shithub: opus

Download patch

ref: 52824c7931456beacb4354f2e3ad2a638fcb1d60
parent: 2de66199b2fc6ac8966d624bd8ab4c325d66ba8a
author: Jean-Marc Valin <[email protected]>
date: Tue May 6 14:01:17 EDT 2008

Some tuning improvements, more to come

--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -78,7 +78,7 @@
 #ifdef STDIN_TUNING
 int MIN_BINS;
 #else
-#define MIN_BINS 4
+#define MIN_BINS 3
 #endif
 
 /* Defining 25 critical bands for the full 0-20 kHz audio bandwidth
@@ -104,16 +104,16 @@
 #define BITALLOC_SIZE 10
 static const int band_allocation[BARK_BANDS*BITALLOC_SIZE] = 
    {  2,  2,  1,  1,  2,  2,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-      2,  2,  2,  1,  2,  2,  2,  2,  2,  1,  2,  2,  5,  5,  7,  7,  7,  5,  4,  0,  0,  0,  0,  0,  0,
-      2,  2,  2,  2,  3,  2,  2,  2,  2,  2,  3,  2,  6,  6,  8,  8,  8,  6,  5,  4,  0,  0,  0,  0,  0,
-      3,  2,  2,  2,  3,  3,  2,  3,  2,  2,  4,  3,  7,  7,  9,  9,  9,  7,  6,  5,  5,  5,  0,  0,  0,
-      3,  3,  2,  2,  3,  3,  3,  3,  3,  2,  4,  4,  9,  9, 10, 10, 10,  9,  6,  5,  5,  5,  5,  0,  0,
-      3,  3,  2,  2,  3,  3,  3,  3,  3,  3,  4,  4, 10, 10, 12, 12, 12, 10, 10, 10, 11, 10, 10,  5,  5,
-      4,  4,  4,  4,  5,  5,  5,  5,  5,  4,  7,  7, 14, 13, 13, 13, 13, 13, 15, 16, 17, 18, 20, 18, 11,
-      7,  7,  6,  6,  9,  8,  8,  8,  8,  8, 11, 11, 20, 18, 19, 19, 25, 22, 25, 30, 30, 35, 35, 35, 35,
-      8,  8,  8,  8, 10, 10, 10, 10,  9,  9, 19, 18, 25, 24, 23, 21, 29, 27, 35, 40, 42, 50, 59, 54, 51,
-     11, 11, 10, 10, 14, 13, 13, 13, 13, 12, 19, 18, 35, 34, 33, 31, 39, 37, 45, 50, 52, 60, 60, 60, 60,
-   };
+      2,  2,  2,  1,  2,  2,  2,  2,  2,  1,  2,  2,  4,  5,  7,  7,  7,  5,  4,  0,  0,  0,  0,  0,  0,
+      2,  2,  2,  2,  3,  2,  2,  2,  2,  2,  3,  3,  5,  6,  8,  8,  8,  6,  5,  4,  0,  0,  0,  0,  0,
+      3,  2,  2,  2,  3,  3,  2,  3,  2,  3,  4,  4,  6,  7,  9,  9,  9,  7,  6,  5,  5,  5,  0,  0,  0,
+      3,  3,  2,  2,  3,  3,  3,  3,  3,  4,  4,  5,  7,  9, 10, 10, 10,  9,  6,  5,  5,  5,  5,  1,  0,
+      4,  4,  3,  3,  3,  3,  3,  3,  3,  4,  5,  6,  7,  9, 10, 10, 10,  9,  9,  8, 11, 10, 10,  1,  1,
+      6,  6,  5,  5,  5,  5,  5,  5,  5,  6,  7,  8, 10, 12, 13, 13, 13, 12, 12, 12, 18, 18, 16, 10,  1,
+      7,  7,  6,  6,  7,  7,  7,  7,  8,  9, 10, 11, 13, 18, 20, 22, 25, 22, 25, 30, 30, 35, 35, 35, 15,
+      9,  9,  9,  9, 10, 10, 10, 10, 11, 12, 18, 22, 25, 24, 23, 27, 29, 27, 35, 40, 42, 50, 59, 54, 31,
+     16, 16, 16, 16, 16, 18, 20, 22, 24, 28, 30, 32, 35, 34, 33, 37, 39, 40, 45, 50, 52, 60, 60, 60, 60,
+};
 #endif
 
 static celt_int16_t *compute_ebands(celt_int32_t Fs, int frame_size, int *nbEBands)