[FFmpeg-soc] [soc]: r3860 - in dirac/libavcodec: dirac.h diracdec.c

conrad subversion at mplayerhq.hu
Thu Dec 4 22:10:27 CET 2008


Author: conrad
Date: Thu Dec  4 22:10:27 2008
New Revision: 3860

Log:
Make coeff_quant_offset not depend on DiracContext


Modified:
   dirac/libavcodec/dirac.h
   dirac/libavcodec/diracdec.c

Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h	(original)
+++ dirac/libavcodec/dirac.h	Thu Dec  4 22:10:27 2008
@@ -286,12 +286,12 @@ static unsigned int inline coeff_quant_f
     return 0;
 }
 
-static unsigned int inline coeff_quant_offset(DiracContext *s, unsigned int quant)
+static unsigned int inline coeff_quant_offset(int is_intra, unsigned int quant)
 {
     if (quant == 0)
         return 1;
 
-    if (s->refs == 0) {
+    if (is_intra) {
         if (quant == 1)
             return 2;
         else

Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c	(original)
+++ dirac/libavcodec/diracdec.c	Thu Dec  4 22:10:27 2008
@@ -201,7 +201,7 @@ static int subband(DiracContext *s, int1
     } else {
         quant = svq3_get_ue_golomb(gb);
         qfactor = coeff_quant_factor(quant);
-        qoffset = coeff_quant_offset(s, quant) + 2;
+        qoffset = coeff_quant_offset(s->refs == 0, quant) + 2;
 
         dirac_arith_init(&s->arith, gb, length);
 
@@ -239,7 +239,7 @@ static int subband_dc(DiracContext *s, i
     } else {
         quant = svq3_get_ue_golomb(gb);
         qfactor = coeff_quant_factor(quant);
-        qoffset = coeff_quant_offset(s, quant) + 2;
+        qoffset = coeff_quant_offset(s->refs == 0, quant) + 2;
 
         dirac_arith_init(&s->arith, gb, length);
 



More information about the FFmpeg-soc mailing list