[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.64,1.65 mp_image.h,1.19,1.20 vd_libmpeg2.c,1.15,1.16

Michael Niedermayer michael at mplayerhq.hu
Tue Oct 29 12:26:29 CET 2002


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

Modified Files:
	vd_ffmpeg.c mp_image.h vd_libmpeg2.c 
Log Message:
passing picture_type (might be usefull for postprocessing)


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- vd_ffmpeg.c	27 Oct 2002 02:54:46 -0000	1.64
+++ vd_ffmpeg.c	29 Oct 2002 11:26:26 -0000	1.65
@@ -630,6 +630,17 @@
     mpi->qscale=&quant_store[0][0];
     mpi->qstride=MBC+1;
 #endif
+
+    {
+        static int last_non_b_type= 0;
+
+	if(avctx->pict_type == B_TYPE)
+	    mpi->pict_type= B_TYPE;
+	else{
+	    mpi->pict_type= last_non_b_type;
+	    last_non_b_type= avctx->pict_type;
+	}
+    }
     
     return mpi;
 }

Index: mp_image.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/mp_image.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- mp_image.h	5 Aug 2002 01:06:25 -0000	1.19
+++ mp_image.h	29 Oct 2002 11:26:26 -0000	1.20
@@ -75,6 +75,7 @@
     unsigned int stride[MP_MAX_PLANES];
     int* qscale;
     int qstride;
+    int pict_type; // 0->unknown, 1->I, 2->P, 3->B
     int num_planes;
     /* these are only used by planar formats Y,U(Cb),V(Cr) */
     int chroma_width;

Index: vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_libmpeg2.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- vd_libmpeg2.c	16 Oct 2002 19:26:30 -0000	1.15
+++ vd_libmpeg2.c	29 Oct 2002 11:26:26 -0000	1.16
@@ -290,5 +290,16 @@
 	if(ret) mpi=ret;
 //    }
 
+    if(mpi){
+        static int last_non_b_type= 0;
+
+	if(picture->picture_coding_type == B_TYPE)
+	    mpi->pict_type= B_TYPE;
+	else{
+	    mpi->pict_type= last_non_b_type;
+	    last_non_b_type= picture->picture_coding_type;
+	}
+    }
+
     return mpi;
 }




More information about the MPlayer-cvslog mailing list