[Mplayer-cvslog] CVS: main/libmpcodecs vf.c,1.16,1.17

Arpi of Ize arpi at mplayerhq.hu
Wed Apr 17 23:50:27 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv6335

Modified Files:
	vf.c 
Log Message:
align yuv 4:2:0 y position by 2

Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- vf.c	17 Apr 2002 19:51:24 -0000	1.16
+++ vf.c	17 Apr 2002 21:50:25 -0000	1.17
@@ -44,19 +44,20 @@
 void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h){
     int y;
     if(mpi->flags&MP_IMGFLAG_PLANAR){
+	y0&=~1;h+=h&1;
 	if(x0==0 && w==mpi->width){
 	    // full width clear:
 	    memset(mpi->planes[0]+mpi->stride[0]*y0,0,mpi->stride[0]*h);
 	    memset(mpi->planes[1]+mpi->stride[1]*(y0>>1),128,mpi->stride[1]*(h>>1));
 	    memset(mpi->planes[2]+mpi->stride[2]*(y0>>1),128,mpi->stride[2]*(h>>1));
-	    return;
-	}
+	} else
 	for(y=y0;y<y0+h;y+=2){
 	    memset(mpi->planes[0]+x0+mpi->stride[0]*y,0,w);
 	    memset(mpi->planes[0]+x0+mpi->stride[0]*(y+1),0,w);
 	    memset(mpi->planes[1]+(x0>>1)+mpi->stride[1]*(y>>1),128,(w>>1));
 	    memset(mpi->planes[2]+(x0>>1)+mpi->stride[2]*(y>>1),128,(w>>1));
 	}
+	return;
     }
     // packed:
     for(y=y0;y<y0+h;y++){




More information about the MPlayer-cvslog mailing list