[Mplayer-cvslog] CVS: main/libmpcodecs vf.c,1.73,1.74

Michael Niedermayer CVS michael at mplayerhq.hu
Wed Mar 5 11:23:55 CET 2003


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

Modified Files:
	vf.c 
Log Message:
hmm found this in my local tree ;)
seems to fix chroma w/h if %2!=0 ??


Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- vf.c	5 Mar 2003 10:20:14 -0000	1.73
+++ vf.c	5 Mar 2003 10:23:52 -0000	1.74
@@ -210,8 +210,8 @@
 		printf("vf.c: have to REALLOCATE buffer memory :(\n");
 	    }
 	} else {
-	    mpi->width=w2; mpi->chroma_width=w2>>mpi->chroma_x_shift;
-	    mpi->height=h; mpi->chroma_height=h>>mpi->chroma_y_shift;
+	    mpi->width=w2; mpi->chroma_width=(w2 + (1<<mpi->chroma_x_shift) - 1)>>mpi->chroma_x_shift;
+	    mpi->height=h; mpi->chroma_height=(h + (1<<mpi->chroma_y_shift) - 1)>>mpi->chroma_y_shift;
 	}
     }
     if(!mpi->bpp) mp_image_setfmt(mpi,outfmt);
@@ -236,7 +236,7 @@
 //		  printf("query -> 0x%X    \n",flags);
 		  if(flags&VFCAP_ACCEPT_STRIDE){
 	              mpi->width=w2;
-		      mpi->chroma_width=w2>>mpi->chroma_x_shift;
+		      mpi->chroma_width=(w2 + (1<<mpi->chroma_x_shift) - 1)>>mpi->chroma_x_shift;
 		  }
 	      }
 	  }



More information about the MPlayer-cvslog mailing list