changeset 7984:a57c1fc0c2fc

change qscale type to int8 and fix qscale ordering
author michael
date Wed, 30 Oct 2002 20:50:33 +0000
parents 8344414c59cf
children 1ab37da5b1da
files libmpcodecs/mp_image.h libmpcodecs/vd_ffmpeg.c libmpeg2/mpeg2_internal.h postproc/postprocess.c postproc/postprocess.h postproc/postprocess_template.c
diffstat 6 files changed, 14 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/mp_image.h	Wed Oct 30 19:26:05 2002 +0000
+++ b/libmpcodecs/mp_image.h	Wed Oct 30 20:50:33 2002 +0000
@@ -73,7 +73,7 @@
     int x,y,w,h;  // visible dimensions
     unsigned char* planes[MP_MAX_PLANES];
     unsigned int stride[MP_MAX_PLANES];
-    int* qscale;
+    char * qscale;
     int qstride;
     int pict_type; // 0->unknown, 1->I, 2->P, 3->B
     int num_planes;
--- a/libmpcodecs/vd_ffmpeg.c	Wed Oct 30 19:26:05 2002 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Wed Oct 30 20:50:33 2002 +0000
@@ -619,16 +619,9 @@
     }
     
 /* to comfirm with newer lavc style */
-#if !defined(FF_POSTPROCESS) && (LIBAVCODEC_BUILD > 4612)
-    mpi->qscale=avctx->quant_store;
-#if LIBAVCODEC_BUILD > 4613
+#if LIBAVCODEC_BUILD >= 4633
+    mpi->qscale=avctx->display_qscale_table;
     mpi->qstride=avctx->qstride;
-#else
-    mpi->qstride=MBC+1;
-#endif
-#elif defined(FF_POSTPROCESS)
-    mpi->qscale=&quant_store[0][0];
-    mpi->qstride=MBC+1;
 #endif
 
     {
--- a/libmpeg2/mpeg2_internal.h	Wed Oct 30 19:26:05 2002 +0000
+++ b/libmpeg2/mpeg2_internal.h	Wed Oct 30 20:50:33 2002 +0000
@@ -59,7 +59,7 @@
 #ifdef MPEG12_POSTPROC
 #define MPEG2_MBC 120
 #define MPEG2_MBR 72
-    int quant_store[MPEG2_MBR+1][MPEG2_MBC+1];
+    int8_t quant_store[MPEG2_MBR+1][MPEG2_MBC+1];
 #endif
 
 //    int slice;
--- a/postproc/postprocess.c	Wed Oct 30 19:26:05 2002 +0000
+++ b/postproc/postprocess.c	Wed Oct 30 20:50:33 2002 +0000
@@ -535,7 +535,7 @@
 
 /* -pp Command line Help
 */
-char *postproc_help=
+char *pp_help=
 "-npp <filterName>[:<option>[:<option>...]][,[-]<filterName>[:<option>...]]...\n"
 "long form example:\n"
 "-npp vdeblock:autoq,hdeblock:autoq,linblenddeint	-npp default,-vdeblock\n"
--- a/postproc/postprocess.h	Wed Oct 30 19:26:05 2002 +0000
+++ b/postproc/postprocess.h	Wed Oct 30 20:50:33 2002 +0000
@@ -62,9 +62,11 @@
 //filters on
 //#define COMPILE_TIME_MODE 0x77
 
-#define QP_STORE_T int
+#define QP_STORE_T int8_t
 
-char *pp_help;
+typedef void pp_context;
+
+extern char *pp_help;
 
 //FIXME decide if this should be exported at all
 typedef struct PPMode{
@@ -88,13 +90,13 @@
                  uint8_t * dst[3], int dstStride[3],
                  int horizontalSize, int verticalSize,
                  QP_STORE_T *QP_store,  int QP_stride,
-		 PPMode *mode, void *ppContext, int pict_type);
+		 PPMode *mode, pp_context *ppContext, int pict_type);
 
 // name is the stuff after "-pp" on the command line
 PPMode pp_get_mode_by_name_and_quality(char *name, int quality);
 
-void *pp_get_context(int width, int height);
-void pp_free_context(void *ppContext);
+pp_context *pp_get_context(int width, int height);
+void pp_free_context(pp_context *ppContext);
 
 int pp_init(int cpuCaps);
 #define PP_CPU_CAPS_MMX   0x80000000
--- a/postproc/postprocess_template.c	Wed Oct 30 19:26:05 2002 +0000
+++ b/postproc/postprocess_template.c	Wed Oct 30 20:50:33 2002 +0000
@@ -2835,8 +2835,8 @@
 		uint8_t *tempBlock1= c.tempBlocks;
 		uint8_t *tempBlock2= c.tempBlocks + 8;
 #endif
-		int *QPptr= isColor ? &QPs[(y>>3)*QPStride] :&QPs[(y>>4)*QPStride];
-		int *nonBQPptr= isColor ? &c.nonBQPTable[(y>>3)*mbWidth] :&c.nonBQPTable[(y>>4)*mbWidth];
+		int8_t *QPptr= isColor ? &QPs[(y>>3)*QPStride] :&QPs[(y>>4)*QPStride];
+		int8_t *nonBQPptr= isColor ? &c.nonBQPTable[(y>>3)*mbWidth] :&c.nonBQPTable[(y>>4)*mbWidth];
 		int QP=0;
 		/* can we mess with a 8x16 block from srcBlock/dstBlock downwards and 1 line upwards
 		   if not than use a temporary buffer */