[FFmpeg-devel] [PATCH 07/13] avcodec/dcahuff: Combine tables, use ff_init_vlc_from_lengths()

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Sep 13 14:33:04 EEST 2022


Up until now, initializing the dca VLC tables uses ff_init_vlc_sparse()
with length tables of type uint8_t and code tables of type uint16_t
(except for the LBR tables, which uses length and symbols of type
uint8_t; these tables are interleaved). In case of the quant index
codebooks these arrays were accessed via tables of pointers to the
individual tables.

This commit changes this: First, we switch to ff_init_vlc_from_lengths()
to replace the uint16_t code tables by uint8_t symbol tables
(this necessitates ordering the tables from left-to-right in the tree
first). These symbol tables are interleaved with the length tables.

Furthermore, these tables are combined in order to remove the table of
pointers to individual tables, thereby avoiding relocations (for x64
elf systems this amounts to 96*24B = 2304B saved in .rela.dyn) and
saving 1280B from .data.rel.ro (for 64bit systems). Meanwhile the
savings in .rodata amount to 2709 + 2 * 334 = 3377B. Due to padding
the actual savings are higher: The ELF x64 ABI requires objects >= 16B
to be padded to 16B and lots of the tables have 2^n + 1 elements
of these were from replacing uint16_t codes with uint8_t symbols;
the rest was due to the fact that combining the tables eliminated
padding (the ELF x64 ABI requires objects >= 16B to be padded to 16B
and lots of the tables have 2^n + 1 elements)). Taking this into
account gives savings of 4548B. (GCC by default uses an even higher
alignment (controlled by -malign-data); for it the savings are 5748B.)

These changes also necessitated to modify the init code for
the encoder tables.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
A part of me wants to move the whole LBR tables (including its init
code) to dca_lbr.c.

 libavcodec/dcaenc.c  |   22 +-
 libavcodec/dcahuff.c | 1963 ++++++++++++++++--------------------------
 libavcodec/dcahuff.h |    6 +-
 3 files changed, 766 insertions(+), 1225 deletions(-)

diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index 4a02aa9d46..d0de6d3eee 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -166,30 +166,38 @@ static uint16_t bitalloc_table[DCA_NUM_BITALLOC_CODES][2];
 static const uint16_t (*bitalloc_tables[DCA_CODE_BOOKS][8])[2];
 
 static av_cold void create_enc_table(uint16_t dst[][2], unsigned count,
-                                     const uint8_t len[], const uint16_t codes[])
+                                     const uint8_t (**src_tablep)[2])
 {
+    const uint8_t (*src_table)[2] = *src_tablep;
+    uint16_t code = 0;
+
     for (unsigned i = 0; i < count; i++) {
-        dst[i][0] = codes[i];
-        dst[i][1] = len[i];
+        unsigned dst_idx = src_table[i][0];
+
+        dst[dst_idx][0] = code >> (16 - src_table[i][1]);
+        dst[dst_idx][1] = src_table[i][1];
+
+        code += 1 << (16 - src_table[i][1]);
     }
+    *src_tablep += count;
 }
 
 static av_cold void dcaenc_init_static_tables(void)
 {
     uint16_t (*bitalloc_dst)[2] = bitalloc_table;
+    const uint8_t (*src_table)[2] = ff_dca_vlc_src_tables;
 
     for (unsigned i = 0; i < DCA_CODE_BOOKS; i++) {
-        for (unsigned j = 0; ff_dca_bitalloc_codes[i][j]; j++) {
+        for (unsigned j = 0; j < ff_dca_quant_index_group_size[i]; j++) {
             create_enc_table(bitalloc_dst, ff_dca_bitalloc_sizes[i],
-                             ff_dca_bitalloc_bits[i][j], ff_dca_bitalloc_codes[i][j]);
+                             &src_table);
             bitalloc_tables[i][j] = bitalloc_dst - ff_dca_bitalloc_offsets[i];
             bitalloc_dst += ff_dca_bitalloc_sizes[i];
         }
     }
 
     for (unsigned i = 0; i < DCA_BITALLOC_12_COUNT; i++)
-        create_enc_table(&bitalloc_12_table[i][1], 12,
-                         ff_dca_bitalloc_12_bits[i], ff_dca_bitalloc_12_codes[i]);
+        create_enc_table(&bitalloc_12_table[i][1], 12, &src_table);
 }
 
 static int encode_init(AVCodecContext *avctx)
diff --git a/libavcodec/dcahuff.c b/libavcodec/dcahuff.c
index d17b49a089..ee4d4bcd6d 100644
--- a/libavcodec/dcahuff.c
+++ b/libavcodec/dcahuff.c
@@ -24,959 +24,15 @@
 
 #include "libavutil/macros.h"
 
+#include "dcadata.h"
 #include "dcahuff.h"
 
-#define TMODE_COUNT 4
-static const uint16_t tmode_codes[TMODE_COUNT][4] = {
-    { 0x0000, 0x0002, 0x0006, 0x0007 },
-    { 0x0002, 0x0006, 0x0007, 0x0000 },
-    { 0x0006, 0x0007, 0x0000, 0x0002 },
-    { 0x0000, 0x0001, 0x0002, 0x0003 }
-};
-
-static const uint8_t tmode_bits[TMODE_COUNT][4] = {
-    { 1, 2, 3, 3 },
-    { 2, 3, 3, 1 },
-    { 3, 3, 1, 2 },
-    { 2, 2, 2, 2 }
-};
-
 static const uint8_t bitalloc_12_vlc_bits[DCA_BITALLOC_12_COUNT] = {
     9, 7, 7, 9, 9
 };
 
-const uint16_t ff_dca_bitalloc_12_codes[DCA_BITALLOC_12_COUNT][12] = {
-    { 0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E, 0x00FF, 0x00FE,
-      0x01FB, 0x01FA, 0x01F9, 0x01F8, },
-    { 0x0001, 0x0000, 0x0002, 0x000F, 0x000C, 0x001D, 0x0039, 0x0038,
-      0x0037, 0x0036, 0x0035, 0x0034, },
-    { 0x0000, 0x0007, 0x0005, 0x0004, 0x0002, 0x000D, 0x000C, 0x0006,
-      0x000F, 0x001D, 0x0039, 0x0038, },
-    { 0x0003, 0x0002, 0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E,
-      0x007E, 0x00FE, 0x01FF, 0x01FE, },
-    { 0x0001, 0x0000, 0x0002, 0x0006, 0x000E, 0x003F, 0x003D, 0x007C,
-      0x0079, 0x0078, 0x00FB, 0x00FA, }
-};
-
-const uint8_t ff_dca_bitalloc_12_bits[DCA_BITALLOC_12_COUNT][12] = {
-    { 1, 2, 3, 4, 5, 6, 8, 8, 9, 9,  9,  9 },
-    { 1, 2, 3, 5, 5, 6, 7, 7, 7, 7,  7,  7 },
-    { 2, 3, 3, 3, 3, 4, 4, 4, 5, 6,  7,  7 },
-    { 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10 },
-    { 1, 2, 3, 4, 5, 7, 7, 8, 8, 8,  9,  9 }
-};
-
-#define SCALES_COUNT    5
 #define SCALES_VLC_BITS 9
