[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.30,1.31

Michael Niedermayer michael at mplayerhq.hu
Mon Jul 15 23:33:55 CEST 2002


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

Modified Files:
	vd_ffmpeg.c 
Log Message:
svq1 direct rendering


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- vd_ffmpeg.c	15 Jul 2002 14:30:12 -0000	1.30
+++ vd_ffmpeg.c	15 Jul 2002 21:33:46 -0000	1.31
@@ -251,7 +251,11 @@
 //    int flags= MP_IMGFLAG_ALIGNED_STRIDE;
     int flags= MP_IMGFLAG_ACCEPT_STRIDE;
     int type= MP_IMGTYPE_IPB;
-    
+    int align=15;
+
+    if(avctx->pix_fmt == PIX_FMT_YUV410P)
+        align=63; //yes seriously, its really needed (16x16 chroma blocks in SVQ1 -> 64x64)
+
     if(init_vo(sh)<0){
         printf("init_vo failed\n");
         return;
@@ -273,8 +277,7 @@
     mp_msg(MSGT_DECVIDEO,MSGL_DBG2, type== MP_IMGTYPE_IPB ? "using IPB\n" : "using IP\n");
 
     mpi= mpcodecs_get_image(sh,type, flags,
-// MN: arpi, is the next line ok? (i doubt it), its needed for height%16!=0 files
-			(width+15)&(~15), (height+15)&(~15));
+			(width+align)&(~align), (height+align)&(~align));
 
     // ok, lets see what did we get:
     if(  mpi->flags&MP_IMGFLAG_DRAW_CALLBACK &&
@@ -338,7 +341,7 @@
 	     &got_picture, data, len);
     if(ret<0) mp_msg(MSGT_DECVIDEO,MSGL_WARN, "Error while decoding frame!\n");
     if(!got_picture) return NULL;	// skipped image
-    
+
     if(init_vo(sh)<0) return NULL;
 
 #if LIBAVCODEC_BUILD > 4615




More information about the MPlayer-cvslog mailing list