shithub: opus

Download patch

ref: cf874373c0df91a429d9e6ead701fecd15214f20
parent: 20e4c6a611d05fb46607c5ef137d8d80033c748d
author: Jean-Marc Valin <[email protected]>
date: Tue Dec 21 20:03:43 EST 2010

Minor tweaks to the max allocation

--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -1028,9 +1028,6 @@
       } else {
          b = 0;
       }
-      /* Prevents ridiculous bit depths */
-      if (b > C*16*N<<BITRES)
-         b = C*16*N<<BITRES;
 
       if (M*eBands[i]-N >= M*eBands[start] && (update_lowband || lowband_offset==-1))
             lowband_offset = M*eBands[i];
--- a/libcelt/rate.c
+++ b/libcelt/rate.c
@@ -328,9 +328,9 @@
          if (C*ebits[j] > (bits[j]>>BITRES))
             ebits[j] = bits[j] >> stereo >> BITRES;
 
-         /* More than 7 is useless because that's about as far as PVQ can go */
-         if (ebits[j]>7)
-            ebits[j]=7;
+         /* More than 8 is useless because that's about as far as PVQ can go */
+         if (ebits[j]>8)
+            ebits[j]=8;
 
       } else {
          /* For N=1, all bits go to fine energy except for a single sign bit */