changeset 13123:34df725814e8

postproc fix
author henry
date Tue, 24 Aug 2004 20:23:11 +0000
parents fcce0023bf55
children d830a4d6ffa6
files libmpeg2/header.c libmpeg2/mpeg2_internal.h libmpeg2/slice.c
diffstat 3 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpeg2/header.c	Tue Aug 24 19:36:17 2004 +0000
+++ b/libmpeg2/header.c	Tue Aug 24 20:23:11 2004 +0000
@@ -803,7 +803,7 @@
 	mpeg2dec->scaled[index] = mpeg2dec->q_scale_type;
 	for (i = 0; i < 32; i++) {
 	    k = mpeg2dec->q_scale_type ? non_linear_scale[i] : (i << 1);
-	    decoder->quantizer_scale = k;
+	    decoder->quantizer_scales[i] = k;
 	    for (j = 0; j < 64; j++)
 		decoder->quantizer_prescale[index][i][j] =
 		    k * mpeg2dec->quantizer_matrix[index][j];
--- a/libmpeg2/mpeg2_internal.h	Tue Aug 24 19:36:17 2004 +0000
+++ b/libmpeg2/mpeg2_internal.h	Tue Aug 24 20:23:11 2004 +0000
@@ -146,6 +146,7 @@
     int mpeg1;
 
     /* for MPlayer: */
+    int quantizer_scales[32];
     int quantizer_scale;
     char* quant_store;
     int quant_stride;
--- a/libmpeg2/slice.c	Tue Aug 24 19:36:17 2004 +0000
+++ b/libmpeg2/slice.c	Tue Aug 24 20:23:11 2004 +0000
@@ -142,6 +142,7 @@
 
     quantizer_scale_code = UBITS (bit_buf, 5);
     DUMPBITS (bit_buf, bits, 5);
+    decoder->quantizer_scale = decoder->quantizer_scales[quantizer_scale_code];
 
     decoder->quantizer_matrix[0] =
 	decoder->quantizer_prescale[0][quantizer_scale_code];