[Mplayer-cvslog] CVS: main/libmpcodecs vd_libmpeg2.c,1.11,1.12

Arpi of Ize arpi at mplayerhq.hu
Thu Apr 18 17:03:11 CEST 2002


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

Modified Files:
	vd_libmpeg2.c 
Log Message:
slices+field pictures fixed, initial sig11 workaround

Index: vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_libmpeg2.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vd_libmpeg2.c	14 Apr 2002 01:21:13 -0000	1.11
+++ vd_libmpeg2.c	18 Apr 2002 15:03:08 -0000	1.12
@@ -73,6 +73,8 @@
 
     picture->pp_options=divx_quality;
     
+    memset(frames,0,3*sizeof(vo_frame_t));
+    
     picture->forward_reference_frame=&frames[0];
     picture->backward_reference_frame=&frames[1];
     picture->temp_frame=&frames[2];
@@ -154,7 +156,9 @@
 		mp_image_t* mpi;
 		int flags;
 		if (picture->picture_coding_type == B_TYPE){
-		    flags=(!framedrop && vd_use_slices)?MP_IMGFLAG_DRAW_CALLBACK:0;
+		    flags=(!framedrop && vd_use_slices && 
+			picture->picture_structure==FRAME_PICTURE) ?
+			    MP_IMGFLAG_DRAW_CALLBACK:0;
 		    picture->display_frame=
 		    picture->current_frame = picture->temp_frame;
 		} else {
@@ -179,6 +183,20 @@
 		picture->current_frame->base[1]=mpi->planes[1];
 		picture->current_frame->base[2]=mpi->planes[2];
 		picture->current_frame->mpi=mpi;	// tricky!
+#if 1
+		if(!picture->forward_reference_frame->base[0]){
+		    // workaround for sig11
+		    picture->forward_reference_frame->base[0]=mpi->planes[0];
+		    picture->forward_reference_frame->base[1]=mpi->planes[1];
+		    picture->forward_reference_frame->base[2]=mpi->planes[2];
+		}
+		if(!picture->backward_reference_frame->base[0]){
+		    // workaround for sig11
+		    picture->backward_reference_frame->base[0]=mpi->planes[0];
+		    picture->backward_reference_frame->base[1]=mpi->planes[1];
+		    picture->backward_reference_frame->base[2]=mpi->planes[2];
+		}
+#endif
 #ifdef MPEG12_POSTPROC
 		mpi->qscale=&picture->current_frame->quant_store[1][1];
 		mpi->qstride=(MPEG2_MBC+1);




More information about the MPlayer-cvslog mailing list