shithub: opus

Download patch

ref: 8f50b0f7569b19da3fa097b0e5d785796cafbeaa
parent: 1887401cca6b1bdf8ab892a3fd9038e281a7de8e
author: Jean-Marc Valin <[email protected]>
date: Wed Sep 1 07:00:48 EDT 2010

Making the allocation matrix a bit smoother

--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -92,6 +92,7 @@
        0,  1,  2,  3,  4,  5,  6,  7,  8, 10, 12, 14, 16, 20, 24, 28, 34, 40, 48, 60, 78, 100
 };
 
+/* Bit allocation table in units of 1/32 bit/sample (0.1875 dB SNR) */
 static const unsigned char band_allocation[] = {
 /*0  200 400 600 800  1k 1.2 1.4 1.6  2k 2.4 2.8 3.2  4k 4.8 5.6 6.8  8k 9.6 12k 15.6 */
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -98,9 +99,9 @@
  40, 40, 56, 44, 40, 32, 24, 20, 40, 48, 52, 44, 32, 16,  8,  4,  0,  0,  0,  0,  0,
  52, 40, 68, 64, 56, 48, 40, 32, 48, 56, 56, 48, 36, 20, 12,  8,  8,  4,  0,  0,  0,
  68, 84, 92,104, 96, 80, 68, 64, 68, 72, 64, 56, 44, 24, 12,  8,  8,  4,  4,  0,  0,
- 84, 84,144,128,112, 96, 92, 92, 88, 72, 72, 56, 44, 28, 20, 20, 20, 12, 12,  0,  0,
-124,140,160,128,120,112,104,104,100, 96, 76, 60, 60, 52, 36, 36, 32, 28, 20,  8,  0,
-168,184,184,148,140,136,132,128,136,140,128,124,108, 96, 92, 92, 72, 56, 44, 28,  0,
+100,100,110,110,100, 96, 90, 88, 84, 76, 68, 60, 44, 28, 20, 20, 20, 12, 12,  0,  0,
+130,130,130,128,120,112,104,104,100, 96, 76, 68, 60, 52, 36, 36, 32, 28, 20,  8,  0,
+168,168,168,148,140,136,135,130,136,140,128,124,108, 96, 88, 83, 72, 56, 44, 28,  2,
 184,196,184,184,168,172,176,188,200,208,204,192,156,128,108, 96, 88, 76, 68, 44, 20,
 212,212,196,192,220,255,255,255,255,255,255,255,224,188,164,148,124, 96, 80, 64, 40,
 255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,220,188,144,104, 84, 60,