[FFmpeg-soc] [soc]: r371 - in rv40: rv40.c rv40data.h

kostya subversion at mplayerhq.hu
Wed Jul 11 09:11:57 CEST 2007


Author: kostya
Date: Wed Jul 11 09:11:57 2007
New Revision: 371

Log:
Use correct table for dequantizing (but quantizer selection is still wrong) 



Modified:
   rv40/rv40.c
   rv40/rv40data.h

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Wed Jul 11 09:11:57 2007
@@ -581,7 +581,7 @@ static int rv40_decode_macroblock(RV40De
         x = (i & 1) << 2;
         y = (i & 2) << 4;
         rv40_decode_block(s->block[i>>2] + x + y, gb, &intra_vlcs[2], luma_vlc, 0);
-        rv40_dequant4x4(s->block[i>>2] + x + y, r->quant, rv40_luma_quant[0][r->quant],rv40_luma_quant[0][r->quant]);
+        rv40_dequant4x4(s->block[i>>2] + x + y, r->quant, rv40_qscale_tab[r->quant],rv40_qscale_tab[r->quant]);
 
         s->block[i>>2][x+y] += 256;
         rv40_intra_inv_transform(s->block[i>>2], x+y);
@@ -591,7 +591,7 @@ static int rv40_decode_macroblock(RV40De
         x = (i & 1) << 2;
         y = (i & 2) << 4;
         rv40_decode_block(s->block[i>>2] + x + y, gb, &intra_vlcs[2], chroma_vlc, 1);
-        rv40_dequant4x4(s->block[i>>2] + x + y, r->quant, rv40_chroma_quant[0][r->quant],rv40_chroma_quant[1][r->quant]);
+        rv40_dequant4x4(s->block[i>>2] + x + y, r->quant, rv40_qscale_tab[r->quant],rv40_qscale_tab[r->quant]);
 
         s->block[i>>2][x+y] += 256;
         rv40_intra_inv_transform(s->block[i>>2], x+y);

Modified: rv40/rv40data.h
==============================================================================
--- rv40/rv40data.h	(original)
+++ rv40/rv40data.h	Wed Jul 11 09:11:57 2007
@@ -126,4 +126,15 @@ static uint8_t rv40_chroma_quant[2][32] 
  {  0,  0,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13,
    14, 15, 15, 16, 17, 18, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23 }
 };
+
+/**
+ * This table is used for dequantizing
+ */
+static uint16_t rv40_qscale_tab[32] = {
+  60,   67,   76,   85,   96,  108,  121,  136,
+ 152,  171,  192,  216,  242,  272,  305,  341,
+ 383,  432,  481,  544,  606,  683,  767,  854,
+ 963, 1074, 1212, 1392, 1566, 1708, 1978, 2211
+};
+
 #endif /* RV40DATA_H */



More information about the FFmpeg-soc mailing list