[FFmpeg-soc] [soc]: r1344 - rv40/rv40.c

kostya subversion at mplayerhq.hu
Wed Sep 12 15:22:28 CEST 2007


Author: kostya
Date: Wed Sep 12 15:22:27 2007
New Revision: 1344

Log:
Luma DC quantizer differs for RV30 and RV40

Modified:
   rv40/rv40.c

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Wed Sep 12 15:22:27 2007
@@ -1626,6 +1626,7 @@ static int rv40_decode_macroblock(RV40De
     int cbp, cbp2;
     int i, blknum, blkoff;
     DCTELEM block16[64];
+    int luma_dc_quant;
 
     // calculate which neighbours are available
     memset(r->avail, 0, sizeof(r->avail));
@@ -1643,10 +1644,11 @@ static int rv40_decode_macroblock(RV40De
     if(cbp == -1)
         return -1;
 
+    luma_dc_quant = r->rv30 ? rv30_luma_dc_quant[r->quant] : rv40_luma_quant[r->si.type>>1][r->quant];
     if(r->is16){
         memset(block16, 0, sizeof(block16));
         rv40_decode_block(block16, gb, r->cur_vlcs, 3, 0);
-        rv40_dequant4x4_16x16(block16, 0, rv40_qscale_tab[rv40_luma_quant[r->si.type>>1][r->quant]],rv40_qscale_tab[r->quant]);
+        rv40_dequant4x4_16x16(block16, 0, rv40_qscale_tab[luma_dc_quant],rv40_qscale_tab[r->quant]);
         rv40_intra_inv_transform_noround(block16, 0);
     }
 
@@ -1657,7 +1659,7 @@ static int rv40_decode_macroblock(RV40De
         if(cbp & 1)
             rv40_decode_block(s->block[blknum] + blkoff, gb, r->cur_vlcs, r->luma_vlc, 0);
         if((cbp & 1) || r->is16){
-            rv40_dequant4x4(s->block[blknum], blkoff, rv40_qscale_tab[rv40_luma_quant[r->si.type>>1][r->quant]],rv40_qscale_tab[r->quant]);
+            rv40_dequant4x4(s->block[blknum], blkoff, rv40_qscale_tab[luma_dc_quant],rv40_qscale_tab[r->quant]);
             if(r->is16) //FIXME: optimize
                 s->block[blknum][blkoff] = block16[(i & 3) | ((i & 0xC) << 1)];
             rv40_intra_inv_transform(s->block[blknum], blkoff);



More information about the FFmpeg-soc mailing list