-static const uint16_t scales_codes[SCALES_COUNT][129] = {
-    { 0x3AB0, 0x3AB2, 0x3AB4, 0x3AB6, 0x3AB8, 0x3ABA, 0x3ABC, 0x3ABE,
-      0x3AC0, 0x3AC2, 0x3AC4, 0x3AC6, 0x3AC8, 0x3ACA, 0x3ACC, 0x3ACE,
-      0x3AD0, 0x3AD2, 0x3AD4, 0x3AD6, 0x3AD8, 0x3ADA, 0x3ADC, 0x3ADE,
-      0x3AE0, 0x3AE2, 0x3AE4, 0x3AE6, 0x3AE8, 0x3AEA, 0x3AEC, 0x3AEE,
-      0x3AF0, 0x3AF2, 0x3AF4, 0x3AF6, 0x3AF8, 0x3AFA, 0x3AFC, 0x3AFE,
-      0x0540, 0x0542, 0x0544, 0x0546, 0x0548, 0x054A, 0x054C, 0x054E,
-      0x0558, 0x055E, 0x02AD, 0x0154, 0x0754, 0x03A8, 0x0056, 0x0028,
-      0x00E8, 0x004A, 0x000B, 0x003B, 0x0013, 0x0003, 0x000F, 0x0005,
-      0x0001, 0x0006, 0x0000, 0x0008, 0x001C, 0x0004, 0x0024, 0x004B,
-      0x00E9, 0x0029, 0x0057, 0x03A9, 0x0755, 0x0155, 0x02AE, 0x055F,
-      0x0559, 0x054F, 0x054D, 0x054B, 0x0549, 0x0547, 0x0545, 0x0543,
-      0x0541, 0x3AFF, 0x3AFD, 0x3AFB, 0x3AF9, 0x3AF7, 0x3AF5, 0x3AF3,
-      0x3AF1, 0x3AEF, 0x3AED, 0x3AEB, 0x3AE9, 0x3AE7, 0x3AE5, 0x3AE3,
-      0x3AE1, 0x3ADF, 0x3ADD, 0x3ADB, 0x3AD9, 0x3AD7, 0x3AD5, 0x3AD3,
-      0x3AD1, 0x3ACF, 0x3ACD, 0x3ACB, 0x3AC9, 0x3AC7, 0x3AC5, 0x3AC3,
-      0x3AC1, 0x3ABF, 0x3ABD, 0x3ABB, 0x3AB9, 0x3AB7, 0x3AB5, 0x3AB3,
-      0x3AB1, },
-    { 0x0F60, 0x0F62, 0x0F64, 0x0F66, 0x0F68, 0x0F6A, 0x0F6C, 0x0F6E,
-      0x0F70, 0x0F72, 0x0F74, 0x0F76, 0x0F78, 0x0F7A, 0x0F7C, 0x0F7E,
-      0x0F80, 0x0F82, 0x0F84, 0x0F86, 0x0F88, 0x0F8A, 0x0F8C, 0x0F8E,
-      0x0F90, 0x0F92, 0x0F94, 0x0F96, 0x0F98, 0x0F9A, 0x0F9C, 0x0F9E,
-      0x0FA0, 0x0FA2, 0x0FA4, 0x0FA6, 0x0FA8, 0x0FAA, 0x0FAC, 0x0FAE,
-      0x0FB0, 0x0FB2, 0x0FB4, 0x0FB6, 0x0FB8, 0x0FBA, 0x0FBC, 0x0FBE,
-      0x07A0, 0x07A2, 0x03D2, 0x01EA, 0x00FC, 0x007F, 0x001C, 0x000C,
-      0x0004, 0x0034, 0x0010, 0x001B, 0x0009, 0x000B, 0x000E, 0x0001,
-      0x0003, 0x0002, 0x000F, 0x000C, 0x000A, 0x0000, 0x0011, 0x0035,
-      0x0005, 0x000D, 0x001D, 0x003C, 0x00FD, 0x01EB, 0x03D3, 0x07A3,
-      0x07A1, 0x0FBF, 0x0FBD, 0x0FBB, 0x0FB9, 0x0FB7, 0x0FB5, 0x0FB3,
-      0x0FB1, 0x0FAF, 0x0FAD, 0x0FAB, 0x0FA9, 0x0FA7, 0x0FA5, 0x0FA3,
-      0x0FA1, 0x0F9F, 0x0F9D, 0x0F9B, 0x0F99, 0x0F97, 0x0F95, 0x0F93,
-      0x0F91, 0x0F8F, 0x0F8D, 0x0F8B, 0x0F89, 0x0F87, 0x0F85, 0x0F83,
-      0x0F81, 0x0F7F, 0x0F7D, 0x0F7B, 0x0F79, 0x0F77, 0x0F75, 0x0F73,
-      0x0F71, 0x0F6F, 0x0F6D, 0x0F6B, 0x0F69, 0x0F67, 0x0F65, 0x0F63,
-      0x0F61, },
-    { 0x51D0, 0x51D2, 0x51D4, 0x51D6, 0x51D8, 0x51DA, 0x51DC, 0x51DE,
-      0x51E0, 0x51E2, 0x51E4, 0x51E6, 0x51E8, 0x51EA, 0x51EC, 0x51EE,
-      0x51F0, 0x51F2, 0x51F4, 0x51F6, 0x51F8, 0x51FA, 0x51FC, 0x51FE,
-      0x70C0, 0x70C2, 0x70C4, 0x70C6, 0x70C8, 0x70CA, 0x70CC, 0x70CE,
-      0x70EC, 0x10EA, 0x3868, 0x3877, 0x0876, 0x1C35, 0x0434, 0x0A34,
-      0x0E1B, 0x021B, 0x051B, 0x070F, 0x010F, 0x0380, 0x0080, 0x0140,
-      0x01C1, 0x0041, 0x00A1, 0x00E2, 0x0022, 0x0052, 0x0072, 0x0012,
-      0x002A, 0x003A, 0x000A, 0x0016, 0x001E, 0x0006, 0x000C, 0x0000,
-      0x0004, 0x0001, 0x000D, 0x0007, 0x001F, 0x0017, 0x000B, 0x003B,
-      0x002B, 0x0013, 0x0073, 0x0053, 0x0023, 0x00E3, 0x00A2, 0x0042,
-      0x01C2, 0x0141, 0x0081, 0x0381, 0x028C, 0x010C, 0x051C, 0x021C,
-      0x0E1C, 0x0A35, 0x0435, 0x1C3A, 0x0877, 0x0874, 0x3869, 0x10EB,
-      0x70ED, 0x70CF, 0x70CD, 0x70CB, 0x70C9, 0x70C7, 0x70C5, 0x70C3,
-      0x70C1, 0x51FF, 0x51FD, 0x51FB, 0x51F9, 0x51F7, 0x51F5, 0x51F3,
-      0x51F1, 0x51EF, 0x51ED, 0x51EB, 0x51E9, 0x51E7, 0x51E5, 0x51E3,
-      0x51E1, 0x51DF, 0x51DD, 0x51DB, 0x51D9, 0x51D7, 0x51D5, 0x51D3,
-      0x51D1, },
-    { 0x6F64, 0x6F66, 0x6F68, 0x6F6A, 0x6F6C, 0x6F6E, 0x6F70, 0x6F72,
-      0x6F74, 0x6F76, 0x6F78, 0x6F7A, 0x6F7C, 0x6F7E, 0x6F80, 0x6F82,
-      0x6F84, 0x6F86, 0x6F88, 0x6F8A, 0x6F8C, 0x6F8E, 0x6F90, 0x6F92,
-      0x6F94, 0x6F96, 0x6F98, 0x6F9A, 0x6F9C, 0x6F9E, 0x6FA0, 0x6FA2,
-      0x6FA4, 0x6FA6, 0x6FA8, 0x6FAA, 0x6FAC, 0x6FAE, 0x6FB0, 0x6FB2,
-      0x6FB4, 0x6FB6, 0x17B4, 0x37DC, 0x0BDB, 0x1BEF, 0x05EE, 0x0DF8,
-      0x02F8, 0x06FD, 0x017D, 0x037F, 0x00BF, 0x0040, 0x00C0, 0x0021,
-      0x0061, 0x0011, 0x0031, 0x0009, 0x0019, 0x0006, 0x000E, 0x0004,
-      0x0000, 0x0005, 0x000F, 0x0007, 0x001A, 0x000A, 0x0036, 0x0016,
-      0x006E, 0x002E, 0x00C1, 0x0041, 0x01BC, 0x00BC, 0x037A, 0x017A,
-      0x02F9, 0x0DF9, 0x05EF, 0x05EC, 0x1BD8, 0x37DD, 0x17B5, 0x6FB7,
-      0x6FB5, 0x6FB3, 0x6FB1, 0x6FAF, 0x6FAD, 0x6FAB, 0x6FA9, 0x6FA7,
-      0x6FA5, 0x6FA3, 0x6FA1, 0x6F9F, 0x6F9D, 0x6F9B, 0x6F99, 0x6F97,
-      0x6F95, 0x6F93, 0x6F91, 0x6F8F, 0x6F8D, 0x6F8B, 0x6F89, 0x6F87,
-      0x6F85, 0x6F83, 0x6F81, 0x6F7F, 0x6F7D, 0x6F7B, 0x6F79, 0x6F77,
-      0x6F75, 0x6F73, 0x6F71, 0x6F6F, 0x6F6D, 0x6F6B, 0x6F69, 0x6F67,
-      0x6F65, },
-    { 0xDF54, 0xDF56, 0xDFC8, 0xDFCA, 0xDFCC, 0xDFCE, 0xDFD0, 0xDFD2,
-      0xDFD4, 0xDFD6, 0xDFD8, 0xDFDA, 0xDFDC, 0xDFDE, 0xDFE0, 0xDFE2,
-      0x0FE8, 0x2FEA, 0x6FA8, 0x6FF6, 0x07F5, 0x07F7, 0x37D2, 0x37F9,
-      0x03F8, 0x0BF8, 0x0BFB, 0x1BEB, 0x01FA, 0x05FA, 0x09FA, 0x0DFA,
-      0x0DFF, 0x00FF, 0x02FF, 0x06FB, 0x007C, 0x017C, 0x027C, 0x027F,
-      0x003C, 0x00BC, 0x013C, 0x01BC, 0x001C, 0x005C, 0x009C, 0x00DC,
-      0x000C, 0x002C, 0x004C, 0x006C, 0x0004, 0x0014, 0x0024, 0x0034,
-      0x0000, 0x0008, 0x0010, 0x0018, 0x001E, 0x0002, 0x0006, 0x000A,
-      0x000E, 0x000B, 0x0007, 0x0003, 0x001F, 0x0019, 0x0011, 0x0009,
-      0x0001, 0x0035, 0x0025, 0x0015, 0x0005, 0x006D, 0x004D, 0x002D,
-      0x000D, 0x00DD, 0x009D, 0x005D, 0x001D, 0x01BD, 0x013D, 0x00BD,
-      0x003D, 0x037C, 0x027D, 0x017D, 0x007D, 0x06FC, 0x04FC, 0x02FC,
-      0x00FC, 0x0DFB, 0x09FB, 0x05FB, 0x01FB, 0x1BF8, 0x1BE8, 0x0BF9,
-      0x03F9, 0x37FA, 0x37D3, 0x17F4, 0x07F6, 0x6FF7, 0x6FA9, 0x2FEB,
-      0x0FE9, 0xDFE3, 0xDFE1, 0xDFDF, 0xDFDD, 0xDFDB, 0xDFD9, 0xDFD7,
-      0xDFD5, 0xDFD3, 0xDFD1, 0xDFCF, 0xDFCD, 0xDFCB, 0xDFC9, 0xDF57,
-      0xDF55, }
-};
-
-static const uint8_t scales_bits[SCALES_COUNT][129] = {
-    { 14, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      13, 13, 13, 13, 13, 13, 13, 13,
-      13, 13, 12, 11, 11, 10,  9,  8,
-       8,  7,  6,  6,  5,  4,  4,  3,
-       2,  3,  3,  4,  5,  5,  6,  7,
-       8,  8,  9, 10, 11, 11, 12, 13,
-      13, 13, 13, 13, 13, 13, 13, 13,
-      13, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      14, 14, 14, 14, 14, 14, 14, 14,
-      14, },
-    { 15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      14, 14, 13, 12, 11, 10,  8,  7,
-       6,  6,  5,  5,  4,  4,  4,  3,
-       3,  3,  4,  4,  4,  4,  5,  6,
-       6,  7,  8,  9, 11, 12, 13, 14,
-      14, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, },
-    { 15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 14, 14, 14, 13, 13, 12, 12,
-      12, 11, 11, 11, 10, 10,  9,  9,
-       9,  8,  8,  8,  7,  7,  7,  6,
-       6,  6,  5,  5,  5,  4,  4,  3,
-       3,  3,  4,  4,  5,  5,  5,  6,
-       6,  6,  7,  7,  7,  8,  8,  8,
-       9,  9,  9, 10, 10, 10, 11, 11,
-      12, 12, 12, 13, 13, 13, 14, 14,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, },
-    { 15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 14, 14, 13, 13, 12, 12,
-      11, 11, 10, 10,  9,  8,  8,  7,
-       7,  6,  6,  5,  5,  4,  4,  3,
-       2,  3,  4,  4,  5,  5,  6,  6,
-       7,  7,  8,  8,  9,  9, 10, 10,
-      11, 12, 12, 12, 13, 14, 14, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, 15, 15, 15, 15, 15, 15, 15,
-      15, },
-    { 16, 16, 16, 16, 16, 16, 16, 16,
-      16, 16, 16, 16, 16, 16, 16, 16,
-      15, 15, 15, 15, 14, 14, 14, 14,
-      13, 13, 13, 13, 12, 12, 12, 12,
-      12, 11, 11, 11, 10, 10, 10, 10,
-       9,  9,  9,  9,  8,  8,  8,  8,
-       7,  7,  7,  7,  6,  6,  6,  6,
-       5,  5,  5,  5,  5,  4,  4,  4,
-       4,  4,  4,  4,  5,  5,  5,  5,
-       5,  6,  6,  6,  6,  7,  7,  7,
-       7,  8,  8,  8,  8,  9,  9,  9,
-       9, 10, 10, 10, 10, 11, 11, 11,
-      11, 12, 12, 12, 12, 13, 13, 13,
-      13, 14, 14, 14, 14, 15, 15, 15,
-      15, 16, 16, 16, 16, 16, 16, 16,
-      16, 16, 16, 16, 16, 16, 16, 16,
-      16,
-    }
-};
-
-static const uint16_t bitalloc_3_codes[3] = {
-    0x0003, 0x0000, 0x0002,
-};
-
-static const uint8_t bitalloc_3_bits[3] = {
-    2,  1,  2,
-};
-
-static const uint16_t bitalloc_5_codes_a[5] = {
-    0x000F, 0x0006, 0x0000, 0x0002, 0x000E,
-};
-
-static const uint16_t bitalloc_5_codes_b[5] = {
-    0x0007, 0x0001, 0x0002, 0x0000, 0x0006,
-};
-
-static const uint16_t bitalloc_5_codes_c[5] = {
-    0x0007, 0x0005, 0x0000, 0x0004, 0x0006,
-};
-
-static const uint8_t bitalloc_5_bits_a[5] = {
-    4,  3,  1,  2,  4,
-};
-
-static const uint8_t bitalloc_5_bits_b[5] = {
-    3,  2,  2,  2,  3,
-};
-
-static const uint8_t bitalloc_5_bits_c[5] = {
-    3,  3,  1,  3,  3,
-};
-
-static const uint16_t bitalloc_7_codes_a[7] = {
-    0x001E, 0x000E, 0x0005, 0x0000, 0x0006, 0x0004, 0x001F,
-};
-
-static const uint16_t bitalloc_7_codes_b[7] = {
-    0x0014, 0x000B, 0x0000, 0x0003, 0x0001, 0x0004, 0x0015,
-};
-
-static const uint16_t bitalloc_7_codes_c[7] = {
-    0x0000, 0x0002, 0x0001, 0x0003, 0x0002, 0x0003, 0x0001,
-};
-
-static const uint8_t bitalloc_7_bits_a[7] = {
-    5,  4,  3,  1,  3,  3,  5,
-};
-
-static const uint8_t bitalloc_7_bits_b[7] = {
-    5,  4,  2,  2,  2,  3,  5,
-};
-
-static const uint8_t bitalloc_7_bits_c[7] = {
-    4,  4,  2,  2,  2,  4,  4,
-};
-
-static const uint16_t bitalloc_9_codes_a[9] = {
-    0x0030, 0x0019, 0x0009, 0x0005, 0x0000, 0x0007, 0x000D, 0x0008,
-    0x0031,
-};
-
-static const uint16_t bitalloc_9_codes_b[9] = {
-    0x0018, 0x001A, 0x0002, 0x0007, 0x0002, 0x0000, 0x0003, 0x001B,
-    0x0019,
-};
-
-static const uint16_t bitalloc_9_codes_c[9] = {
-    0x001C, 0x000F, 0x0002, 0x0007, 0x0002, 0x0000, 0x0006, 0x0006,
-    0x001D,
-};
-
-static const uint8_t bitalloc_9_bits_a[9] = {
-    6,  5,  4,  3,  1,  3,  4,  4,  6,
-};
-
-static const uint8_t bitalloc_9_bits_b[9] = {
-    5,  5,  3,  3,  2,  2,  3,  5,  5,
-};
-
-static const uint8_t bitalloc_9_bits_c[9] = {
-    6,  5,  3,  3,  2,  2,  3,  4,  6,
-};
-
-static const uint16_t bitalloc_13_codes_a[13] = {
-    0x0070, 0x002E, 0x0039, 0x001D, 0x000C, 0x000F, 0x0000, 0x0004,
-    0x000D, 0x000A, 0x0016, 0x002F, 0x0071,
-};
-
-static const uint16_t bitalloc_13_codes_b[13] = {
-    0x0038, 0x0010, 0x001D, 0x0007, 0x000F, 0x0005, 0x0000, 0x0006,
-    0x0002, 0x0009, 0x0006, 0x0011, 0x0039,
-};
-
-static const uint16_t bitalloc_13_codes_c[13] = {
-    0x0004, 0x001A, 0x0003, 0x000E, 0x0000, 0x0003, 0x0005, 0x0004,
-    0x0002, 0x000F, 0x000C, 0x001B, 0x0005,
-};
-
-static const uint8_t bitalloc_13_bits_a[13] = {
-     7,  6,  6,  5,  4,  4,  1,  3,  4,  4,  5,  6,  7,
-};
-
-static const uint8_t bitalloc_13_bits_b[13] = {
-     6,  5,  5,  4,  4,  3,  2,  3,  3,  4,  4,  5,  6,
-};
-
-static const uint8_t bitalloc_13_bits_c[13] = {
-     5,  5,  4,  4,  3,  3,  3,  3,  3,  4,  4,  5,  5,
-};
-
-static const uint16_t bitalloc_17_codes_a[17] = {
-    0x0154, 0x00AB, 0x002B, 0x000B, 0x0003, 0x000A, 0x0001, 0x0006,
-    0x0001, 0x0007, 0x0004, 0x000B, 0x0000, 0x0004, 0x0014, 0x0054,
-    0x0155,
-};
-
-static const uint16_t bitalloc_17_codes_b[17] = {
-    0x007C, 0x003F, 0x0019, 0x000D, 0x001C, 0x0008, 0x000F, 0x0005,
-    0x0000, 0x0006, 0x0002, 0x0009, 0x001D, 0x000E, 0x001E, 0x0018,
-    0x007D,
-};
-
-static const uint16_t bitalloc_17_codes_c[17] = {
-    0x002C, 0x0017, 0x0005, 0x001C, 0x0003, 0x000A, 0x000F, 0x0003,
-    0x0006, 0x0004, 0x0000, 0x000B, 0x0004, 0x001D, 0x000A, 0x0004,
-    0x002D,
-};
-
-static const uint16_t bitalloc_17_codes_d[17] = {
-    0x0100, 0x0102, 0x0082, 0x0042, 0x0022, 0x0012, 0x000A, 0x0006,
-    0x0000, 0x0007, 0x000B, 0x0013, 0x0023, 0x0043, 0x0083, 0x0103,
-    0x0101,
-};
-
-static const uint16_t bitalloc_17_codes_e[17] = {
-    0x00E8, 0x00F6, 0x0075, 0x0034, 0x003B, 0x001B, 0x001F, 0x0004,
-    0x0000, 0x0005, 0x000C, 0x001C, 0x003C, 0x0035, 0x007A, 0x00F7,
-    0x00E9,
-};
-
-static const uint16_t bitalloc_17_codes_f[17] = {
-    0x0004, 0x0003, 0x001E, 0x0001, 0x0001, 0x000E, 0x0001, 0x0004,
-    0x0006, 0x0005, 0x0002, 0x000F, 0x0006, 0x000E, 0x001F, 0x0000,
-    0x0005,
-};
-
-static const uint16_t bitalloc_17_codes_g[17] = {
-    0x0060, 0x007E, 0x0031, 0x0019, 0x000D, 0x0004, 0x0000, 0x0006,
-    0x0002, 0x0007, 0x0001, 0x0005, 0x000E, 0x001E, 0x003E, 0x007F,
-    0x0061,
-};
-
-static const uint8_t bitalloc_17_bits_a[17] = {
-    12, 11,  9,  7,  5,  4,  3,  3,  2,  3,  3,  4,  4,  6,  8, 10,
-    12,
-};
-
-static const uint8_t bitalloc_17_bits_b[17] = {
-    8,  7,  6,  5,  5,  4,  4,  3,  2,  3,  3,  4,  5,  5,  6,  6,
-    8,
-};
-
-static const uint8_t bitalloc_17_bits_c[17] = {
-    7,  6,  5,  5,  4,  4,  4,  3,  3,  3,  3,  4,  4,  5,  5,  5,
-    7,
-};
-
-static const uint8_t bitalloc_17_bits_d[17] = {
-    9,  9,  8,  7,  6,  5,  4,  3,  1,  3,  4,  5,  6,  7,  8,  9,
-    9,
-};
-
-static const uint8_t bitalloc_17_bits_e[17] = {
-    8,  8,  7,  6,  6,  5,  5,  3,  1,  3,  4,  5,  6,  6,  7,  8,
-    8,
-};
-
-static const uint8_t bitalloc_17_bits_f[17] = {
-    8,  7,  6,  5,  4,  4,  3,  3,  3,  3,  3,  4,  4,  5,  6,  6,
-    8,
-};
-
-static const uint8_t bitalloc_17_bits_g[17] = {
-    8,  8,  7,  6,  5,  4,  3,  3,  2,  3,  3,  4,  5,  6,  7,  8,
-    8,
-};
-
-static const uint16_t bitalloc_25_codes_a[25] = {
-    0x2854, 0x142B, 0x050B, 0x0143, 0x00A2, 0x0052, 0x002E, 0x0015,
-    0x0004, 0x000E, 0x0000, 0x0003, 0x0006, 0x0004, 0x0001, 0x000F,
-    0x0005, 0x0016, 0x002F, 0x0053, 0x00A3, 0x00A0, 0x0284, 0x0A14,
-    0x2855,
-};
-
-static const uint16_t bitalloc_25_codes_b[25] = {
-    0x001C, 0x000F, 0x0005, 0x0000, 0x0030, 0x0036, 0x000E, 0x0019,
-    0x0001, 0x0008, 0x000E, 0x0001, 0x0005, 0x0002, 0x000F, 0x0009,
-    0x0006, 0x001A, 0x000F, 0x0037, 0x0031, 0x0001, 0x0006, 0x0004,
-    0x001D,
-};
-
-static const uint16_t bitalloc_25_codes_c[25] = {
-    0x004C, 0x0027, 0x006D, 0x0028, 0x0037, 0x000E, 0x0015, 0x0000,
-    0x0005, 0x0008, 0x000B, 0x000E, 0x0001, 0x000F, 0x000C, 0x0009,
-    0x0006, 0x0001, 0x001A, 0x000F, 0x0008, 0x0029, 0x0012, 0x006C,
-    0x004D,
-};
-
-static const uint16_t bitalloc_25_codes_d[25] = {
-    0x0780, 0x0782, 0x03C2, 0x01E2, 0x00FE, 0x0079, 0x003D, 0x001C,
-    0x000C, 0x0004, 0x0000, 0x0006, 0x0002, 0x0007, 0x0001, 0x0005,
-    0x000D, 0x001D, 0x003E, 0x007E, 0x00FF, 0x01E3, 0x03C3, 0x0783,
-    0x0781,
-};
-
-static const uint16_t bitalloc_25_codes_e[25] = {
-    0x003C, 0x0092, 0x0018, 0x001F, 0x004E, 0x000D, 0x0025, 0x0004,
-    0x0010, 0x0000, 0x000A, 0x0002, 0x0003, 0x0003, 0x000B, 0x0001,
-    0x0011, 0x0005, 0x0026, 0x000E, 0x004F, 0x0048, 0x0019, 0x0093,
-    0x003D,
-};
-
-static const uint16_t bitalloc_25_codes_f[25] = {
-    0x0324, 0x0193, 0x00CE, 0x0065, 0x0024, 0x000C, 0x0013, 0x0004,
-    0x0007, 0x000A, 0x000D, 0x000F, 0x0001, 0x0000, 0x000E, 0x000B,
-    0x0008, 0x0005, 0x0018, 0x000D, 0x0025, 0x0066, 0x00CF, 0x00C8,
-    0x0325,
-};
-
-static const uint16_t bitalloc_25_codes_g[25] = {
-    0x03A8, 0x03AE, 0x01D5, 0x0094, 0x0014, 0x004B, 0x000B, 0x003B,
-    0x0013, 0x0003, 0x000F, 0x0005, 0x0001, 0x0006, 0x0000, 0x0008,
-    0x001C, 0x0004, 0x0024, 0x0074, 0x0015, 0x0095, 0x01D6, 0x03AF,
-    0x03A9,
-};
-
-static const uint8_t bitalloc_25_bits_a[25] = {
-    14, 13, 11,  9,  8,  7,  6,  5,  4,  4,  3,  3,  3,  3,  3,  4,
-     4,  5,  6,  7,  8,  8, 10, 12, 14,
-};
-
-static const uint8_t bitalloc_25_bits_b[25] = {
-    9,  8,  7,  6,  6,  6,  5,  5,  4,  4,  4,  3,  3,  3,  4,  4,
-    4,  5,  5,  6,  6,  6,  7,  7,  9,
-};
-
-static const uint8_t bitalloc_25_bits_c[25] = {
-    8,  7,  7,  6,  6,  5,  5,  4,  4,  4,  4,  4,  3,  4,  4,  4,
-    4,  4,  5,  5,  5,  6,  6,  7,  8,
-};
-
-static const uint8_t bitalloc_25_bits_d[25] = {
-    12, 12, 11, 10,  9,  8,  7,  6,  5,  4,  3,  3,  2,  3,  3,  4,
-     5,  6,  7,  8,  9, 10, 11, 12, 12,
-};
-
-static const uint8_t bitalloc_25_bits_e[25] = {
-    8,  8,  7,  7,  7,  6,  6,  5,  5,  4,  4,  3,  2,  3,  4,  4,
-    5,  5,  6,  6,  7,  7,  7,  8,  8,
-};
-
-static const uint8_t bitalloc_25_bits_f[25] = {
-    10,  9,  8,  7,  6,  5,  5,  4,  4,  4,  4,  4,  3,  3,  4,  4,
-     4,  4,  5,  5,  6,  7,  8,  8, 10,
-};
-
-static const uint8_t bitalloc_25_bits_g[25] = {
-    10, 10,  9,  8,  7,  7,  6,  6,  5,  4,  4,  3,  2,  3,  3,  4,
-     5,  5,  6,  7,  7,  8,  9, 10, 10,
-};
-
-static const uint16_t bitalloc_33_codes_a[33] = {
-    0x1580, 0x1582, 0x0AC2, 0x0562, 0x02B2, 0x015E, 0x00AD, 0x0054,
-    0x001C, 0x003C, 0x000F, 0x001F, 0x0008, 0x000B, 0x000D, 0x0000,
-    0x0002, 0x0001, 0x000E, 0x000C, 0x0009, 0x0006, 0x0014, 0x003D,
-    0x001D, 0x0055, 0x00AE, 0x015F, 0x02B3, 0x0563, 0x0AC3, 0x1583,
-    0x1581,
-};
-
-static const uint16_t bitalloc_33_codes_b[33] = {
-    0x030C, 0x0187, 0x006D, 0x0028, 0x0037, 0x0066, 0x0015, 0x0031,
-    0x0000, 0x000B, 0x0012, 0x001A, 0x0001, 0x0007, 0x000A, 0x000E,
-    0x0001, 0x000F, 0x000B, 0x0008, 0x0004, 0x001B, 0x0013, 0x000C,
-    0x0001, 0x0032, 0x001A, 0x0067, 0x0060, 0x0029, 0x00C2, 0x006C,
-    0x030D,
-};
-
-static const uint16_t bitalloc_33_codes_c[33] = {
-    0x00CC, 0x0067, 0x0005, 0x0070, 0x0003, 0x001A, 0x0039, 0x003F,
-    0x000A, 0x0012, 0x0018, 0x001D, 0x0001, 0x0003, 0x0007, 0x000A,
-    0x000D, 0x000B, 0x0008, 0x0004, 0x0002, 0x001E, 0x0019, 0x0013,
-    0x000B, 0x0000, 0x003E, 0x001B, 0x0018, 0x0071, 0x0032, 0x0004,
-    0x00CD,
-};
-
-static const uint16_t bitalloc_33_codes_d[33] = {
-    0x3AF8, 0x3AFA, 0x1D7E, 0x0EBC, 0x075C, 0x03AC, 0x01D4, 0x0094,
-    0x0014, 0x004B, 0x000B, 0x003B, 0x0013, 0x0003, 0x000F, 0x0005,
-    0x0001, 0x0006, 0x0000, 0x0008, 0x001C, 0x0004, 0x0024, 0x0074,
-    0x0015, 0x0095, 0x01D5, 0x03AD, 0x075D, 0x0EBD, 0x1D7F, 0x3AFB,
-    0x3AF9,
-};
-
-static const uint16_t bitalloc_33_codes_e[33] = {
-    0x01C8, 0x01E6, 0x0064, 0x00E2, 0x00E5, 0x0030, 0x0033, 0x0073,
-    0x007A, 0x001A, 0x003A, 0x0002, 0x001A, 0x001F, 0x0007, 0x0001,
-    0x0002, 0x0002, 0x000C, 0x0000, 0x001B, 0x0003, 0x003B, 0x001B,
-    0x007B, 0x0078, 0x0070, 0x0031, 0x00F2, 0x00E3, 0x0065, 0x01E7,
-    0x01C9,
-};
-
-static const uint16_t bitalloc_33_codes_f[33] = {
-    0x0724, 0x0393, 0x01CE, 0x00E5, 0x002C, 0x0008, 0x0017, 0x003E,
-    0x0005, 0x0014, 0x001D, 0x0000, 0x0003, 0x0006, 0x0008, 0x000B,
-    0x000D, 0x000C, 0x0009, 0x0007, 0x0004, 0x0001, 0x001E, 0x0015,
-    0x000A, 0x003F, 0x0038, 0x0009, 0x002D, 0x00E6, 0x01CF, 0x01C8,
-    0x0725,
-};
-
-static const uint16_t bitalloc_33_codes_g[33] = {
-    0x0284, 0x0042, 0x0140, 0x0143, 0x003E, 0x00BE, 0x0011, 0x0051,
-    0x0009, 0x0029, 0x0005, 0x0015, 0x0000, 0x0008, 0x000E, 0x0002,
-    0x0006, 0x0003, 0x000F, 0x0009, 0x0001, 0x0016, 0x0006, 0x002E,
-    0x000E, 0x005E, 0x001E, 0x00BF, 0x003F, 0x0020, 0x0141, 0x0043,
-    0x0285,
-};
-
-static const uint8_t bitalloc_33_bits_a[33] = {
-    13, 13, 12, 11, 10,  9,  8,  7,  6,  6,  5,  5,  4,  4,  4,  3,
-     3,  3,  4,  4,  4,  4,  5,  6,  6,  7,  8,  9, 10, 11, 12, 13,
-    13,
-};
-
-static const uint8_t bitalloc_33_bits_b[33] = {
-    10,  9,  8,  7,  7,  7,  6,  6,  5,  5,  5,  5,  4,  4,  4,  4,
-     3,  4,  4,  4,  4,  5,  5,  5,  5,  6,  6,  7,  7,  7,  8,  8,
-    10,
-};
-
-static const uint8_t bitalloc_33_bits_c[33] = {
-    9,  8,  7,  7,  6,  6,  6,  6,  5,  5,  5,  5,  4,  4,  4,  4,
-    4,  4,  4,  4,  4,  5,  5,  5,  5,  5,  6,  6,  6,  7,  7,  7,
-    9,
-};
-
-static const uint8_t bitalloc_33_bits_d[33] = {
-    14, 14, 13, 12, 11, 10,  9,  8,  7,  7,  6,  6,  5,  4,  4,  3,
-     2,  3,  3,  4,  5,  5,  6,  7,  7,  8,  9, 10, 11, 12, 13, 14,
-    14,
-};
-
-static const uint8_t bitalloc_33_bits_e[33] = {
-    9,  9,  8,  8,  8,  7,  7,  7,  7,  6,  6,  5,  5,  5,  4,  3,
-    2,  3,  4,  4,  5,  5,  6,  6,  7,  7,  7,  7,  8,  8,  8,  9,
-    9,
-};
-
-static const uint8_t bitalloc_33_bits_f[33] = {
-    11, 10,  9,  8,  7,  6,  6,  6,  5,  5,  5,  4,  4,  4,  4,  4,
-     4,  4,  4,  4,  4,  4,  5,  5,  5,  6,  6,  6,  7,  8,  9,  9,
-    11,
-};
-
-static const uint8_t bitalloc_33_bits_g[33] = {
-    10,  9,  9,  9,  8,  8,  7,  7,  6,  6,  5,  5,  4,  4,  4,  3,
-     3,  3,  4,  4,  4,  5,  5,  6,  6,  7,  7,  8,  8,  8,  9,  9,
-    10,
-};
-
-static const uint16_t bitalloc_65_codes_a[65] = {
-    0x9E5C, 0x9E5E, 0x4F2C, 0x2794, 0x13C4, 0x1E44, 0x09E3, 0x0F23,
-    0x04F3, 0x0792, 0x027E, 0x03CE, 0x013D, 0x01E5, 0x009C, 0x00CC,
-    0x0040, 0x0058, 0x0067, 0x001E, 0x0021, 0x002D, 0x003D, 0x0007,
-    0x0011, 0x0014, 0x0017, 0x001A, 0x001C, 0x001F, 0x0001, 0x0004,
-    0x0006, 0x0005, 0x0002, 0x0000, 0x001D, 0x001B, 0x0018, 0x0015,
-    0x0012, 0x000E, 0x0006, 0x0032, 0x0026, 0x001F, 0x0078, 0x0059,
-    0x0041, 0x00CD, 0x009D, 0x01E6, 0x013E, 0x03CF, 0x027F, 0x0793,
-    0x0790, 0x04F0, 0x09E4, 0x1E45, 0x13C5, 0x2795, 0x4F2D, 0x9E5F,
-    0x9E5D,
-};
-
-static const uint16_t bitalloc_65_codes_b[65] = {
-    0x0A8C, 0x0547, 0x01B5, 0x0008, 0x00DB, 0x0152, 0x0005, 0x000B,
-    0x008E, 0x00AE, 0x00E4, 0x0003, 0x0037, 0x0039, 0x0055, 0x006C,
-    0x0073, 0x0003, 0x0015, 0x001D, 0x0028, 0x0030, 0x0037, 0x003E,
-    0x0006, 0x000B, 0x000F, 0x0012, 0x0016, 0x0019, 0x001D, 0x0001,
-    0x0004, 0x0002, 0x001E, 0x001A, 0x0017, 0x0013, 0x0010, 0x000C,
-    0x0007, 0x003F, 0x0038, 0x0031, 0x0029, 0x0022, 0x001A, 0x0014,
-    0x0000, 0x006D, 0x0056, 0x0046, 0x0038, 0x0004, 0x00E5, 0x00AF,
-    0x008F, 0x006C, 0x000A, 0x0153, 0x0150, 0x0009, 0x02A2, 0x01B4,
-    0x0A8D,
-};
-
-static const uint16_t bitalloc_65_codes_c[65] = {
-    0x045C, 0x022F, 0x03F5, 0x01BC, 0x01FB, 0x0059, 0x00D0, 0x00DF,
-    0x000A, 0x002D, 0x002F, 0x0052, 0x0069, 0x0078, 0x007F, 0x000A,
-    0x0010, 0x001C, 0x0023, 0x002A, 0x0035, 0x003A, 0x003D, 0x0000,
-    0x0003, 0x0006, 0x0009, 0x000C, 0x000F, 0x0012, 0x0016, 0x0018,
-    0x001C, 0x0019, 0x0017, 0x0013, 0x0010, 0x000D, 0x000A, 0x0007,
-    0x0004, 0x0001, 0x003E, 0x003B, 0x0036, 0x002B, 0x0028, 0x001D,
-    0x0011, 0x000B, 0x0004, 0x0079, 0x006E, 0x0053, 0x0044, 0x002E,
-    0x000B, 0x00FC, 0x00D1, 0x008A, 0x0058, 0x01BD, 0x0116, 0x03F4,
-    0x045D,
-};
-
-static const uint16_t bitalloc_65_codes_d[65] = {
-    0x70B0, 0x70B2, 0x70B4, 0x2852, 0x385B, 0x142E, 0x1C2E, 0x0A15,
-    0x0E14, 0x0214, 0x0704, 0x0104, 0x010B, 0x0383, 0x0083, 0x0143,
-    0x01C3, 0x0043, 0x00A2, 0x00E2, 0x0022, 0x0052, 0x0072, 0x0012,
-    0x002A, 0x003A, 0x000A, 0x0016, 0x001E, 0x0006, 0x000C, 0x0000,
-    0x0004, 0x0001, 0x000D, 0x0007, 0x001F, 0x0017, 0x000B, 0x003B,
-    0x002B, 0x0013, 0x0073, 0x0053, 0x0023, 0x00E3, 0x00A3, 0x00A0,
-    0x0040, 0x01C0, 0x0084, 0x0384, 0x0284, 0x0105, 0x0705, 0x0215,
-    0x0E15, 0x0A16, 0x1C2F, 0x142F, 0x1428, 0x2853, 0x70B5, 0x70B3,
-    0x70B1,
-};
-
-static const uint16_t bitalloc_65_codes_e[65] = {
-    0x032C, 0x0332, 0x0378, 0x037E, 0x008C, 0x014A, 0x0188, 0x0197,
-    0x019E, 0x01BD, 0x0044, 0x0047, 0x00AA, 0x00C5, 0x00CD, 0x00DC,
-    0x001C, 0x002C, 0x0053, 0x0063, 0x0068, 0x0008, 0x000F, 0x0017,
-    0x002B, 0x0035, 0x0005, 0x0009, 0x0016, 0x001C, 0x0006, 0x000F,
-    0x0004, 0x0000, 0x0007, 0x001D, 0x0017, 0x000A, 0x0006, 0x0036,
-    0x0030, 0x0028, 0x0010, 0x0009, 0x0069, 0x0064, 0x0054, 0x002D,
-    0x001D, 0x00DD, 0x00CE, 0x00CA, 0x00AB, 0x00A4, 0x0045, 0x01BE,
-    0x019F, 0x0198, 0x0189, 0x014B, 0x008D, 0x037F, 0x0379, 0x0333,
-    0x032D,
-};
-
-static const uint16_t bitalloc_65_codes_f[65] = {
-    0x0FE0, 0x0FE2, 0x0FE8, 0x0FEA, 0x0FEC, 0x0FEE, 0x0FF0, 0x0FF2,
-    0x0FF4, 0x2FF2, 0x07F2, 0x07FB, 0x03F6, 0x0BFA, 0x0BFD, 0x01FF,
-    0x05FF, 0x02FC, 0x007C, 0x017C, 0x003C, 0x00BC, 0x001C, 0x005C,
-    0x000C, 0x002C, 0x0004, 0x0014, 0x0000, 0x0008, 0x000E, 0x0002,
-    0x0006, 0x0003, 0x000F, 0x0009, 0x0001, 0x0015, 0x0005, 0x002D,
-    0x000D, 0x005D, 0x001D, 0x00BD, 0x003D, 0x017D, 0x007D, 0x02FD,
-    0x00FC, 0x05FC, 0x01FA, 0x0BFB, 0x03F7, 0x17F8, 0x07F3, 0x2FF3,
-    0x0FF5, 0x0FF3, 0x0FF1, 0x0FEF, 0x0FED, 0x0FEB, 0x0FE9, 0x0FE3,
-    0x0FE1,
-};
-
-static const uint16_t bitalloc_65_codes_g[65] = {
-    0x010C, 0x038A, 0x0608, 0x0786, 0x0084, 0x0087, 0x0302, 0x0305,
-    0x0040, 0x00E0, 0x00E3, 0x0183, 0x001E, 0x005E, 0x009E, 0x00DE,
-    0x00F1, 0x0011, 0x0039, 0x0061, 0x0079, 0x0009, 0x001D, 0x0031,
-    0x003D, 0x0005, 0x000F, 0x0019, 0x001F, 0x0003, 0x0006, 0x000A,
-    0x000E, 0x000B, 0x0008, 0x0004, 0x0000, 0x001A, 0x0012, 0x000A,
-    0x0002, 0x0036, 0x0026, 0x0016, 0x0006, 0x006E, 0x004E, 0x002E,
-    0x000E, 0x00DF, 0x009F, 0x005F, 0x001F, 0x01E0, 0x0180, 0x00E1,
-    0x0041, 0x03C2, 0x0303, 0x01C4, 0x0085, 0x0787, 0x0609, 0x038B,
-    0x010D,
-};
-
-static const uint8_t bitalloc_65_bits_a[65] = {
-    16, 16, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10,  9,  9,  8,  8,
-     7,  7,  7,  6,  6,  6,  6,  5,  5,  5,  5,  5,  5,  5,  4,  4,
-     4,  4,  4,  4,  5,  5,  5,  5,  5,  5,  5,  6,  6,  6,  7,  7,
-     7,  8,  8,  9,  9, 10, 10, 11, 11, 11, 12, 13, 13, 14, 15, 16,
-    16,
-};
-
-static const uint8_t bitalloc_65_bits_b[65] = {
-    12, 11, 10,  9,  9,  9,  8,  8,  8,  8,  8,  7,  7,  7,  7,  7,
-     7,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,  5,  5,  4,
-     4,  4,  5,  5,  5,  5,  5,  5,  5,  6,  6,  6,  6,  6,  6,  6,
-     6,  7,  7,  7,  7,  7,  8,  8,  8,  8,  8,  9,  9,  9, 10, 10,
-    12,
-};
-
-static const uint8_t bitalloc_65_bits_c[65] = {
-    11, 10, 10,  9,  9,  8,  8,  8,  7,  7,  7,  7,  7,  7,  7,  6,
-     6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,  5,  5,  5,  5,
-     5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  7,  7,  7,  7,  7,  7,  8,  8,  8,  8,  9,  9, 10,
-    11,
-};
-
-static const uint8_t bitalloc_65_bits_d[65] = {
-    15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10,  9,  9,
-     9,  8,  8,  8,  7,  7,  7,  6,  6,  6,  5,  5,  5,  4,  4,  3,
-     3,  3,  4,  4,  5,  5,  5,  6,  6,  6,  7,  7,  7,  8,  8,  8,
-     8,  9,  9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 15, 15,
-    15,
-};
-
-static const uint8_t bitalloc_65_bits_e[65] = {
-    10, 10, 10, 10,  9,  9,  9,  9,  9,  9,  8,  8,  8,  8,  8,  8,
-     7,  7,  7,  7,  7,  6,  6,  6,  6,  6,  5,  5,  5,  5,  4,  4,
-     3,  3,  4,  5,  5,  5,  5,  6,  6,  6,  6,  6,  7,  7,  7,  7,
-     7,  8,  8,  8,  8,  8,  8,  9,  9,  9,  9,  9,  9, 10, 10, 10,
-    10,
-};
-
-static const uint8_t bitalloc_65_bits_f[65] = {
-    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11,
-    11, 10,  9,  9,  8,  8,  7,  7,  6,  6,  5,  5,  4,  4,  4,  3,
-     3,  3,  4,  4,  4,  5,  5,  6,  6,  7,  7,  8,  8,  9,  9, 10,
-    10, 11, 11, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-    14,
-};
-
-static const uint8_t bitalloc_65_bits_g[65] = {
-    11, 11, 11, 11, 10, 10, 10, 10,  9,  9,  9,  9,  8,  8,  8,  8,
-     8,  7,  7,  7,  7,  6,  6,  6,  6,  5,  5,  5,  5,  4,  4,  4,
-     4,  4,  4,  4,  4,  5,  5,  5,  5,  6,  6,  6,  6,  7,  7,  7,
-     7,  8,  8,  8,  8,  9,  9,  9,  9, 10, 10, 10, 10, 11, 11, 11,
-    11,
-};
-
-static const uint16_t bitalloc_129_codes_a[129] = {
-    0x0660, 0x0666, 0x06EC, 0x0722, 0x0760, 0x076E, 0x004C, 0x004E,
-    0x00F4, 0x010A, 0x0148, 0x0156, 0x01D4, 0x01F2, 0x0331, 0x0370,
-    0x0377, 0x0396, 0x03B1, 0x0024, 0x0064, 0x007B, 0x008A, 0x00A5,
-    0x00D4, 0x00EB, 0x00FA, 0x019A, 0x01B9, 0x01C9, 0x01D9, 0x0010,
-    0x0030, 0x0033, 0x0043, 0x0053, 0x006B, 0x007A, 0x00CA, 0x00D2,
-    0x00DE, 0x00E6, 0x00F6, 0x000E, 0x001F, 0x0023, 0x002B, 0x003B,
-    0x003F, 0x0067, 0x0070, 0x0077, 0x0005, 0x000D, 0x0012, 0x001B,
-    0x002C, 0x0035, 0x003A, 0x0004, 0x000B, 0x0017, 0x001F, 0x0009,
-    0x0008, 0x000A, 0x0000, 0x0018, 0x000C, 0x0005, 0x003C, 0x0036,
-    0x002D, 0x001C, 0x0013, 0x000E, 0x0006, 0x007A, 0x0071, 0x0068,
-    0x0064, 0x003C, 0x0034, 0x0028, 0x0020, 0x000F, 0x00F7, 0x00E7,
-    0x00DF, 0x00D3, 0x00CB, 0x007B, 0x0074, 0x0054, 0x0044, 0x003C,
-    0x0031, 0x0011, 0x01DA, 0x01CA, 0x01BA, 0x019B, 0x00FB, 0x00F8,
-    0x00D5, 0x00AA, 0x008B, 0x0084, 0x0065, 0x0025, 0x03B6, 0x0397,
-    0x0390, 0x0371, 0x0332, 0x01F3, 0x01D5, 0x0157, 0x0149, 0x010B,
-    0x00F5, 0x004F, 0x004D, 0x076F, 0x0761, 0x0723, 0x06ED, 0x0667,
-    0x0661,
-};
-
-static const uint16_t bitalloc_129_codes_b[129] = {
-    0x29DC, 0x14EF, 0x0455, 0x0E9C, 0x022B, 0x0489, 0x0740, 0x074F,
-    0x0172, 0x0245, 0x0247, 0x030A, 0x03A1, 0x001C, 0x008B, 0x00D6,
-    0x010C, 0x0148, 0x014F, 0x0186, 0x01D1, 0x0008, 0x000F, 0x0046,
-    0x005D, 0x0078, 0x0087, 0x0096, 0x00A5, 0x00BC, 0x00D8, 0x00DE,
-    0x00F6, 0x0005, 0x0014, 0x0024, 0x002F, 0x003A, 0x003D, 0x0049,
-    0x0050, 0x0058, 0x005F, 0x0066, 0x006D, 0x0075, 0x007C, 0x0004,
-    0x000B, 0x0013, 0x0018, 0x001B, 0x001F, 0x0022, 0x0026, 0x002A,
-    0x002D, 0x0031, 0x0034, 0x0038, 0x003B, 0x003F, 0x0003, 0x0006,
-    0x000A, 0x0007, 0x0004, 0x0000, 0x003C, 0x0039, 0x0035, 0x0032,
-    0x002E, 0x002B, 0x0027, 0x0023, 0x0020, 0x001C, 0x0019, 0x0016,
-    0x0010, 0x0005, 0x007D, 0x007A, 0x006E, 0x0067, 0x0060, 0x0059,
-    0x0051, 0x004A, 0x0042, 0x003B, 0x0034, 0x0025, 0x0015, 0x0006,
-    0x00F7, 0x00DF, 0x00D9, 0x00BD, 0x00A6, 0x0097, 0x0090, 0x0079,
-    0x006A, 0x0047, 0x0044, 0x0009, 0x01D2, 0x0187, 0x0184, 0x0149,
-    0x010D, 0x00D7, 0x00B8, 0x001D, 0x03A6, 0x030B, 0x029C, 0x0246,
-    0x0173, 0x0114, 0x0741, 0x053A, 0x0488, 0x0E9D, 0x0A76, 0x0454,
-    0x29DD,
-};
-
-static const uint16_t bitalloc_129_codes_c[129] = {
-    0x0E5C, 0x072F, 0x001D, 0x0724, 0x000F, 0x010D, 0x0324, 0x0393,
-    0x03E9, 0x0080, 0x0087, 0x00FA, 0x0164, 0x0193, 0x01DE, 0x01F5,
-    0x0010, 0x002A, 0x0041, 0x0064, 0x0073, 0x008E, 0x00A4, 0x00B3,
-    0x00D6, 0x00E5, 0x00F4, 0x00FB, 0x0002, 0x0009, 0x0013, 0x001E,
-    0x0026, 0x002C, 0x0033, 0x003F, 0x0041, 0x004C, 0x0053, 0x005E,
-    0x0065, 0x0070, 0x0073, 0x0078, 0x007B, 0x007E, 0x0002, 0x0005,
-    0x0007, 0x000B, 0x000D, 0x0011, 0x0014, 0x0017, 0x001A, 0x001D,
-    0x0021, 0x0024, 0x0027, 0x002A, 0x002D, 0x0030, 0x0033, 0x0036,
-    0x003A, 0x0037, 0x0034, 0x0031, 0x002E, 0x002B, 0x0028, 0x0025,
-    0x0022, 0x001E, 0x001B, 0x0018, 0x0015, 0x0012, 0x000E, 0x000C,
-    0x0008, 0x0006, 0x0003, 0x007F, 0x007C, 0x0079, 0x0076, 0x0071,
-    0x006A, 0x005F, 0x0058, 0x004D, 0x0046, 0x0040, 0x0038, 0x002D,
-    0x0027, 0x001F, 0x0014, 0x0012, 0x0003, 0x0000, 0x00F5, 0x00EE,
-    0x00D7, 0x00C8, 0x00A5, 0x008F, 0x007C, 0x0065, 0x0042, 0x002B,
-    0x0011, 0x0002, 0x01DF, 0x01C8, 0x0165, 0x00FB, 0x00E4, 0x0081,
-    0x0006, 0x03E8, 0x0325, 0x01CA, 0x010C, 0x0725, 0x0396, 0x001C,
-    0x0E5D,
-};
-
-static const uint16_t bitalloc_129_codes_d[129] = {
-    0xA598, 0xA59A, 0xA59C, 0xA59E, 0xC598, 0xE586, 0x3ACC, 0x52CA,
-    0x62CD, 0x0D48, 0x1D67, 0x2978, 0x3167, 0x3966, 0x06A5, 0x0EBC,
-    0x14BD, 0x1CB1, 0x0350, 0x0353, 0x075F, 0x0A5F, 0x0C5E, 0x0E5E,
-    0x01AE, 0x03AD, 0x052D, 0x062D, 0x072D, 0x00D5, 0x01D4, 0x0294,
-    0x0314, 0x0394, 0x0014, 0x0094, 0x0114, 0x0174, 0x01B4, 0x01F4,
-    0x000B, 0x004B, 0x008B, 0x00BB, 0x00DB, 0x00FB, 0x001B, 0x003B,
-    0x0053, 0x0063, 0x0073, 0x0003, 0x0013, 0x0023, 0x002F, 0x0037,
-    0x003F, 0x0007, 0x000F, 0x0015, 0x0019, 0x001D, 0x0001, 0x0005,
-    0x0009, 0x0006, 0x0002, 0x001E, 0x001A, 0x0016, 0x0010, 0x0008,
-    0x0000, 0x0038, 0x0030, 0x0028, 0x001C, 0x000C, 0x007C, 0x006C,
-    0x005C, 0x0044, 0x0024, 0x0004, 0x00E4, 0x00C4, 0x00A4, 0x0074,
-    0x0034, 0x01F5, 0x01B5, 0x0175, 0x0115, 0x0095, 0x0015, 0x0395,
-    0x0315, 0x0295, 0x01D5, 0x00D6, 0x072E, 0x062E, 0x052E, 0x03AE,
-    0x01AF, 0x0E5F, 0x0C5F, 0x0C58, 0x0A58, 0x0758, 0x0351, 0x1CB2,
-    0x18B2, 0x0EBD, 0x0EB2, 0x3967, 0x3960, 0x2979, 0x2964, 0x0D49,
-    0x72C2, 0x52CB, 0x3ACD, 0xE587, 0xC599, 0xA59F, 0xA59D, 0xA59B,
-    0xA599,
-};
-
-static const uint16_t bitalloc_129_codes_e[129] = {
-    0xA13C, 0xC720, 0xA13F, 0xA13E, 0xA13D, 0xE722, 0x5090, 0x6393,
-    0x7392, 0x2849, 0x31CE, 0x39CE, 0x1425, 0x18E5, 0x1CE5, 0x0844,
-    0x0A1C, 0x0C7C, 0x036C, 0x0423, 0x050F, 0x063F, 0x01B7, 0x0216,
-    0x0285, 0x031D, 0x039D, 0x0109, 0x0140, 0x0180, 0x01C8, 0x01CF,
-    0x007A, 0x008A, 0x00A2, 0x00C1, 0x00E5, 0x0014, 0x0037, 0x0043,
-    0x004E, 0x0056, 0x0061, 0x006C, 0x007C, 0x000B, 0x001C, 0x001F,
-    0x0023, 0x0025, 0x0029, 0x002C, 0x002E, 0x0032, 0x0034, 0x0037,
-    0x003A, 0x003C, 0x003F, 0x0001, 0x0003, 0x0006, 0x0008, 0x000A,
-    0x000C, 0x000B, 0x0009, 0x0007, 0x0004, 0x0002, 0x0000, 0x003D,
-    0x003B, 0x0038, 0x0035, 0x0033, 0x002F, 0x002D, 0x002A, 0x0026,
-    0x0024, 0x0020, 0x001D, 0x001A, 0x007D, 0x006D, 0x0062, 0x0057,
-    0x004F, 0x0044, 0x003C, 0x0015, 0x00E6, 0x00C6, 0x00A3, 0x008B,
-    0x007B, 0x006C, 0x01C9, 0x0181, 0x0141, 0x010A, 0x00DA, 0x031E,
-    0x0286, 0x0217, 0x0210, 0x0738, 0x0638, 0x0508, 0x036D, 0x0C7D,
-    0x0A1D, 0x0845, 0x1CE6, 0x18E6, 0x1426, 0x39CF, 0x31CF, 0x284E,
-    0x7393, 0x7390, 0x5091, 0xE723, 0xC724, 0xC725, 0xC722, 0xC723,
-    0xC721,
-};
-
-static const uint16_t bitalloc_129_codes_f[129] = {
-    0x762C, 0x3B17, 0x1555, 0x0608, 0x0AAB, 0x0FF2, 0x0305, 0x0307,
-    0x0763, 0x0046, 0x010C, 0x01BC, 0x02AB, 0x03B6, 0x03FD, 0x0080,
-    0x0087, 0x00DF, 0x0156, 0x01D9, 0x01F8, 0x01FF, 0x002A, 0x0041,
-    0x0061, 0x0094, 0x00D4, 0x00EA, 0x00F2, 0x00FD, 0x0009, 0x000B,
-    0x001A, 0x0026, 0x0031, 0x0040, 0x004B, 0x006B, 0x0073, 0x0077,
-    0x007A, 0x007C, 0x0000, 0x0002, 0x0006, 0x0008, 0x000B, 0x000E,
-    0x0011, 0x0014, 0x0016, 0x0019, 0x001C, 0x001E, 0x0021, 0x0023,
-    0x0026, 0x0028, 0x002B, 0x002D, 0x002F, 0x0031, 0x0033, 0x0036,
-    0x0038, 0x0037, 0x0034, 0x0032, 0x0030, 0x002E, 0x002C, 0x0029,
-    0x0027, 0x0024, 0x0022, 0x001F, 0x001D, 0x001A, 0x0017, 0x0015,
-    0x0012, 0x000F, 0x000C, 0x0009, 0x0007, 0x0003, 0x0001, 0x007D,
-    0x007B, 0x0078, 0x0074, 0x0072, 0x0054, 0x0041, 0x0036, 0x0027,
-    0x001B, 0x0014, 0x000A, 0x00FE, 0x00F3, 0x00EB, 0x00D5, 0x0095,
-    0x006E, 0x0042, 0x002B, 0x0010, 0x01F9, 0x01DA, 0x0157, 0x0154,
-    0x00C0, 0x0081, 0x0022, 0x03B7, 0x03B0, 0x01BD, 0x010D, 0x0047,
-    0x07F8, 0x0554, 0x0306, 0x0FF3, 0x0EC4, 0x0609, 0x1D8A, 0x1554,
-    0x762D,
-};
-
-static const uint16_t bitalloc_129_codes_g[129] = {
-    0x1E20, 0x1E5E, 0x031C, 0x051A, 0x0718, 0x0916, 0x0B14, 0x0D12,
-    0x0F11, 0x0090, 0x018F, 0x028E, 0x038D, 0x048C, 0x058B, 0x068A,
-    0x0789, 0x0049, 0x00C8, 0x0148, 0x01C7, 0x0247, 0x02C6, 0x0346,
-    0x03C5, 0x0025, 0x0065, 0x00A5, 0x00E4, 0x0124, 0x0164, 0x01A4,
-    0x01E3, 0x0013, 0x0033, 0x0053, 0x0073, 0x0093, 0x00B3, 0x00D3,
-    0x00F3, 0x000A, 0x001A, 0x002A, 0x003A, 0x004A, 0x005A, 0x006A,
-    0x007A, 0x0006, 0x000E, 0x0016, 0x001E, 0x0026, 0x002E, 0x0036,
-    0x003E, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C,
-    0x0000, 0x001D, 0x0019, 0x0015, 0x0011, 0x000D, 0x0009, 0x0005,
-    0x003F, 0x0037, 0x002F, 0x0027, 0x001F, 0x0017, 0x000F, 0x0007,
-    0x007B, 0x006B, 0x005B, 0x004B, 0x003B, 0x002B, 0x001B, 0x000B,
-    0x0008, 0x00F0, 0x00D0, 0x00B0, 0x0090, 0x0070, 0x0050, 0x0030,
-    0x01E4, 0x01A5, 0x0165, 0x0125, 0x00E5, 0x00E2, 0x00A2, 0x0062,
-    0x03CA, 0x0347, 0x02C7, 0x02C4, 0x0244, 0x0149, 0x00C9, 0x00C6,
-    0x0796, 0x068B, 0x0688, 0x048D, 0x048A, 0x028F, 0x028C, 0x0091,
-    0x0F2E, 0x0D13, 0x0B15, 0x0917, 0x0719, 0x051B, 0x031D, 0x1E5F,
-    0x1E21,
-};
-
-static const uint8_t bitalloc_129_bits_a[129] = {
-    11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
-    10, 10, 10,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  8,
-     8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  7,  7,  7,  7,  7,
-     7,  7,  7,  7,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  4,
-     4,  4,  4,  5,  5,  5,  6,  6,  6,  6,  6,  6,  6,  7,  7,  7,
-     7,  7,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-     8,  8,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10,
-    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11,
-    11,
-};
-
-static const uint8_t bitalloc_129_bits_b[129] = {
-    14, 13, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10,  9,  9,  9,
-     9,  9,  9,  9,  9,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-     8,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  6,
-     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,
-     5,  5,  5,  5,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
-     6,  6,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,
-     8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  9,  9,  9,  9,
-     9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12,
-    14,
-};
-
-static const uint8_t bitalloc_129_bits_c[129] = {
-    13, 12, 11, 11, 10, 10, 10, 10, 10,  9,  9,  9,  9,  9,  9,  9,
-     8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  7,  7,  7,  7,
-     7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  6,  6,
-     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,
-     7,  7,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-     8,  8,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 11, 11, 11,
-    13,
-};
-
-static const uint8_t bitalloc_129_bits_d[129] = {
-    16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13,
-    13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 10, 10, 10,
-    10, 10,  9,  9,  9,  9,  9,  9,  8,  8,  8,  8,  8,  8,  7,  7,
-     7,  7,  7,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,  4,  4,
-     4,  4,  4,  5,  5,  5,  5,  5,  5,  6,  6,  6,  6,  6,  7,  7,
-     7,  7,  7,  7,  8,  8,  8,  8,  8,  9,  9,  9,  9,  9,  9, 10,
-    10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13,
-    13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16,
-    16,
-};
-
-static const uint8_t bitalloc_129_bits_e[129] = {
-    16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12,
-    12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10,  9,  9,  9,  9,  9,
-     8,  8,  8,  8,  8,  7,  7,  7,  7,  7,  7,  7,  7,  6,  6,  6,
-     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,
-     5,  5,  5,  5,  5,  5,  5,  6,  6,  6,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  6,  7,  7,  7,  7,  7,  7,  7,  7,  8,  8,  8,  8,
-     8,  8,  9,  9,  9,  9,  9, 10, 10, 10, 10, 11, 11, 11, 11, 12,
-    12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16,
-    16,
-};
-
-static const uint8_t bitalloc_129_bits_f[129] = {
-    15, 14, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 10, 10,  9,
-     9,  9,  9,  9,  9,  9,  8,  8,  8,  8,  8,  8,  8,  8,  7,  7,
-     7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  6,  6,  6,  6,  7,  7,  7,  7,  7,  7,  7,  7,  7,
-     7,  7,  7,  8,  8,  8,  8,  8,  8,  8,  8,  8,  9,  9,  9,  9,
-     9,  9,  9, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13,
-    15,
-};
-
-static const uint8_t bitalloc_129_bits_g[129] = {
-    13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11,
-    11, 10, 10, 10, 10, 10, 10, 10, 10,  9,  9,  9,  9,  9,  9,  9,
-     9,  8,  8,  8,  8,  8,  8,  8,  8,  7,  7,  7,  7,  7,  7,  7,
-     7,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,  5,  5,
-     4,  5,  5,  5,  5,  5,  5,  5,  6,  6,  6,  6,  6,  6,  6,  6,
-     7,  7,  7,  7,  7,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,
-     9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-    11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13,
-    13,
-};
+static const uint8_t tnl_grp_sizes[] = { 37, 34, 31, 28, 23 };
 
 const uint8_t ff_dca_bitalloc_sizes[DCA_CODE_BOOKS] = {
     3, 5, 7, 9, 13, 17, 25, 33, 65, 129
@@ -999,234 +55,717 @@ static const uint8_t bitalloc_maxbits[DCA_CODE_BOOKS][7] = {
     { 9, 9, 9, 9, 9, 9, 9 }
 };
 
-const uint16_t *const ff_dca_bitalloc_codes[DCA_CODE_BOOKS][8] = {
-    { bitalloc_3_codes,     NULL },
-    { bitalloc_5_codes_a,   bitalloc_5_codes_b,   bitalloc_5_codes_c,   NULL },
-    { bitalloc_7_codes_a,   bitalloc_7_codes_b,   bitalloc_7_codes_c,   NULL },
-    { bitalloc_9_codes_a,   bitalloc_9_codes_b,   bitalloc_9_codes_c,   NULL },
-    { bitalloc_13_codes_a,  bitalloc_13_codes_b,  bitalloc_13_codes_c,  NULL },
-    { bitalloc_17_codes_a,  bitalloc_17_codes_b,  bitalloc_17_codes_c,  bitalloc_17_codes_d,
-      bitalloc_17_codes_e,  bitalloc_17_codes_f,  bitalloc_17_codes_g,  NULL },
-    { bitalloc_25_codes_a,  bitalloc_25_codes_b,  bitalloc_25_codes_c,  bitalloc_25_codes_d,
-      bitalloc_25_codes_e,  bitalloc_25_codes_f,  bitalloc_25_codes_g,  NULL },
-    { bitalloc_33_codes_a,  bitalloc_33_codes_b,  bitalloc_33_codes_c,  bitalloc_33_codes_d,
-      bitalloc_33_codes_e,  bitalloc_33_codes_f,  bitalloc_33_codes_g,  NULL },
-    { bitalloc_65_codes_a,  bitalloc_65_codes_b,  bitalloc_65_codes_c,  bitalloc_65_codes_d,
-      bitalloc_65_codes_e,  bitalloc_65_codes_f,  bitalloc_65_codes_g,  NULL },
-    { bitalloc_129_codes_a, bitalloc_129_codes_b, bitalloc_129_codes_c, bitalloc_129_codes_d,
-      bitalloc_129_codes_e, bitalloc_129_codes_f, bitalloc_129_codes_g, NULL }
-};
-
-const uint8_t *const ff_dca_bitalloc_bits[DCA_CODE_BOOKS][8] = {
-    { bitalloc_3_bits,     NULL },
-    { bitalloc_5_bits_a,   bitalloc_5_bits_b,   bitalloc_5_bits_c,   NULL },
-    { bitalloc_7_bits_a,   bitalloc_7_bits_b,   bitalloc_7_bits_c,   NULL },
-    { bitalloc_9_bits_a,   bitalloc_9_bits_b,   bitalloc_9_bits_c,   NULL },
-    { bitalloc_13_bits_a,  bitalloc_13_bits_b,  bitalloc_13_bits_c,  NULL },
-    { bitalloc_17_bits_a,  bitalloc_17_bits_b,  bitalloc_17_bits_c,  bitalloc_17_bits_d,
-      bitalloc_17_bits_e,  bitalloc_17_bits_f,  bitalloc_17_bits_g,  NULL },
-    { bitalloc_25_bits_a,  bitalloc_25_bits_b,  bitalloc_25_bits_c,  bitalloc_25_bits_d,
-      bitalloc_25_bits_e,  bitalloc_25_bits_f,  bitalloc_25_bits_g,  NULL },
-    { bitalloc_33_bits_a,  bitalloc_33_bits_b,  bitalloc_33_bits_c,  bitalloc_33_bits_d,
-      bitalloc_33_bits_e,  bitalloc_33_bits_f,  bitalloc_33_bits_g,  NULL },
-    { bitalloc_65_bits_a,  bitalloc_65_bits_b,  bitalloc_65_bits_c,  bitalloc_65_bits_d,
-      bitalloc_65_bits_e,  bitalloc_65_bits_f,  bitalloc_65_bits_g,  NULL },
-    { bitalloc_129_bits_a, bitalloc_129_bits_b, bitalloc_129_bits_c, bitalloc_129_bits_d,
-      bitalloc_129_bits_e, bitalloc_129_bits_f, bitalloc_129_bits_g, NULL }
-};
-
-static const uint16_t tnl_grp_0_codes[37] = {
-    0x0000, 0x0003, 0x0004, 0x0007, 0x0001, 0x0009, 0x000a, 0x000d,
-    0x000e, 0x0006, 0x0012, 0x0005, 0x0015, 0x0016, 0x0022, 0x0025,
-    0x0035, 0x0076, 0x0002, 0x0042, 0x00b6, 0x0036, 0x00c2, 0x0136,
-    0x0182, 0x01c2, 0x03c2, 0x0482, 0x0682, 0x0082, 0x0882, 0x0a82,
-    0x0282, 0x2282, 0x3282, 0x1282, 0x5282,
-};
-
-static const uint16_t tnl_grp_1_codes[34] = {
-    0x0001, 0x0003, 0x0006, 0x0000, 0x0002, 0x0004, 0x0005, 0x0007,
-    0x0008, 0x000f, 0x001a, 0x001c, 0x001d, 0x000a, 0x002c, 0x002d,
-    0x000d, 0x002a, 0x004c, 0x004d, 0x006a, 0x008c, 0x00cd, 0x00ea,
-    0x000c, 0x010c, 0x01ea, 0x020c, 0x030c, 0x07ea, 0x0bea, 0x03ea,
-    0x13ea, 0x33ea,
-};
-
-static const uint16_t tnl_grp_2_codes[31] = {
-    0x0001, 0x0003, 0x0006, 0x0007, 0x0004, 0x0008, 0x000c, 0x0010,
-    0x0012, 0x001a, 0x0022, 0x0000, 0x000a, 0x0020, 0x0040, 0x004a,
-    0x006a, 0x0002, 0x002a, 0x0042, 0x0082, 0x00aa, 0x00e0, 0x0060,
-    0x00c2, 0x01c2, 0x0160, 0x0360, 0x0f60, 0x0760, 0x1760,
-};
-
-static const uint16_t tnl_grp_3_codes[28] = {
-    0x0001, 0x0006, 0x0008, 0x0014, 0x001c, 0x0000, 0x0002, 0x0004,
-    0x000a, 0x000c, 0x0010, 0x0012, 0x001a, 0x0020, 0x002a, 0x002c,
-    0x0032, 0x003a, 0x0022, 0x0030, 0x0062, 0x0064, 0x0070, 0x0024,
-    0x00a4, 0x01a4, 0x03a4, 0x07a4,
-};
-
-static const uint16_t tnl_grp_4_codes[23] = {
-    0x0001, 0x0000, 0x000a, 0x0006, 0x0012, 0x001e, 0x0022, 0x002e,
-    0x0036, 0x003e, 0x0002, 0x0016, 0x0032, 0x004e, 0x0056, 0x000e,
-    0x0042, 0x0072, 0x00c2, 0x00f2, 0x008e, 0x018e, 0x038e,
-};
-
-static const uint16_t tnl_scf_codes[20] = {
-    0x0000, 0x0001, 0x0002, 0x0005, 0x0006, 0x0007, 0x000b, 0x000c,
-    0x0013, 0x0014, 0x0003, 0x0004, 0x0023, 0x0064, 0x00a4, 0x0024,
-    0x0124, 0x0324, 0x0724, 0x0f24,
-};
-
-static const uint16_t damp_codes[7] = {
-    0x0001, 0x0000, 0x0002, 0x0006, 0x000e, 0x001e, 0x003e,
-};
-
-static const uint16_t dph_codes[9] = {
-    0x0000, 0x0002, 0x0003, 0x0001, 0x0009, 0x000d, 0x0005, 0x0015,
-    0x0035,
-};
-
-static const uint16_t fst_rsd_amp_codes[24] = {
-    0x0003, 0x0005, 0x0006, 0x0007, 0x0000, 0x0001, 0x0002, 0x0008,
-    0x0009, 0x000a, 0x0014, 0x0004, 0x001a, 0x001c, 0x0024, 0x002c,
-    0x003a, 0x000c, 0x003c, 0x004c, 0x00fc, 0x007c, 0x017c, 0x037c,
-};
-
-static const uint16_t rsd_apprx_codes[6] = {
-    0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f,
-};
-
-static const uint16_t rsd_amp_codes[33] = {
-    0x0001, 0x0000, 0x0002, 0x0003, 0x0004, 0x000e, 0x000f, 0x0016,
-    0x0007, 0x0027, 0x0037, 0x0026, 0x0066, 0x0006, 0x0017, 0x0046,
-    0x0097, 0x00d7, 0x0086, 0x00c6, 0x01c6, 0x0157, 0x0186, 0x0257,
-    0x0357, 0x0057, 0x0786, 0x0386, 0x0b86, 0x0457, 0x0c57, 0x1457,
-    0x1c57,
-};
-
-static const uint16_t avg_g3_codes[18] = {
-    0x0001, 0x0002, 0x0003, 0x0000, 0x000c, 0x0014, 0x0018, 0x0004,
-    0x0008, 0x0028, 0x0068, 0x0024, 0x00a4, 0x00e4, 0x0164, 0x0064,
-    0x0264, 0x0664,
-};
-
-static const uint16_t st_grid_codes[22] = {
-    0x0001, 0x0002, 0x0000, 0x0004, 0x0008, 0x001c, 0x004c, 0x006c,
-    0x000c, 0x002c, 0x008c, 0x00ac, 0x012c, 0x018c, 0x01ac, 0x038c,
-    0x03ac, 0x032c, 0x072c, 0x0f2c, 0x172c, 0x1f2c,
-};
-
-static const uint16_t grid_2_codes[20] = {
-    0x0000, 0x0002, 0x0003, 0x0001, 0x0005, 0x000d, 0x003d, 0x005d,
-    0x009d, 0x011d, 0x001d, 0x061d, 0x041d, 0x0c1d, 0x0a1d, 0x121d,
-    0x021d, 0x1a1d, 0x221d, 0x3a1d,
-};
-
-static const uint16_t grid_3_codes[13] = {
-    0x0001, 0x0002, 0x0000, 0x0004, 0x000c, 0x001c, 0x007c, 0x003c,
-    0x01bc, 0x00bc, 0x06bc, 0x02bc, 0x0abc,
-};
-
-static const uint16_t rsd_codes[9] = {
-    0x0001, 0x0003, 0x0000, 0x0002, 0x0006, 0x0004, 0x000c, 0x001c,
-    0x003c,
-};
-
-static const uint8_t tnl_grp_0_bitvals[74] = {
-     3,  5,  3,  9,  3,  4,  3,  6,  4, 10,  4, 13,  4,  7,  4, 11,
-     4,  8,  5, 12,  5, 14,  6, 15,  6, 18,  6,  1,  6, 17,  6, 16,
-     6, 21,  7, 20,  8, 19,  8, 22,  8, 25,  9, 26,  9, 23,  9,  3,
-     9, 24, 10, 29, 10, 27, 11, 28, 11, 30, 12, 33, 12, 31, 12, 32,
-    14, 34, 14, 37, 14, 36, 15, 35, 15,  0,
-};
-
-static const uint8_t tnl_grp_1_bitvals[68] = {
-     3,  9,  3,  6,  3,  5,  4,  4,  4,  8,  4, 10,  4,  1,  4, 11,
-     4,  7,  4, 13,  5, 12,  5, 14,  5, 17,  6, 16,  6, 15,  6, 18,
-     7, 20,  7, 19,  7, 21,  8, 25,  8, 23,  8, 22,  8, 24,  9, 26,
-    10,  3, 10, 29, 10, 30, 10, 27, 10, 28, 11, 31, 12, 32, 13, 33,
-    14, 34, 14,  0,
-};
-
-static const uint8_t tnl_grp_2_bitvals[62] = {
-     2,  1,  3,  6,  3,  5,  3,  7,  4,  9,  4,  8,  4,  4,  5, 10,
-     5, 11,  5, 13,  6, 12,  7, 14,  7, 16,  7, 15,  7, 17,  7, 18,
-     7, 19,  8, 22,  8, 20,  8, 21,  8,  3,  8, 24,  8, 25,  9, 23,
-     9, 26,  9, 27, 10, 28, 11, 29, 12, 31, 13, 30, 13,  0,
-};
-
-static const uint8_t tnl_grp_3_bitvals[56] = {
-     1,  1,  3,  6,  4,  5,  5,  9,  5,  4,  6,  8,  6, 14,  6, 10,
-     6, 21,  6, 13,  6,  7,  6,  3,  6, 16,  6,  2,  6, 18,  6, 17,
-     6, 11,  6, 15,  7, 19,  7, 23,  7, 24,  7, 22,  7, 12,  8, 20,
-     9, 25, 10, 26, 11, 27, 11,  0,
-};
-
-static const uint8_t tnl_grp_4_bitvals[46] = {
-     1,  1,  2,  2,  4,  4,  5,  5,  6,  6,  6,  8,  6,  3,  6, 19,
-     6, 20,  6,  9,  7,  7,  7, 11,  7, 13,  7, 17,  7, 10,  8, 12,
-     8, 15,  8, 14,  8, 21,  8, 18,  9, 16, 10, 22, 10,  0,
-};
-
-static const uint8_t tnl_scf_bitvals[40] = {
-     3,  3,  3,  1,  3,  2,  3,  5,  3,  4,  3,  6,  4,  8,  4,  7,
-     5, 10,  5,  9,  6, 12,  6, 11,  6, 13,  7, 14,  8, 15,  9, 16,
-    10, 17, 11, 18, 12, 19, 12,  0,
-};
-
-static const uint8_t damp_bitvals[14] = {
-     1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  6,  0,
-};
-
-static const uint8_t dph_bitvals[18] = {
-     2,  2,  2,  1,  2,  8,  4,  3,  4,  7,  4,  4,  5,  6,  6,  5,
-     6,  0,
-};
-
-static const uint8_t fst_rsd_amp_bitvals[48] = {
-     3, 13,  3, 15,  3, 16,  3, 14,  4, 12,  4, 10,  4, 11,  4, 17,
-     4, 18,  5, 19,  5,  9,  6,  1,  6,  7,  6,  6,  6,  8,  6,  5,
-     6,  4,  7, 20,  7,  2,  7,  3,  8, 21,  9, 22, 10, 23, 10,  0,
-};
-
-static const uint8_t rsd_apprx_bitvals[12] = {
-     1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  5,  0,
-};
-
-static const uint8_t rsd_amp_bitvals[66] = {
-     2,  3,  3,  2,  3,  5,  3,  4,  3,  1,  4,  7,  4,  6,  5,  9,
-     6,  8,  6, 11,  6, 10,  7, 12,  7, 13,  8, 14,  8, 18,  8, 16,
-     8, 15,  8, 22,  9, 20,  9, 24,  9, 17, 10, 28, 10, 26, 10, 21,
-    10, 23, 11, 30, 11, 19, 12, 25, 12, 32, 13, 36, 13, 29, 13, 34,
-    13,  0,
-};
-
-static const uint8_t avg_g3_bitvals[36] = {
-     2, 15,  2, 16,  2, 17,  4, 14,  4, 18,  5, 12,  5, 13,  6, 10,
-     6, 11,  7, 19,  7,  9,  8, 20,  8,  8,  8,  7,  9, 21, 10,  6,
-    11, 23, 11,  0,
-};
-
-static const uint8_t st_grid_bitvals[44] = {
-     1,  6,  2,  1,  4,  4,  4,  8,  4,  3,  5, 10,  7, 12,  7,  5,
-     8, 14,  9, 16,  9,  7,  9, 18, 10, 11, 10,  9, 10, 20, 10, 22,
-    10,  2, 11, 13, 13, 17, 13, 24, 13, 15, 13,  0,
-};
-
-static const uint8_t grid_2_bitvals[40] = {
-     2,  3,  2,  2,  2,  1,  3,  4,  4,  5,  5,  6,  6,  7,  7,  8,
-     8,  9,  9, 10, 11, 11, 11, 12, 12, 13, 12, 17, 13, 15, 13, 18,
-    14, 19, 14, 16, 14, 14, 14,  0,
-};
-
-static const uint8_t grid_3_bitvals[26] = {
-     1, 17,  2, 16,  3, 18,  4, 15,  5, 19,  6, 14,  7, 20,  8, 13,
-     9, 21, 10, 12, 11, 22, 12, 11, 12,  0,
-};
-
-static const uint8_t rsd_bitvals[18] = {
-     2,  2,  2,  3,  3,  1,  3,  4,  3,  0,  4,  5,  5,  6,  6,  7,
-     6,  4,
+const uint8_t ff_dca_vlc_src_tables[][2] = {
+    /* bitalloc_3 - 3 entries */
+    {   1,   1 }, {   2,   2 }, {   0,   2 },
+    /* bitalloc_5_a - 5 entries */
+    {   2,   1 }, {   3,   2 }, {   1,   3 }, {   4,   4 }, {   0,   4 },
+    /* bitalloc_5_b - 5 entries */
+    {   3,   2 }, {   1,   2 }, {   2,   2 }, {   4,   3 }, {   0,   3 },
+    /* bitalloc_5_c - 5 entries */
+    {   2,   1 }, {   3,   3 }, {   1,   3 }, {   4,   3 }, {   0,   3 },
+    /* bitalloc_7_a - 7 entries */
+    {   3,   1 }, {   5,   3 }, {   2,   3 }, {   4,   3 }, {   1,   4 },
+    {   0,   5 }, {   6,   5 },
+    /* bitalloc_7_b - 7 entries */
+    {   2,   2 }, {   4,   2 }, {   5,   3 }, {   0,   5 }, {   6,   5 },
+    {   1,   4 }, {   3,   2 },
+    /* bitalloc_7_c - 7 entries */
+    {   0,   4 }, {   6,   4 }, {   1,   4 }, {   5,   4 }, {   2,   2 },
+    {   4,   2 }, {   3,   2 },
+    /* bitalloc_9_a - 9 entries */
+    {   4,   1 }, {   7,   4 }, {   2,   4 }, {   3,   3 }, {   0,   6 },
+    {   8,   6 }, {   1,   5 }, {   6,   4 }, {   5,   3 },
+    /* bitalloc_9_b - 9 entries */
+    {   5,   2 }, {   2,   3 }, {   6,   3 }, {   4,   2 }, {   0,   5 },
+    {   8,   5 }, {   1,   5 }, {   7,   5 }, {   3,   3 },
+    /* bitalloc_9_c - 9 entries */
+    {   5,   2 }, {   2,   3 }, {   7,   4 }, {   0,   6 }, {   8,   6 },
+    {   1,   5 }, {   4,   2 }, {   6,   3 }, {   3,   3 },
+    /* bitalloc_13_a - 13 entries */
+    {   6,   1 }, {   7,   3 }, {   9,   4 }, {  10,   5 }, {   1,   6 },
+    {  11,   6 }, {   4,   4 }, {   8,   4 }, {   0,   7 }, {  12,   7 },
+    {   2,   6 }, {   3,   5 }, {   5,   4 },
+    /* bitalloc_13_b - 13 entries */
+    {   6,   2 }, {   8,   3 }, {  10,   4 }, {   3,   4 }, {   1,   5 },
+    {  11,   5 }, {   9,   4 }, {   5,   3 }, {   7,   3 }, {   0,   6 },
+    {  12,   6 }, {   2,   5 }, {   4,   4 },
+    /* bitalloc_13_c - 13 entries */
+    {   4,   3 }, {   0,   5 }, {  12,   5 }, {   2,   4 }, {   8,   3 },
+    {   5,   3 }, {   7,   3 }, {   6,   3 }, {  10,   4 }, {   1,   5 },
+    {  11,   5 }, {   3,   4 }, {   9,   4 },
+    /* bitalloc_17_a - 17 entries */
+    {  12,   4 }, {  13,   6 }, {  14,   8 }, {  15,  10 }, {   0,  12 },
+    {  16,  12 }, {   1,  11 }, {   2,   9 }, {   3,   7 }, {   4,   5 },
+    {   6,   3 }, {   8,   2 }, {  10,   3 }, {   5,   4 }, {  11,   4 },
+    {   7,   3 }, {   9,   3 },
+    /* bitalloc_17_b - 17 entries */
+    {   8,   2 }, {  10,   3 }, {  15,   6 }, {   2,   6 }, {   3,   5 },
+    {  13,   5 }, {  14,   6 }, {   0,   8 }, {  16,   8 }, {   1,   7 },
+    {   5,   4 }, {  11,   4 }, {   7,   3 }, {   9,   3 }, {   4,   5 },
+    {  12,   5 }, {   6,   4 },
+    /* bitalloc_17_c - 17 entries */
+    {  10,   3 }, {  15,   5 }, {   2,   5 }, {   4,   4 }, {  12,   4 },
+    {  14,   5 }, {   0,   7 }, {  16,   7 }, {   1,   6 }, {   7,   3 },
+    {   9,   3 }, {   5,   4 }, {  11,   4 }, {   8,   3 }, {   3,   5 },
+    {  13,   5 }, {   6,   4 },
+    /* bitalloc_17_d - 17 entries */
+    {   8,   1 }, {   0,   9 }, {  16,   9 }, {   1,   9 }, {  15,   9 },
+    {   2,   8 }, {  14,   8 }, {   3,   7 }, {  13,   7 }, {   4,   6 },
+    {  12,   6 }, {   5,   5 }, {  11,   5 }, {   6,   4 }, {  10,   4 },
+    {   7,   3 }, {   9,   3 },
+    /* bitalloc_17_e - 17 entries */
+    {   8,   1 }, {   7,   3 }, {   9,   3 }, {  10,   4 }, {   3,   6 },
+    {  13,   6 }, {   5,   5 }, {  11,   5 }, {   0,   8 }, {  16,   8 },
+    {   2,   7 }, {   4,   6 }, {  12,   6 }, {  14,   7 }, {   1,   8 },
+    {  15,   8 }, {   6,   5 },
+    /* bitalloc_17_f - 17 entries */
+    {  15,   6 }, {   0,   8 }, {  16,   8 }, {   1,   7 }, {   3,   5 },
+    {   4,   4 }, {   6,   3 }, {  10,   3 }, {  12,   4 }, {  13,   5 },
+    {   2,   6 }, {  14,   6 }, {   7,   3 }, {   9,   3 }, {   8,   3 },
+    {   5,   4 }, {  11,   4 },
+    /* bitalloc_17_g - 17 entries */
+    {   6,   3 }, {  10,   3 }, {   5,   4 }, {  11,   4 }, {   0,   8 },
+    {  16,   8 }, {   2,   7 }, {   3,   6 }, {   4,   5 }, {  12,   5 },
+    {  13,   6 }, {  14,   7 }, {   1,   8 }, {  15,   8 }, {   8,   2 },
+    {   7,   3 }, {   9,   3 },
+    /* bitalloc_25_a - 25 entries */
+    {  10,   3 }, {  14,   3 }, {   8,   4 }, {  16,   4 }, {  11,   3 },
+    {  13,   3 }, {  21,   8 }, {  22,  10 }, {  23,  12 }, {   0,  14 },
+    {  24,  14 }, {   1,  13 }, {   2,  11 }, {   3,   9 }, {   4,   8 },
+    {  20,   8 }, {   5,   7 }, {  19,   7 }, {   7,   5 }, {  17,   5 },
+    {   6,   6 }, {  18,   6 }, {  12,   3 }, {   9,   4 }, {  15,   4 },
+    /* bitalloc_25_b - 25 entries */
+    {   3,   6 }, {  21,   6 }, {  23,   7 }, {   2,   7 }, {  22,   7 },
+    {   0,   9 }, {  24,   9 }, {   1,   8 }, {   8,   4 }, {  11,   3 },
+    {  13,   3 }, {  16,   4 }, {   6,   5 }, {  18,   5 }, {   9,   4 },
+    {  15,   4 }, {  12,   3 }, {   4,   6 }, {  20,   6 }, {   7,   5 },
+    {  17,   5 }, {   5,   6 }, {  19,   6 }, {  10,   4 }, {  14,   4 },
+    /* bitalloc_25_c - 25 entries */
+    {   7,   4 }, {  17,   4 }, {  12,   3 }, {  20,   5 }, {  22,   6 },
+    {   0,   8 }, {  24,   8 }, {   1,   7 }, {   8,   4 }, {  16,   4 },
+    {   5,   5 }, {  19,   5 }, {   9,   4 }, {  15,   4 }, {   3,   6 },
+    {  21,   6 }, {   6,   5 }, {  10,   4 }, {  14,   4 }, {  18,   5 },
+    {  23,   7 }, {   2,   7 }, {   4,   6 }, {  11,   4 }, {  13,   4 },
+    /* bitalloc_25_d - 25 entries */
+    {  10,   3 }, {  14,   3 }, {   9,   4 }, {  15,   4 }, {   8,   5 },
+    {  16,   5 }, {   7,   6 }, {  17,   6 }, {   0,  12 }, {  24,  12 },
+    {   1,  12 }, {  23,  12 }, {   2,  11 }, {  22,  11 }, {   3,  10 },
+    {  21,  10 }, {   5,   8 }, {   6,   7 }, {  18,   7 }, {  19,   8 },
+    {   4,   9 }, {  20,   9 }, {  12,   2 }, {  11,   3 }, {  13,   3 },
+    /* bitalloc_25_e - 25 entries */
+    {   9,   4 }, {  15,   4 }, {   7,   5 }, {  17,   5 }, {   2,   7 },
+    {  22,   7 }, {   5,   6 }, {  19,   6 }, {   0,   8 }, {  24,   8 },
+    {   3,   7 }, {  11,   3 }, {  13,   3 }, {   8,   5 }, {  16,   5 },
+    {  21,   7 }, {   1,   8 }, {  23,   8 }, {   6,   6 }, {  18,   6 },
+    {   4,   7 }, {  20,   7 }, {  10,   4 }, {  14,   4 }, {  12,   2 },
+    /* bitalloc_25_f - 25 entries */
+    {  13,   3 }, {  12,   3 }, {   7,   4 }, {  17,   4 }, {   5,   5 },
+    {  19,   5 }, {   8,   4 }, {  16,   4 }, {   4,   6 }, {  20,   6 },
+    {   6,   5 }, {   9,   4 }, {  15,   4 }, {  18,   5 }, {  23,   8 },
+    {   0,  10 }, {  24,  10 }, {   1,   9 }, {   3,   7 }, {  21,   7 },
+    {   2,   8 }, {  22,   8 }, {  10,   4 }, {  14,   4 }, {  11,   4 },
+    /* bitalloc_25_g - 25 entries */
+    {  14,   3 }, {  17,   5 }, {   4,   7 }, {  20,   7 }, {   6,   6 },
+    {   9,   4 }, {  12,   2 }, {  15,   4 }, {  18,   6 }, {   3,   8 },
+    {  21,   8 }, {   5,   7 }, {   8,   5 }, {  11,   3 }, {  13,   3 },
+    {  16,   5 }, {  19,   7 }, {   0,  10 }, {  24,  10 }, {   2,   9 },
+    {  22,   9 }, {   1,  10 }, {  23,  10 }, {   7,   6 }, {  10,   4 },
+    /* bitalloc_33_a - 33 entries */
+    {  15,   3 }, {  17,   3 }, {  16,   3 }, {  21,   4 }, {   8,   6 },
+    {  24,   6 }, {  10,   5 }, {  12,   4 }, {  20,   4 }, {  22,   5 },
+    {   7,   7 }, {  25,   7 }, {   0,  13 }, {  32,  13 }, {   1,  13 },
+    {  31,  13 }, {   2,  12 }, {  30,  12 }, {   3,  11 }, {  29,  11 },
+    {   4,  10 }, {  28,  10 }, {   6,   8 }, {  26,   8 }, {   5,   9 },
+    {  27,   9 }, {  13,   4 }, {  19,   4 }, {  14,   4 }, {  18,   4 },
+    {   9,   6 }, {  23,   6 }, {  11,   5 },
+    /* bitalloc_33_b - 33 entries */
+    {   8,   5 }, {  24,   5 }, {  12,   4 }, {  16,   3 }, {  20,   4 },
+    {   3,   7 }, {  29,   7 }, {   6,   6 }, {   9,   5 }, {  23,   5 },
+    {  26,   6 }, {  31,   8 }, {   2,   8 }, {   4,   7 }, {  13,   4 },
+    {  19,   4 }, {  10,   5 }, {  22,   5 }, {  14,   4 }, {  18,   4 },
+    {  28,   7 }, {  30,   8 }, {   0,  10 }, {  32,  10 }, {   1,   9 },
+    {   7,   6 }, {  25,   6 }, {   5,   7 }, {  27,   7 }, {  11,   5 },
+    {  21,   5 }, {  15,   4 }, {  17,   4 },
+    /* bitalloc_33_c - 33 entries */
+    {  25,   5 }, {  31,   7 }, {   2,   7 }, {   4,   6 }, {  12,   4 },
+    {  20,   4 }, {  13,   4 }, {  19,   4 }, {   8,   5 }, {  24,   5 },
+    {  28,   6 }, {  30,   7 }, {   0,   9 }, {  32,   9 }, {   1,   8 },
+    {   5,   6 }, {  27,   6 }, {  14,   4 }, {  18,   4 }, {   9,   5 },
+    {  23,   5 }, {  15,   4 }, {  17,   4 }, {  10,   5 }, {  22,   5 },
+    {  16,   4 }, {   3,   7 }, {  29,   7 }, {   6,   6 }, {  11,   5 },
+    {  21,   5 }, {  26,   6 }, {   7,   6 },
+    /* bitalloc_33_d - 33 entries */
+    {  18,   3 }, {  21,   5 }, {   8,   7 }, {  24,   7 }, {  10,   6 },
+    {  13,   4 }, {  16,   2 }, {  19,   4 }, {  22,   6 }, {   7,   8 },
+    {  25,   8 }, {   9,   7 }, {  12,   5 }, {  15,   3 }, {  17,   3 },
+    {  20,   5 }, {  23,   7 }, {   6,   9 }, {  26,   9 }, {   5,  10 },
+    {  27,  10 }, {   4,  11 }, {  28,  11 }, {   3,  12 }, {  29,  12 },
+    {   0,  14 }, {  32,  14 }, {   1,  14 }, {  31,  14 }, {   2,  13 },
+    {  30,  13 }, {  11,   6 }, {  14,   4 },
+    /* bitalloc_33_e - 33 entries */
+    {  19,   4 }, {  11,   5 }, {  21,   5 }, {  15,   3 }, {  17,   3 },
+    {   5,   7 }, {  27,   7 }, {   2,   8 }, {  30,   8 }, {   6,   7 },
+    {   9,   6 }, {  23,   6 }, {  14,   4 }, {  16,   2 }, {  18,   4 },
+    {  12,   5 }, {  20,   5 }, {  26,   7 }, {   3,   8 }, {  29,   8 },
+    {   0,   9 }, {  32,   9 }, {   4,   8 }, {   7,   7 }, {  10,   6 },
+    {  22,   6 }, {  25,   7 }, {  28,   8 }, {   1,   9 }, {  31,   9 },
+    {   8,   7 }, {  24,   7 }, {  13,   5 },
+    /* bitalloc_33_f - 33 entries */
+    {  11,   4 }, {  21,   4 }, {   5,   6 }, {  27,   6 }, {   8,   5 },
+    {  12,   4 }, {  20,   4 }, {  24,   5 }, {   4,   7 }, {  28,   7 },
+    {   6,   6 }, {  13,   4 }, {  19,   4 }, {  14,   4 }, {  18,   4 },
+    {   9,   5 }, {  23,   5 }, {  15,   4 }, {  17,   4 }, {  16,   4 },
+    {  26,   6 }, {  31,   9 }, {   0,  11 }, {  32,  11 }, {   1,  10 },
+    {   3,   8 }, {  29,   8 }, {   2,   9 }, {  30,   9 }, {  10,   5 },
+    {  22,   5 }, {   7,   6 }, {  25,   6 },
+    /* bitalloc_33_g - 33 entries */
+    {  12,   4 }, {  20,   4 }, {  29,   8 }, {   1,   9 }, {  31,   9 },
+    {   6,   7 }, {   8,   6 }, {  10,   5 }, {  22,   5 }, {  24,   6 },
+    {  26,   7 }, {   4,   8 }, {  28,   8 }, {  15,   3 }, {  17,   3 },
+    {  13,   4 }, {  19,   4 }, {   2,   9 }, {  30,   9 }, {   0,  10 },
+    {  32,  10 }, {   3,   9 }, {   7,   7 }, {   9,   6 }, {  11,   5 },
+    {  21,   5 }, {  23,   6 }, {  25,   7 }, {   5,   8 }, {  27,   8 },
+    {  16,   3 }, {  14,   4 }, {  18,   4 },
+    /* bitalloc_65_a - 65 entries */
+    {  35,   4 }, {  30,   4 }, {  34,   4 }, {  42,   5 }, {  23,   5 },
+    {  31,   4 }, {  33,   4 }, {  32,   4 }, {  41,   5 }, {  19,   6 },
+    {  45,   6 }, {  16,   7 }, {  48,   7 }, {  20,   6 }, {  24,   5 },
+    {  40,   5 }, {  44,   6 }, {  14,   8 }, {  50,   8 }, {  57,  11 },
+    {   4,  13 }, {  60,  13 }, {   6,  12 }, {  58,  12 }, {   3,  14 },
+    {  61,  14 }, {   2,  15 }, {  62,  15 }, {   0,  16 }, {  64,  16 },
+    {   1,  16 }, {  63,  16 }, {   8,  11 }, {  12,   9 }, {  52,   9 },
+    {  10,  10 }, {  54,  10 }, {  25,   5 }, {  39,   5 }, {  17,   7 },
+    {  47,   7 }, {  21,   6 }, {  26,   5 }, {  38,   5 }, {  43,   6 },
+    {  15,   8 }, {  49,   8 }, {  18,   7 }, {  27,   5 }, {  37,   5 },
+    {  28,   5 }, {  36,   5 }, {  46,   7 }, {  56,  11 }, {   5,  13 },
+    {  59,  13 }, {   7,  12 }, {   9,  11 }, {  55,  11 }, {  13,   9 },
+    {  51,   9 }, {  11,  10 }, {  53,  10 }, {  22,   6 }, {  29,   5 },
+    /* bitalloc_65_b - 65 entries */
+    {  48,   6 }, {   3,   9 }, {  61,   9 }, {   6,   8 }, {  11,   7 },
+    {  53,   7 }, {  58,   8 }, {   7,   8 }, {  17,   6 }, {  31,   4 },
+    {  33,   4 }, {  24,   5 }, {  40,   5 }, {  32,   4 }, {  47,   6 },
+    {  18,   6 }, {  25,   5 }, {  39,   5 }, {  46,   6 }, {  57,   8 },
+    {  63,  10 }, {   2,  10 }, {   4,   9 }, {  12,   7 }, {  52,   7 },
+    {  13,   7 }, {  19,   6 }, {  26,   5 }, {  38,   5 }, {  45,   6 },
+    {  51,   7 }, {   8,   8 }, {  56,   8 }, {  27,   5 }, {  37,   5 },
+    {  20,   6 }, {  44,   6 }, {  60,   9 }, {  62,  10 }, {   0,  12 },
+    {  64,  12 }, {   1,  11 }, {   5,   9 }, {  59,   9 }, {  14,   7 },
+    {  50,   7 }, {   9,   8 }, {  55,   8 }, {  28,   5 }, {  36,   5 },
+    {  21,   6 }, {  43,   6 }, {  29,   5 }, {  35,   5 }, {  15,   7 },
+    {  49,   7 }, {  22,   6 }, {  42,   6 }, {  10,   8 }, {  54,   8 },
+    {  16,   7 }, {  30,   5 }, {  34,   5 }, {  23,   6 }, {  41,   6 },
+    /* bitalloc_65_c - 65 entries */
+    {  23,   5 }, {  41,   5 }, {  50,   6 }, {   8,   7 }, {  56,   7 },
+    {  24,   5 }, {  40,   5 }, {  15,   6 }, {  49,   6 }, {  25,   5 },
+    {  39,   5 }, {  16,   6 }, {  48,   6 }, {  26,   5 }, {  38,   5 },
+    {  60,   8 }, {   5,   8 }, {   9,   7 }, {  55,   7 }, {  10,   7 },
+    {  27,   5 }, {  37,   5 }, {  17,   6 }, {  47,   6 }, {  28,   5 },
+    {  36,   5 }, {  54,   7 }, {  59,   8 }, {  62,   9 }, {   0,  11 },
+    {  64,  11 }, {   1,  10 }, {  18,   6 }, {  29,   5 }, {  35,   5 },
+    {  46,   6 }, {  11,   7 }, {  53,   7 }, {  19,   6 }, {  45,   6 },
+    {  30,   5 }, {  34,   5 }, {  31,   5 }, {  33,   5 }, {   6,   8 },
+    {  58,   8 }, {  12,   7 }, {  20,   6 }, {  44,   6 }, {  52,   7 },
+    {   3,   9 }, {  61,   9 }, {   7,   8 }, {  32,   5 }, {  21,   6 },
+    {  43,   6 }, {  13,   7 }, {  51,   7 }, {  22,   6 }, {  42,   6 },
+    {  57,   8 }, {  63,  10 }, {   2,  10 }, {   4,   9 }, {  14,   7 },
+    /* bitalloc_65_d - 65 entries */
+    {  31,   3 }, {  33,   3 }, {  48,   8 }, {  11,  10 }, {  53,  10 },
+    {  14,   9 }, {  50,   9 }, {   9,  11 }, {  55,  11 }, {  12,  10 },
+    {  17,   8 }, {  20,   7 }, {  44,   7 }, {  23,   6 }, {  41,   6 },
+    {  26,   5 }, {  38,   5 }, {  29,   4 }, {  35,   4 }, {  32,   3 },
+    {  47,   8 }, {  52,  10 }, {  60,  13 }, {   3,  14 }, {  61,  14 },
+    {   7,  12 }, {  57,  12 }, {   5,  13 }, {  59,  13 }, {  15,   9 },
+    {  18,   8 }, {  46,   8 }, {  21,   7 }, {  43,   7 }, {  24,   6 },
+    {  40,   6 }, {  27,   5 }, {  37,   5 }, {  30,   4 }, {  34,   4 },
+    {  49,   9 }, {  10,  11 }, {  54,  11 }, {  13,  10 }, {  51,  10 },
+    {   8,  12 }, {  56,  12 }, {   0,  15 }, {  64,  15 }, {   1,  15 },
+    {  63,  15 }, {   2,  15 }, {  62,  15 }, {   4,  14 }, {   6,  13 },
+    {  58,  13 }, {  16,   9 }, {  19,   8 }, {  45,   8 }, {  22,   7 },
+    {  42,   7 }, {  25,   6 }, {  39,   6 }, {  28,   5 }, {  36,   5 },
+    /* bitalloc_65_e - 65 entries */
+    {  33,   3 }, {  21,   6 }, {  43,   6 }, {  26,   5 }, {  38,   5 },
+    {  16,   7 }, {  48,   7 }, {  22,   6 }, {  42,   6 }, {  10,   8 },
+    {  54,   8 }, {   4,   9 }, {  60,   9 }, {  11,   8 }, {  27,   5 },
+    {  37,   5 }, {  17,   7 }, {  47,   7 }, {  23,   6 }, {  30,   4 },
+    {  34,   4 }, {  32,   3 }, {  41,   6 }, {  53,   8 }, {   5,   9 },
+    {  59,   9 }, {  18,   7 }, {  46,   7 }, {  12,   8 }, {  52,   8 },
+    {  24,   6 }, {  28,   5 }, {  36,   5 }, {  40,   6 }, {   6,   9 },
+    {  58,   9 }, {  13,   8 }, {  19,   7 }, {  45,   7 }, {  51,   8 },
+    {   0,  10 }, {  64,  10 }, {   7,   9 }, {  57,   9 }, {   1,  10 },
+    {  63,  10 }, {  14,   8 }, {  50,   8 }, {   8,   9 }, {  56,   9 },
+    {  20,   7 }, {  44,   7 }, {  25,   6 }, {  39,   6 }, {  15,   8 },
+    {  49,   8 }, {   2,  10 }, {  62,  10 }, {   9,   9 }, {  55,   9 },
+    {   3,  10 }, {  61,  10 }, {  29,   5 }, {  35,   5 }, {  31,   4 },
+    /* bitalloc_65_f - 65 entries */
+    {  28,   4 }, {  36,   4 }, {  26,   5 }, {  38,   5 }, {  24,   6 },
+    {  40,   6 }, {  22,   7 }, {  42,   7 }, {  20,   8 }, {  44,   8 },
+    {  18,   9 }, {  46,   9 }, {  48,  10 }, {  50,  11 }, {  12,  12 },
+    {  52,  12 }, {   0,  14 }, {  64,  14 }, {   1,  14 }, {  63,  14 },
+    {  10,  13 }, {  54,  13 }, {   2,  14 }, {  62,  14 }, {   3,  14 },
+    {  61,  14 }, {   4,  14 }, {  60,  14 }, {   5,  14 }, {  59,  14 },
+    {   6,  14 }, {  58,  14 }, {   7,  14 }, {  57,  14 }, {   8,  14 },
+    {  56,  14 }, {  11,  13 }, {  15,  11 }, {  31,   3 }, {  33,   3 },
+    {  29,   4 }, {  35,   4 }, {  27,   5 }, {  37,   5 }, {  25,   6 },
+    {  39,   6 }, {  23,   7 }, {  41,   7 }, {  21,   8 }, {  43,   8 },
+    {  19,   9 }, {  45,   9 }, {  17,  10 }, {  47,  10 }, {  49,  11 },
+    {  13,  12 }, {  51,  12 }, {  53,  13 }, {   9,  14 }, {  55,  14 },
+    {  14,  12 }, {  16,  11 }, {  32,   3 }, {  30,   4 }, {  34,   4 },
+    /* bitalloc_65_g - 65 entries */
+    {  36,   4 }, {  40,   5 }, {  44,   6 }, {  48,   7 }, {  12,   8 },
+    {  52,   8 }, {   8,   9 }, {  56,   9 }, {   4,  10 }, {  60,  10 },
+    {   0,  11 }, {  64,  11 }, {   5,  10 }, {  17,   7 }, {  21,   6 },
+    {  25,   5 }, {  29,   4 }, {  35,   4 }, {  39,   5 }, {  43,   6 },
+    {  47,   7 }, {  13,   8 }, {  51,   8 }, {  30,   4 }, {   9,   9 },
+    {  55,   9 }, {  59,  10 }, {   1,  11 }, {  63,  11 }, {  10,   9 },
+    {  18,   7 }, {  22,   6 }, {  26,   5 }, {  34,   4 }, {  38,   5 },
+    {  42,   6 }, {  46,   7 }, {  14,   8 }, {  50,   8 }, {  31,   4 },
+    {  33,   4 }, {  54,   9 }, {   6,  10 }, {  58,  10 }, {   2,  11 },
+    {  62,  11 }, {   7,  10 }, {  11,   9 }, {  19,   7 }, {  23,   6 },
+    {  27,   5 }, {  37,   5 }, {  41,   6 }, {  45,   7 }, {  15,   8 },
+    {  49,   8 }, {  32,   4 }, {  53,   9 }, {  57,  10 }, {   3,  11 },
+    {  61,  11 }, {  16,   8 }, {  20,   7 }, {  24,   6 }, {  28,   5 },
+    /* bitalloc_129_a - 129 entries */
+    {  66,   4 }, {  31,   8 }, {  97,   8 }, {  19,   9 }, { 109,   9 },
+    {   6,  10 }, { 122,  10 }, {   7,  10 }, { 121,  10 }, {  52,   6 },
+    {  76,   6 }, {  43,   7 }, {  85,   7 }, {  59,   5 }, {  69,   5 },
+    {  32,   8 }, {  96,   8 }, {  20,   9 }, { 108,   9 }, {  33,   8 },
+    {  53,   6 }, {  75,   6 }, {  95,   8 }, {   8,  10 }, { 120,  10 },
+    {  21,   9 }, {  44,   7 }, {  84,   7 }, { 107,   9 }, {   9,  10 },
+    { 119,  10 }, {  34,   8 }, {  94,   8 }, {  22,   9 }, { 106,   9 },
+    {  45,   7 }, {  54,   6 }, {  74,   6 }, {  83,   7 }, {  10,  10 },
+    { 118,  10 }, {  23,   9 }, {  35,   8 }, {  93,   8 }, { 105,   9 },
+    {  11,  10 }, { 117,  10 }, {  46,   7 }, {  60,   5 }, {  68,   5 },
+    {  82,   7 }, {  24,   9 }, { 104,   9 }, {  36,   8 }, {  55,   6 },
+    {  73,   6 }, {  92,   8 }, {  12,  10 }, { 116,  10 }, {  25,   9 },
+    {  47,   7 }, {  81,   7 }, {  37,   8 }, {  91,   8 }, { 103,   9 },
+    {  13,  10 }, { 115,  10 }, {  26,   9 }, { 102,   9 }, {  48,   7 },
+    {  64,   4 }, {  63,   4 }, {  65,   4 }, {  56,   6 }, {  72,   6 },
+    {  61,   5 }, {  67,   5 }, {  80,   7 }, {  38,   8 }, {  90,   8 },
+    {   0,  11 }, { 128,  11 }, {  14,  10 }, { 114,  10 }, {   1,  11 },
+    { 127,  11 }, {  27,   9 }, { 101,   9 }, {  49,   7 }, {  79,   7 },
+    {  39,   8 }, {  89,   8 }, {  57,   6 }, {  71,   6 }, {  15,  10 },
+    { 113,  10 }, {  28,   9 }, { 100,   9 }, {   2,  11 }, { 126,  11 },
+    {  16,  10 }, {  40,   8 }, {  88,   8 }, {  50,   7 }, {  78,   7 },
+    { 112,  10 }, {   3,  11 }, { 125,  11 }, {  29,   9 }, {  99,   9 },
+    {  17,  10 }, { 111,  10 }, {  41,   8 }, {  87,   8 }, {  58,   6 },
+    {   4,  11 }, { 124,  11 }, {  18,  10 }, {  30,   9 }, {  98,   9 },
+    { 110,  10 }, {   5,  11 }, { 123,  11 }, {  51,   7 }, {  70,   6 },
+    {  77,   7 }, {  42,   8 }, {  86,   8 }, {  62,   5 },
+    /* bitalloc_129_b - 129 entries */
+    {  67,   5 }, {  21,   8 }, { 107,   8 }, {  33,   7 }, {  95,   7 },
+    {  13,   9 }, { 115,   9 }, {  22,   8 }, {  47,   6 }, {  81,   6 },
+    {  62,   5 }, {  66,   5 }, {  34,   7 }, {  94,   7 }, {  48,   6 },
+    {  63,   5 }, {  65,   5 }, {  80,   6 }, { 106,   8 }, { 121,  10 },
+    { 127,  12 }, {   2,  12 }, {   4,  11 }, {  14,   9 }, {  23,   8 },
+    { 105,   8 }, {  35,   7 }, {  93,   7 }, {  49,   6 }, {  64,   5 },
+    {  79,   6 }, { 114,   9 }, {   8,  10 }, { 120,  10 }, {  24,   8 },
+    {  36,   7 }, {  50,   6 }, {  78,   6 }, {  92,   7 }, { 104,   8 },
+    {  15,   9 }, { 113,   9 }, {  51,   6 }, {  77,   6 }, {  37,   7 },
+    {  91,   7 }, {  25,   8 }, { 103,   8 }, {  38,   7 }, {  52,   6 },
+    {  76,   6 }, {  90,   7 }, {  16,   9 }, { 112,   9 }, {  26,   8 },
+    {  53,   6 }, {  75,   6 }, { 102,   8 }, { 124,  11 }, {   5,  11 },
+    {   9,  10 }, { 119,  10 }, {  10,  10 }, {  39,   7 }, {  89,   7 },
+    {  27,   8 }, { 101,   8 }, {  54,   6 }, {  74,   6 }, {  40,   7 },
+    {  88,   7 }, {  17,   9 }, { 111,   9 }, {  28,   8 }, { 100,   8 },
+    { 118,  10 }, { 123,  11 }, { 126,  12 }, {   0,  14 }, { 128,  14 },
+    {   1,  13 }, {  18,   9 }, {  55,   6 }, {  73,   6 }, {  41,   7 },
+    {  87,   7 }, {  56,   6 }, {  72,   6 }, {  29,   8 }, {  99,   8 },
+    {  42,   7 }, {  86,   7 }, { 110,   9 }, {  11,  10 }, { 117,  10 },
+    {  19,   9 }, { 109,   9 }, {  57,   6 }, {  71,   6 }, {  43,   7 },
+    {  85,   7 }, {  58,   6 }, {  70,   6 }, {  30,   8 }, {  98,   8 },
+    {  44,   7 }, {  84,   7 }, {  31,   8 }, {  97,   8 }, {  59,   6 },
+    {  69,   6 }, {   6,  11 }, { 122,  11 }, {  12,  10 }, {  20,   9 },
+    { 108,   9 }, { 116,  10 }, {   3,  12 }, { 125,  12 }, {   7,  11 },
+    {  45,   7 }, {  60,   6 }, {  68,   6 }, {  83,   7 }, {  32,   8 },
+    {  96,   8 }, {  46,   7 }, {  82,   7 }, {  61,   6 },
+    /* bitalloc_129_c - 129 entries */
+    { 101,   7 }, { 113,   8 }, { 120,   9 }, { 127,  11 }, {   2,  11 },
+    {   4,  10 }, {  28,   7 }, { 100,   7 }, {  46,   6 }, {  82,   6 },
+    {  16,   8 }, { 112,   8 }, {  29,   7 }, {  47,   6 }, {  81,   6 },
+    {  48,   6 }, {  80,   6 }, {  99,   7 }, {  30,   7 }, {  98,   7 },
+    {  17,   8 }, { 111,   8 }, {  49,   6 }, {  79,   6 }, {  50,   6 },
+    {  78,   6 }, {  31,   7 }, {  97,   7 }, {   9,   9 }, { 119,   9 },
+    {  18,   8 }, { 110,   8 }, { 124,  10 }, {   5,  10 }, {  10,   9 },
+    {  51,   6 }, {  77,   6 }, {  32,   7 }, {  96,   7 }, {  52,   6 },
+    {  76,   6 }, {  33,   7 }, {  95,   7 }, {  53,   6 }, {  75,   6 },
+    {  19,   8 }, { 109,   8 }, {  34,   7 }, {  54,   6 }, {  74,   6 },
+    {  94,   7 }, { 118,   9 }, { 123,  10 }, { 126,  11 }, {   0,  13 },
+    { 128,  13 }, {   1,  12 }, {  20,   8 }, {  55,   6 }, {  73,   6 },
+    { 108,   8 }, {  11,   9 }, { 117,   9 }, {  35,   7 }, {  93,   7 },
+    {  36,   7 }, {  56,   6 }, {  72,   6 }, {  92,   7 }, {  21,   8 },
+    { 107,   8 }, {  57,   6 }, {  71,   6 }, {  37,   7 }, {  91,   7 },
+    {  58,   6 }, {  70,   6 }, {  22,   8 }, { 106,   8 }, {  38,   7 },
+    {  59,   6 }, {  69,   6 }, {  90,   7 }, {  12,   9 }, { 116,   9 },
+    {  23,   8 }, {  60,   6 }, {  68,   6 }, {  39,   7 }, {  89,   7 },
+    {  61,   6 }, {  67,   6 }, { 105,   8 }, {   6,  10 }, { 122,  10 },
+    {  13,   9 }, {  40,   7 }, {  62,   6 }, {  66,   6 }, {  88,   7 },
+    {  24,   8 }, { 104,   8 }, {  63,   6 }, {  65,   6 }, {  41,   7 },
+    {  87,   7 }, { 115,   9 }, {   3,  11 }, { 125,  11 }, {   7,  10 },
+    {  25,   8 }, {  42,   7 }, {  64,   6 }, {  86,   7 }, { 103,   8 },
+    {  14,   9 }, { 114,   9 }, {  43,   7 }, {  85,   7 }, {  26,   8 },
+    { 102,   8 }, {  44,   7 }, {  84,   7 }, { 121,  10 }, {   8,  10 },
+    {  15,   9 }, {  27,   8 }, {  45,   7 }, {  83,   7 },
+    /* bitalloc_129_d - 129 entries */
+    {  72,   5 }, {  83,   7 }, {  34,   9 }, {  94,   9 }, {  40,   8 },
+    {  51,   6 }, {  62,   4 }, {  66,   4 }, {  77,   6 }, {  88,   8 },
+    {  18,  12 }, { 110,  12 }, {   9,  14 }, { 119,  14 }, {  14,  13 },
+    {  19,  12 }, {  29,  10 }, {  99,  10 }, {  24,  11 }, { 104,  11 },
+    {  46,   7 }, {  57,   5 }, {  71,   5 }, {  82,   7 }, {  35,   9 },
+    {  93,   9 }, {  41,   8 }, {  52,   6 }, {  63,   4 }, {  65,   4 },
+    {  76,   6 }, {  87,   8 }, {  30,  10 }, {  98,  10 }, { 109,  12 },
+    { 114,  13 }, {   6,  15 }, { 122,  15 }, {  10,  14 }, {  25,  11 },
+    { 103,  11 }, {  15,  13 }, { 113,  13 }, {  20,  12 }, {  47,   7 },
+    {  58,   5 }, {  70,   5 }, {  81,   7 }, {  36,   9 }, {  92,   9 },
+    {  42,   8 }, {  53,   6 }, {  64,   4 }, {  75,   6 }, {  86,   8 },
+    {  31,  10 }, {  97,  10 }, { 108,  12 }, { 118,  14 }, {   7,  15 },
+    { 121,  15 }, {   0,  16 }, { 128,  16 }, {   1,  16 }, { 127,  16 },
+    {   2,  16 }, { 126,  16 }, {   3,  16 }, { 125,  16 }, {  26,  11 },
+    { 102,  11 }, {  11,  14 }, { 117,  14 }, {  16,  13 }, {  21,  12 },
+    {  48,   7 }, {  59,   5 }, {  69,   5 }, {  80,   7 }, {  37,   9 },
+    {  91,   9 }, {  43,   8 }, {  54,   6 }, {  74,   6 }, {  85,   8 },
+    {  32,  10 }, {  96,  10 }, { 107,  12 }, { 112,  13 }, {   4,  16 },
+    { 124,  16 }, {   8,  15 }, {  12,  14 }, {  27,  11 }, { 101,  11 },
+    {  22,  12 }, { 106,  12 }, {  49,   7 }, {  60,   5 }, {  68,   5 },
+    {  79,   7 }, {  38,   9 }, {  90,   9 }, {  44,   8 }, {  55,   6 },
+    {  73,   6 }, {  84,   8 }, {  33,  10 }, {  95,  10 }, { 116,  14 },
+    { 120,  15 }, {   5,  16 }, { 123,  16 }, {  17,  13 }, { 111,  13 },
+    {  13,  14 }, { 115,  14 }, {  28,  11 }, { 100,  11 }, {  23,  12 },
+    { 105,  12 }, {  50,   7 }, {  61,   5 }, {  67,   5 }, {  78,   7 },
+    {  39,   9 }, {  89,   9 }, {  45,   8 }, {  56,   6 },
+    /* bitalloc_129_e - 129 entries */
+    {  70,   5 }, {  59,   5 }, {  69,   5 }, {  60,   5 }, {  68,   5 },
+    {  37,   7 }, {  91,   7 }, {  45,   6 }, {  61,   5 }, {  67,   5 },
+    {  62,   5 }, {  66,   5 }, {  63,   5 }, {  65,   5 }, {  64,   5 },
+    {  83,   6 }, {  97,   8 }, { 102,   9 }, {  18,  11 }, { 110,  11 },
+    {  22,  10 }, {  38,   7 }, {  46,   6 }, {  82,   6 }, {  90,   7 },
+    {  32,   8 }, {  96,   8 }, {  47,   6 }, {  81,   6 }, { 106,  10 },
+    {  15,  12 }, { 113,  12 }, {  19,  11 }, {  27,   9 }, { 101,   9 },
+    {  23,  10 }, { 105,  10 }, {  39,   7 }, {  89,   7 }, {  33,   8 },
+    {  95,   8 }, {  48,   6 }, {  80,   6 }, {  49,   6 }, {  79,   6 },
+    {  40,   7 }, {  88,   7 }, {  28,   9 }, { 100,   9 }, { 109,  11 },
+    {   6,  15 }, { 122,  15 }, {   9,  14 }, {  12,  13 }, { 116,  13 },
+    { 119,  14 }, {   0,  16 }, {   4,  16 }, {   3,  16 }, {   2,  16 },
+    {  24,  10 }, { 104,  10 }, {  16,  12 }, { 112,  12 }, {  20,  11 },
+    {  34,   8 }, {  94,   8 }, {  50,   6 }, {  78,   6 }, {  41,   7 },
+    {  87,   7 }, {  51,   6 }, {  77,   6 }, {  52,   6 }, {  76,   6 },
+    {  29,   9 }, {  99,   9 }, {  35,   8 }, {  42,   7 }, {  86,   7 },
+    {  93,   8 }, { 108,  11 }, {   1,  16 }, { 128,  16 }, { 126,  16 },
+    { 127,  16 }, { 124,  16 }, { 125,  16 }, {   7,  15 }, {  13,  13 },
+    { 115,  13 }, {  10,  14 }, { 118,  14 }, {  25,  10 }, { 103,  10 },
+    {  17,  12 }, { 111,  12 }, {  21,  11 }, {  53,   6 }, {  75,   6 },
+    {  54,   6 }, {  74,   6 }, {  43,   7 }, {  85,   7 }, {  55,   6 },
+    {  73,   6 }, {  30,   9 }, {  98,   9 }, {  36,   8 }, {  92,   8 },
+    { 107,  11 }, { 121,  15 }, {   5,  16 }, { 123,  16 }, {   8,  15 },
+    { 120,  15 }, {  14,  13 }, { 114,  13 }, {  11,  14 }, { 117,  14 },
+    {  26,  10 }, {  31,   9 }, {  56,   6 }, {  72,   6 }, {  57,   6 },
+    {  71,   6 }, {  44,   7 }, {  84,   7 }, {  58,   6 },
+    /* bitalloc_129_f - 129 entries */
+    {  42,   6 }, {  86,   6 }, {  43,   6 }, {  85,   6 }, { 107,   8 },
+    { 114,   9 }, {   9,  10 }, { 119,  10 }, {  30,   7 }, {  98,   7 },
+    {  31,   7 }, {  44,   6 }, {  84,   6 }, {  45,   6 }, {  83,   6 },
+    {  97,   7 }, {  22,   8 }, { 106,   8 }, {  46,   6 }, {  82,   6 },
+    {  32,   7 }, {  96,   7 }, {  47,   6 }, {  81,   6 }, {  15,   9 },
+    { 113,   9 }, {  23,   8 }, { 105,   8 }, {  10,  10 }, { 118,  10 },
+    {  16,   9 }, {  48,   6 }, {  80,   6 }, {  33,   7 }, {  95,   7 },
+    {  49,   6 }, {  79,   6 }, {  50,   6 }, {  78,   6 }, { 112,   9 },
+    {   3,  12 }, { 125,  12 }, {   6,  11 }, { 122,  11 }, {   7,  11 },
+    {  24,   8 }, {  34,   7 }, {  51,   6 }, {  77,   6 }, {  94,   7 },
+    { 104,   8 }, {  11,  10 }, { 117,  10 }, {  17,   9 }, {  52,   6 },
+    {  76,   6 }, {  53,   6 }, {  75,   6 }, {  35,   7 }, {  93,   7 },
+    {  54,   6 }, {  74,   6 }, {  55,   6 }, {  73,   6 }, {  25,   8 },
+    { 103,   8 }, {  36,   7 }, {  56,   6 }, {  72,   6 }, {  57,   6 },
+    {  71,   6 }, {  92,   7 }, { 111,   9 }, { 121,  11 }, { 127,  13 },
+    {   2,  13 }, {   4,  12 }, {  12,  10 }, {  18,   9 }, { 110,   9 },
+    {  58,   6 }, {  70,   6 }, {  59,   6 }, {  69,   6 }, {  60,   6 },
+    {  68,   6 }, {  61,   6 }, {  67,   6 }, {  62,   6 }, {  66,   6 },
+    {  26,   8 }, { 102,   8 }, {  37,   7 }, {  63,   6 }, {  65,   6 },
+    {  64,   6 }, {  91,   7 }, {  38,   7 }, {  90,   7 }, {  27,   8 },
+    { 101,   8 }, { 116,  10 }, { 124,  12 }, { 126,  13 }, {   0,  15 },
+    { 128,  15 }, {   1,  14 }, {   8,  11 }, {  19,   9 }, { 109,   9 },
+    {  13,  10 }, { 115,  10 }, {  39,   7 }, {  89,   7 }, {  28,   8 },
+    { 100,   8 }, {  40,   7 }, {  88,   7 }, {  41,   7 }, {  87,   7 },
+    {  20,   9 }, { 108,   9 }, {  29,   8 }, {  99,   8 }, { 120,  11 },
+    {   5,  12 }, { 123,  12 }, {  14,  10 }, {  21,   9 },
+    /* bitalloc_129_g - 129 entries */
+    {  64,   4 }, {  88,   7 }, {   9,  11 }, { 119,  11 }, {  17,  10 },
+    {  25,   9 }, {  33,   8 }, {  41,   7 }, {  87,   7 }, {  49,   6 },
+    {  79,   6 }, {  57,   5 }, {  71,   5 }, {  95,   8 }, { 103,   9 },
+    { 111,  10 }, {   2,  12 }, { 126,  12 }, {  10,  11 }, {  18,  10 },
+    { 110,  10 }, {  26,   9 }, {  34,   8 }, {  42,   7 }, {  86,   7 },
+    {  50,   6 }, {  78,   6 }, {  58,   5 }, {  70,   5 }, {  94,   8 },
+    { 102,   9 }, { 118,  11 }, {   3,  12 }, { 125,  12 }, {  11,  11 },
+    { 117,  11 }, {  19,  10 }, { 109,  10 }, {  27,   9 }, {  35,   8 },
+    {  43,   7 }, {  85,   7 }, {  51,   6 }, {  77,   6 }, {  59,   5 },
+    {  69,   5 }, {  93,   8 }, { 101,   9 }, {   4,  12 }, { 124,  12 },
+    {  12,  11 }, {  20,  10 }, {  28,   9 }, { 100,   9 }, {  36,   8 },
+    {  44,   7 }, {  84,   7 }, {  52,   6 }, {  76,   6 }, {  60,   5 },
+    {  68,   5 }, {  92,   8 }, { 108,  10 }, { 116,  11 }, {   5,  12 },
+    { 123,  12 }, {  13,  11 }, { 115,  11 }, {  21,  10 }, {  29,   9 },
+    {  99,   9 }, {  37,   8 }, {  45,   7 }, {  83,   7 }, {  53,   6 },
+    {  75,   6 }, {  61,   5 }, {  67,   5 }, {  91,   8 }, { 107,  10 },
+    {   6,  12 }, { 122,  12 }, {  14,  11 }, {  22,  10 }, { 106,  10 },
+    {  30,   9 }, {  98,   9 }, {  38,   8 }, {  46,   7 }, {  82,   7 },
+    {  54,   6 }, {  74,   6 }, {  62,   5 }, {  66,   5 }, {  90,   8 },
+    { 114,  11 }, {   7,  12 }, { 121,  12 }, {  15,  11 }, { 113,  11 },
+    {  23,  10 }, { 105,  10 }, {  31,   9 }, {  97,   9 }, {  39,   8 },
+    {  47,   7 }, {  81,   7 }, {  55,   6 }, {  73,   6 }, {  63,   5 },
+    {  65,   5 }, {  89,   8 }, {   0,  13 }, { 128,  13 }, {   8,  12 },
+    {  16,  11 }, {  24,  10 }, {  32,   9 }, {  96,   9 }, { 104,  10 },
+    { 112,  11 }, { 120,  12 }, {   1,  13 }, { 127,  13 }, {  40,   8 },
+    {  48,   7 }, {  80,   7 }, {  56,   6 }, {  72,   6 },
+    /* bit_alloc_12[0] - 12 entries */
+    {   0,   1 }, {   1,   2 }, {   2,   3 }, {   3,   4 }, {   4,   5 },
+    {   5,   6 }, {  11,   9 }, {  10,   9 }, {   9,   9 }, {   8,   9 },
+    {   7,   8 }, {   6,   8 },
+    /* bit_alloc_12[1] - 12 entries */
+    {   1,   2 }, {   2,   3 }, {   4,   5 }, {  11,   7 }, {  10,   7 },
+    {   9,   7 }, {   8,   7 }, {   7,   7 }, {   6,   7 }, {   5,   6 },
+    {   3,   5 }, {   0,   1 },
+    /* bit_alloc_12[2] - 12 entries */
+    {   0,   2 }, {   4,   3 }, {   7,   4 }, {  11,   7 }, {  10,   7 },
+    {   9,   6 }, {   8,   5 }, {   3,   3 }, {   2,   3 }, {   6,   4 },
+    {   5,   4 }, {   1,   3 },
+    /* bit_alloc_12[3] - 12 entries */
+    {   2,   2 }, {   3,   3 }, {   4,   4 }, {   5,   5 }, {   6,   6 },
+    {   7,   7 }, {   8,   8 }, {   9,   9 }, {  11,  10 }, {  10,  10 },
+    {   1,   2 }, {   0,   2 },
+    /* bit_alloc_12[4] - 12 entries */
+    {   1,   2 }, {   2,   3 }, {   3,   4 }, {   4,   5 }, {   9,   8 },
+    {   8,   8 }, {   6,   7 }, {   7,   8 }, {  11,   9 }, {  10,   9 },
+    {   5,   7 }, {   0,   1 },
+    /* scale_factor[0] - 129 entries */
+    {  66,   3 }, {  69,   5 }, {  55,   8 }, {  73,   8 }, {  40,  13 },
+    {  88,  13 }, {  41,  13 }, {  87,  13 }, {  42,  13 }, {  86,  13 },
+    {  43,  13 }, {  85,  13 }, {  44,  13 }, {  84,  13 }, {  45,  13 },
+    {  83,  13 }, {  46,  13 }, {  82,  13 }, {  47,  13 }, {  81,  13 },
+    {  51,  11 }, {  77,  11 }, {  48,  13 }, {  80,  13 }, {  50,  12 },
+    {  78,  12 }, {  49,  13 }, {  79,  13 }, {  54,   9 }, {  74,   9 },
+    {  58,   6 }, {  61,   4 }, {  64,   2 }, {  67,   4 }, {  70,   6 },
+    {  57,   7 }, {  71,   7 }, {  60,   5 }, {  63,   3 }, {  65,   3 },
+    {  68,   5 }, {  56,   8 }, {  72,   8 }, {  53,  10 }, {  75,  10 },
+    {  52,  11 }, {  76,  11 }, {   0,  14 }, { 128,  14 }, {   1,  14 },
+    { 127,  14 }, {   2,  14 }, { 126,  14 }, {   3,  14 }, { 125,  14 },
+    {   4,  14 }, { 124,  14 }, {   5,  14 }, { 123,  14 }, {   6,  14 },
+    { 122,  14 }, {   7,  14 }, { 121,  14 }, {   8,  14 }, { 120,  14 },
+    {   9,  14 }, { 119,  14 }, {  10,  14 }, { 118,  14 }, {  11,  14 },
+    { 117,  14 }, {  12,  14 }, { 116,  14 }, {  13,  14 }, { 115,  14 },
+    {  14,  14 }, { 114,  14 }, {  15,  14 }, { 113,  14 }, {  16,  14 },
+    { 112,  14 }, {  17,  14 }, { 111,  14 }, {  18,  14 }, { 110,  14 },
+    {  19,  14 }, { 109,  14 }, {  20,  14 }, { 108,  14 }, {  21,  14 },
+    { 107,  14 }, {  22,  14 }, { 106,  14 }, {  23,  14 }, { 105,  14 },
+    {  24,  14 }, { 104,  14 }, {  25,  14 }, { 103,  14 }, {  26,  14 },
+    { 102,  14 }, {  27,  14 }, { 101,  14 }, {  28,  14 }, { 100,  14 },
+    {  29,  14 }, {  99,  14 }, {  30,  14 }, {  98,  14 }, {  31,  14 },
+    {  97,  14 }, {  32,  14 }, {  96,  14 }, {  33,  14 }, {  95,  14 },
+    {  34,  14 }, {  94,  14 }, {  35,  14 }, {  93,  14 }, {  36,  14 },
+    {  92,  14 }, {  37,  14 }, {  91,  14 }, {  38,  14 }, {  90,  14 },
+    {  39,  14 }, {  89,  14 }, {  59,   6 }, {  62,   4 },
+    /* scale_factor[1] - 129 entries */
+    {  69,   4 }, {  56,   6 }, {  72,   6 }, {  55,   7 }, {  73,   7 },
+    {  54,   8 }, {  74,   8 }, {  75,   9 }, {  48,  14 }, {  80,  14 },
+    {  49,  14 }, {  79,  14 }, {  50,  13 }, {  78,  13 }, {  51,  12 },
+    {  77,  12 }, {   0,  15 }, { 128,  15 }, {   1,  15 }, { 127,  15 },
+    {   2,  15 }, { 126,  15 }, {   3,  15 }, { 125,  15 }, {   4,  15 },
+    { 124,  15 }, {   5,  15 }, { 123,  15 }, {   6,  15 }, { 122,  15 },
+    {   7,  15 }, { 121,  15 }, {   8,  15 }, { 120,  15 }, {   9,  15 },
+    { 119,  15 }, {  10,  15 }, { 118,  15 }, {  11,  15 }, { 117,  15 },
+    {  12,  15 }, { 116,  15 }, {  13,  15 }, { 115,  15 }, {  14,  15 },
+    { 114,  15 }, {  15,  15 }, { 113,  15 }, {  16,  15 }, { 112,  15 },
+    {  17,  15 }, { 111,  15 }, {  18,  15 }, { 110,  15 }, {  19,  15 },
+    { 109,  15 }, {  20,  15 }, { 108,  15 }, {  21,  15 }, { 107,  15 },
+    {  22,  15 }, { 106,  15 }, {  23,  15 }, { 105,  15 }, {  24,  15 },
+    { 104,  15 }, {  25,  15 }, { 103,  15 }, {  26,  15 }, { 102,  15 },
+    {  27,  15 }, { 101,  15 }, {  28,  15 }, { 100,  15 }, {  29,  15 },
+    {  99,  15 }, {  30,  15 }, {  98,  15 }, {  31,  15 }, {  97,  15 },
+    {  32,  15 }, {  96,  15 }, {  33,  15 }, {  95,  15 }, {  34,  15 },
+    {  94,  15 }, {  35,  15 }, {  93,  15 }, {  36,  15 }, {  92,  15 },
+    {  37,  15 }, {  91,  15 }, {  38,  15 }, {  90,  15 }, {  39,  15 },
+    {  89,  15 }, {  40,  15 }, {  88,  15 }, {  41,  15 }, {  87,  15 },
+    {  42,  15 }, {  86,  15 }, {  43,  15 }, {  85,  15 }, {  44,  15 },
+    {  84,  15 }, {  45,  15 }, {  83,  15 }, {  46,  15 }, {  82,  15 },
+    {  47,  15 }, {  81,  15 }, {  52,  11 }, {  76,  11 }, {  53,  10 },
+    {  63,   3 }, {  65,   3 }, {  64,   3 }, {  58,   5 }, {  70,   5 },
+    {  60,   4 }, {  68,   4 }, {  61,   4 }, {  67,   4 }, {  57,   6 },
+    {  71,   6 }, {  59,   5 }, {  62,   4 }, {  66,   4 },
+    /* scale_factor[2] - 129 entries */
+    {  63,   3 }, {  65,   3 }, {  46,   9 }, {  82,   9 }, {  49,   8 },
+    {  79,   8 }, {  85,  10 }, {  38,  12 }, {  90,  12 }, {  41,  11 },
+    {  87,  11 }, {  93,  13 }, {  33,  14 }, {  95,  14 }, {  36,  13 },
+    {  92,  13 }, {  44,  10 }, {  52,   7 }, {  76,   7 }, {  55,   6 },
+    {  73,   6 }, {  58,   5 }, {  70,   5 }, {  61,   4 }, {  67,   4 },
+    {  64,   3 }, {  47,   9 }, {  81,   9 }, {  50,   8 }, {  78,   8 },
+    {  84,  10 }, {  39,  12 }, {  89,  12 }, {  42,  11 }, {  86,  11 },
+    {   0,  15 }, { 128,  15 }, {   1,  15 }, { 127,  15 }, {   2,  15 },
+    { 126,  15 }, {   3,  15 }, { 125,  15 }, {   4,  15 }, { 124,  15 },
+    {   5,  15 }, { 123,  15 }, {   6,  15 }, { 122,  15 }, {   7,  15 },
+    { 121,  15 }, {   8,  15 }, { 120,  15 }, {   9,  15 }, { 119,  15 },
+    {  10,  15 }, { 118,  15 }, {  11,  15 }, { 117,  15 }, {  12,  15 },
+    { 116,  15 }, {  13,  15 }, { 115,  15 }, {  14,  15 }, { 114,  15 },
+    {  15,  15 }, { 113,  15 }, {  16,  15 }, { 112,  15 }, {  17,  15 },
+    { 111,  15 }, {  18,  15 }, { 110,  15 }, {  19,  15 }, { 109,  15 },
+    {  20,  15 }, { 108,  15 }, {  21,  15 }, { 107,  15 }, {  22,  15 },
+    { 106,  15 }, {  23,  15 }, { 105,  15 }, {  53,   7 }, {  75,   7 },
+    {  56,   6 }, {  72,   6 }, {  59,   5 }, {  69,   5 }, {  62,   4 },
+    {  66,   4 }, {  45,  10 }, {  83,  10 }, {  48,   9 }, {  80,   9 },
+    {  24,  15 }, { 104,  15 }, {  25,  15 }, { 103,  15 }, {  26,  15 },
+    { 102,  15 }, {  27,  15 }, { 101,  15 }, {  28,  15 }, { 100,  15 },
+    {  29,  15 }, {  99,  15 }, {  30,  15 }, {  98,  15 }, {  31,  15 },
+    {  97,  15 }, {  34,  14 }, {  94,  14 }, {  37,  13 }, {  40,  12 },
+    {  88,  12 }, {  91,  13 }, {  32,  15 }, {  96,  15 }, {  35,  14 },
+    {  43,  11 }, {  51,   8 }, {  77,   8 }, {  54,   7 }, {  74,   7 },
+    {  57,   6 }, {  71,   6 }, {  60,   5 }, {  68,   5 },
+    /* scale_factor[3] - 129 entries */
+    {  64,   2 }, {  53,   8 }, {  75,   8 }, {  55,   7 }, {  57,   6 },
+    {  59,   5 }, {  69,   5 }, {  71,   6 }, {  73,   7 }, {  77,   9 },
+    {  79,  10 }, {  83,  12 }, {  42,  14 }, {  86,  14 }, {  44,  13 },
+    {  46,  12 }, {  82,  12 }, {  48,  11 }, {  80,  11 }, {  50,  10 },
+    {  52,   9 }, {  61,   4 }, {  67,   4 }, {  63,   3 }, {  65,   3 },
+    {  54,   8 }, {  74,   8 }, {  56,   7 }, {  58,   6 }, {  60,   5 },
+    {  68,   5 }, {  70,   6 }, {  72,   7 }, {  76,   9 }, {  78,  10 },
+    {  84,  13 }, {   0,  15 }, { 128,  15 }, {   1,  15 }, { 127,  15 },
+    {   2,  15 }, { 126,  15 }, {   3,  15 }, { 125,  15 }, {   4,  15 },
+    { 124,  15 }, {   5,  15 }, { 123,  15 }, {   6,  15 }, { 122,  15 },
+    {   7,  15 }, { 121,  15 }, {   8,  15 }, { 120,  15 }, {   9,  15 },
+    { 119,  15 }, {  10,  15 }, { 118,  15 }, {  11,  15 }, { 117,  15 },
+    {  12,  15 }, { 116,  15 }, {  13,  15 }, { 115,  15 }, {  14,  15 },
+    { 114,  15 }, {  15,  15 }, { 113,  15 }, {  16,  15 }, { 112,  15 },
+    {  17,  15 }, { 111,  15 }, {  18,  15 }, { 110,  15 }, {  19,  15 },
+    { 109,  15 }, {  20,  15 }, { 108,  15 }, {  21,  15 }, { 107,  15 },
+    {  22,  15 }, { 106,  15 }, {  23,  15 }, { 105,  15 }, {  24,  15 },
+    { 104,  15 }, {  25,  15 }, { 103,  15 }, {  26,  15 }, { 102,  15 },
+    {  27,  15 }, { 101,  15 }, {  28,  15 }, { 100,  15 }, {  29,  15 },
+    {  99,  15 }, {  30,  15 }, {  98,  15 }, {  31,  15 }, {  97,  15 },
+    {  32,  15 }, {  96,  15 }, {  33,  15 }, {  95,  15 }, {  34,  15 },
+    {  94,  15 }, {  35,  15 }, {  93,  15 }, {  36,  15 }, {  92,  15 },
+    {  37,  15 }, {  91,  15 }, {  38,  15 }, {  90,  15 }, {  39,  15 },
+    {  89,  15 }, {  40,  15 }, {  88,  15 }, {  41,  15 }, {  87,  15 },
+    {  43,  14 }, {  85,  14 }, {  45,  13 }, {  47,  12 }, {  81,  12 },
+    {  49,  11 }, {  51,  10 }, {  62,   4 }, {  66,   4 },
+    /* scale_factor[4] - 129 entries */
+    {  56,   5 }, {  72,   5 }, {  52,   6 }, {  76,   6 }, {  48,   7 },
+    {  80,   7 }, {  44,   8 }, {  84,   8 }, {  40,   9 }, {  88,   9 },
+    {  36,  10 }, {  92,  10 }, {  96,  11 }, {  28,  12 }, { 100,  12 },
+    {  24,  13 }, { 104,  13 }, {  16,  15 }, { 112,  15 }, {  20,  14 },
+    { 108,  14 }, {  21,  14 }, {  33,  11 }, {  61,   4 }, {  67,   4 },
+    {  57,   5 }, {  71,   5 }, {  53,   6 }, {  75,   6 }, {  49,   7 },
+    {  79,   7 }, {  45,   8 }, {  83,   8 }, {  41,   9 }, {  87,   9 },
+    {  37,  10 }, {  91,  10 }, {  95,  11 }, {  29,  12 }, {  99,  12 },
+    {  25,  13 }, { 103,  13 }, { 107,  14 }, {  17,  15 }, { 111,  15 },
+    {  26,  13 }, {  34,  11 }, {  62,   4 }, {  66,   4 }, {  58,   5 },
+    {  70,   5 }, {  54,   6 }, {  74,   6 }, {  50,   7 }, {  78,   7 },
+    {  46,   8 }, {  82,   8 }, {  42,   9 }, {  86,   9 }, {  38,  10 },
+    {  90,  10 }, {  94,  11 }, {  30,  12 }, {  98,  12 }, {  39,  10 },
+    {  63,   4 }, {  65,   4 }, {  59,   5 }, {  69,   5 }, {  55,   6 },
+    {  73,   6 }, {  51,   7 }, {  77,   7 }, {  47,   8 }, {  81,   8 },
+    {  43,   9 }, {  85,   9 }, {  89,  10 }, { 102,  13 }, {  22,  14 },
+    { 106,  14 }, {  18,  15 }, { 110,  15 }, {   0,  16 }, { 128,  16 },
+    {   1,  16 }, { 127,  16 }, {  27,  13 }, {  35,  11 }, {  93,  11 },
+    {  31,  12 }, {  97,  12 }, { 101,  13 }, {   2,  16 }, { 126,  16 },
+    {   3,  16 }, { 125,  16 }, {   4,  16 }, { 124,  16 }, {   5,  16 },
+    { 123,  16 }, {   6,  16 }, { 122,  16 }, {   7,  16 }, { 121,  16 },
+    {   8,  16 }, { 120,  16 }, {   9,  16 }, { 119,  16 }, {  10,  16 },
+    { 118,  16 }, {  11,  16 }, { 117,  16 }, {  12,  16 }, { 116,  16 },
+    {  13,  16 }, { 115,  16 }, {  14,  16 }, { 114,  16 }, {  15,  16 },
+    { 113,  16 }, {  23,  14 }, { 105,  14 }, {  19,  15 }, { 109,  15 },
+    {  32,  12 }, {  64,   4 }, {  60,   5 }, {  68,   5 },
+    /* transition_mode[0] - 4 entries */
+    {   0,   1 }, {   1,   2 }, {   2,   3 }, {   3,   3 },
+    /* transition_mode[1] - 4 entries */
+    {   3,   1 }, {   0,   2 }, {   1,   3 }, {   2,   3 },
+    /* transition_mode[2] - 4 entries */
+    {   2,   1 }, {   3,   2 }, {   0,   3 }, {   1,   3 },
+    /* transition_mode[3] - 4 entries */
+    {   0,   2 }, {   1,   2 }, {   2,   2 }, {   3,   2 },
+    /* tnl_group[0] - 37 entries */
+    {   5,   3 }, {   4,   3 }, {  19,   8 }, {  33,  12 }, {  31,  12 },
+    {  28,  11 }, {  34,  14 }, {  37,  14 }, {  35,  15 }, {   0,  15 },
+    {  36,  14 }, {  32,  12 }, {  30,  11 }, {  24,   9 }, {  22,   8 },
+    {  23,   9 }, {  29,  10 }, {  27,  10 }, {  17,   6 }, {  14,   5 },
+    {   7,   4 }, {  12,   5 }, {   1,   6 }, {  26,   9 }, {   3,   9 },
+    {  25,   8 }, {  20,   7 }, {   8,   4 }, {  10,   4 }, {  13,   4 },
+    {  15,   6 }, {  16,   6 }, {  18,   6 }, {  21,   6 }, {  11,   4 },
+    {   9,   3 }, {   6,   3 },
+    /* tnl_group[1] - 34 entries */
+    {   4,   4 }, {   7,   4 }, {  10,   4 }, {   3,  10 }, {  27,  10 },
+    {  29,  10 }, {  28,  10 }, {  22,   8 }, {  21,   7 }, {  15,   6 },
+    {  14,   5 }, {   8,   4 }, {  16,   6 }, {  19,   7 }, {  23,   8 },
+    {  26,   9 }, {  30,  10 }, {  33,  13 }, {  34,  14 }, {   0,  14 },
+    {  32,  12 }, {  31,  11 }, {  12,   5 }, {   5,   3 }, {   9,   3 },
+    {   1,   4 }, {  20,   7 }, {  25,   8 }, {  24,   8 }, {  18,   6 },
+    {  17,   5 }, {   6,   3 }, {  11,   4 }, {  13,   4 },
+    /* tnl_group[2] - 31 entries */
+    {  14,   7 }, {  17,   7 }, {  15,   7 }, {  23,   9 }, {  28,  10 },
+    {  29,  11 }, {  30,  13 }, {   0,  13 }, {  31,  12 }, {  25,   8 },
+    {  10,   5 }, {   8,   4 }, {   9,   4 }, {   4,   4 }, {  22,   8 },
+    {   3,   8 }, {  21,   8 }, {  26,   9 }, {  27,   9 }, {  12,   6 },
+    {  11,   5 }, {  16,   7 }, {  18,   7 }, {  20,   8 }, {  24,   8 },
+    {  19,   7 }, {  13,   5 }, {   5,   3 }, {   1,   2 }, {   6,   3 },
+    {   7,   3 },
+    /* tnl_group[3] - 28 entries */
+    {   8,   6 }, {   2,   6 }, {   7,   6 }, {  23,   7 }, {  12,   7 },
+    {   5,   4 }, {  10,   6 }, {  20,   8 }, {  25,   9 }, {  26,  10 },
+    {  27,  11 }, {   0,  11 }, {  22,   7 }, {   9,   5 }, {  13,   6 },
+    {  17,   6 }, {   4,   5 }, {  14,   6 }, {  19,   7 }, {  24,   7 },
+    {   3,   6 }, {  11,   6 }, {  21,   6 }, {  18,   6 }, {  16,   6 },
+    {  15,   6 }, {   6,   3 }, {   1,   1 },
+    /* tnl_group[4] - 23 entries */
+    {   2,   2 }, {   7,   7 }, {  15,   8 }, {  21,   8 }, {   3,   6 },
+    {   6,   6 }, {  13,   7 }, {  14,   8 }, {  18,   8 }, {   4,   4 },
+    {   5,   5 }, {  11,   7 }, {  10,   7 }, {  20,   6 }, {  12,   8 },
+    {  16,   9 }, {  22,  10 }, {   0,  10 }, {  17,   7 }, {  19,   6 },
+    {   8,   6 }, {   9,   6 }, {   1,   1 },
+    /* tnl_scf - 20 entries */
+    {   3,   3 }, {  11,   6 }, {  16,   9 }, {  17,  10 }, {  18,  11 },
+    {  19,  12 }, {   0,  12 }, {  15,   8 }, {  14,   7 }, {   9,   5 },
+    {   7,   4 }, {   2,   3 }, {   4,   3 }, {   1,   3 }, {   5,   3 },
+    {  12,   6 }, {  13,   6 }, {  10,   5 }, {   8,   4 }, {   6,   3 },
+    /* damp - 7 entries */
+    {   2,   2 }, {   3,   3 }, {   4,   4 }, {   5,   5 }, {   6,   6 },
+    {   0,   6 }, {   1,   1 },
+    /* dph - 9 entries */
+    {   2,   2 }, {   1,   2 }, {   3,   4 }, {   7,   4 }, {   6,   5 },
+    {   5,   6 }, {   0,   6 }, {   4,   4 }, {   8,   2 },
+    /* fst_rsd_amp - 24 entries */
+    {  12,   4 }, {  17,   4 }, {   1,   6 }, {   8,   6 }, {   9,   5 },
+    {  20,   7 }, {   3,   7 }, {   5,   6 }, {   6,   6 }, {   2,   7 },
+    {  22,   9 }, {  23,  10 }, {   0,  10 }, {  21,   8 }, {  11,   4 },
+    {  19,   5 }, {   7,   6 }, {   4,   6 }, {  16,   3 }, {  10,   4 },
+    {  18,   4 }, {  15,   3 }, {  13,   3 }, {  14,   3 },
+    /* rsd_apprx - 6 entries */
+    {   1,   1 }, {   2,   2 }, {   3,   3 }, {   4,   4 }, {   5,   5 },
+    {   0,   5 },
+    /* rsd_amp - 33 entries */
+    {   2,   3 }, {   1,   3 }, {   5,   3 }, {  14,   8 }, {  20,   9 },
+    {  26,  10 }, {  25,  12 }, {  32,  12 }, {  19,  11 }, {  16,   8 },
+    {  24,   9 }, {  17,   9 }, {  12,   7 }, {  13,   7 }, {   9,   5 },
+    {   7,   4 }, {   3,   2 }, {   4,   3 }, {   8,   6 }, {  11,   6 },
+    {  18,   8 }, {  15,   8 }, {  30,  11 }, {  36,  13 }, {  34,  13 },
+    {  29,  13 }, {   0,  13 }, {  21,  10 }, {  28,  10 }, {  23,  10 },
+    {  22,   8 }, {  10,   6 }, {   6,   4 },
+    /* avg_g3 - 18 entries */
+    {  14,   4 }, {  11,   6 }, {  19,   7 }, {   9,   7 }, {  13,   5 },
+    {  10,   6 }, {  20,   8 }, {   8,   8 }, {   6,  10 }, {  23,  11 },
+    {   0,  11 }, {  21,   9 }, {   7,   8 }, {  12,   5 }, {  18,   4 },
+    {  16,   2 }, {  15,   2 }, {  17,   2 },
+    /* st_grid - 22 entries */
+    {   4,   4 }, {   3,   4 }, {   8,   4 }, {  14,   8 }, {   7,   9 },
+    {   9,  10 }, {  22,  10 }, {  12,   7 }, {  16,   9 }, {  11,  10 },
+    {  13,  11 }, {  17,  13 }, {  15,  13 }, {  24,  13 }, {   0,  13 },
+    {  18,   9 }, {  20,  10 }, {   2,  10 }, {   5,   7 }, {  10,   5 },
+    {   1,   2 }, {   6,   1 },
+    /* grid_2 - 20 entries */
+    {   3,   2 }, {   2,   2 }, {   4,   3 }, {   5,   4 }, {   6,   5 },
+    {  11,  11 }, {  13,  12 }, {  17,  12 }, {  19,  14 }, {  14,  14 },
+    {  18,  13 }, {  15,  13 }, {  16,  14 }, {   0,  14 }, {  12,  11 },
+    {  10,   9 }, {   9,   8 }, {   8,   7 }, {   7,   6 }, {   1,   2 },
+    /* grid_3 - 13 entries */
+    {  18,   3 }, {  15,   4 }, {  19,   5 }, {  14,   6 }, {  13,   8 },
+    {  12,  10 }, {  11,  12 }, {   0,  12 }, {  22,  11 }, {  21,   9 },
+    {  20,   7 }, {  16,   2 }, {  17,   1 },
+    /* rsd - 9 entries */
+    {   1,   3 }, {   5,   4 }, {   6,   5 }, {   7,   6 }, {   4,   6 },
+    {   4,   3 }, {   0,   3 }, {   2,   2 }, {   3,   2 },
 };
 
 DCAVLC  ff_dca_vlc_bit_allocation;
@@ -1250,67 +789,65 @@ VLC     ff_dca_vlc_rsd;
 av_cold void ff_dca_init_vlcs(void)
 {
     static VLCElem dca_table[30218];
+    const uint8_t (*src_table)[2] = ff_dca_vlc_src_tables;
     unsigned offset = 0;
-    int i, j;
+    int i;
 
-#define DCA_INIT_VLC(vlc, a, b, c, d)                                       \
+#define DCA_INIT_VLC(vlc, nb_bits, nb_codes)                                \
     do {                                                                    \
         vlc.table           = &dca_table[offset];                           \
         vlc.table_allocated = FF_ARRAY_ELEMS(dca_table) - offset;           \
-        init_vlc(&vlc, a, b, c, 1, 1, d, 2, 2, INIT_VLC_STATIC_OVERLONG);   \
+        ff_init_vlc_from_lengths(&vlc, nb_bits, nb_codes, &src_table[0][1], 2, \
+                                 &src_table[0][0], 2, 1,                    \
+                                 0, INIT_VLC_STATIC_OVERLONG, NULL);        \
         offset += vlc.table_size;                                           \
+        src_table += nb_codes;                                              \
     } while (0)
 
+    for (unsigned i = 0; i < DCA_CODE_BOOKS; i++) {
+        ff_dca_vlc_quant_index[i].offset    = ff_dca_bitalloc_offsets[i];
+        ff_dca_vlc_quant_index[i].max_depth = 1 + (i > 4);
+        for (unsigned j = 0; j < ff_dca_quant_index_group_size[i]; j++)
+            DCA_INIT_VLC(ff_dca_vlc_quant_index[i].vlc[j], bitalloc_maxbits[i][j],
+                         ff_dca_bitalloc_sizes[i]);
+    }
+
     ff_dca_vlc_bit_allocation.offset    = 1;
     ff_dca_vlc_bit_allocation.max_depth = 2;
     for (i = 0; i < 5; i++)
-        DCA_INIT_VLC(ff_dca_vlc_bit_allocation.vlc[i], bitalloc_12_vlc_bits[i], 12,
-                     ff_dca_bitalloc_12_bits[i], ff_dca_bitalloc_12_codes[i]);
+        DCA_INIT_VLC(ff_dca_vlc_bit_allocation.vlc[i], bitalloc_12_vlc_bits[i], 12);
 
     ff_dca_vlc_scale_factor.offset    = -64;
     ff_dca_vlc_scale_factor.max_depth = 2;
     for (i = 0; i < 5; i++)
-        DCA_INIT_VLC(ff_dca_vlc_scale_factor.vlc[i], SCALES_VLC_BITS, 129,
-                     scales_bits[i], scales_codes[i]);
+        DCA_INIT_VLC(ff_dca_vlc_scale_factor.vlc[i], SCALES_VLC_BITS, 129);
 
     for (unsigned i = 0; i < FF_ARRAY_ELEMS(ff_dca_vlc_transition_mode); i++)
-        DCA_INIT_VLC(ff_dca_vlc_transition_mode[i], DCA_TMODE_VLC_BITS, 4,
-                     tmode_bits[i], tmode_codes[i]);
-
-    for (i = 0; i < DCA_CODE_BOOKS; i++) {
-        ff_dca_vlc_quant_index[i].offset    = ff_dca_bitalloc_offsets[i];
-        ff_dca_vlc_quant_index[i].max_depth = 1 + (i > 4);
-        for (j = 0; ff_dca_bitalloc_codes[i][j]; j++)
-            DCA_INIT_VLC(ff_dca_vlc_quant_index[i].vlc[j], bitalloc_maxbits[i][j],
-                         ff_dca_bitalloc_sizes[i], ff_dca_bitalloc_bits[i][j], ff_dca_bitalloc_codes[i][j]);
-    }
+        DCA_INIT_VLC(ff_dca_vlc_transition_mode[i], DCA_TMODE_VLC_BITS, 4);
 
-#define LBR_INIT_VLC(vlc, tab, nb_bits)                                 \
+#define LBR_INIT_VLC(vlc, nb_bits, nb_codes)                            \
     do {                                                                \
         vlc.table           = &dca_table[offset];                       \
         vlc.table_allocated = FF_ARRAY_ELEMS(dca_table) - offset;       \
-        ff_init_vlc_sparse(&vlc, nb_bits, FF_ARRAY_ELEMS(tab##_codes),  \
-                           &tab##_bitvals[0], 2, 1,                     \
-                           tab##_codes, 2, 2,                           \
-                           &tab##_bitvals[1], 2, 1,                     \
-                           INIT_VLC_LE | INIT_VLC_STATIC_OVERLONG);     \
+        ff_init_vlc_from_lengths(&vlc, nb_bits, nb_codes, &src_table[0][1], 2, \
+                                 &src_table[0][0], 2, 1, 0,             \
+                                 INIT_VLC_STATIC_OVERLONG | INIT_VLC_LE,\
+                                 NULL);                                 \
         offset += vlc.table_size;                                       \
+        src_table += nb_codes;                                          \
     } while (0)
 
-    LBR_INIT_VLC(ff_dca_vlc_tnl_grp[0],  tnl_grp_0,   9);
-    LBR_INIT_VLC(ff_dca_vlc_tnl_grp[1],  tnl_grp_1,   9);
-    LBR_INIT_VLC(ff_dca_vlc_tnl_grp[2],  tnl_grp_2,   9);
-    LBR_INIT_VLC(ff_dca_vlc_tnl_grp[3],  tnl_grp_3,   9);
-    LBR_INIT_VLC(ff_dca_vlc_tnl_grp[4],  tnl_grp_4,   9);
-    LBR_INIT_VLC(ff_dca_vlc_tnl_scf,     tnl_scf,     9);
-    LBR_INIT_VLC(ff_dca_vlc_damp,        damp,        6);
-    LBR_INIT_VLC(ff_dca_vlc_dph,         dph,         6);
-    LBR_INIT_VLC(ff_dca_vlc_fst_rsd_amp, fst_rsd_amp, 9);
-    LBR_INIT_VLC(ff_dca_vlc_rsd_apprx,   rsd_apprx,   5);
-    LBR_INIT_VLC(ff_dca_vlc_rsd_amp,     rsd_amp,     9);
-    LBR_INIT_VLC(ff_dca_vlc_avg_g3,      avg_g3,      9);
-    LBR_INIT_VLC(ff_dca_vlc_st_grid,     st_grid,     9);
-    LBR_INIT_VLC(ff_dca_vlc_grid_2,      grid_2,      9);
-    LBR_INIT_VLC(ff_dca_vlc_grid_3,      grid_3,      9);
-    LBR_INIT_VLC(ff_dca_vlc_rsd,         rsd,         6);
+    for (unsigned i = 0; i < FF_ARRAY_ELEMS(ff_dca_vlc_tnl_grp); i++)
+        LBR_INIT_VLC(ff_dca_vlc_tnl_grp[i], 9, tnl_grp_sizes[i]);
+    LBR_INIT_VLC(ff_dca_vlc_tnl_scf,     9,  20);
+    LBR_INIT_VLC(ff_dca_vlc_damp,        6,   7);
+    LBR_INIT_VLC(ff_dca_vlc_dph,         6,   9);
+    LBR_INIT_VLC(ff_dca_vlc_fst_rsd_amp, 9,  24);
+    LBR_INIT_VLC(ff_dca_vlc_rsd_apprx,   5,   6);
+    LBR_INIT_VLC(ff_dca_vlc_rsd_amp,     9,  33);
+    LBR_INIT_VLC(ff_dca_vlc_avg_g3,      9,  18);
+    LBR_INIT_VLC(ff_dca_vlc_st_grid,     9,  22);
+    LBR_INIT_VLC(ff_dca_vlc_grid_2,      9,  20);
+    LBR_INIT_VLC(ff_dca_vlc_grid_3,      9,  13);
+    LBR_INIT_VLC(ff_dca_vlc_rsd,         6,   9);
 }
diff --git a/libavcodec/dcahuff.h b/libavcodec/dcahuff.h
index 68974d9965..c0bdce5998 100644
--- a/libavcodec/dcahuff.h
+++ b/libavcodec/dcahuff.h
@@ -62,11 +62,7 @@ extern VLC  ff_dca_vlc_rsd;
 
 extern const int8_t  ff_dca_bitalloc_offsets[DCA_CODE_BOOKS];
 extern const uint8_t ff_dca_bitalloc_sizes[DCA_CODE_BOOKS];
-extern const uint16_t *const ff_dca_bitalloc_codes[DCA_CODE_BOOKS][8];
-extern const uint8_t  *const ff_dca_bitalloc_bits[DCA_CODE_BOOKS][8];
-
-extern const uint8_t  ff_dca_bitalloc_12_bits[DCA_BITALLOC_12_COUNT][12];
-extern const uint16_t ff_dca_bitalloc_12_codes[DCA_BITALLOC_12_COUNT][12];
+extern const uint8_t ff_dca_vlc_src_tables[][2];
 
 av_cold void ff_dca_init_vlcs(void);
 
-- 
2.34.1



More information about the ffmpeg-devel mailing list