[FFmpeg-soc] [soc]: r1803 - in aac: aac.c aactab.h

superdump subversion at mplayerhq.hu
Tue Jan 8 21:22:06 CET 2008


Author: superdump
Date: Tue Jan  8 21:22:06 2008
New Revision: 1803

Log:
Split huffman tables into codes and code lengths (bits) and edit calling code
accordingly


Modified:
   aac/aac.c
   aac/aactab.h

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Tue Jan  8 21:22:06 2008
@@ -750,20 +750,21 @@ static int AudioSpecificConfig(AACContex
 
 static int aac_decode_init(AVCodecContext * avccontext) {
     static const struct {
-        const uint16_t (*a)[2];
+        const uint16_t     *a_code;
         const unsigned int s;
+        const uint8_t      *a_bits;
     } tmp[] = {
-        { codebook1 , sizeof codebook1  },
-        { codebook2 , sizeof codebook2  },
-        { codebook3 , sizeof codebook3  },
-        { codebook4 , sizeof codebook4  },
-        { codebook5 , sizeof codebook5  },
-        { codebook6 , sizeof codebook6  },
-        { codebook7 , sizeof codebook7  },
-        { codebook8 , sizeof codebook8  },
-        { codebook9 , sizeof codebook9  },
-        { codebook10, sizeof codebook10 },
-        { codebook11, sizeof codebook11 },
+        { code1 , sizeof code1 , bits1  },
+        { code2 , sizeof code2 , bits2  },
+        { code3 , sizeof code3 , bits3  },
+        { code4 , sizeof code4 , bits4  },
+        { code5 , sizeof code5 , bits5  },
+        { code6 , sizeof code6 , bits6  },
+        { code7 , sizeof code7 , bits7  },
+        { code8 , sizeof code8 , bits8  },
+        { code9 , sizeof code9 , bits9  },
+        { code10, sizeof code10, bits10 },
+        { code11, sizeof code11, bits11 },
     };
     AACContext * ac = avccontext->priv_data;
     int i;
@@ -805,13 +806,15 @@ static int aac_decode_init(AVCodecContex
         static const int mod_cb[11] = { 3, 3, 3, 3, 9, 9, 8, 8, 13, 13, 17 };
         static const int off_cb[11] = { 1, 1, 0, 0, 4, 4, 0, 0,  0,  0,  0 };
 
-        int j, values = tmp[i].s/sizeof(tmp[i].a[0]);
+        int a_bits_size = sizeof(tmp[i].a_bits[0]);
+        int a_code_size = sizeof(tmp[i].a_code[0]);
+        int j, values = tmp[i].s/a_code_size;
         int dim = (i >= 4 ? 2 : 4);
         int mod = mod_cb[i], off = off_cb[i], index = 0;
         int ret;
         ret = init_vlc(&ac->books[i], 6, values,
-                &tmp[i].a[0][1], sizeof(tmp[i].a[0]), sizeof(tmp[i].a[0][1]),
-                &tmp[i].a[0][0], sizeof(tmp[i].a[0]), sizeof(tmp[i].a[0][0]),
+                tmp[i].a_bits, a_bits_size, a_bits_size,
+                tmp[i].a_code, a_code_size, a_code_size,
                 0);
         assert(!ret);
         ac->vq[i] = av_malloc(dim * values * sizeof(int));
@@ -868,9 +871,9 @@ static int aac_decode_init(AVCodecContex
     ac->num_swb_128 = num_swb_128[ac->sampling_index];
     ac->tns_max_bands_128 = tns_max_bands_128[ac->sampling_index];
 
-    init_vlc(&ac->mainvlc, 7, sizeof(scalefactor_huffman_table)/sizeof(scalefactor_huffman_table[0]),
-            &scalefactor_huffman_table[0][1], sizeof(scalefactor_huffman_table[0]), sizeof(scalefactor_huffman_table[0][1]),
-            &scalefactor_huffman_table[0][0], sizeof(scalefactor_huffman_table[0]), sizeof(scalefactor_huffman_table[0][0]),
+    init_vlc(&ac->mainvlc, 7, sizeof(code)/sizeof(code[0]),
+            bits, sizeof(bits[0]), sizeof(bits[0]),
+            code, sizeof(code[0]), sizeof(code[0]),
             0);
 
     if (ac->audioObjectType == AOT_AAC_SSR) {

Modified: aac/aactab.h
==============================================================================
--- aac/aactab.h	(original)
+++ aac/aactab.h	Tue Jan  8 21:22:06 2008
@@ -232,481 +232,348 @@ static float ssr_q_table[] = {
      1.0737914947736096E+00
 };
 
-static const unsigned int scalefactor_huffman_table[][2] = {
-    /* codeword, code length */
-    { 0x3FFE8, 18 },
-    { 0x3FFE6, 18 },
-    { 0x3FFE7, 18 },
-    { 0x3FFE5, 18 },
-    { 0x7FFF5, 19 },
-    { 0x7FFF1, 19 },
-    { 0x7FFED, 19 },
-    { 0x7FFF6, 19 },
-    { 0x7FFEE, 19 },
-    { 0x7FFEF, 19 },
-    { 0x7FFF0, 19 },
-    { 0x7FFFC, 19 },
-    { 0x7FFFD, 19 },
-    { 0x7FFFF, 19 },
-    { 0x7FFFE, 19 },
-    { 0x7FFF7, 19 },
-    { 0x7FFF8, 19 },
-    { 0x7FFFB, 19 },
-    { 0x7FFF9, 19 },
-    { 0x3FFE4, 18 },
-    { 0x7FFFA, 19 },
-    { 0x3FFE3, 18 },
-    { 0x1FFEF, 17 },
-    { 0x1FFF0, 17 },
-    {  0xFFF5, 16 },
-    { 0x1FFEE, 17 },
-    {  0xFFF2, 16 },
-    {  0xFFF3, 16 },
-    {  0xFFF4, 16 },
-    {  0xFFF1, 16 },
-    {  0x7FF6, 15 },
-    {  0x7FF7, 15 },
-    {  0x3FF9, 14 },
-    {  0x3FF5, 14 },
-    {  0x3FF7, 14 },
-    {  0x3FF3, 14 },
-    {  0x3FF6, 14 },
-    {  0x3FF2, 14 },
-    {  0x1FF7, 13 },
-    {  0x1FF5, 13 },
-    {   0xFF9, 12 },
-    {   0xFF7, 12 },
-    {   0xFF6, 12 },
-    {   0x7F9, 11 },
-    {   0xFF4, 12 },
-    {   0x7F8, 11 },
-    {   0x3F9, 10 },
-    {   0x3F7, 10 },
-    {   0x3F5, 10 },
-    {   0x1F8,  9 },
-    {   0x1F7,  9 },
-    {    0xFA,  8 },
-    {    0xF8,  8 },
-    {    0xF6,  8 },
-    {    0x79,  7 },
-    {    0x3A,  6 },
-    {    0x38,  6 },
-    {    0x1A,  5 },
-    {     0xB,  4 },
-    {     0x4,  3 },
-    {     0x0,  1 },
-    {     0xA,  4 },
-    {     0xC,  4 },
-    {    0x1B,  5 },
-    {    0x39,  6 },
-    {    0x3B,  6 },
-    {    0x78,  7 },
-    {    0x7A,  7 },
-    {    0xF7,  8 },
-    {    0xF9,  8 },
-    {   0x1F6,  9 },
-    {   0x1F9,  9 },
-    {   0x3F4, 10 },
-    {   0x3F6, 10 },
-    {   0x3F8, 10 },
-    {   0x7F5, 11 },
-    {   0x7F4, 11 },
-    {   0x7F6, 11 },
-    {   0x7F7, 11 },
-    {   0xFF5, 12 },
-    {   0xFF8, 12 },
-    {  0x1FF4, 13 },
-    {  0x1FF6, 13 },
-    {  0x1FF8, 13 },
-    {  0x3FF8, 14 },
-    {  0x3FF4, 14 },
-    {  0xFFF0, 16 },
-    {  0x7FF4, 15 },
-    {  0xFFF6, 16 },
-    {  0x7FF5, 15 },
-    { 0x3FFE2, 18 },
-    { 0x7FFD9, 19 },
-    { 0x7FFDA, 19 },
-    { 0x7FFDB, 19 },
-    { 0x7FFDC, 19 },
-    { 0x7FFDD, 19 },
-    { 0x7FFDE, 19 },
-    { 0x7FFD8, 19 },
-    { 0x7FFD2, 19 },
-    { 0x7FFD3, 19 },
-    { 0x7FFD4, 19 },
-    { 0x7FFD5, 19 },
-    { 0x7FFD6, 19 },
-    { 0x7FFF2, 19 },
-    { 0x7FFDF, 19 },
-    { 0x7FFE7, 19 },
-    { 0x7FFE8, 19 },
-    { 0x7FFE9, 19 },
-    { 0x7FFEA, 19 },
-    { 0x7FFEB, 19 },
-    { 0x7FFE6, 19 },
-    { 0x7FFE0, 19 },
-    { 0x7FFE1, 19 },
-    { 0x7FFE2, 19 },
-    { 0x7FFE3, 19 },
-    { 0x7FFE4, 19 },
-    { 0x7FFE5, 19 },
-    { 0x7FFD7, 19 },
-    { 0x7FFEC, 19 },
-    { 0x7FFF4, 19 },
-    { 0x7FFF3, 19 },
+static const uint32_t code[121] = {
+    0x3ffe8, 0x3ffe6, 0x3ffe7, 0x3ffe5, 0x7fff5, 0x7fff1, 0x7ffed, 0x7fff6,
+    0x7ffee, 0x7ffef, 0x7fff0, 0x7fffc, 0x7fffd, 0x7ffff, 0x7fffe, 0x7fff7,
+    0x7fff8, 0x7fffb, 0x7fff9, 0x3ffe4, 0x7fffa, 0x3ffe3, 0x1ffef, 0x1fff0,
+    0x0fff5, 0x1ffee, 0x0fff2, 0x0fff3, 0x0fff4, 0x0fff1, 0x07ff6, 0x07ff7,
+    0x03ff9, 0x03ff5, 0x03ff7, 0x03ff3, 0x03ff6, 0x03ff2, 0x01ff7, 0x01ff5,
+    0x00ff9, 0x00ff7, 0x00ff6, 0x007f9, 0x00ff4, 0x007f8, 0x003f9, 0x003f7,
+    0x003f5, 0x001f8, 0x001f7, 0x000fa, 0x000f8, 0x000f6, 0x00079, 0x0003a,
+    0x00038, 0x0001a, 0x0000b, 0x00004, 0x00000, 0x0000a, 0x0000c, 0x0001b,
+    0x00039, 0x0003b, 0x00078, 0x0007a, 0x000f7, 0x000f9, 0x001f6, 0x001f9,
+    0x003f4, 0x003f6, 0x003f8, 0x007f5, 0x007f4, 0x007f6, 0x007f7, 0x00ff5,
+    0x00ff8, 0x01ff4, 0x01ff6, 0x01ff8, 0x03ff8, 0x03ff4, 0x0fff0, 0x07ff4,
+    0x0fff6, 0x07ff5, 0x3ffe2, 0x7ffd9, 0x7ffda, 0x7ffdb, 0x7ffdc, 0x7ffdd,
+    0x7ffde, 0x7ffd8, 0x7ffd2, 0x7ffd3, 0x7ffd4, 0x7ffd5, 0x7ffd6, 0x7fff2,
+    0x7ffdf, 0x7ffe7, 0x7ffe8, 0x7ffe9, 0x7ffea, 0x7ffeb, 0x7ffe6, 0x7ffe0,
+    0x7ffe1, 0x7ffe2, 0x7ffe3, 0x7ffe4, 0x7ffe5, 0x7ffd7, 0x7ffec, 0x7fff4,
+    0x7fff3,
 };
 
-static const uint16_t codebook1[][2] = {
-    {   0x7F8, 11 },
-    {   0x1F1,  9 }, {   0x7FD, 11 }, {   0x3F5, 10 }, {    0x68,  7 },
-    {   0x3F0, 10 }, {   0x7F7, 11 }, {   0x1EC,  9 }, {   0x7F5, 11 },
-    {   0x3F1, 10 }, {    0x72,  7 }, {   0x3F4, 10 }, {    0x74,  7 },
-    {    0x11,  5 }, {    0x76,  7 }, {   0x1EB,  9 }, {    0x6C,  7 },
-    {   0x3F6, 10 }, {   0x7FC, 11 }, {   0x1E1,  9 }, {   0x7F1, 11 },
-    {   0x1F0,  9 }, {    0x61,  7 }, {   0x1F6,  9 }, {   0x7F2, 11 },
-    {   0x1EA,  9 }, {   0x7FB, 11 }, {   0x1F2,  9 }, {    0x69,  7 },
-    {   0x1ED,  9 }, {    0x77,  7 }, {    0x17,  5 }, {    0x6F,  7 },
-    {   0x1E6,  9 }, {    0x64,  7 }, {   0x1E5,  9 }, {    0x67,  7 },
-    {    0x15,  5 }, {    0x62,  7 }, {    0x12,  5 }, {     0x0,  1 },
-    {    0x14,  5 }, {    0x65,  7 }, {    0x16,  5 }, {    0x6D,  7 },
-    {   0x1E9,  9 }, {    0x63,  7 }, {   0x1E4,  9 }, {    0x6B,  7 },
-    {    0x13,  5 }, {    0x71,  7 }, {   0x1E3,  9 }, {    0x70,  7 },
-    {   0x1F3,  9 }, {   0x7FE, 11 }, {   0x1E7,  9 }, {   0x7F3, 11 },
-    {   0x1EF,  9 }, {    0x60,  7 }, {   0x1EE,  9 }, {   0x7F0, 11 },
-    {   0x1E2,  9 }, {   0x7FA, 11 }, {   0x3F3, 10 }, {    0x6A,  7 },
-    {   0x1E8,  9 }, {    0x75,  7 }, {    0x10,  5 }, {    0x73,  7 },
-    {   0x1F4,  9 }, {    0x6E,  7 }, {   0x3F7, 10 }, {   0x7F6, 11 },
-    {   0x1E0,  9 }, {   0x7F9, 11 }, {   0x3F2, 10 }, {    0x66,  7 },
-    {   0x1F5,  9 }, {   0x7FF, 11 }, {   0x1F7,  9 }, {   0x7F4, 11 },
+static const uint8_t bits[121] = {
+    18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+    19, 19, 19, 18, 19, 18, 17, 17, 16, 17, 16, 16, 16, 16, 15, 15,
+    14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11, 12, 11, 10, 10,
+    10,  9,  9,  8,  8,  8,  7,  6,  6,  5,  4,  3,  1,  4,  4,  5,
+     6,  6,  7,  7,  8,  8,  9,  9, 10, 10, 10, 11, 11, 11, 11, 12,
+    12, 13, 13, 13, 14, 14, 16, 15, 16, 15, 18, 19, 19, 19, 19, 19,
+    19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+    19, 19, 19, 19, 19, 19, 19, 19, 19,
 };
 
-static const uint16_t codebook2[][2] = {
-    {   0x1F3,  9 },
-    {    0x6F,  7 }, {   0x1FD,  9 }, {    0xEB,  8 }, {    0x23,  6 },
-    {    0xEA,  8 }, {   0x1F7,  9 }, {    0xE8,  8 }, {   0x1FA,  9 },
-    {    0xF2,  8 }, {    0x2D,  6 }, {    0x70,  7 }, {    0x20,  6 },
-    {     0x6,  5 }, {    0x2B,  6 }, {    0x6E,  7 }, {    0x28,  6 },
-    {    0xE9,  8 }, {   0x1F9,  9 }, {    0x66,  7 }, {    0xF8,  8 },
-    {    0xE7,  8 }, {    0x1B,  6 }, {    0xF1,  8 }, {   0x1F4,  9 },
-    {    0x6B,  7 }, {   0x1F5,  9 }, {    0xEC,  8 }, {    0x2A,  6 },
-    {    0x6C,  7 }, {    0x2C,  6 }, {     0xA,  5 }, {    0x27,  6 },
-    {    0x67,  7 }, {    0x1A,  6 }, {    0xF5,  8 }, {    0x24,  6 },
-    {     0x8,  5 }, {    0x1F,  6 }, {     0x9,  5 }, {     0x0,  3 },
-    {     0x7,  5 }, {    0x1D,  6 }, {     0xB,  5 }, {    0x30,  6 },
-    {    0xEF,  8 }, {    0x1C,  6 }, {    0x64,  7 }, {    0x1E,  6 },
-    {     0xC,  5 }, {    0x29,  6 }, {    0xF3,  8 }, {    0x2F,  6 },
-    {    0xF0,  8 }, {   0x1FC,  9 }, {    0x71,  7 }, {   0x1F2,  9 },
-    {    0xF4,  8 }, {    0x21,  6 }, {    0xE6,  8 }, {    0xF7,  8 },
-    {    0x68,  7 }, {   0x1F8,  9 }, {    0xEE,  8 }, {    0x22,  6 },
-    {    0x65,  7 }, {    0x31,  6 }, {     0x2,  4 }, {    0x26,  6 },
-    {    0xED,  8 }, {    0x25,  6 }, {    0x6A,  7 }, {   0x1FB,  9 },
-    {    0x72,  7 }, {   0x1FE,  9 }, {    0x69,  7 }, {    0x2E,  6 },
-    {    0xF6,  8 }, {   0x1FF,  9 }, {    0x6D,  7 }, {   0x1F6,  9 },
+static const uint16_t code1[81] = {
+    0x7f8, 0x1f1, 0x7fd, 0x3f5, 0x068, 0x3f0, 0x7f7, 0x1ec,
+    0x7f5, 0x3f1, 0x072, 0x3f4, 0x074, 0x011, 0x076, 0x1eb,
+    0x06c, 0x3f6, 0x7fc, 0x1e1, 0x7f1, 0x1f0, 0x061, 0x1f6,
+    0x7f2, 0x1ea, 0x7fb, 0x1f2, 0x069, 0x1ed, 0x077, 0x017,
+    0x06f, 0x1e6, 0x064, 0x1e5, 0x067, 0x015, 0x062, 0x012,
+    0x000, 0x014, 0x065, 0x016, 0x06d, 0x1e9, 0x063, 0x1e4,
+    0x06b, 0x013, 0x071, 0x1e3, 0x070, 0x1f3, 0x7fe, 0x1e7,
+    0x7f3, 0x1ef, 0x060, 0x1ee, 0x7f0, 0x1e2, 0x7fa, 0x3f3,
+    0x06a, 0x1e8, 0x075, 0x010, 0x073, 0x1f4, 0x06e, 0x3f7,
+    0x7f6, 0x1e0, 0x7f9, 0x3f2, 0x066, 0x1f5, 0x7ff, 0x1f7,
+    0x7f4,
 };
 
-static const uint16_t codebook3[][2] = {
-    {     0x0,  1 },
-    {     0x9,  4 }, {    0xEF,  8 }, {     0xB,  4 }, {    0x19,  5 },
-    {    0xF0,  8 }, {   0x1EB,  9 }, {   0x1E6,  9 }, {   0x3F2, 10 },
-    {     0xA,  4 }, {    0x35,  6 }, {   0x1EF,  9 }, {    0x34,  6 },
-    {    0x37,  6 }, {   0x1E9,  9 }, {   0x1ED,  9 }, {   0x1E7,  9 },
-    {   0x3F3, 10 }, {   0x1EE,  9 }, {   0x3ED, 10 }, {  0x1FFA, 13 },
-    {   0x1EC,  9 }, {   0x1F2,  9 }, {   0x7F9, 11 }, {   0x7F8, 11 },
-    {   0x3F8, 10 }, {   0xFF8, 12 }, {     0x8,  4 }, {    0x38,  6 },
-    {   0x3F6, 10 }, {    0x36,  6 }, {    0x75,  7 }, {   0x3F1, 10 },
-    {   0x3EB, 10 }, {   0x3EC, 10 }, {   0xFF4, 12 }, {    0x18,  5 },
-    {    0x76,  7 }, {   0x7F4, 11 }, {    0x39,  6 }, {    0x74,  7 },
-    {   0x3EF, 10 }, {   0x1F3,  9 }, {   0x1F4,  9 }, {   0x7F6, 11 },
-    {   0x1E8,  9 }, {   0x3EA, 10 }, {  0x1FFC, 13 }, {    0xF2,  8 },
-    {   0x1F1,  9 }, {   0xFFB, 12 }, {   0x3F5, 10 }, {   0x7F3, 11 },
-    {   0xFFC, 12 }, {    0xEE,  8 }, {   0x3F7, 10 }, {  0x7FFE, 15 },
-    {   0x1F0,  9 }, {   0x7F5, 11 }, {  0x7FFD, 15 }, {  0x1FFB, 13 },
-    {  0x3FFA, 14 }, {  0xFFFF, 16 }, {    0xF1,  8 }, {   0x3F0, 10 },
-    {  0x3FFC, 14 }, {   0x1EA,  9 }, {   0x3EE, 10 }, {  0x3FFB, 14 },
-    {   0xFF6, 12 }, {   0xFFA, 12 }, {  0x7FFC, 15 }, {   0x7F2, 11 },
-    {   0xFF5, 12 }, {  0xFFFE, 16 }, {   0x3F4, 10 }, {   0x7F7, 11 },
-    {  0x7FFB, 15 }, {   0xFF7, 12 }, {   0xFF9, 12 }, {  0x7FFA, 15 },
+static const uint8_t bits1[81] = {
+    11,  9, 11, 10,  7, 10, 11,  9, 11, 10,  7, 10,  7,  5,  7,  9,
+     7, 10, 11,  9, 11,  9,  7,  9, 11,  9, 11,  9,  7,  9,  7,  5,
+     7,  9,  7,  9,  7,  5,  7,  5,  1,  5,  7,  5,  7,  9,  7,  9,
+     7,  5,  7,  9,  7,  9, 11,  9, 11,  9,  7,  9, 11,  9, 11, 10,
+     7,  9,  7,  5,  7,  9,  7, 10, 11,  9, 11, 10,  7,  9, 11,  9,
+    11,
 };
 
-static const uint16_t codebook4[][2] = {
-    {     0x7,  4 },
-    {    0x16,  5 }, {    0xF6,  8 }, {    0x18,  5 }, {     0x8,  4 },
-    {    0xEF,  8 }, {   0x1EF,  9 }, {    0xF3,  8 }, {   0x7F8, 11 },
-    {    0x19,  5 }, {    0x17,  5 }, {    0xED,  8 }, {    0x15,  5 },
-    {     0x1,  4 }, {    0xE2,  8 }, {    0xF0,  8 }, {    0x70,  7 },
-    {   0x3F0, 10 }, {   0x1EE,  9 }, {    0xF1,  8 }, {   0x7FA, 11 },
-    {    0xEE,  8 }, {    0xE4,  8 }, {   0x3F2, 10 }, {   0x7F6, 11 },
-    {   0x3EF, 10 }, {   0x7FD, 11 }, {     0x5,  4 }, {    0x14,  5 },
-    {    0xF2,  8 }, {     0x9,  4 }, {     0x4,  4 }, {    0xE5,  8 },
-    {    0xF4,  8 }, {    0xE8,  8 }, {   0x3F4, 10 }, {     0x6,  4 },
-    {     0x2,  4 }, {    0xE7,  8 }, {     0x3,  4 }, {     0x0,  4 },
-    {    0x6B,  7 }, {    0xE3,  8 }, {    0x69,  7 }, {   0x1F3,  9 },
-    {    0xEB,  8 }, {    0xE6,  8 }, {   0x3F6, 10 }, {    0x6E,  7 },
-    {    0x6A,  7 }, {   0x1F4,  9 }, {   0x3EC, 10 }, {   0x1F0,  9 },
-    {   0x3F9, 10 }, {    0xF5,  8 }, {    0xEC,  8 }, {   0x7FB, 11 },
-    {    0xEA,  8 }, {    0x6F,  7 }, {   0x3F7, 10 }, {   0x7F9, 11 },
-    {   0x3F3, 10 }, {   0xFFF, 12 }, {    0xE9,  8 }, {    0x6D,  7 },
-    {   0x3F8, 10 }, {    0x6C,  7 }, {    0x68,  7 }, {   0x1F5,  9 },
-    {   0x3EE, 10 }, {   0x1F2,  9 }, {   0x7F4, 11 }, {   0x7F7, 11 },
-    {   0x3F1, 10 }, {   0xFFE, 12 }, {   0x3ED, 10 }, {   0x1F1,  9 },
-    {   0x7F5, 11 }, {   0x7FE, 11 }, {   0x3F5, 10 }, {   0x7FC, 11 },
+static const uint16_t code2[81] = {
+    0x1f3, 0x06f, 0x1fd, 0x0eb, 0x023, 0x0ea, 0x1f7, 0x0e8,
+    0x1fa, 0x0f2, 0x02d, 0x070, 0x020, 0x006, 0x02b, 0x06e,
+    0x028, 0x0e9, 0x1f9, 0x066, 0x0f8, 0x0e7, 0x01b, 0x0f1,
+    0x1f4, 0x06b, 0x1f5, 0x0ec, 0x02a, 0x06c, 0x02c, 0x00a,
+    0x027, 0x067, 0x01a, 0x0f5, 0x024, 0x008, 0x01f, 0x009,
+    0x000, 0x007, 0x01d, 0x00b, 0x030, 0x0ef, 0x01c, 0x064,
+    0x01e, 0x00c, 0x029, 0x0f3, 0x02f, 0x0f0, 0x1fc, 0x071,
+    0x1f2, 0x0f4, 0x021, 0x0e6, 0x0f7, 0x068, 0x1f8, 0x0ee,
+    0x022, 0x065, 0x031, 0x002, 0x026, 0x0ed, 0x025, 0x06a,
+    0x1fb, 0x072, 0x1fe, 0x069, 0x02e, 0x0f6, 0x1ff, 0x06d,
+    0x1f6,
 };
 
-static const uint16_t codebook5[][2] = {
-    {  0x1FFF, 13 },
-    {   0xFF7, 12 }, {   0x7F4, 11 }, {   0x7E8, 11 }, {   0x3F1, 10 },
-    {   0x7EE, 11 }, {   0x7F9, 11 }, {   0xFF8, 12 }, {  0x1FFD, 13 },
-    {   0xFFD, 12 }, {   0x7F1, 11 }, {   0x3E8, 10 }, {   0x1E8,  9 },
-    {    0xF0,  8 }, {   0x1EC,  9 }, {   0x3EE, 10 }, {   0x7F2, 11 },
-    {   0xFFA, 12 }, {   0xFF4, 12 }, {   0x3EF, 10 }, {   0x1F2,  9 },
-    {    0xE8,  8 }, {    0x70,  7 }, {    0xEC,  8 }, {   0x1F0,  9 },
-    {   0x3EA, 10 }, {   0x7F3, 11 }, {   0x7EB, 11 }, {   0x1EB,  9 },
-    {    0xEA,  8 }, {    0x1A,  5 }, {     0x8,  4 }, {    0x19,  5 },
-    {    0xEE,  8 }, {   0x1EF,  9 }, {   0x7ED, 11 }, {   0x3F0, 10 },
-    {    0xF2,  8 }, {    0x73,  7 }, {     0xB,  4 }, {     0x0,  1 },
-    {     0xA,  4 }, {    0x71,  7 }, {    0xF3,  8 }, {   0x7E9, 11 },
-    {   0x7EF, 11 }, {   0x1EE,  9 }, {    0xEF,  8 }, {    0x18,  5 },
-    {     0x9,  4 }, {    0x1B,  5 }, {    0xEB,  8 }, {   0x1E9,  9 },
-    {   0x7EC, 11 }, {   0x7F6, 11 }, {   0x3EB, 10 }, {   0x1F3,  9 },
-    {    0xED,  8 }, {    0x72,  7 }, {    0xE9,  8 }, {   0x1F1,  9 },
-    {   0x3ED, 10 }, {   0x7F7, 11 }, {   0xFF6, 12 }, {   0x7F0, 11 },
-    {   0x3E9, 10 }, {   0x1ED,  9 }, {    0xF1,  8 }, {   0x1EA,  9 },
-    {   0x3EC, 10 }, {   0x7F8, 11 }, {   0xFF9, 12 }, {  0x1FFC, 13 },
-    {   0xFFC, 12 }, {   0xFF5, 12 }, {   0x7EA, 11 }, {   0x3F3, 10 },
-    {   0x3F2, 10 }, {   0x7F5, 11 }, {   0xFFB, 12 }, {  0x1FFE, 13 },
+static const uint8_t bits2[81] = {
+    9, 7, 9, 8, 6, 8, 9, 8, 9, 8, 6, 7, 6, 5, 6, 7,
+    6, 8, 9, 7, 8, 8, 6, 8, 9, 7, 9, 8, 6, 7, 6, 5,
+    6, 7, 6, 8, 6, 5, 6, 5, 3, 5, 6, 5, 6, 8, 6, 7,
+    6, 5, 6, 8, 6, 8, 9, 7, 9, 8, 6, 8, 8, 7, 9, 8,
+    6, 7, 6, 4, 6, 8, 6, 7, 9, 7, 9, 7, 6, 8, 9, 7,
+    9,
 };
 
-static const uint16_t codebook6[][2] = {
-    {   0x7FE, 11 },
-    {   0x3FD, 10 }, {   0x1F1,  9 }, {   0x1EB,  9 }, {   0x1F4,  9 },
-    {   0x1EA,  9 }, {   0x1F0,  9 }, {   0x3FC, 10 }, {   0x7FD, 11 },
-    {   0x3F6, 10 }, {   0x1E5,  9 }, {    0xEA,  8 }, {    0x6C,  7 },
-    {    0x71,  7 }, {    0x68,  7 }, {    0xF0,  8 }, {   0x1E6,  9 },
-    {   0x3F7, 10 }, {   0x1F3,  9 }, {    0xEF,  8 }, {    0x32,  6 },
-    {    0x27,  6 }, {    0x28,  6 }, {    0x26,  6 }, {    0x31,  6 },
-    {    0xEB,  8 }, {   0x1F7,  9 }, {   0x1E8,  9 }, {    0x6F,  7 },
-    {    0x2E,  6 }, {     0x8,  4 }, {     0x4,  4 }, {     0x6,  4 },
-    {    0x29,  6 }, {    0x6B,  7 }, {   0x1EE,  9 }, {   0x1EF,  9 },
-    {    0x72,  7 }, {    0x2D,  6 }, {     0x2,  4 }, {     0x0,  4 },
-    {     0x3,  4 }, {    0x2F,  6 }, {    0x73,  7 }, {   0x1FA,  9 },
-    {   0x1E7,  9 }, {    0x6E,  7 }, {    0x2B,  6 }, {     0x7,  4 },
-    {     0x1,  4 }, {     0x5,  4 }, {    0x2C,  6 }, {    0x6D,  7 },
-    {   0x1EC,  9 }, {   0x1F9,  9 }, {    0xEE,  8 }, {    0x30,  6 },
-    {    0x24,  6 }, {    0x2A,  6 }, {    0x25,  6 }, {    0x33,  6 },
-    {    0xEC,  8 }, {   0x1F2,  9 }, {   0x3F8, 10 }, {   0x1E4,  9 },
-    {    0xED,  8 }, {    0x6A,  7 }, {    0x70,  7 }, {    0x69,  7 },
-    {    0x74,  7 }, {    0xF1,  8 }, {   0x3FA, 10 }, {   0x7FF, 11 },
-    {   0x3F9, 10 }, {   0x1F6,  9 }, {   0x1ED,  9 }, {   0x1F8,  9 },
-    {   0x1E9,  9 }, {   0x1F5,  9 }, {   0x3FB, 10 }, {   0x7FC, 11 },
+static const uint16_t code3[81] = {
+    0x0000, 0x0009, 0x00ef, 0x000b, 0x0019, 0x00f0, 0x01eb, 0x01e6,
+    0x03f2, 0x000a, 0x0035, 0x01ef, 0x0034, 0x0037, 0x01e9, 0x01ed,
+    0x01e7, 0x03f3, 0x01ee, 0x03ed, 0x1ffa, 0x01ec, 0x01f2, 0x07f9,
+    0x07f8, 0x03f8, 0x0ff8, 0x0008, 0x0038, 0x03f6, 0x0036, 0x0075,
+    0x03f1, 0x03eb, 0x03ec, 0x0ff4, 0x0018, 0x0076, 0x07f4, 0x0039,
+    0x0074, 0x03ef, 0x01f3, 0x01f4, 0x07f6, 0x01e8, 0x03ea, 0x1ffc,
+    0x00f2, 0x01f1, 0x0ffb, 0x03f5, 0x07f3, 0x0ffc, 0x00ee, 0x03f7,
+    0x7ffe, 0x01f0, 0x07f5, 0x7ffd, 0x1ffb, 0x3ffa, 0xffff, 0x00f1,
+    0x03f0, 0x3ffc, 0x01ea, 0x03ee, 0x3ffb, 0x0ff6, 0x0ffa, 0x7ffc,
+    0x07f2, 0x0ff5, 0xfffe, 0x03f4, 0x07f7, 0x7ffb, 0x0ff7, 0x0ff9,
+    0x7ffa,
 };
 
-static const uint16_t codebook7[][2] = {
-    {     0x0,  1 },
-    {     0x5,  3 }, {    0x37,  6 }, {    0x74,  7 }, {    0xF2,  8 },
-    {   0x1EB,  9 }, {   0x3ED, 10 }, {   0x7F7, 11 }, {     0x4,  3 },
-    {     0xC,  4 }, {    0x35,  6 }, {    0x71,  7 }, {    0xEC,  8 },
-    {    0xEE,  8 }, {   0x1EE,  9 }, {   0x1F5,  9 }, {    0x36,  6 },
-    {    0x34,  6 }, {    0x72,  7 }, {    0xEA,  8 }, {    0xF1,  8 },
-    {   0x1E9,  9 }, {   0x1F3,  9 }, {   0x3F5, 10 }, {    0x73,  7 },
-    {    0x70,  7 }, {    0xEB,  8 }, {    0xF0,  8 }, {   0x1F1,  9 },
-    {   0x1F0,  9 }, {   0x3EC, 10 }, {   0x3FA, 10 }, {    0xF3,  8 },
-    {    0xED,  8 }, {   0x1E8,  9 }, {   0x1EF,  9 }, {   0x3EF, 10 },
-    {   0x3F1, 10 }, {   0x3F9, 10 }, {   0x7FB, 11 }, {   0x1ED,  9 },
-    {    0xEF,  8 }, {   0x1EA,  9 }, {   0x1F2,  9 }, {   0x3F3, 10 },
-    {   0x3F8, 10 }, {   0x7F9, 11 }, {   0x7FC, 11 }, {   0x3EE, 10 },
-    {   0x1EC,  9 }, {   0x1F4,  9 }, {   0x3F4, 10 }, {   0x3F7, 10 },
-    {   0x7F8, 11 }, {   0xFFD, 12 }, {   0xFFE, 12 }, {   0x7F6, 11 },
-    {   0x3F0, 10 }, {   0x3F2, 10 }, {   0x3F6, 10 }, {   0x7FA, 11 },
-    {   0x7FD, 11 }, {   0xFFC, 12 }, {   0xFFF, 12 },
+static const uint8_t bits3[81] = {
+     1,  4,  8,  4,  5,  8,  9,  9, 10,  4,  6,  9,  6,  6,  9,  9,
+     9, 10,  9, 10, 13,  9,  9, 11, 11, 10, 12,  4,  6, 10,  6,  7,
+    10, 10, 10, 12,  5,  7, 11,  6,  7, 10,  9,  9, 11,  9, 10, 13,
+     8,  9, 12, 10, 11, 12,  8, 10, 15,  9, 11, 15, 13, 14, 16,  8,
+    10, 14,  9, 10, 14, 12, 12, 15, 11, 12, 16, 10, 11, 15, 12, 12,
+    15,
 };
 
-static const uint16_t codebook8[][2] = {
-    {     0xE,  5 },
-    {     0x5,  4 }, {    0x10,  5 }, {    0x30,  6 }, {    0x6F,  7 },
-    {    0xF1,  8 }, {   0x1FA,  9 }, {   0x3FE, 10 }, {     0x3,  4 },
-    {     0x0,  3 }, {     0x4,  4 }, {    0x12,  5 }, {    0x2C,  6 },
-    {    0x6A,  7 }, {    0x75,  7 }, {    0xF8,  8 }, {     0xF,  5 },
-    {     0x2,  4 }, {     0x6,  4 }, {    0x14,  5 }, {    0x2E,  6 },
-    {    0x69,  7 }, {    0x72,  7 }, {    0xF5,  8 }, {    0x2F,  6 },
-    {    0x11,  5 }, {    0x13,  5 }, {    0x2A,  6 }, {    0x32,  6 },
-    {    0x6C,  7 }, {    0xEC,  8 }, {    0xFA,  8 }, {    0x71,  7 },
-    {    0x2B,  6 }, {    0x2D,  6 }, {    0x31,  6 }, {    0x6D,  7 },
-    {    0x70,  7 }, {    0xF2,  8 }, {   0x1F9,  9 }, {    0xEF,  8 },
-    {    0x68,  7 }, {    0x33,  6 }, {    0x6B,  7 }, {    0x6E,  7 },
-    {    0xEE,  8 }, {    0xF9,  8 }, {   0x3FC, 10 }, {   0x1F8,  9 },
-    {    0x74,  7 }, {    0x73,  7 }, {    0xED,  8 }, {    0xF0,  8 },
-    {    0xF6,  8 }, {   0x1F6,  9 }, {   0x1FD,  9 }, {   0x3FD, 10 },
-    {    0xF3,  8 }, {    0xF4,  8 }, {    0xF7,  8 }, {   0x1F7,  9 },
-    {   0x1FB,  9 }, {   0x1FC,  9 }, {   0x3FF, 10 },
+static const uint16_t code4[81] = {
+    0x007, 0x016, 0x0f6, 0x018, 0x008, 0x0ef, 0x1ef, 0x0f3,
+    0x7f8, 0x019, 0x017, 0x0ed, 0x015, 0x001, 0x0e2, 0x0f0,
+    0x070, 0x3f0, 0x1ee, 0x0f1, 0x7fa, 0x0ee, 0x0e4, 0x3f2,
+    0x7f6, 0x3ef, 0x7fd, 0x005, 0x014, 0x0f2, 0x009, 0x004,
+    0x0e5, 0x0f4, 0x0e8, 0x3f4, 0x006, 0x002, 0x0e7, 0x003,
+    0x000, 0x06b, 0x0e3, 0x069, 0x1f3, 0x0eb, 0x0e6, 0x3f6,
+    0x06e, 0x06a, 0x1f4, 0x3ec, 0x1f0, 0x3f9, 0x0f5, 0x0ec,
+    0x7fb, 0x0ea, 0x06f, 0x3f7, 0x7f9, 0x3f3, 0xfff, 0x0e9,
+    0x06d, 0x3f8, 0x06c, 0x068, 0x1f5, 0x3ee, 0x1f2, 0x7f4,
+    0x7f7, 0x3f1, 0xffe, 0x3ed, 0x1f1, 0x7f5, 0x7fe, 0x3f5,
+    0x7fc,
 };
 
-static const uint16_t codebook9[][2] = {
-    {     0x0,  1 },
-    {     0x5,  3 }, {    0x37,  6 }, {    0xE7,  8 }, {   0x1DE,  9 },
-    {   0x3CE, 10 }, {   0x3D9, 10 }, {   0x7C8, 11 }, {   0x7CD, 11 },
-    {   0xFC8, 12 }, {   0xFDD, 12 }, {  0x1FE4, 13 }, {  0x1FEC, 13 },
-    {     0x4,  3 }, {     0xC,  4 }, {    0x35,  6 }, {    0x72,  7 },
-    {    0xEA,  8 }, {    0xED,  8 }, {   0x1E2,  9 }, {   0x3D1, 10 },
-    {   0x3D3, 10 }, {   0x3E0, 10 }, {   0x7D8, 11 }, {   0xFCF, 12 },
-    {   0xFD5, 12 }, {    0x36,  6 }, {    0x34,  6 }, {    0x71,  7 },
-    {    0xE8,  8 }, {    0xEC,  8 }, {   0x1E1,  9 }, {   0x3CF, 10 },
-    {   0x3DD, 10 }, {   0x3DB, 10 }, {   0x7D0, 11 }, {   0xFC7, 12 },
-    {   0xFD4, 12 }, {   0xFE4, 12 }, {    0xE6,  8 }, {    0x70,  7 },
-    {    0xE9,  8 }, {   0x1DD,  9 }, {   0x1E3,  9 }, {   0x3D2, 10 },
-    {   0x3DC, 10 }, {   0x7CC, 11 }, {   0x7CA, 11 }, {   0x7DE, 11 },
-    {   0xFD8, 12 }, {   0xFEA, 12 }, {  0x1FDB, 13 }, {   0x1DF,  9 },
-    {    0xEB,  8 }, {   0x1DC,  9 }, {   0x1E6,  9 }, {   0x3D5, 10 },
-    {   0x3DE, 10 }, {   0x7CB, 11 }, {   0x7DD, 11 }, {   0x7DC, 11 },
-    {   0xFCD, 12 }, {   0xFE2, 12 }, {   0xFE7, 12 }, {  0x1FE1, 13 },
-    {   0x3D0, 10 }, {   0x1E0,  9 }, {   0x1E4,  9 }, {   0x3D6, 10 },
-    {   0x7C5, 11 }, {   0x7D1, 11 }, {   0x7DB, 11 }, {   0xFD2, 12 },
-    {   0x7E0, 11 }, {   0xFD9, 12 }, {   0xFEB, 12 }, {  0x1FE3, 13 },
-    {  0x1FE9, 13 }, {   0x7C4, 11 }, {   0x1E5,  9 }, {   0x3D7, 10 },
-    {   0x7C6, 11 }, {   0x7CF, 11 }, {   0x7DA, 11 }, {   0xFCB, 12 },
-    {   0xFDA, 12 }, {   0xFE3, 12 }, {   0xFE9, 12 }, {  0x1FE6, 13 },
-    {  0x1FF3, 13 }, {  0x1FF7, 13 }, {   0x7D3, 11 }, {   0x3D8, 10 },
-    {   0x3E1, 10 }, {   0x7D4, 11 }, {   0x7D9, 11 }, {   0xFD3, 12 },
-    {   0xFDE, 12 }, {  0x1FDD, 13 }, {  0x1FD9, 13 }, {  0x1FE2, 13 },
-    {  0x1FEA, 13 }, {  0x1FF1, 13 }, {  0x1FF6, 13 }, {   0x7D2, 11 },
-    {   0x3D4, 10 }, {   0x3DA, 10 }, {   0x7C7, 11 }, {   0x7D7, 11 },
-    {   0x7E2, 11 }, {   0xFCE, 12 }, {   0xFDB, 12 }, {  0x1FD8, 13 },
-    {  0x1FEE, 13 }, {  0x3FF0, 14 }, {  0x1FF4, 13 }, {  0x3FF2, 14 },
-    {   0x7E1, 11 }, {   0x3DF, 10 }, {   0x7C9, 11 }, {   0x7D6, 11 },
-    {   0xFCA, 12 }, {   0xFD0, 12 }, {   0xFE5, 12 }, {   0xFE6, 12 },
-    {  0x1FEB, 13 }, {  0x1FEF, 13 }, {  0x3FF3, 14 }, {  0x3FF4, 14 },
-    {  0x3FF5, 14 }, {   0xFE0, 12 }, {   0x7CE, 11 }, {   0x7D5, 11 },
-    {   0xFC6, 12 }, {   0xFD1, 12 }, {   0xFE1, 12 }, {  0x1FE0, 13 },
-    {  0x1FE8, 13 }, {  0x1FF0, 13 }, {  0x3FF1, 14 }, {  0x3FF8, 14 },
-    {  0x3FF6, 14 }, {  0x7FFC, 15 }, {   0xFE8, 12 }, {   0x7DF, 11 },
-    {   0xFC9, 12 }, {   0xFD7, 12 }, {   0xFDC, 12 }, {  0x1FDC, 13 },
-    {  0x1FDF, 13 }, {  0x1FED, 13 }, {  0x1FF5, 13 }, {  0x3FF9, 14 },
-    {  0x3FFB, 14 }, {  0x7FFD, 15 }, {  0x7FFE, 15 }, {  0x1FE7, 13 },
-    {   0xFCC, 12 }, {   0xFD6, 12 }, {   0xFDF, 12 }, {  0x1FDE, 13 },
-    {  0x1FDA, 13 }, {  0x1FE5, 13 }, {  0x1FF2, 13 }, {  0x3FFA, 14 },
-    {  0x3FF7, 14 }, {  0x3FFC, 14 }, {  0x3FFD, 14 }, {  0x7FFF, 15 },
+static const uint8_t bits4[81] = {
+     4,  5,  8,  5,  4,  8,  9,  8, 11,  5,  5,  8,  5,  4,  8,  8,
+     7, 10,  9,  8, 11,  8,  8, 10, 11, 10, 11,  4,  5,  8,  4,  4,
+     8,  8,  8, 10,  4,  4,  8,  4,  4,  7,  8,  7,  9,  8,  8, 10,
+     7,  7,  9, 10,  9, 10,  8,  8, 11,  8,  7, 10, 11, 10, 12,  8,
+     7, 10,  7,  7,  9, 10,  9, 11, 11, 10, 12, 10,  9, 11, 11, 10,
+    11,
 };
 
-static const uint16_t codebook10[][2] = {
-    {    0x22,  6 },
-    {     0x8,  5 }, {    0x1D,  6 }, {    0x26,  6 }, {    0x5F,  7 },
-    {    0xD3,  8 }, {   0x1CF,  9 }, {   0x3D0, 10 }, {   0x3D7, 10 },
-    {   0x3ED, 10 }, {   0x7F0, 11 }, {   0x7F6, 11 }, {   0xFFD, 12 },
-    {     0x7,  5 }, {     0x0,  4 }, {     0x1,  4 }, {     0x9,  5 },
-    {    0x20,  6 }, {    0x54,  7 }, {    0x60,  7 }, {    0xD5,  8 },
-    {    0xDC,  8 }, {   0x1D4,  9 }, {   0x3CD, 10 }, {   0x3DE, 10 },
-    {   0x7E7, 11 }, {    0x1C,  6 }, {     0x2,  4 }, {     0x6,  5 },
-    {     0xC,  5 }, {    0x1E,  6 }, {    0x28,  6 }, {    0x5B,  7 },
-    {    0xCD,  8 }, {    0xD9,  8 }, {   0x1CE,  9 }, {   0x1DC,  9 },
-    {   0x3D9, 10 }, {   0x3F1, 10 }, {    0x25,  6 }, {     0xB,  5 },
-    {     0xA,  5 }, {     0xD,  5 }, {    0x24,  6 }, {    0x57,  7 },
-    {    0x61,  7 }, {    0xCC,  8 }, {    0xDD,  8 }, {   0x1CC,  9 },
-    {   0x1DE,  9 }, {   0x3D3, 10 }, {   0x3E7, 10 }, {    0x5D,  7 },
-    {    0x21,  6 }, {    0x1F,  6 }, {    0x23,  6 }, {    0x27,  6 },
-    {    0x59,  7 }, {    0x64,  7 }, {    0xD8,  8 }, {    0xDF,  8 },
-    {   0x1D2,  9 }, {   0x1E2,  9 }, {   0x3DD, 10 }, {   0x3EE, 10 },
-    {    0xD1,  8 }, {    0x55,  7 }, {    0x29,  6 }, {    0x56,  7 },
-    {    0x58,  7 }, {    0x62,  7 }, {    0xCE,  8 }, {    0xE0,  8 },
-    {    0xE2,  8 }, {   0x1DA,  9 }, {   0x3D4, 10 }, {   0x3E3, 10 },
-    {   0x7EB, 11 }, {   0x1C9,  9 }, {    0x5E,  7 }, {    0x5A,  7 },
-    {    0x5C,  7 }, {    0x63,  7 }, {    0xCA,  8 }, {    0xDA,  8 },
-    {   0x1C7,  9 }, {   0x1CA,  9 }, {   0x1E0,  9 }, {   0x3DB, 10 },
-    {   0x3E8, 10 }, {   0x7EC, 11 }, {   0x1E3,  9 }, {    0xD2,  8 },
-    {    0xCB,  8 }, {    0xD0,  8 }, {    0xD7,  8 }, {    0xDB,  8 },
-    {   0x1C6,  9 }, {   0x1D5,  9 }, {   0x1D8,  9 }, {   0x3CA, 10 },
-    {   0x3DA, 10 }, {   0x7EA, 11 }, {   0x7F1, 11 }, {   0x1E1,  9 },
-    {    0xD4,  8 }, {    0xCF,  8 }, {    0xD6,  8 }, {    0xDE,  8 },
-    {    0xE1,  8 }, {   0x1D0,  9 }, {   0x1D6,  9 }, {   0x3D1, 10 },
-    {   0x3D5, 10 }, {   0x3F2, 10 }, {   0x7EE, 11 }, {   0x7FB, 11 },
-    {   0x3E9, 10 }, {   0x1CD,  9 }, {   0x1C8,  9 }, {   0x1CB,  9 },
-    {   0x1D1,  9 }, {   0x1D7,  9 }, {   0x1DF,  9 }, {   0x3CF, 10 },
-    {   0x3E0, 10 }, {   0x3EF, 10 }, {   0x7E6, 11 }, {   0x7F8, 11 },
-    {   0xFFA, 12 }, {   0x3EB, 10 }, {   0x1DD,  9 }, {   0x1D3,  9 },
-    {   0x1D9,  9 }, {   0x1DB,  9 }, {   0x3D2, 10 }, {   0x3CC, 10 },
-    {   0x3DC, 10 }, {   0x3EA, 10 }, {   0x7ED, 11 }, {   0x7F3, 11 },
-    {   0x7F9, 11 }, {   0xFF9, 12 }, {   0x7F2, 11 }, {   0x3CE, 10 },
-    {   0x1E4,  9 }, {   0x3CB, 10 }, {   0x3D8, 10 }, {   0x3D6, 10 },
-    {   0x3E2, 10 }, {   0x3E5, 10 }, {   0x7E8, 11 }, {   0x7F4, 11 },
-    {   0x7F5, 11 }, {   0x7F7, 11 }, {   0xFFB, 12 }, {   0x7FA, 11 },
-    {   0x3EC, 10 }, {   0x3DF, 10 }, {   0x3E1, 10 }, {   0x3E4, 10 },
-    {   0x3E6, 10 }, {   0x3F0, 10 }, {   0x7E9, 11 }, {   0x7EF, 11 },
-    {   0xFF8, 12 }, {   0xFFE, 12 }, {   0xFFC, 12 }, {   0xFFF, 12 },
+static const uint16_t code5[81] = {
+    0x1fff, 0x0ff7, 0x07f4, 0x07e8, 0x03f1, 0x07ee, 0x07f9, 0x0ff8,
+    0x1ffd, 0x0ffd, 0x07f1, 0x03e8, 0x01e8, 0x00f0, 0x01ec, 0x03ee,
+    0x07f2, 0x0ffa, 0x0ff4, 0x03ef, 0x01f2, 0x00e8, 0x0070, 0x00ec,
+    0x01f0, 0x03ea, 0x07f3, 0x07eb, 0x01eb, 0x00ea, 0x001a, 0x0008,
+    0x0019, 0x00ee, 0x01ef, 0x07ed, 0x03f0, 0x00f2, 0x0073, 0x000b,
+    0x0000, 0x000a, 0x0071, 0x00f3, 0x07e9, 0x07ef, 0x01ee, 0x00ef,
+    0x0018, 0x0009, 0x001b, 0x00eb, 0x01e9, 0x07ec, 0x07f6, 0x03eb,
+    0x01f3, 0x00ed, 0x0072, 0x00e9, 0x01f1, 0x03ed, 0x07f7, 0x0ff6,
+    0x07f0, 0x03e9, 0x01ed, 0x00f1, 0x01ea, 0x03ec, 0x07f8, 0x0ff9,
+    0x1ffc, 0x0ffc, 0x0ff5, 0x07ea, 0x03f3, 0x03f2, 0x07f5, 0x0ffb,
+    0x1ffe,
 };
 
-static const uint16_t codebook11[][2] = {
-    {     0x0,  4 },
-    {     0x6,  5 }, {    0x19,  6 }, {    0x3D,  7 }, {    0x9C,  8 },
-    {    0xC6,  8 }, {   0x1A7,  9 }, {   0x390, 10 }, {   0x3C2, 10 },
-    {   0x3DF, 10 }, {   0x7E6, 11 }, {   0x7F3, 11 }, {   0xFFB, 12 },
-    {   0x7EC, 11 }, {   0xFFA, 12 }, {   0xFFE, 12 }, {   0x38E, 10 },
-    {     0x5,  5 }, {     0x1,  4 }, {     0x8,  5 }, {    0x14,  6 },
-    {    0x37,  7 }, {    0x42,  7 }, {    0x92,  8 }, {    0xAF,  8 },
-    {   0x191,  9 }, {   0x1A5,  9 }, {   0x1B5,  9 }, {   0x39E, 10 },
-    {   0x3C0, 10 }, {   0x3A2, 10 }, {   0x3CD, 10 }, {   0x7D6, 11 },
-    {    0xAE,  8 }, {    0x17,  6 }, {     0x7,  5 }, {     0x9,  5 },
-    {    0x18,  6 }, {    0x39,  7 }, {    0x40,  7 }, {    0x8E,  8 },
-    {    0xA3,  8 }, {    0xB8,  8 }, {   0x199,  9 }, {   0x1AC,  9 },
-    {   0x1C1,  9 }, {   0x3B1, 10 }, {   0x396, 10 }, {   0x3BE, 10 },
-    {   0x3CA, 10 }, {    0x9D,  8 }, {    0x3C,  7 }, {    0x15,  6 },
-    {    0x16,  6 }, {    0x1A,  6 }, {    0x3B,  7 }, {    0x44,  7 },
-    {    0x91,  8 }, {    0xA5,  8 }, {    0xBE,  8 }, {   0x196,  9 },
-    {   0x1AE,  9 }, {   0x1B9,  9 }, {   0x3A1, 10 }, {   0x391, 10 },
-    {   0x3A5, 10 }, {   0x3D5, 10 }, {    0x94,  8 }, {    0x9A,  8 },
-    {    0x36,  7 }, {    0x38,  7 }, {    0x3A,  7 }, {    0x41,  7 },
-    {    0x8C,  8 }, {    0x9B,  8 }, {    0xB0,  8 }, {    0xC3,  8 },
-    {   0x19E,  9 }, {   0x1AB,  9 }, {   0x1BC,  9 }, {   0x39F, 10 },
-    {   0x38F, 10 }, {   0x3A9, 10 }, {   0x3CF, 10 }, {    0x93,  8 },
-    {    0xBF,  8 }, {    0x3E,  7 }, {    0x3F,  7 }, {    0x43,  7 },
-    {    0x45,  7 }, {    0x9E,  8 }, {    0xA7,  8 }, {    0xB9,  8 },
-    {   0x194,  9 }, {   0x1A2,  9 }, {   0x1BA,  9 }, {   0x1C3,  9 },
-    {   0x3A6, 10 }, {   0x3A7, 10 }, {   0x3BB, 10 }, {   0x3D4, 10 },
-    {    0x9F,  8 }, {   0x1A0,  9 }, {    0x8F,  8 }, {    0x8D,  8 },
-    {    0x90,  8 }, {    0x98,  8 }, {    0xA6,  8 }, {    0xB6,  8 },
-    {    0xC4,  8 }, {   0x19F,  9 }, {   0x1AF,  9 }, {   0x1BF,  9 },
-    {   0x399, 10 }, {   0x3BF, 10 }, {   0x3B4, 10 }, {   0x3C9, 10 },
-    {   0x3E7, 10 }, {    0xA8,  8 }, {   0x1B6,  9 }, {    0xAB,  8 },
-    {    0xA4,  8 }, {    0xAA,  8 }, {    0xB2,  8 }, {    0xC2,  8 },
-    {    0xC5,  8 }, {   0x198,  9 }, {   0x1A4,  9 }, {   0x1B8,  9 },
-    {   0x38C, 10 }, {   0x3A4, 10 }, {   0x3C4, 10 }, {   0x3C6, 10 },
-    {   0x3DD, 10 }, {   0x3E8, 10 }, {    0xAD,  8 }, {   0x3AF, 10 },
-    {   0x192,  9 }, {    0xBD,  8 }, {    0xBC,  8 }, {   0x18E,  9 },
-    {   0x197,  9 }, {   0x19A,  9 }, {   0x1A3,  9 }, {   0x1B1,  9 },
-    {   0x38D, 10 }, {   0x398, 10 }, {   0x3B7, 10 }, {   0x3D3, 10 },
-    {   0x3D1, 10 }, {   0x3DB, 10 }, {   0x7DD, 11 }, {    0xB4,  8 },
-    {   0x3DE, 10 }, {   0x1A9,  9 }, {   0x19B,  9 }, {   0x19C,  9 },
-    {   0x1A1,  9 }, {   0x1AA,  9 }, {   0x1AD,  9 }, {   0x1B3,  9 },
-    {   0x38B, 10 }, {   0x3B2, 10 }, {   0x3B8, 10 }, {   0x3CE, 10 },
-    {   0x3E1, 10 }, {   0x3E0, 10 }, {   0x7D2, 11 }, {   0x7E5, 11 },
-    {    0xB7,  8 }, {   0x7E3, 11 }, {   0x1BB,  9 }, {   0x1A8,  9 },
-    {   0x1A6,  9 }, {   0x1B0,  9 }, {   0x1B2,  9 }, {   0x1B7,  9 },
-    {   0x39B, 10 }, {   0x39A, 10 }, {   0x3BA, 10 }, {   0x3B5, 10 },
-    {   0x3D6, 10 }, {   0x7D7, 11 }, {   0x3E4, 10 }, {   0x7D8, 11 },
-    {   0x7EA, 11 }, {    0xBA,  8 }, {   0x7E8, 11 }, {   0x3A0, 10 },
-    {   0x1BD,  9 }, {   0x1B4,  9 }, {   0x38A, 10 }, {   0x1C4,  9 },
-    {   0x392, 10 }, {   0x3AA, 10 }, {   0x3B0, 10 }, {   0x3BC, 10 },
-    {   0x3D7, 10 }, {   0x7D4, 11 }, {   0x7DC, 11 }, {   0x7DB, 11 },
-    {   0x7D5, 11 }, {   0x7F0, 11 }, {    0xC1,  8 }, {   0x7FB, 11 },
-    {   0x3C8, 10 }, {   0x3A3, 10 }, {   0x395, 10 }, {   0x39D, 10 },
-    {   0x3AC, 10 }, {   0x3AE, 10 }, {   0x3C5, 10 }, {   0x3D8, 10 },
-    {   0x3E2, 10 }, {   0x3E6, 10 }, {   0x7E4, 11 }, {   0x7E7, 11 },
-    {   0x7E0, 11 }, {   0x7E9, 11 }, {   0x7F7, 11 }, {   0x190,  9 },
-    {   0x7F2, 11 }, {   0x393, 10 }, {   0x1BE,  9 }, {   0x1C0,  9 },
-    {   0x394, 10 }, {   0x397, 10 }, {   0x3AD, 10 }, {   0x3C3, 10 },
-    {   0x3C1, 10 }, {   0x3D2, 10 }, {   0x7DA, 11 }, {   0x7D9, 11 },
-    {   0x7DF, 11 }, {   0x7EB, 11 }, {   0x7F4, 11 }, {   0x7FA, 11 },
-    {   0x195,  9 }, {   0x7F8, 11 }, {   0x3BD, 10 }, {   0x39C, 10 },
-    {   0x3AB, 10 }, {   0x3A8, 10 }, {   0x3B3, 10 }, {   0x3B9, 10 },
-    {   0x3D0, 10 }, {   0x3E3, 10 }, {   0x3E5, 10 }, {   0x7E2, 11 },
-    {   0x7DE, 11 }, {   0x7ED, 11 }, {   0x7F1, 11 }, {   0x7F9, 11 },
-    {   0x7FC, 11 }, {   0x193,  9 }, {   0xFFD, 12 }, {   0x3DC, 10 },
-    {   0x3B6, 10 }, {   0x3C7, 10 }, {   0x3CC, 10 }, {   0x3CB, 10 },
-    {   0x3D9, 10 }, {   0x3DA, 10 }, {   0x7D3, 11 }, {   0x7E1, 11 },
-    {   0x7EE, 11 }, {   0x7EF, 11 }, {   0x7F5, 11 }, {   0x7F6, 11 },
-    {   0xFFC, 12 }, {   0xFFF, 12 }, {   0x19D,  9 }, {   0x1C2,  9 },
-    {    0xB5,  8 }, {    0xA1,  8 }, {    0x96,  8 }, {    0x97,  8 },
-    {    0x95,  8 }, {    0x99,  8 }, {    0xA0,  8 }, {    0xA2,  8 },
-    {    0xAC,  8 }, {    0xA9,  8 }, {    0xB1,  8 }, {    0xB3,  8 },
-    {    0xBB,  8 }, {    0xC0,  8 }, {   0x18F,  9 }, {     0x4,  5 },
+static const uint8_t bits5[81] = {
+    13, 12, 11, 11, 10, 11, 11, 12, 13, 12, 11, 10,  9,  8,  9, 10,
+    11, 12, 12, 10,  9,  8,  7,  8,  9, 10, 11, 11,  9,  8,  5,  4,
+     5,  8,  9, 11, 10,  8,  7,  4,  1,  4,  7,  8, 11, 11,  9,  8,
+     5,  4,  5,  8,  9, 11, 11, 10,  9,  8,  7,  8,  9, 10, 11, 12,
+    11, 10,  9,  8,  9, 10, 11, 12, 13, 12, 12, 11, 10, 10, 11, 12,
+    13,
+};
+
+static const uint16_t code6[81] = {
+    0x7fe, 0x3fd, 0x1f1, 0x1eb, 0x1f4, 0x1ea, 0x1f0, 0x3fc,
+    0x7fd, 0x3f6, 0x1e5, 0x0ea, 0x06c, 0x071, 0x068, 0x0f0,
+    0x1e6, 0x3f7, 0x1f3, 0x0ef, 0x032, 0x027, 0x028, 0x026,
+    0x031, 0x0eb, 0x1f7, 0x1e8, 0x06f, 0x02e, 0x008, 0x004,
+    0x006, 0x029, 0x06b, 0x1ee, 0x1ef, 0x072, 0x02d, 0x002,
+    0x000, 0x003, 0x02f, 0x073, 0x1fa, 0x1e7, 0x06e, 0x02b,
+    0x007, 0x001, 0x005, 0x02c, 0x06d, 0x1ec, 0x1f9, 0x0ee,
+    0x030, 0x024, 0x02a, 0x025, 0x033, 0x0ec, 0x1f2, 0x3f8,
+    0x1e4, 0x0ed, 0x06a, 0x070, 0x069, 0x074, 0x0f1, 0x3fa,
+    0x7ff, 0x3f9, 0x1f6, 0x1ed, 0x1f8, 0x1e9, 0x1f5, 0x3fb,
+    0x7fc,
+};
+
+static const uint8_t bits6[81] = {
+    11, 10,  9,  9,  9,  9,  9, 10, 11, 10,  9,  8,  7,  7,  7,  8,
+     9, 10,  9,  8,  6,  6,  6,  6,  6,  8,  9,  9,  7,  6,  4,  4,
+     4,  6,  7,  9,  9,  7,  6,  4,  4,  4,  6,  7,  9,  9,  7,  6,
+     4,  4,  4,  6,  7,  9,  9,  8,  6,  6,  6,  6,  6,  8,  9, 10,
+     9,  8,  7,  7,  7,  7,  8, 10, 11, 10,  9,  9,  9,  9,  9, 10,
+    11,
+};
+
+static const uint16_t code7[64] = {
+    0x000, 0x005, 0x037, 0x074, 0x0f2, 0x1eb, 0x3ed, 0x7f7,
+    0x004, 0x00c, 0x035, 0x071, 0x0ec, 0x0ee, 0x1ee, 0x1f5,
+    0x036, 0x034, 0x072, 0x0ea, 0x0f1, 0x1e9, 0x1f3, 0x3f5,
+    0x073, 0x070, 0x0eb, 0x0f0, 0x1f1, 0x1f0, 0x3ec, 0x3fa,
+    0x0f3, 0x0ed, 0x1e8, 0x1ef, 0x3ef, 0x3f1, 0x3f9, 0x7fb,
+    0x1ed, 0x0ef, 0x1ea, 0x1f2, 0x3f3, 0x3f8, 0x7f9, 0x7fc,
+    0x3ee, 0x1ec, 0x1f4, 0x3f4, 0x3f7, 0x7f8, 0xffd, 0xffe,
+    0x7f6, 0x3f0, 0x3f2, 0x3f6, 0x7fa, 0x7fd, 0xffc, 0xfff,
+};
+
+static const uint8_t bits7[64] = {
+     1,  3,  6,  7,  8,  9, 10, 11,  3,  4,  6,  7,  8,  8,  9,  9,
+     6,  6,  7,  8,  8,  9,  9, 10,  7,  7,  8,  8,  9,  9, 10, 10,
+     8,  8,  9,  9, 10, 10, 10, 11,  9,  8,  9,  9, 10, 10, 11, 11,
+    10,  9,  9, 10, 10, 11, 12, 12, 11, 10, 10, 10, 11, 11, 12, 12,
+};
+
+static const uint16_t code8[64] = {
+    0x00e, 0x005, 0x010, 0x030, 0x06f, 0x0f1, 0x1fa, 0x3fe,
+    0x003, 0x000, 0x004, 0x012, 0x02c, 0x06a, 0x075, 0x0f8,
+    0x00f, 0x002, 0x006, 0x014, 0x02e, 0x069, 0x072, 0x0f5,
+    0x02f, 0x011, 0x013, 0x02a, 0x032, 0x06c, 0x0ec, 0x0fa,
+    0x071, 0x02b, 0x02d, 0x031, 0x06d, 0x070, 0x0f2, 0x1f9,
+    0x0ef, 0x068, 0x033, 0x06b, 0x06e, 0x0ee, 0x0f9, 0x3fc,
+    0x1f8, 0x074, 0x073, 0x0ed, 0x0f0, 0x0f6, 0x1f6, 0x1fd,
+    0x3fd, 0x0f3, 0x0f4, 0x0f7, 0x1f7, 0x1fb, 0x1fc, 0x3ff,
+};
+
+static const uint8_t bits8[64] = {
+     5,  4,  5,  6,  7,  8,  9, 10,  4,  3,  4,  5,  6,  7,  7,  8,
+     5,  4,  4,  5,  6,  7,  7,  8,  6,  5,  5,  6,  6,  7,  8,  8,
+     7,  6,  6,  6,  7,  7,  8,  9,  8,  7,  6,  7,  7,  8,  8, 10,
+     9,  7,  7,  8,  8,  8,  9,  9, 10,  8,  8,  8,  9,  9,  9, 10,
+};
+
+static const uint16_t code9[169] = {
+    0x0000, 0x0005, 0x0037, 0x00e7, 0x01de, 0x03ce, 0x03d9, 0x07c8,
+    0x07cd, 0x0fc8, 0x0fdd, 0x1fe4, 0x1fec, 0x0004, 0x000c, 0x0035,
+    0x0072, 0x00ea, 0x00ed, 0x01e2, 0x03d1, 0x03d3, 0x03e0, 0x07d8,
+    0x0fcf, 0x0fd5, 0x0036, 0x0034, 0x0071, 0x00e8, 0x00ec, 0x01e1,
+    0x03cf, 0x03dd, 0x03db, 0x07d0, 0x0fc7, 0x0fd4, 0x0fe4, 0x00e6,
+    0x0070, 0x00e9, 0x01dd, 0x01e3, 0x03d2, 0x03dc, 0x07cc, 0x07ca,
+    0x07de, 0x0fd8, 0x0fea, 0x1fdb, 0x01df, 0x00eb, 0x01dc, 0x01e6,
+    0x03d5, 0x03de, 0x07cb, 0x07dd, 0x07dc, 0x0fcd, 0x0fe2, 0x0fe7,
+    0x1fe1, 0x03d0, 0x01e0, 0x01e4, 0x03d6, 0x07c5, 0x07d1, 0x07db,
+    0x0fd2, 0x07e0, 0x0fd9, 0x0feb, 0x1fe3, 0x1fe9, 0x07c4, 0x01e5,
+    0x03d7, 0x07c6, 0x07cf, 0x07da, 0x0fcb, 0x0fda, 0x0fe3, 0x0fe9,
+    0x1fe6, 0x1ff3, 0x1ff7, 0x07d3, 0x03d8, 0x03e1, 0x07d4, 0x07d9,
+    0x0fd3, 0x0fde, 0x1fdd, 0x1fd9, 0x1fe2, 0x1fea, 0x1ff1, 0x1ff6,
+    0x07d2, 0x03d4, 0x03da, 0x07c7, 0x07d7, 0x07e2, 0x0fce, 0x0fdb,
+    0x1fd8, 0x1fee, 0x3ff0, 0x1ff4, 0x3ff2, 0x07e1, 0x03df, 0x07c9,
+    0x07d6, 0x0fca, 0x0fd0, 0x0fe5, 0x0fe6, 0x1feb, 0x1fef, 0x3ff3,
+    0x3ff4, 0x3ff5, 0x0fe0, 0x07ce, 0x07d5, 0x0fc6, 0x0fd1, 0x0fe1,
+    0x1fe0, 0x1fe8, 0x1ff0, 0x3ff1, 0x3ff8, 0x3ff6, 0x7ffc, 0x0fe8,
+    0x07df, 0x0fc9, 0x0fd7, 0x0fdc, 0x1fdc, 0x1fdf, 0x1fed, 0x1ff5,
+    0x3ff9, 0x3ffb, 0x7ffd, 0x7ffe, 0x1fe7, 0x0fcc, 0x0fd6, 0x0fdf,
+    0x1fde, 0x1fda, 0x1fe5, 0x1ff2, 0x3ffa, 0x3ff7, 0x3ffc, 0x3ffd,
+    0x7fff,
+};
+
+static const uint8_t bits9[169] = {
+     1,  3,  6,  8,  9, 10, 10, 11, 11, 12, 12, 13, 13,  3,  4,  6,
+     7,  8,  8,  9, 10, 10, 10, 11, 12, 12,  6,  6,  7,  8,  8,  9,
+    10, 10, 10, 11, 12, 12, 12,  8,  7,  8,  9,  9, 10, 10, 11, 11,
+    11, 12, 12, 13,  9,  8,  9,  9, 10, 10, 11, 11, 11, 12, 12, 12,
+    13, 10,  9,  9, 10, 11, 11, 11, 12, 11, 12, 12, 13, 13, 11,  9,
+    10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 11, 10, 10, 11, 11,
+    12, 12, 13, 13, 13, 13, 13, 13, 11, 10, 10, 11, 11, 11, 12, 12,
+    13, 13, 14, 13, 14, 11, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14,
+    14, 14, 12, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 12,
+    11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 13, 12, 12, 12,
+    13, 13, 13, 13, 14, 14, 14, 14, 15,
+};
+
+static const uint16_t code10[169] = {
+    0x022, 0x008, 0x01d, 0x026, 0x05f, 0x0d3, 0x1cf, 0x3d0,
+    0x3d7, 0x3ed, 0x7f0, 0x7f6, 0xffd, 0x007, 0x000, 0x001,
+    0x009, 0x020, 0x054, 0x060, 0x0d5, 0x0dc, 0x1d4, 0x3cd,
+    0x3de, 0x7e7, 0x01c, 0x002, 0x006, 0x00c, 0x01e, 0x028,
+    0x05b, 0x0cd, 0x0d9, 0x1ce, 0x1dc, 0x3d9, 0x3f1, 0x025,
+    0x00b, 0x00a, 0x00d, 0x024, 0x057, 0x061, 0x0cc, 0x0dd,
+    0x1cc, 0x1de, 0x3d3, 0x3e7, 0x05d, 0x021, 0x01f, 0x023,
+    0x027, 0x059, 0x064, 0x0d8, 0x0df, 0x1d2, 0x1e2, 0x3dd,
+    0x3ee, 0x0d1, 0x055, 0x029, 0x056, 0x058, 0x062, 0x0ce,
+    0x0e0, 0x0e2, 0x1da, 0x3d4, 0x3e3, 0x7eb, 0x1c9, 0x05e,
+    0x05a, 0x05c, 0x063, 0x0ca, 0x0da, 0x1c7, 0x1ca, 0x1e0,
+    0x3db, 0x3e8, 0x7ec, 0x1e3, 0x0d2, 0x0cb, 0x0d0, 0x0d7,
+    0x0db, 0x1c6, 0x1d5, 0x1d8, 0x3ca, 0x3da, 0x7ea, 0x7f1,
+    0x1e1, 0x0d4, 0x0cf, 0x0d6, 0x0de, 0x0e1, 0x1d0, 0x1d6,
+    0x3d1, 0x3d5, 0x3f2, 0x7ee, 0x7fb, 0x3e9, 0x1cd, 0x1c8,
+    0x1cb, 0x1d1, 0x1d7, 0x1df, 0x3cf, 0x3e0, 0x3ef, 0x7e6,
+    0x7f8, 0xffa, 0x3eb, 0x1dd, 0x1d3, 0x1d9, 0x1db, 0x3d2,
+    0x3cc, 0x3dc, 0x3ea, 0x7ed, 0x7f3, 0x7f9, 0xff9, 0x7f2,
+    0x3ce, 0x1e4, 0x3cb, 0x3d8, 0x3d6, 0x3e2, 0x3e5, 0x7e8,
+    0x7f4, 0x7f5, 0x7f7, 0xffb, 0x7fa, 0x3ec, 0x3df, 0x3e1,
+    0x3e4, 0x3e6, 0x3f0, 0x7e9, 0x7ef, 0xff8, 0xffe, 0xffc,
+    0xfff,
+};
+
+static const uint8_t bits10[169] = {
+     6,  5,  6,  6,  7,  8,  9, 10, 10, 10, 11, 11, 12,  5,  4,  4,
+     5,  6,  7,  7,  8,  8,  9, 10, 10, 11,  6,  4,  5,  5,  6,  6,
+     7,  8,  8,  9,  9, 10, 10,  6,  5,  5,  5,  6,  7,  7,  8,  8,
+     9,  9, 10, 10,  7,  6,  6,  6,  6,  7,  7,  8,  8,  9,  9, 10,
+    10,  8,  7,  6,  7,  7,  7,  8,  8,  8,  9, 10, 10, 11,  9,  7,
+     7,  7,  7,  8,  8,  9,  9,  9, 10, 10, 11,  9,  8,  8,  8,  8,
+     8,  9,  9,  9, 10, 10, 11, 11,  9,  8,  8,  8,  8,  8,  9,  9,
+    10, 10, 10, 11, 11, 10,  9,  9,  9,  9,  9,  9, 10, 10, 10, 11,
+    11, 12, 10,  9,  9,  9,  9, 10, 10, 10, 10, 11, 11, 11, 12, 11,
+    10,  9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 11, 10, 10, 10,
+    10, 10, 10, 11, 11, 12, 12, 12, 12,
+};
+
+static const uint16_t code11[289] = {
+    0x000, 0x006, 0x019, 0x03d, 0x09c, 0x0c6, 0x1a7, 0x390,
+    0x3c2, 0x3df, 0x7e6, 0x7f3, 0xffb, 0x7ec, 0xffa, 0xffe,
+    0x38e, 0x005, 0x001, 0x008, 0x014, 0x037, 0x042, 0x092,
+    0x0af, 0x191, 0x1a5, 0x1b5, 0x39e, 0x3c0, 0x3a2, 0x3cd,
+    0x7d6, 0x0ae, 0x017, 0x007, 0x009, 0x018, 0x039, 0x040,
+    0x08e, 0x0a3, 0x0b8, 0x199, 0x1ac, 0x1c1, 0x3b1, 0x396,
+    0x3be, 0x3ca, 0x09d, 0x03c, 0x015, 0x016, 0x01a, 0x03b,
+    0x044, 0x091, 0x0a5, 0x0be, 0x196, 0x1ae, 0x1b9, 0x3a1,
+    0x391, 0x3a5, 0x3d5, 0x094, 0x09a, 0x036, 0x038, 0x03a,
+    0x041, 0x08c, 0x09b, 0x0b0, 0x0c3, 0x19e, 0x1ab, 0x1bc,
+    0x39f, 0x38f, 0x3a9, 0x3cf, 0x093, 0x0bf, 0x03e, 0x03f,
+    0x043, 0x045, 0x09e, 0x0a7, 0x0b9, 0x194, 0x1a2, 0x1ba,
+    0x1c3, 0x3a6, 0x3a7, 0x3bb, 0x3d4, 0x09f, 0x1a0, 0x08f,
+    0x08d, 0x090, 0x098, 0x0a6, 0x0b6, 0x0c4, 0x19f, 0x1af,
+    0x1bf, 0x399, 0x3bf, 0x3b4, 0x3c9, 0x3e7, 0x0a8, 0x1b6,
+    0x0ab, 0x0a4, 0x0aa, 0x0b2, 0x0c2, 0x0c5, 0x198, 0x1a4,
+    0x1b8, 0x38c, 0x3a4, 0x3c4, 0x3c6, 0x3dd, 0x3e8, 0x0ad,
+    0x3af, 0x192, 0x0bd, 0x0bc, 0x18e, 0x197, 0x19a, 0x1a3,
+    0x1b1, 0x38d, 0x398, 0x3b7, 0x3d3, 0x3d1, 0x3db, 0x7dd,
+    0x0b4, 0x3de, 0x1a9, 0x19b, 0x19c, 0x1a1, 0x1aa, 0x1ad,
+    0x1b3, 0x38b, 0x3b2, 0x3b8, 0x3ce, 0x3e1, 0x3e0, 0x7d2,
+    0x7e5, 0x0b7, 0x7e3, 0x1bb, 0x1a8, 0x1a6, 0x1b0, 0x1b2,
+    0x1b7, 0x39b, 0x39a, 0x3ba, 0x3b5, 0x3d6, 0x7d7, 0x3e4,
+    0x7d8, 0x7ea, 0x0ba, 0x7e8, 0x3a0, 0x1bd, 0x1b4, 0x38a,
+    0x1c4, 0x392, 0x3aa, 0x3b0, 0x3bc, 0x3d7, 0x7d4, 0x7dc,
+    0x7db, 0x7d5, 0x7f0, 0x0c1, 0x7fb, 0x3c8, 0x3a3, 0x395,
+    0x39d, 0x3ac, 0x3ae, 0x3c5, 0x3d8, 0x3e2, 0x3e6, 0x7e4,
+    0x7e7, 0x7e0, 0x7e9, 0x7f7, 0x190, 0x7f2, 0x393, 0x1be,
+    0x1c0, 0x394, 0x397, 0x3ad, 0x3c3, 0x3c1, 0x3d2, 0x7da,
+    0x7d9, 0x7df, 0x7eb, 0x7f4, 0x7fa, 0x195, 0x7f8, 0x3bd,
+    0x39c, 0x3ab, 0x3a8, 0x3b3, 0x3b9, 0x3d0, 0x3e3, 0x3e5,
+    0x7e2, 0x7de, 0x7ed, 0x7f1, 0x7f9, 0x7fc, 0x193, 0xffd,
+    0x3dc, 0x3b6, 0x3c7, 0x3cc, 0x3cb, 0x3d9, 0x3da, 0x7d3,
+    0x7e1, 0x7ee, 0x7ef, 0x7f5, 0x7f6, 0xffc, 0xfff, 0x19d,
+    0x1c2, 0x0b5, 0x0a1, 0x096, 0x097, 0x095, 0x099, 0x0a0,
+    0x0a2, 0x0ac, 0x0a9, 0x0b1, 0x0b3, 0x0bb, 0x0c0, 0x18f,
+    0x004,
+};
+
+static const uint8_t bits11[289] = {
+     4,  5,  6,  7,  8,  8,  9, 10, 10, 10, 11, 11, 12, 11, 12, 12,
+    10,  5,  4,  5,  6,  7,  7,  8,  8,  9,  9,  9, 10, 10, 10, 10,
+    11,  8,  6,  5,  5,  6,  7,  7,  8,  8,  8,  9,  9,  9, 10, 10,
+    10, 10,  8,  7,  6,  6,  6,  7,  7,  8,  8,  8,  9,  9,  9, 10,
+    10, 10, 10,  8,  8,  7,  7,  7,  7,  8,  8,  8,  8,  9,  9,  9,
+    10, 10, 10, 10,  8,  8,  7,  7,  7,  7,  8,  8,  8,  9,  9,  9,
+     9, 10, 10, 10, 10,  8,  9,  8,  8,  8,  8,  8,  8,  8,  9,  9,
+     9, 10, 10, 10, 10, 10,  8,  9,  8,  8,  8,  8,  8,  8,  9,  9,
+     9, 10, 10, 10, 10, 10, 10,  8, 10,  9,  8,  8,  9,  9,  9,  9,
+     9, 10, 10, 10, 10, 10, 10, 11,  8, 10,  9,  9,  9,  9,  9,  9,
+     9, 10, 10, 10, 10, 10, 10, 11, 11,  8, 11,  9,  9,  9,  9,  9,
+     9, 10, 10, 10, 10, 10, 11, 10, 11, 11,  8, 11, 10,  9,  9, 10,
+     9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11,  8, 11, 10, 10, 10,
+    10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11,  9, 11, 10,  9,
+     9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11,  9, 11, 10,
+    10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11,  9, 12,
+    10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12,  9,
+     9,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  9,
+     5,
 };
 
 #endif /* FFMPEG_AACTAB_H */



More information about the FFmpeg-soc mailing list