[SCM] libav/experimental: remove permutation done to quant tables and then undone during idct move permutation from idct to unpack_vlcs

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:44:02 UTC 2013


The following commit has been merged in the experimental branch:
commit ea191e08d6cefad09bfb1e6d9317874dfd4080be
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue May 17 09:18:49 2005 +0000

    remove permutation done to quant tables and then undone during idct
    move permutation from idct to unpack_vlcs
    
    Originally committed as revision 4256 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 8b9f7c8..7923229 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -886,7 +886,7 @@ static void init_dequantizer(Vp3DecodeContext *s)
      * the dequantization phase */
     for (i = 1; i < 64; i++) {
 
-        j = zigzag_index[i];
+        j = i;
 
         s->intra_y_dequant[j] = s->coded_intra_y_dequant[i] * ac_scale_factor / 100;
         if (s->intra_y_dequant[j] < MIN_DEQUANT_VAL)
@@ -1659,7 +1659,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
         if (!eob_run) {
             fragment->coeff_count += zero_run;
             if (fragment->coeff_count < 64)
-                fragment->coeffs[fragment->coeff_count++] = coeff;
+                fragment->coeffs[dezigzag_index[fragment->coeff_count++]] = coeff;
             debug_vlc(" fragment %d coeff = %d\n",
                 s->coded_fragment_list[i], fragment->coeffs[coeff_index]);
         } else {
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index 9c9530d..8cf77a2 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -53,11 +53,10 @@ void vp3_idct_c(int16_t *input_data, int16_t *dequant_matrix,
     int32_t t1, t2;
 
     int i, j;
-
+    
     /* de-zigzag and dequantize */
     for (i = 0; i < coeff_count; i++) {
-        j = dezigzag_index[i];
-        dequantized_data[j] = dequant_matrix[i] * input_data[i];
+        dequantized_data[i] = dequant_matrix[i] * input_data[i];
     }
 
     /* Inverse DCT on the rows now */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list