[FFmpeg-soc] [soc]: r3857 - dirac/libavcodec/dirac.h

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


Author: conrad
Date: Thu Dec  4 22:10:21 2008
New Revision: 3857

Log:
quant is unsigned


Modified:
   dirac/libavcodec/dirac.h

Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h	(original)
+++ dirac/libavcodec/dirac.h	Thu Dec  4 22:10:21 2008
@@ -267,10 +267,11 @@ static int inline subband_height(DiracCo
     return s->padded_height >> (s->decoding.wavelet_depth - level + 1);
 }
 
-static int inline coeff_quant_factor(int quant)
+// this assumes a max quantizer of 119 (larger would overflow 32 bits),
+// which schoedinger and dirac-research also assume
+static unsigned int inline coeff_quant_factor(unsigned int quant)
 {
     uint64_t base;
-    quant = FFMAX(quant, 0);
     base = 1 << (quant / 4);
     switch(quant & 3) {
     case 0:
@@ -285,7 +286,7 @@ static int inline coeff_quant_factor(int
     return 0; /* XXX: should never be reached */
 }
 
-static int inline coeff_quant_offset(DiracContext *s, int quant)
+static unsigned int inline coeff_quant_offset(DiracContext *s, unsigned int quant)
 {
     if (quant == 0)
         return 1;



More information about the FFmpeg-soc mailing list