[Mplayer-cvslog] CVS: main/libmpcodecs vf_down3dright.c,1.2,1.3
Richard Felker CVS
rfelker at mplayerhq.hu
Sat May 3 06:21:11 CEST 2003
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv12525/libmpcodecs
Modified Files:
vf_down3dright.c
Log Message:
fixed a 10l (undefined behavior) and made the other parameters configurable
(it's probably nice not to have to throw away half the information...)
Index: vf_down3dright.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_down3dright.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_down3dright.c 15 Mar 2003 18:01:02 -0000 1.2
+++ vf_down3dright.c 3 May 2003 04:20:44 -0000 1.3
@@ -53,10 +53,14 @@
unsigned char* sR = fromR;
if (p->scalew == 1) {
- for (j = dd; j > 0; j--)
- *t++ = (*sL++ + *sL++) / 2;
- for (j = dd ; j > 0; j--)
- *t++ = (*sR++ + *sR++) / 2;
+ for (j = dd; j > 0; j--) {
+ *t++ = (sL[0] + sL[1]) / 2;
+ sL+=2;
+ }
+ for (j = dd ; j > 0; j--) {
+ *t++ = (sR[0] + sR[1]) / 2;
+ sR+=2;
+ }
} else {
for (j = dd * 2 ; j > 0; j--)
*t++ = *sL++;
@@ -129,7 +133,7 @@
vf->priv->skipline = 0;
vf->priv->scalew = 1;
vf->priv->scaleh = 2;
- if (args) sscanf(args, "%d", &vf->priv->skipline);
+ if (args) sscanf(args, "%d:%d:%d", &vf->priv->skipline, &vf->priv->scalew, &vf->priv->scaleh);
return 1;
}
More information about the MPlayer-cvslog
mailing list