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

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


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

Modified Files:
	vf.c 
Log Message:
relaly black packed yuv images

Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf.c	8 Apr 2002 01:26:20 -0000	1.6
+++ vf.c	8 Apr 2002 01:33:29 -0000	1.7
@@ -105,7 +105,13 @@
 	  } else {
 	      if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8;
 	      if(mpi->flags&MP_IMGFLAG_YUV){
-	          // TODO: clear packed yuv plane
+		  int size=mpi->bpp*mpi->width*mpi->height/8/4;
+		  unsigned int* p=mpi->planes[0];
+		  int i;
+		  if(mpi->flags&MP_IMGFLAG_SWAPPED)
+		      for(i=0;i<size;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=0x00800080;
+		  else
+		      for(i=0;i<size;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=0x80008000;
 	      } else
 	          memset(mpi->planes[0],0,mpi->bpp*mpi->width*mpi->height/8);
 	  }




More information about the MPlayer-cvslog mailing list