Turns out maxK and maxM were also inverted in fits_in64()
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 10 Jun 2008 13:46:12 +0000 (23:46 +1000)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 10 Jun 2008 13:46:12 +0000 (23:46 +1000)
libcelt/cwrs.c

index a62cd04..3cdfdfe 100644 (file)
@@ -119,15 +119,15 @@ int fits_in32(int _n, int _m)
 int fits_in64(int _n, int _m)
 {
    static const celt_int16_t maxN[28] = {
-      255, 255, 255, 255, 255, 255, 255, 255, 
-      255, 255, 245, 166, 122,  94,  77,  64, 
-       56,  49,  44,  40,  37,  34,  32,  30,
-       29,  27,  26,  25};
-   static const celt_int16_t maxM[28] = {
       255, 255, 255, 255, 255, 255, 255, 255,
       255, 255, 178, 129, 100,  81,  68,  58,
        51,  46,  42,  38,  36,  33,  31,  30,
        28, 27, 26, 25};
+   static const celt_int16_t maxM[28] = {
+      255, 255, 255, 255, 255, 255, 255, 255, 
+      255, 255, 245, 166, 122,  94,  77,  64, 
+       56,  49,  44,  40,  37,  34,  32,  30,
+       29,  27,  26,  25};
    if (_n>=27)
    {
       if (_m>=27)