[FFmpeg-soc] [soc]: r506 - dirac/dirac.c

marco subversion at mplayerhq.hu
Mon Jul 23 17:06:21 CEST 2007


Author: marco
Date: Mon Jul 23 17:06:21 2007
New Revision: 506

Log:
Use 64 bits precision. The spec was wrong one one variable, make sure the code isn't.


Modified:
   dirac/dirac.c

Modified: dirac/dirac.c
==============================================================================
--- dirac/dirac.c	(original)
+++ dirac/dirac.c	Mon Jul 23 17:06:21 2007
@@ -621,8 +621,8 @@ static int inline subband_height(AVCodec
     return s->padded_height >> (s->frame_decoding.wavelet_depth - level + 1);
 }
 
-static int inline coeff_quant_factor(int idx) {
-    int base;
+static int inline coeff_quant_factor(uint64_t idx) {
+    uint64_t base;
     idx = FFMAX(idx, 0);
     base = 1 << (idx / 4);
     switch(idx & 3) {
@@ -631,7 +631,7 @@ static int inline coeff_quant_factor(int
     case 1:
         return (503829 * base + 52958) / 105917;
     case 2:
-        return (665857 * idx + 58854) / 117708;
+        return (665857 * base + 58854) / 117708;
     case 3:
         return (440253 * base + 32722) / 65444;
     }



More information about the FFmpeg-soc mailing list