changeset 9925:420640a0f6d0

passing qscale_type around so the pp code can fix the mpeg2 <<1 thing
author michael
date Fri, 18 Apr 2003 13:18:59 +0000
parents d66ed2c80ddf
children ad429d617df4
files libmpcodecs/mp_image.h libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_libmpeg2.c libmpcodecs/vf_pp.c
diffstat 4 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/mp_image.h	Fri Apr 18 12:16:35 2003 +0000
+++ b/libmpcodecs/mp_image.h	Fri Apr 18 13:18:59 2003 +0000
@@ -76,6 +76,7 @@
     char * qscale;
     int qstride;
     int pict_type; // 0->unknown, 1->I, 2->P, 3->B
+    int qscale_type; // 0->mpeg1/4/h263, 1->mpeg2
     int num_planes;
     /* these are only used by planar formats Y,U(Cb),V(Cr) */
     int chroma_width;
--- a/libmpcodecs/vd_ffmpeg.c	Fri Apr 18 12:16:35 2003 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Fri Apr 18 13:18:59 2003 +0000
@@ -662,6 +662,7 @@
     mpi->qscale =pic->qscale_table;
     mpi->qstride=pic->qstride;
     mpi->pict_type=pic->pict_type;
+    mpi->qscale_type= pic->qscale_type;
     
     return mpi;
 }
--- a/libmpcodecs/vd_libmpeg2.c	Fri Apr 18 12:16:35 2003 +0000
+++ b/libmpcodecs/vd_libmpeg2.c	Fri Apr 18 13:18:59 2003 +0000
@@ -150,6 +150,7 @@
 	    mpeg2dec->decoder.quant_store=mpi->qscale;
 	    mpeg2dec->decoder.quant_stride=mpi->qstride;
 	    mpi->pict_type=type; // 1->I, 2->P, 3->B
+	    mpi->qscale_type= 1;
 #endif
 
 	    if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK &&
--- a/libmpcodecs/vf_pp.c	Fri Apr 18 12:16:35 2003 +0000
+++ b/libmpcodecs/vf_pp.c	Fri Apr 18 13:18:59 2003 +0000
@@ -129,7 +129,7 @@
 		    (mpi->w+7)&(~7),mpi->h,
 		    mpi->qscale, mpi->qstride,
 		    vf->priv->ppMode[ vf->priv->pp ], vf->priv->context,
-		    mpi->pict_type);
+		    mpi->pict_type | (mpi->qscale_type ? PP_PICT_TYPE_QP2 : 0));
     }
     return vf_next_put_image(vf,vf->priv->dmpi);
 }