[Mplayer-cvslog] CVS: main/libmpcodecs vf.c,1.5,1.6

Arpi of Ize arpi at mplayer.dev.hu
Mon Apr 8 03:26:23 CEST 2002


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

Modified Files:
	vf.c 
Log Message:
really black yv12/rgb images (todo: packed yuv)

Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf.c	7 Apr 2002 21:36:39 -0000	1.5
+++ vf.c	8 Apr 2002 01:26:20 -0000	1.6
@@ -98,8 +98,16 @@
 	          mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height;
 	          mpi->planes[1]=mpi->planes[2]+(mpi->width>>1)*(mpi->height>>1);
 	      }
+	      // clear!
+	      memset(mpi->planes[0],0,mpi->stride[0]*mpi->height);
+	      memset(mpi->planes[1],128,mpi->stride[1]*(mpi->height>>1));
+	      memset(mpi->planes[2],128,mpi->stride[2]*(mpi->height>>1));
 	  } else {
 	      if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8;
+	      if(mpi->flags&MP_IMGFLAG_YUV){
+	          // TODO: clear packed yuv plane
+	      } else
+	          memset(mpi->planes[0],0,mpi->bpp*mpi->width*mpi->height/8);
 	  }
 	  mpi->flags|=MP_IMGFLAG_ALLOCATED;
         }




More information about the MPlayer-cvslog mailing list