00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef AVCODEC_DCAHUFF_H
00024 #define AVCODEC_DCAHUFF_H
00025
00026 #include <stdint.h>
00027 #include <stdlib.h>
00028
00029 #define TMODE_COUNT 4
00030 static const uint8_t tmode_vlc_bits[TMODE_COUNT] = { 3, 3, 3, 2 };
00031 static const uint16_t tmode_codes[TMODE_COUNT][4] = {
00032 { 0x0000, 0x0002, 0x0006, 0x0007 },
00033 { 0x0002, 0x0006, 0x0007, 0x0000 },
00034 { 0x0006, 0x0007, 0x0000, 0x0002 },
00035 { 0x0000, 0x0001, 0x0002, 0x0003 }
00036 };
00037 static const uint8_t tmode_bits[TMODE_COUNT][4] = {
00038 { 1, 2, 3, 3 },
00039 { 2, 3, 3, 1 },
00040 { 3, 3, 1, 2 },
00041 { 2, 2, 2, 2 }
00042 };
00043
00044
00045 #define BITALLOC_12_COUNT 5
00046 #define BITALLOC_12_VLC_BITS 9
00047 static const uint8_t bitalloc_12_vlc_bits[BITALLOC_12_COUNT] = {
00048 9, 7, 7, 9, 9
00049 };
00050 static const uint16_t bitalloc_12_codes[BITALLOC_12_COUNT][12] = {
00051 {
00052 0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E, 0x00FF, 0x00FE,
00053 0x01FB, 0x01FA, 0x01F9, 0x01F8,
00054 },
00055 {
00056 0x0001, 0x0000, 0x0002, 0x000F, 0x000C, 0x001D, 0x0039, 0x0038,
00057 0x0037, 0x0036, 0x0035, 0x0034,
00058 },
00059 {
00060 0x0000, 0x0007, 0x0005, 0x0004, 0x0002, 0x000D, 0x000C, 0x0006,
00061 0x000F, 0x001D, 0x0039, 0x0038,
00062 },
00063 {
00064 0x0003, 0x0002, 0x0000, 0x0002, 0x0006, 0x000E, 0x001E, 0x003E,
00065 0x007E, 0x00FE, 0x01FF, 0x01FE,
00066 },
00067 {
00068 0x0001, 0x0000, 0x0002, 0x0006, 0x000E, 0x003F, 0x003D, 0x007C,
00069 0x0079, 0x0078, 0x00FB, 0x00FA,
00070 }
00071 };
00072 static const uint8_t bitalloc_12_bits[BITALLOC_12_COUNT][12] = {
00073 { 1, 2, 3, 4, 5, 6, 8, 8, 9, 9, 9, 9 },
00074 { 1, 2, 3, 5, 5, 6, 7, 7, 7, 7, 7, 7 },
00075 { 2, 3, 3, 3, 3, 4, 4, 4, 5, 6, 7, 7 },
00076 { 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10 },
00077 { 1, 2, 3, 4, 5, 7, 7, 8, 8, 8, 9, 9 }
00078 };
00079
00080
00081 #define SCALES_COUNT 5
00082 #define SCALES_VLC_BITS 9
00083 static const uint16_t scales_codes[SCALES_COUNT][129] = {
00084 {
00085 0x3AB0, 0x3AB2, 0x3AB4, 0x3AB6, 0x3AB8, 0x3ABA, 0x3ABC, 0x3ABE,
00086 0x3AC0, 0x3AC2, 0x3AC4, 0x3AC6, 0x3AC8, 0x3ACA, 0x3ACC, 0x3ACE,
00087 0x3AD0, 0x3AD2, 0x3AD4, 0x3AD6, 0x3AD8, 0x3ADA, 0x3ADC, 0x3ADE,
00088 0x3AE0, 0x3AE2, 0x3AE4, 0x3AE6, 0x3AE8, 0x3AEA, 0x3AEC, 0x3AEE,
00089 0x3AF0, 0x3AF2, 0x3AF4, 0x3AF6, 0x3AF8, 0x3AFA, 0x3AFC, 0x3AFE,
00090 0x0540, 0x0542, 0x0544, 0x0546, 0x0548, 0x054A, 0x054C, 0x054E,
00091 0x0558, 0x055E, 0x02AD, 0x0154, 0x0754, 0x03A8, 0x0056, 0x0028,
00092 0x00E8, 0x004A, 0x000B, 0x003B, 0x0013, 0x0003, 0x000F, 0x0005,
00093 0x0001, 0x0006, 0x0000, 0x0008, 0x001C, 0x0004, 0x0024, 0x004B,
00094 0x00E9, 0x0029, 0x0057, 0x03A9, 0x0755, 0x0155, 0x02AE, 0x055F,
00095 0x0559, 0x054F, 0x054D, 0x054B, 0x0549, 0x0547, 0x0545, 0x0543,
00096 0x0541, 0x3AFF, 0x3AFD, 0x3AFB, 0x3AF9, 0x3AF7, 0x3AF5, 0x3AF3,
00097 0x3AF1, 0x3AEF, 0x3AED, 0x3AEB, 0x3AE9, 0x3AE7, 0x3AE5, 0x3AE3,
00098 0x3AE1, 0x3ADF, 0x3ADD, 0x3ADB, 0x3AD9, 0x3AD7, 0x3AD5, 0x3AD3,
00099 0x3AD1, 0x3ACF, 0x3ACD, 0x3ACB, 0x3AC9, 0x3AC7, 0x3AC5, 0x3AC3,
00100 0x3AC1, 0x3ABF, 0x3ABD, 0x3ABB, 0x3AB9, 0x3AB7, 0x3AB5, 0x3AB3,
00101 0x3AB1,
00102 },
00103 {
00104 0x0F60, 0x0F62, 0x0F64, 0x0F66, 0x0F68, 0x0F6A, 0x0F6C, 0x0F6E,
00105 0x0F70, 0x0F72, 0x0F74, 0x0F76, 0x0F78, 0x0F7A, 0x0F7C, 0x0F7E,
00106 0x0F80, 0x0F82, 0x0F84, 0x0F86, 0x0F88, 0x0F8A, 0x0F8C, 0x0F8E,
00107 0x0F90, 0x0F92, 0x0F94, 0x0F96, 0x0F98, 0x0F9A, 0x0F9C, 0x0F9E,
00108 0x0FA0, 0x0FA2, 0x0FA4, 0x0FA6, 0x0FA8, 0x0FAA, 0x0FAC, 0x0FAE,
00109 0x0FB0, 0x0FB2, 0x0FB4, 0x0FB6, 0x0FB8, 0x0FBA, 0x0FBC, 0x0FBE,
00110 0x07A0, 0x07A2, 0x03D2, 0x01EA, 0x00FC, 0x007F, 0x001C, 0x000C,
00111 0x0004, 0x0034, 0x0010, 0x001B, 0x0009, 0x000B, 0x000E, 0x0001,
00112 0x0003, 0x0002, 0x000F, 0x000C, 0x000A, 0x0000, 0x0011, 0x0035,
00113 0x0005, 0x000D, 0x001D, 0x003C, 0x00FD, 0x01EB, 0x03D3, 0x07A3,
00114 0x07A1, 0x0FBF, 0x0FBD, 0x0FBB, 0x0FB9, 0x0FB7, 0x0FB5, 0x0FB3,
00115 0x0FB1, 0x0FAF, 0x0FAD, 0x0FAB, 0x0FA9, 0x0FA7, 0x0FA5, 0x0FA3,
00116 0x0FA1, 0x0F9F, 0x0F9D, 0x0F9B, 0x0F99, 0x0F97, 0x0F95, 0x0F93,
00117 0x0F91, 0x0F8F, 0x0F8D, 0x0F8B, 0x0F89, 0x0F87, 0x0F85, 0x0F83,
00118 0x0F81, 0x0F7F, 0x0F7D, 0x0F7B, 0x0F79, 0x0F77, 0x0F75, 0x0F73,
00119 0x0F71, 0x0F6F, 0x0F6D, 0x0F6B, 0x0F69, 0x0F67, 0x0F65, 0x0F63,
00120 0x0F61,
00121 },
00122 {
00123 0x51D0, 0x51D2, 0x51D4, 0x51D6, 0x51D8, 0x51DA, 0x51DC, 0x51DE,
00124 0x51E0, 0x51E2, 0x51E4, 0x51E6, 0x51E8, 0x51EA, 0x51EC, 0x51EE,
00125 0x51F0, 0x51F2, 0x51F4, 0x51F6, 0x51F8, 0x51FA, 0x51FC, 0x51FE,
00126 0x70C0, 0x70C2, 0x70C4, 0x70C6, 0x70C8, 0x70CA, 0x70CC, 0x70CE,
00127 0x70EC, 0x10EA, 0x3868, 0x3877, 0x0876, 0x1C35, 0x0434, 0x0A34,
00128 0x0E1B, 0x021B, 0x051B, 0x070F, 0x010F, 0x0380, 0x0080, 0x0140,
00129 0x01C1, 0x0041, 0x00A1, 0x00E2, 0x0022, 0x0052, 0x0072, 0x0012,
00130 0x002A, 0x003A, 0x000A, 0x0016, 0x001E, 0x0006, 0x000C, 0x0000,
00131 0x0004, 0x0001, 0x000D, 0x0007, 0x001F, 0x0017, 0x000B, 0x003B,
00132 0x002B, 0x0013, 0x0073, 0x0053, 0x0023, 0x00E3, 0x00A2, 0x0042,
00133 0x01C2, 0x0141, 0x0081, 0x0381, 0x028C, 0x010C, 0x051C, 0x021C,
00134 0x0E1C, 0x0A35, 0x0435, 0x1C3A, 0x0877, 0x0874, 0x3869, 0x10EB,
00135 0x70ED, 0x70CF, 0x70CD, 0x70CB, 0x70C9, 0x70C7, 0x70C5, 0x70C3,
00136 0x70C1, 0x51FF, 0x51FD, 0x51FB, 0x51F9, 0x51F7, 0x51F5, 0x51F3,
00137 0x51F1, 0x51EF, 0x51ED, 0x51EB, 0x51E9, 0x51E7, 0x51E5, 0x51E3,
00138 0x51E1, 0x51DF, 0x51DD, 0x51DB, 0x51D9, 0x51D7, 0x51D5, 0x51D3,
00139 0x51D1,
00140 },
00141 {
00142 0x6F64, 0x6F66, 0x6F68, 0x6F6A, 0x6F6C, 0x6F6E, 0x6F70, 0x6F72,
00143 0x6F74, 0x6F76, 0x6F78, 0x6F7A, 0x6F7C, 0x6F7E, 0x6F80, 0x6F82,
00144 0x6F84, 0x6F86, 0x6F88, 0x6F8A, 0x6F8C, 0x6F8E, 0x6F90, 0x6F92,
00145 0x6F94, 0x6F96, 0x6F98, 0x6F9A, 0x6F9C, 0x6F9E, 0x6FA0, 0x6FA2,
00146 0x6FA4, 0x6FA6, 0x6FA8, 0x6FAA, 0x6FAC, 0x6FAE, 0x6FB0, 0x6FB2,
00147 0x6FB4, 0x6FB6, 0x17B4, 0x37DC, 0x0BDB, 0x1BEF, 0x05EE, 0x0DF8,
00148 0x02F8, 0x06FD, 0x017D, 0x037F, 0x00BF, 0x0040, 0x00C0, 0x0021,
00149 0x0061, 0x0011, 0x0031, 0x0009, 0x0019, 0x0006, 0x000E, 0x0004,
00150 0x0000, 0x0005, 0x000F, 0x0007, 0x001A, 0x000A, 0x0036, 0x0016,
00151 0x006E, 0x002E, 0x00C1, 0x0041, 0x01BC, 0x00BC, 0x037A, 0x017A,
00152 0x02F9, 0x0DF9, 0x05EF, 0x05EC, 0x1BD8, 0x37DD, 0x17B5, 0x6FB7,
00153 0x6FB5, 0x6FB3, 0x6FB1, 0x6FAF, 0x6FAD, 0x6FAB, 0x6FA9, 0x6FA7,
00154 0x6FA5, 0x6FA3, 0x6FA1, 0x6F9F, 0x6F9D, 0x6F9B, 0x6F99, 0x6F97,
00155 0x6F95, 0x6F93, 0x6F91, 0x6F8F, 0x6F8D, 0x6F8B, 0x6F89, 0x6F87,
00156 0x6F85, 0x6F83, 0x6F81, 0x6F7F, 0x6F7D, 0x6F7B, 0x6F79, 0x6F77,
00157 0x6F75, 0x6F73, 0x6F71, 0x6F6F, 0x6F6D, 0x6F6B, 0x6F69, 0x6F67,
00158 0x6F65,
00159 },
00160 {
00161 0xDF54, 0xDF56, 0xDFC8, 0xDFCA, 0xDFCC, 0xDFCE, 0xDFD0, 0xDFD2,
00162 0xDFD4, 0xDFD6, 0xDFD8, 0xDFDA, 0xDFDC, 0xDFDE, 0xDFE0, 0xDFE2,
00163 0x0FE8, 0x2FEA, 0x6FA8, 0x6FF6, 0x07F5, 0x07F7, 0x37D2, 0x37F9,
00164 0x03F8, 0x0BF8, 0x0BFB, 0x1BEB, 0x01FA, 0x05FA, 0x09FA, 0x0DFA,
00165 0x0DFF, 0x00FF, 0x02FF, 0x06FB, 0x007C, 0x017C, 0x027C, 0x027F,
00166 0x003C, 0x00BC, 0x013C, 0x01BC, 0x001C, 0x005C, 0x009C, 0x00DC,
00167 0x000C, 0x002C, 0x004C, 0x006C, 0x0004, 0x0014, 0x0024, 0x0034,
00168 0x0000, 0x0008, 0x0010, 0x0018, 0x001E, 0x0002, 0x0006, 0x000A,
00169 0x000E, 0x000B, 0x0007, 0x0003, 0x001F, 0x0019, 0x0011, 0x0009,
00170 0x0001, 0x0035, 0x0025, 0x0015, 0x0005, 0x006D, 0x004D, 0x002D,
00171 0x000D, 0x00DD, 0x009D, 0x005D, 0x001D, 0x01BD, 0x013D, 0x00BD,
00172 0x003D, 0x037C, 0x027D, 0x017D, 0x007D, 0x06FC, 0x04FC, 0x02FC,
00173 0x00FC, 0x0DFB, 0x09FB, 0x05FB, 0x01FB, 0x1BF8, 0x1BE8, 0x0BF9,
00174 0x03F9, 0x37FA, 0x37D3, 0x17F4, 0x07F6, 0x6FF7, 0x6FA9, 0x2FEB,
00175 0x0FE9, 0xDFE3, 0xDFE1, 0xDFDF, 0xDFDD, 0xDFDB, 0xDFD9, 0xDFD7,
00176 0xDFD5, 0xDFD3, 0xDFD1, 0xDFCF, 0xDFCD, 0xDFCB, 0xDFC9, 0xDF57,
00177 0xDF55,
00178 }
00179 };
00180
00181 static const uint8_t scales_bits[SCALES_COUNT][129] = {
00182 {
00183 14, 14, 14, 14, 14, 14, 14, 14,
00184 14, 14, 14, 14, 14, 14, 14, 14,
00185 14, 14, 14, 14, 14, 14, 14, 14,
00186 14, 14, 14, 14, 14, 14, 14, 14,
00187 14, 14, 14, 14, 14, 14, 14, 14,
00188 13, 13, 13, 13, 13, 13, 13, 13,
00189 13, 13, 12, 11, 11, 10, 9, 8,
00190 8, 7, 6, 6, 5, 4, 4, 3,
00191 2, 3, 3, 4, 5, 5, 6, 7,
00192 8, 8, 9, 10, 11, 11, 12, 13,
00193 13, 13, 13, 13, 13, 13, 13, 13,
00194 13, 14, 14, 14, 14, 14, 14, 14,
00195 14, 14, 14, 14, 14, 14, 14, 14,
00196 14, 14, 14, 14, 14, 14, 14, 14,
00197 14, 14, 14, 14, 14, 14, 14, 14,
00198 14, 14, 14, 14, 14, 14, 14, 14,
00199 14,
00200 },
00201 {
00202 15, 15, 15, 15, 15, 15, 15, 15,
00203 15, 15, 15, 15, 15, 15, 15, 15,
00204 15, 15, 15, 15, 15, 15, 15, 15,
00205 15, 15, 15, 15, 15, 15, 15, 15,
00206 15, 15, 15, 15, 15, 15, 15, 15,
00207 15, 15, 15, 15, 15, 15, 15, 15,
00208 14, 14, 13, 12, 11, 10, 8, 7,
00209 6, 6, 5, 5, 4, 4, 4, 3,
00210 3, 3, 4, 4, 4, 4, 5, 6,
00211 6, 7, 8, 9, 11, 12, 13, 14,
00212 14, 15, 15, 15, 15, 15, 15, 15,
00213 15, 15, 15, 15, 15, 15, 15, 15,
00214 15, 15, 15, 15, 15, 15, 15, 15,
00215 15, 15, 15, 15, 15, 15, 15, 15,
00216 15, 15, 15, 15, 15, 15, 15, 15,
00217 15, 15, 15, 15, 15, 15, 15, 15,
00218 15,
00219 },
00220 {
00221 15, 15, 15, 15, 15, 15, 15, 15,
00222 15, 15, 15, 15, 15, 15, 15, 15,
00223 15, 15, 15, 15, 15, 15, 15, 15,
00224 15, 15, 15, 15, 15, 15, 15, 15,
00225 15, 14, 14, 14, 13, 13, 12, 12,
00226 12, 11, 11, 11, 10, 10, 9, 9,
00227 9, 8, 8, 8, 7, 7, 7, 6,
00228 6, 6, 5, 5, 5, 4, 4, 3,
00229 3, 3, 4, 4, 5, 5, 5, 6,
00230 6, 6, 7, 7, 7, 8, 8, 8,
00231 9, 9, 9, 10, 10, 10, 11, 11,
00232 12, 12, 12, 13, 13, 13, 14, 14,
00233 15, 15, 15, 15, 15, 15, 15, 15,
00234 15, 15, 15, 15, 15, 15, 15, 15,
00235 15, 15, 15, 15, 15, 15, 15, 15,
00236 15, 15, 15, 15, 15, 15, 15, 15,
00237 15,
00238 },
00239 {
00240 15, 15, 15, 15, 15, 15, 15, 15,
00241 15, 15, 15, 15, 15, 15, 15, 15,
00242 15, 15, 15, 15, 15, 15, 15, 15,
00243 15, 15, 15, 15, 15, 15, 15, 15,
00244 15, 15, 15, 15, 15, 15, 15, 15,
00245 15, 15, 14, 14, 13, 13, 12, 12,
00246 11, 11, 10, 10, 9, 8, 8, 7,
00247 7, 6, 6, 5, 5, 4, 4, 3,
00248 2, 3, 4, 4, 5, 5, 6, 6,
00249 7, 7, 8, 8, 9, 9, 10, 10,
00250 11, 12, 12, 12, 13, 14, 14, 15,
00251 15, 15, 15, 15, 15, 15, 15, 15,
00252 15, 15, 15, 15, 15, 15, 15, 15,
00253 15, 15, 15, 15, 15, 15, 15, 15,
00254 15, 15, 15, 15, 15, 15, 15, 15,
00255 15, 15, 15, 15, 15, 15, 15, 15,
00256 15,
00257 },
00258 {
00259 16, 16, 16, 16, 16, 16, 16, 16,
00260 16, 16, 16, 16, 16, 16, 16, 16,
00261 15, 15, 15, 15, 14, 14, 14, 14,
00262 13, 13, 13, 13, 12, 12, 12, 12,
00263 12, 11, 11, 11, 10, 10, 10, 10,
00264 9, 9, 9, 9, 8, 8, 8, 8,
00265 7, 7, 7, 7, 6, 6, 6, 6,
00266 5, 5, 5, 5, 5, 4, 4, 4,
00267 4, 4, 4, 4, 5, 5, 5, 5,
00268 5, 6, 6, 6, 6, 7, 7, 7,
00269 7, 8, 8, 8, 8, 9, 9, 9,
00270 9, 10, 10, 10, 10, 11, 11, 11,
00271 11, 12, 12, 12, 12, 13, 13, 13,
00272 13, 14, 14, 14, 14, 15, 15, 15,
00273 15, 16, 16, 16, 16, 16, 16, 16,
00274 16, 16, 16, 16, 16, 16, 16, 16,
00275 16,
00276 }
00277 };
00278
00279 static const uint16_t bitalloc_3_codes[3] =
00280 {
00281 0x0003, 0x0000, 0x0002,
00282 };
00283 static const uint8_t bitalloc_3_bits[3] =
00284 {
00285 2, 1, 2,
00286 };
00287
00288 static const uint16_t bitalloc_5_codes_a[5] =
00289 {
00290 0x000F, 0x0006, 0x0000, 0x0002, 0x000E,
00291 };
00292 static const uint16_t bitalloc_5_codes_b[5] =
00293 {
00294 0x0007, 0x0001, 0x0002, 0x0000, 0x0006,
00295 };
00296 static const uint16_t bitalloc_5_codes_c[5] =
00297 {
00298 0x0007, 0x0005, 0x0000, 0x0004, 0x0006,
00299 };
00300 static const uint8_t bitalloc_5_bits_a[5] =
00301 {
00302 4, 3, 1, 2, 4,
00303 };
00304 static const uint8_t bitalloc_5_bits_b[5] =
00305 {
00306 3, 2, 2, 2, 3,
00307 };
00308 static const uint8_t bitalloc_5_bits_c[5] =
00309 {
00310 3, 3, 1, 3, 3,
00311 };
00312
00313 static const uint16_t bitalloc_7_codes_a[7] =
00314 {
00315 0x001E, 0x000E, 0x0005, 0x0000, 0x0006, 0x0004, 0x001F,
00316 };
00317 static const uint16_t bitalloc_7_codes_b[7] =
00318 {
00319 0x0014, 0x000B, 0x0000, 0x0003, 0x0001, 0x0004, 0x0015,
00320 };
00321 static const uint16_t bitalloc_7_codes_c[7] =
00322 {
00323 0x0000, 0x0002, 0x0001, 0x0003, 0x0002, 0x0003, 0x0001,
00324 };
00325 static const uint8_t bitalloc_7_bits_a[7] =
00326 {
00327 5, 4, 3, 1, 3, 3, 5,
00328 };
00329 static const uint8_t bitalloc_7_bits_b[7] =
00330 {
00331 5, 4, 2, 2, 2, 3, 5,
00332 };
00333 static const uint8_t bitalloc_7_bits_c[7] =
00334 {
00335 4, 4, 2, 2, 2, 4, 4,
00336 };
00337
00338 static const uint16_t bitalloc_9_codes_a[9] =
00339 {
00340 0x0030, 0x0019, 0x0009, 0x0005, 0x0000, 0x0007, 0x000D, 0x0008,
00341 0x0031,
00342 };
00343 static const uint16_t bitalloc_9_codes_b[9] =
00344 {
00345 0x0018, 0x001A, 0x0002, 0x0007, 0x0002, 0x0000, 0x0003, 0x001B,
00346 0x0019,
00347 };
00348 static const uint16_t bitalloc_9_codes_c[9] =
00349 {
00350 0x001C, 0x000F, 0x0002, 0x0007, 0x0002, 0x0000, 0x0006, 0x0006,
00351 0x001D,
00352 };
00353 static const uint8_t bitalloc_9_bits_a[9] =
00354 {
00355 6, 5, 4, 3, 1, 3, 4, 4, 6,
00356 };
00357 static const uint8_t bitalloc_9_bits_b[9] =
00358 {
00359 5, 5, 3, 3, 2, 2, 3, 5, 5,
00360 };
00361 static const uint8_t bitalloc_9_bits_c[9] =
00362 {
00363 6, 5, 3, 3, 2, 2, 3, 4, 6,
00364 };
00365
00366 static const uint16_t bitalloc_13_codes_a[13] =
00367 {
00368 0x0070, 0x002E, 0x0039, 0x001D, 0x000C, 0x000F, 0x0000, 0x0004,
00369 0x000D, 0x000A, 0x0016, 0x002F, 0x0071,
00370 };
00371 static const uint16_t bitalloc_13_codes_b[13] =
00372 {
00373 0x0038, 0x0010, 0x001D, 0x0007, 0x000F, 0x0005, 0x0000, 0x0006,
00374 0x0002, 0x0009, 0x0006, 0x0011, 0x0039,
00375 };
00376 static const uint16_t bitalloc_13_codes_c[13] =
00377 {
00378 0x0004, 0x001A, 0x0003, 0x000E, 0x0000, 0x0003, 0x0005, 0x0004,
00379 0x0002, 0x000F, 0x000C, 0x001B, 0x0005,
00380 };
00381 static const uint8_t bitalloc_13_bits_a[13] =
00382 {
00383 7, 6, 6, 5, 4, 4, 1, 3, 4, 4, 5, 6, 7,
00384 };
00385 static const uint8_t bitalloc_13_bits_b[13] =
00386 {
00387 6, 5, 5, 4, 4, 3, 2, 3, 3, 4, 4, 5, 6,
00388 };
00389 static const uint8_t bitalloc_13_bits_c[13] =
00390 {
00391 5, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 5,
00392 };
00393
00394 static const uint16_t bitalloc_17_codes_a[17] =
00395 {
00396 0x0154, 0x00AB, 0x002B, 0x000B, 0x0003, 0x000A, 0x0001, 0x0006,
00397 0x0001, 0x0007, 0x0004, 0x000B, 0x0000, 0x0004, 0x0014, 0x0054,
00398 0x0155,
00399 };
00400 static const uint16_t bitalloc_17_codes_b[17] =
00401 {
00402 0x007C, 0x003F, 0x0019, 0x000D, 0x001C, 0x0008, 0x000F, 0x0005,
00403 0x0000, 0x0006, 0x0002, 0x0009, 0x001D, 0x000E, 0x001E, 0x0018,
00404 0x007D,
00405 };
00406 static const uint16_t bitalloc_17_codes_c[17] =
00407 {
00408 0x002C, 0x0017, 0x0005, 0x001C, 0x0003, 0x000A, 0x000F, 0x0003,
00409 0x0006, 0x0004, 0x0000, 0x000B, 0x0004, 0x001D, 0x000A, 0x0004,
00410 0x002D,
00411 };
00412 static const uint16_t bitalloc_17_codes_d[17] =
00413 {
00414 0x0100, 0x0102, 0x0082, 0x0042, 0x0022, 0x0012, 0x000A, 0x0006,
00415 0x0000, 0x0007, 0x000B, 0x0013, 0x0023, 0x0043, 0x0083, 0x0103,
00416 0x0101,
00417 };
00418 static const uint16_t bitalloc_17_codes_e[17] =
00419 {
00420 0x00E8, 0x00F6, 0x0075, 0x0034, 0x003B, 0x001B, 0x001F, 0x0004,
00421 0x0000, 0x0005, 0x000C, 0x001C, 0x003C, 0x0035, 0x007A, 0x00F7,
00422 0x00E9,
00423 };
00424 static const uint16_t bitalloc_17_codes_f[17] =
00425 {
00426 0x0004, 0x0003, 0x001E, 0x0001, 0x0001, 0x000E, 0x0001, 0x0004,
00427 0x0006, 0x0005, 0x0002, 0x000F, 0x0006, 0x000E, 0x001F, 0x0000,
00428 0x0005,
00429 };
00430 static const uint16_t bitalloc_17_codes_g[17] =
00431 {
00432 0x0060, 0x007E, 0x0031, 0x0019, 0x000D, 0x0004, 0x0000, 0x0006,
00433 0x0002, 0x0007, 0x0001, 0x0005, 0x000E, 0x001E, 0x003E, 0x007F,
00434 0x0061,
00435 };
00436 static const uint8_t bitalloc_17_bits_a[17] =
00437 {
00438 12, 11, 9, 7, 5, 4, 3, 3, 2, 3, 3, 4, 4, 6, 8, 10,
00439 12,
00440 };
00441 static const uint8_t bitalloc_17_bits_b[17] =
00442 {
00443 8, 7, 6, 5, 5, 4, 4, 3, 2, 3, 3, 4, 5, 5, 6, 6,
00444 8,
00445 };
00446 static const uint8_t bitalloc_17_bits_c[17] =
00447 {
00448 7, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 4, 4, 5, 5, 5,
00449 7,
00450 };
00451 static const uint8_t bitalloc_17_bits_d[17] =
00452 {
00453 9, 9, 8, 7, 6, 5, 4, 3, 1, 3, 4, 5, 6, 7, 8, 9,
00454 9,
00455 };
00456 static const uint8_t bitalloc_17_bits_e[17] =
00457 {
00458 8, 8, 7, 6, 6, 5, 5, 3, 1, 3, 4, 5, 6, 6, 7, 8,
00459 8,
00460 };
00461 static const uint8_t bitalloc_17_bits_f[17] =
00462 {
00463 8, 7, 6, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 6, 6,
00464 8,
00465 };
00466 static const uint8_t bitalloc_17_bits_g[17] =
00467 {
00468 8, 8, 7, 6, 5, 4, 3, 3, 2, 3, 3, 4, 5, 6, 7, 8,
00469 8,
00470 };
00471
00472 static const uint16_t bitalloc_25_codes_a[25] =
00473 {
00474 0x2854, 0x142B, 0x050B, 0x0143, 0x00A2, 0x0052, 0x002E, 0x0015,
00475 0x0004, 0x000E, 0x0000, 0x0003, 0x0006, 0x0004, 0x0001, 0x000F,
00476 0x0005, 0x0016, 0x002F, 0x0053, 0x00A3, 0x00A0, 0x0284, 0x0A14,
00477 0x2855,
00478 };
00479 static const uint16_t bitalloc_25_codes_b[25] =
00480 {
00481 0x001C, 0x000F, 0x0005, 0x0000, 0x0030, 0x0036, 0x000E, 0x0019,
00482 0x0001, 0x0008, 0x000E, 0x0001, 0x0005, 0x0002, 0x000F, 0x0009,
00483 0x0006, 0x001A, 0x000F, 0x0037, 0x0031, 0x0001, 0x0006, 0x0004,
00484 0x001D,
00485 };
00486 static const uint16_t bitalloc_25_codes_c[25] =
00487 {
00488 0x004C, 0x0027, 0x006D, 0x0028, 0x0037, 0x000E, 0x0015, 0x0000,
00489 0x0005, 0x0008, 0x000B, 0x000E, 0x0001, 0x000F, 0x000C, 0x0009,
00490 0x0006, 0x0001, 0x001A, 0x000F, 0x0008, 0x0029, 0x0012, 0x006C,
00491 0x004D,
00492 };
00493 static const uint16_t bitalloc_25_codes_d[25] =
00494 {
00495 0x0780, 0x0782, 0x03C2, 0x01E2, 0x00FE, 0x0079, 0x003D, 0x001C,
00496 0x000C, 0x0004, 0x0000, 0x0006, 0x0002, 0x0007, 0x0001, 0x0005,
00497 0x000D, 0x001D, 0x003E, 0x007E, 0x00FF, 0x01E3, 0x03C3, 0x0783,
00498 0x0781,
00499 };
00500 static const uint16_t bitalloc_25_codes_e[25] =
00501 {
00502 0x003C, 0x0092, 0x0018, 0x001F, 0x004E, 0x000D, 0x0025, 0x0004,
00503 0x0010, 0x0000, 0x000A, 0x0002, 0x0003, 0x0003, 0x000B, 0x0001,
00504 0x0011, 0x0005, 0x0026, 0x000E, 0x004F, 0x0048, 0x0019, 0x0093,
00505 0x003D,
00506 };
00507 static const uint16_t bitalloc_25_codes_f[25] =
00508 {
00509 0x0324, 0x0193, 0x00CE, 0x0065, 0x0024, 0x000C, 0x0013, 0x0004,
00510 0x0007, 0x000A, 0x000D, 0x000F, 0x0001, 0x0000, 0x000E, 0x000B,
00511 0x0008, 0x0005, 0x0018, 0x000D, 0x0025, 0x0066, 0x00CF, 0x00C8,
00512 0x0325,
00513 };
00514 static const uint16_t bitalloc_25_codes_g[25] =
00515 {
00516 0x03A8, 0x03AE, 0x01D5, 0x0094, 0x0014, 0x004B, 0x000B, 0x003B,
00517 0x0013, 0x0003, 0x000F, 0x0005, 0x0001, 0x0006, 0x0000, 0x0008,
00518 0x001C, 0x0004, 0x0024, 0x0074, 0x0015, 0x0095, 0x01D6, 0x03AF,
00519 0x03A9,
00520 };
00521 static const uint8_t bitalloc_25_bits_a[25] =
00522 {
00523 14, 13, 11, 9, 8, 7, 6, 5, 4, 4, 3, 3, 3, 3, 3, 4,
00524 4, 5, 6, 7, 8, 8, 10, 12, 14,
00525 };
00526 static const uint8_t bitalloc_25_bits_b[25] =
00527 {
00528 9, 8, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 4, 4,
00529 4, 5, 5, 6, 6, 6, 7, 7, 9,
00530 };
00531 static const uint8_t bitalloc_25_bits_c[25] =
00532 {
00533 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 4, 4, 3, 4, 4, 4,
00534 4, 4, 5, 5, 5, 6, 6, 7, 8,
00535 };
00536 static const uint8_t bitalloc_25_bits_d[25] =
00537 {
00538 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2, 3, 3, 4,
00539 5, 6, 7, 8, 9, 10, 11, 12, 12,
00540 };
00541 static const uint8_t bitalloc_25_bits_e[25] =
00542 {
00543 8, 8, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 2, 3, 4, 4,
00544 5, 5, 6, 6, 7, 7, 7, 8, 8,
00545 };
00546 static const uint8_t bitalloc_25_bits_f[25] =
00547 {
00548 10, 9, 8, 7, 6, 5, 5, 4, 4, 4, 4, 4, 3, 3, 4, 4,
00549 4, 4, 5, 5, 6, 7, 8, 8, 10,
00550 };
00551 static const uint8_t bitalloc_25_bits_g[25] =
00552 {
00553 10, 10, 9, 8, 7, 7, 6, 6, 5, 4, 4, 3, 2, 3, 3, 4,
00554 5, 5, 6, 7, 7, 8, 9, 10, 10,
00555 };
00556
00557 static const uint16_t bitalloc_33_codes_a[33] =
00558 {
00559 0x1580, 0x1582, 0x0AC2, 0x0562, 0x02B2, 0x015E, 0x00AD, 0x0054,
00560 0x001C, 0x003C, 0x000F, 0x001F, 0x0008, 0x000B, 0x000D, 0x0000,
00561 0x0002, 0x0001, 0x000E, 0x000C, 0x0009, 0x0006, 0x0014, 0x003D,
00562 0x001D, 0x0055, 0x00AE, 0x015F, 0x02B3, 0x0563, 0x0AC3, 0x1583,
00563 0x1581,
00564 };
00565 static const uint16_t bitalloc_33_codes_b[33] =
00566 {
00567 0x030C, 0x0187, 0x006D, 0x0028, 0x0037, 0x0066, 0x0015, 0x0031,
00568 0x0000, 0x000B, 0x0012, 0x001A, 0x0001, 0x0007, 0x000A, 0x000E,
00569 0x0001, 0x000F, 0x000B, 0x0008, 0x0004, 0x001B, 0x0013, 0x000C,
00570 0x0001, 0x0032, 0x001A, 0x0067, 0x0060, 0x0029, 0x00C2, 0x006C,
00571 0x030D,
00572 };
00573 static const uint16_t bitalloc_33_codes_c[33] =
00574 {
00575 0x00CC, 0x0067, 0x0005, 0x0070, 0x0003, 0x001A, 0x0039, 0x003F,
00576 0x000A, 0x0012, 0x0018, 0x001D, 0x0001, 0x0003, 0x0007, 0x000A,
00577 0x000D, 0x000B, 0x0008, 0x0004, 0x0002, 0x001E, 0x0019, 0x0013,
00578 0x000B, 0x0000, 0x003E, 0x001B, 0x0018, 0x0071, 0x0032, 0x0004,
00579 0x00CD,
00580 };
00581 static const uint16_t bitalloc_33_codes_d[33] =
00582 {
00583 0x3AF8, 0x3AFA, 0x1D7E, 0x0EBC, 0x075C, 0x03AC, 0x01D4, 0x0094,
00584 0x0014, 0x004B, 0x000B, 0x003B, 0x0013, 0x0003, 0x000F, 0x0005,
00585 0x0001, 0x0006, 0x0000, 0x0008, 0x001C, 0x0004, 0x0024, 0x0074,
00586 0x0015, 0x0095, 0x01D5, 0x03AD, 0x075D, 0x0EBD, 0x1D7F, 0x3AFB,
00587 0x3AF9,
00588 };
00589 static const uint16_t bitalloc_33_codes_e[33] =
00590 {
00591 0x01C8, 0x01E6, 0x0064, 0x00E2, 0x00E5, 0x0030, 0x0033, 0x0073,
00592 0x007A, 0x001A, 0x003A, 0x0002, 0x001A, 0x001F, 0x0007, 0x0001,
00593 0x0002, 0x0002, 0x000C, 0x0000, 0x001B, 0x0003, 0x003B, 0x001B,
00594 0x007B, 0x0078, 0x0070, 0x0031, 0x00F2, 0x00E3, 0x0065, 0x01E7,
00595 0x01C9,
00596 };
00597 static const uint16_t bitalloc_33_codes_f[33] =
00598 {
00599 0x0724, 0x0393, 0x01CE, 0x00E5, 0x002C, 0x0008, 0x0017, 0x003E,
00600 0x0005, 0x0014, 0x001D, 0x0000, 0x0003, 0x0006, 0x0008, 0x000B,
00601 0x000D, 0x000C, 0x0009, 0x0007, 0x0004, 0x0001, 0x001E, 0x0015,
00602 0x000A, 0x003F, 0x0038, 0x0009, 0x002D, 0x00E6, 0x01CF, 0x01C8,
00603 0x0725,
00604 };
00605 static const uint16_t bitalloc_33_codes_g[33] =
00606 {
00607 0x0284, 0x0042, 0x0140, 0x0143, 0x003E, 0x00BE, 0x0011, 0x0051,
00608 0x0009, 0x0029, 0x0005, 0x0015, 0x0000, 0x0008, 0x000E, 0x0002,
00609 0x0006, 0x0003, 0x000F, 0x0009, 0x0001, 0x0016, 0x0006, 0x002E,
00610 0x000E, 0x005E, 0x001E, 0x00BF, 0x003F, 0x0020, 0x0141, 0x0043,
00611 0x0285,
00612 };
00613 static const uint8_t bitalloc_33_bits_a[33] =
00614 {
00615 13, 13, 12, 11, 10, 9, 8, 7, 6, 6, 5, 5, 4, 4, 4, 3,
00616 3, 3, 4, 4, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13,
00617 13,
00618 };
00619 static const uint8_t bitalloc_33_bits_b[33] =
00620 {
00621 10, 9, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4,
00622 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8,
00623 10,
00624 };
00625 static const uint8_t bitalloc_33_bits_c[33] =
00626 {
00627 9, 8, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4,
00628 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7,
00629 9,
00630 };
00631 static const uint8_t bitalloc_33_bits_d[33] =
00632 {
00633 14, 14, 13, 12, 11, 10, 9, 8, 7, 7, 6, 6, 5, 4, 4, 3,
00634 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14,
00635 14,
00636 };
00637 static const uint8_t bitalloc_33_bits_e[33] =
00638 {
00639 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 5, 5, 5, 4, 3,
00640 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9,
00641 9,
00642 };
00643 static const uint8_t bitalloc_33_bits_f[33] =
00644 {
00645 11, 10, 9, 8, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4,
00646 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9,
00647 11,
00648 };
00649 static const uint8_t bitalloc_33_bits_g[33] =
00650 {
00651 10, 9, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3,
00652 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9,
00653 10,
00654 };
00655
00656 static const uint16_t bitalloc_65_codes_a[65] =
00657 {
00658 0x9E5C, 0x9E5E, 0x4F2C, 0x2794, 0x13C4, 0x1E44, 0x09E3, 0x0F23,
00659 0x04F3, 0x0792, 0x027E, 0x03CE, 0x013D, 0x01E5, 0x009C, 0x00CC,
00660 0x0040, 0x0058, 0x0067, 0x001E, 0x0021, 0x002D, 0x003D, 0x0007,
00661 0x0011, 0x0014, 0x0017, 0x001A, 0x001C, 0x001F, 0x0001, 0x0004,
00662 0x0006, 0x0005, 0x0002, 0x0000, 0x001D, 0x001B, 0x0018, 0x0015,
00663 0x0012, 0x000E, 0x0006, 0x0032, 0x0026, 0x001F, 0x0078, 0x0059,
00664 0x0041, 0x00CD, 0x009D, 0x01E6, 0x013E, 0x03CF, 0x027F, 0x0793,
00665 0x0790, 0x04F0, 0x09E4, 0x1E45, 0x13C5, 0x2795, 0x4F2D, 0x9E5F,
00666 0x9E5D,
00667 };
00668 static const uint16_t bitalloc_65_codes_b[65] =
00669 {
00670 0x0A8C, 0x0547, 0x01B5, 0x0008, 0x00DB, 0x0152, 0x0005, 0x000B,
00671 0x008E, 0x00AE, 0x00E4, 0x0003, 0x0037, 0x0039, 0x0055, 0x006C,
00672 0x0073, 0x0003, 0x0015, 0x001D, 0x0028, 0x0030, 0x0037, 0x003E,
00673 0x0006, 0x000B, 0x000F, 0x0012, 0x0016, 0x0019, 0x001D, 0x0001,
00674 0x0004, 0x0002, 0x001E, 0x001A, 0x0017, 0x0013, 0x0010, 0x000C,
00675 0x0007, 0x003F, 0x0038, 0x0031, 0x0029, 0x0022, 0x001A, 0x0014,
00676 0x0000, 0x006D, 0x0056, 0x0046, 0x0038, 0x0004, 0x00E5, 0x00AF,
00677 0x008F, 0x006C, 0x000A, 0x0153, 0x0150, 0x0009, 0x02A2, 0x01B4,
00678 0x0A8D,
00679 };
00680 static const uint16_t bitalloc_65_codes_c[65] =
00681 {
00682 0x045C, 0x022F, 0x03F5, 0x01BC, 0x01FB, 0x0059, 0x00D0, 0x00DF,
00683 0x000A, 0x002D, 0x002F, 0x0052, 0x0069, 0x0078, 0x007F, 0x000A,
00684 0x0010, 0x001C, 0x0023, 0x002A, 0x0035, 0x003A, 0x003D, 0x0000,
00685 0x0003, 0x0006, 0x0009, 0x000C, 0x000F, 0x0012, 0x0016, 0x0018,
00686 0x001C, 0x0019, 0x0017, 0x0013, 0x0010, 0x000D, 0x000A, 0x0007,
00687 0x0004, 0x0001, 0x003E, 0x003B, 0x0036, 0x002B, 0x0028, 0x001D,
00688 0x0011, 0x000B, 0x0004, 0x0079, 0x006E, 0x0053, 0x0044, 0x002E,
00689 0x000B, 0x00FC, 0x00D1, 0x008A, 0x0058, 0x01BD, 0x0116, 0x03F4,
00690 0x045D,
00691 };
00692 static const uint16_t bitalloc_65_codes_d[65] =
00693 {
00694 0x70B0, 0x70B2, 0x70B4, 0x2852, 0x385B, 0x142E, 0x1C2E, 0x0A15,
00695 0x0E14, 0x0214, 0x0704, 0x0104, 0x010B, 0x0383, 0x0083, 0x0143,
00696 0x01C3, 0x0043, 0x00A2, 0x00E2, 0x0022, 0x0052, 0x0072, 0x0012,
00697 0x002A, 0x003A, 0x000A, 0x0016, 0x001E, 0x0006, 0x000C, 0x0000,
00698 0x0004, 0x0001, 0x000D, 0x0007, 0x001F, 0x0017, 0x000B, 0x003B,
00699 0x002B, 0x0013, 0x0073, 0x0053, 0x0023, 0x00E3, 0x00A3, 0x00A0,
00700 0x0040, 0x01C0, 0x0084, 0x0384, 0x0284, 0x0105, 0x0705, 0x0215,
00701 0x0E15, 0x0A16, 0x1C2F, 0x142F, 0x1428, 0x2853, 0x70B5, 0x70B3,
00702 0x70B1,
00703 };
00704 static const uint16_t bitalloc_65_codes_e[65] =
00705 {
00706 0x032C, 0x0332, 0x0378, 0x037E, 0x008C, 0x014A, 0x0188, 0x0197,
00707 0x019E, 0x01BD, 0x0044, 0x0047, 0x00AA, 0x00C5, 0x00CD, 0x00DC,
00708 0x001C, 0x002C, 0x0053, 0x0063, 0x0068, 0x0008, 0x000F, 0x0017,
00709 0x002B, 0x0035, 0x0005, 0x0009, 0x0016, 0x001C, 0x0006, 0x000F,
00710 0x0004, 0x0000, 0x0007, 0x001D, 0x0017, 0x000A, 0x0006, 0x0036,
00711 0x0030, 0x0028, 0x0010, 0x0009, 0x0069, 0x0064, 0x0054, 0x002D,
00712 0x001D, 0x00DD, 0x00CE, 0x00CA, 0x00AB, 0x00A4, 0x0045, 0x01BE,
00713 0x019F, 0x0198, 0x0189, 0x014B, 0x008D, 0x037F, 0x0379, 0x0333,
00714 0x032D,
00715 };
00716 static const uint16_t bitalloc_65_codes_f[65] =
00717 {
00718 0x0FE0, 0x0FE2, 0x0FE8, 0x0FEA, 0x0FEC, 0x0FEE, 0x0FF0, 0x0FF2,
00719 0x0FF4, 0x2FF2, 0x07F2, 0x07FB, 0x03F6, 0x0BFA, 0x0BFD, 0x01FF,
00720 0x05FF, 0x02FC, 0x007C, 0x017C, 0x003C, 0x00BC, 0x001C, 0x005C,
00721 0x000C, 0x002C, 0x0004, 0x0014, 0x0000, 0x0008, 0x000E, 0x0002,
00722 0x0006, 0x0003, 0x000F, 0x0009, 0x0001, 0x0015, 0x0005, 0x002D,
00723 0x000D, 0x005D, 0x001D, 0x00BD, 0x003D, 0x017D, 0x007D, 0x02FD,
00724 0x00FC, 0x05FC, 0x01FA, 0x0BFB, 0x03F7, 0x17F8, 0x07F3, 0x2FF3,
00725 0x0FF5, 0x0FF3, 0x0FF1, 0x0FEF, 0x0FED, 0x0FEB, 0x0FE9, 0x0FE3,
00726 0x0FE1,
00727 };
00728 static const uint16_t bitalloc_65_codes_g[65] =
00729 {
00730 0x010C, 0x038A, 0x0608, 0x0786, 0x0084, 0x0087, 0x0302, 0x0305,
00731 0x0040, 0x00E0, 0x00E3, 0x0183, 0x001E, 0x005E, 0x009E, 0x00DE,
00732 0x00F1, 0x0011, 0x0039, 0x0061, 0x0079, 0x0009, 0x001D, 0x0031,
00733 0x003D, 0x0005, 0x000F, 0x0019, 0x001F, 0x0003, 0x0006, 0x000A,
00734 0x000E, 0x000B, 0x0008, 0x0004, 0x0000, 0x001A, 0x0012, 0x000A,
00735 0x0002, 0x0036, 0x0026, 0x0016, 0x0006, 0x006E, 0x004E, 0x002E,
00736 0x000E, 0x00DF, 0x009F, 0x005F, 0x001F, 0x01E0, 0x0180, 0x00E1,
00737 0x0041, 0x03C2, 0x0303, 0x01C4, 0x0085, 0x0787, 0x0609, 0x038B,
00738 0x010D,
00739 };
00740 static const uint8_t bitalloc_65_bits_a[65] =
00741 {
00742 16, 16, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8,
00743 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4,
00744 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7,
00745 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 13, 13, 14, 15, 16,
00746 16,
00747 };
00748 static const uint8_t bitalloc_65_bits_b[65] =
00749 {
00750 12, 11, 10, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7,
00751 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4,
00752 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
00753 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10,
00754 12,
00755 };
00756 static const uint8_t bitalloc_65_bits_c[65] =
00757 {
00758 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6,
00759 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5,
00760 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6,
00761 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10,
00762 11,
00763 };
00764 static const uint8_t bitalloc_65_bits_d[65] =
00765 {
00766 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9,
00767 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 3,
00768 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8,
00769 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 15, 15,
00770 15,
00771 };
00772 static const uint8_t bitalloc_65_bits_e[65] =
00773 {
00774 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8,
00775 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4,
00776 3, 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7,
00777 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10,
00778 10,
00779 };
00780 static const uint8_t bitalloc_65_bits_f[65] =
00781 {
00782 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11,
00783 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3,
00784 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10,
00785 10, 11, 11, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14,
00786 14,
00787 };
00788 static const uint8_t bitalloc_65_bits_g[65] =
00789 {
00790 11, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8,
00791 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4,
00792 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7,
00793 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11,
00794 11,
00795 };
00796
00797 static const uint16_t bitalloc_129_codes_a[129] =
00798 {
00799 0x0660, 0x0666, 0x06EC, 0x0722, 0x0760, 0x076E, 0x004C, 0x004E,
00800 0x00F4, 0x010A, 0x0148, 0x0156, 0x01D4, 0x01F2, 0x0331, 0x0370,
00801 0x0377, 0x0396, 0x03B1, 0x0024, 0x0064, 0x007B, 0x008A, 0x00A5,
00802 0x00D4, 0x00EB, 0x00FA, 0x019A, 0x01B9, 0x01C9, 0x01D9, 0x0010,
00803 0x0030, 0x0033, 0x0043, 0x0053, 0x006B, 0x007A, 0x00CA, 0x00D2,
00804 0x00DE, 0x00E6, 0x00F6, 0x000E, 0x001F, 0x0023, 0x002B, 0x003B,
00805 0x003F, 0x0067, 0x0070, 0x0077, 0x0005, 0x000D, 0x0012, 0x001B,
00806 0x002C, 0x0035, 0x003A, 0x0004, 0x000B, 0x0017, 0x001F, 0x0009,
00807 0x0008, 0x000A, 0x0000, 0x0018, 0x000C, 0x0005, 0x003C, 0x0036,
00808 0x002D, 0x001C, 0x0013, 0x000E, 0x0006, 0x007A, 0x0071, 0x0068,
00809 0x0064, 0x003C, 0x0034, 0x0028, 0x0020, 0x000F, 0x00F7, 0x00E7,
00810 0x00DF, 0x00D3, 0x00CB, 0x007B, 0x0074, 0x0054, 0x0044, 0x003C,
00811 0x0031, 0x0011, 0x01DA, 0x01CA, 0x01BA, 0x019B, 0x00FB, 0x00F8,
00812 0x00D5, 0x00AA, 0x008B, 0x0084, 0x0065, 0x0025, 0x03B6, 0x0397,
00813 0x0390, 0x0371, 0x0332, 0x01F3, 0x01D5, 0x0157, 0x0149, 0x010B,
00814 0x00F5, 0x004F, 0x004D, 0x076F, 0x0761, 0x0723, 0x06ED, 0x0667,
00815 0x0661,
00816 };
00817 static const uint16_t bitalloc_129_codes_b[129] =
00818 {
00819 0x29DC, 0x14EF, 0x0455, 0x0E9C, 0x022B, 0x0489, 0x0740, 0x074F,
00820 0x0172, 0x0245, 0x0247, 0x030A, 0x03A1, 0x001C, 0x008B, 0x00D6,
00821 0x010C, 0x0148, 0x014F, 0x0186, 0x01D1, 0x0008, 0x000F, 0x0046,
00822 0x005D, 0x0078, 0x0087, 0x0096, 0x00A5, 0x00BC, 0x00D8, 0x00DE,
00823 0x00F6, 0x0005, 0x0014, 0x0024, 0x002F, 0x003A, 0x003D, 0x0049,
00824 0x0050, 0x0058, 0x005F, 0x0066, 0x006D, 0x0075, 0x007C, 0x0004,
00825 0x000B, 0x0013, 0x0018, 0x001B, 0x001F, 0x0022, 0x0026, 0x002A,
00826 0x002D, 0x0031, 0x0034, 0x0038, 0x003B, 0x003F, 0x0003, 0x0006,
00827 0x000A, 0x0007, 0x0004, 0x0000, 0x003C, 0x0039, 0x0035, 0x0032,
00828 0x002E, 0x002B, 0x0027, 0x0023, 0x0020, 0x001C, 0x0019, 0x0016,
00829 0x0010, 0x0005, 0x007D, 0x007A, 0x006E, 0x0067, 0x0060, 0x0059,
00830 0x0051, 0x004A, 0x0042, 0x003B, 0x0034, 0x0025, 0x0015, 0x0006,
00831 0x00F7, 0x00DF, 0x00D9, 0x00BD, 0x00A6, 0x0097, 0x0090, 0x0079,
00832 0x006A, 0x0047, 0x0044, 0x0009, 0x01D2, 0x0187, 0x0184, 0x0149,
00833 0x010D, 0x00D7, 0x00B8, 0x001D, 0x03A6, 0x030B, 0x029C, 0x0246,
00834 0x0173, 0x0114, 0x0741, 0x053A, 0x0488, 0x0E9D, 0x0A76, 0x0454,
00835 0x29DD,
00836 };
00837 static const uint16_t bitalloc_129_codes_c[129] =
00838 {
00839 0x0E5C, 0x072F, 0x001D, 0x0724, 0x000F, 0x010D, 0x0324, 0x0393,
00840 0x03E9, 0x0080, 0x0087, 0x00FA, 0x0164, 0x0193, 0x01DE, 0x01F5,
00841 0x0010, 0x002A, 0x0041, 0x0064, 0x0073, 0x008E, 0x00A4, 0x00B3,
00842 0x00D6, 0x00E5, 0x00F4, 0x00FB, 0x0002, 0x0009, 0x0013, 0x001E,
00843 0x0026, 0x002C, 0x0033, 0x003F, 0x0041, 0x004C, 0x0053, 0x005E,
00844 0x0065, 0x0070, 0x0073, 0x0078, 0x007B, 0x007E, 0x0002, 0x0005,
00845 0x0007, 0x000B, 0x000D, 0x0011, 0x0014, 0x0017, 0x001A, 0x001D,
00846 0x0021, 0x0024, 0x0027, 0x002A, 0x002D, 0x0030, 0x0033, 0x0036,
00847 0x003A, 0x0037, 0x0034, 0x0031, 0x002E, 0x002B, 0x0028, 0x0025,
00848 0x0022, 0x001E, 0x001B, 0x0018, 0x0015, 0x0012, 0x000E, 0x000C,
00849 0x0008, 0x0006, 0x0003, 0x007F, 0x007C, 0x0079, 0x0076, 0x0071,
00850 0x006A, 0x005F, 0x0058, 0x004D, 0x0046, 0x0040, 0x0038, 0x002D,
00851 0x0027, 0x001F, 0x0014, 0x0012, 0x0003, 0x0000, 0x00F5, 0x00EE,
00852 0x00D7, 0x00C8, 0x00A5, 0x008F, 0x007C, 0x0065, 0x0042, 0x002B,
00853 0x0011, 0x0002, 0x01DF, 0x01C8, 0x0165, 0x00FB, 0x00E4, 0x0081,
00854 0x0006, 0x03E8, 0x0325, 0x01CA, 0x010C, 0x0725, 0x0396, 0x001C,
00855 0x0E5D,
00856 };
00857 static const uint16_t bitalloc_129_codes_d[129] =
00858 {
00859 0xA598, 0xA59A, 0xA59C, 0xA59E, 0xC598, 0xE586, 0x3ACC, 0x52CA,
00860 0x62CD, 0x0D48, 0x1D67, 0x2978, 0x3167, 0x3966, 0x06A5, 0x0EBC,
00861 0x14BD, 0x1CB1, 0x0350, 0x0353, 0x075F, 0x0A5F, 0x0C5E, 0x0E5E,
00862 0x01AE, 0x03AD, 0x052D, 0x062D, 0x072D, 0x00D5, 0x01D4, 0x0294,
00863 0x0314, 0x0394, 0x0014, 0x0094, 0x0114, 0x0174, 0x01B4, 0x01F4,
00864 0x000B, 0x004B, 0x008B, 0x00BB, 0x00DB, 0x00FB, 0x001B, 0x003B,
00865 0x0053, 0x0063, 0x0073, 0x0003, 0x0013, 0x0023, 0x002F, 0x0037,
00866 0x003F, 0x0007, 0x000F, 0x0015, 0x0019, 0x001D, 0x0001, 0x0005,
00867 0x0009, 0x0006, 0x0002, 0x001E, 0x001A, 0x0016, 0x0010, 0x0008,
00868 0x0000, 0x0038, 0x0030, 0x0028, 0x001C, 0x000C, 0x007C, 0x006C,
00869 0x005C, 0x0044, 0x0024, 0x0004, 0x00E4, 0x00C4, 0x00A4, 0x0074,
00870 0x0034, 0x01F5, 0x01B5, 0x0175, 0x0115, 0x0095, 0x0015, 0x0395,
00871 0x0315, 0x0295, 0x01D5, 0x00D6, 0x072E, 0x062E, 0x052E, 0x03AE,
00872 0x01AF, 0x0E5F, 0x0C5F, 0x0C58, 0x0A58, 0x0758, 0x0351, 0x1CB2,
00873 0x18B2, 0x0EBD, 0x0EB2, 0x3967, 0x3960, 0x2979, 0x2964, 0x0D49,
00874 0x72C2, 0x52CB, 0x3ACD, 0xE587, 0xC599, 0xA59F, 0xA59D, 0xA59B,
00875 0xA599,
00876 };
00877 static const uint16_t bitalloc_129_codes_e[129] =
00878 {
00879 0xA13C, 0xC720, 0xA13F, 0xA13E, 0xA13D, 0xE722, 0x5090, 0x6393,
00880 0x7392, 0x2849, 0x31CE, 0x39CE, 0x1425, 0x18E5, 0x1CE5, 0x0844,
00881 0x0A1C, 0x0C7C, 0x036C, 0x0423, 0x050F, 0x063F, 0x01B7, 0x0216,
00882 0x0285, 0x031D, 0x039D, 0x0109, 0x0140, 0x0180, 0x01C8, 0x01CF,
00883 0x007A, 0x008A, 0x00A2, 0x00C1, 0x00E5, 0x0014, 0x0037, 0x0043,
00884 0x004E, 0x0056, 0x0061, 0x006C, 0x007C, 0x000B, 0x001C, 0x001F,
00885 0x0023, 0x0025, 0x0029, 0x002C, 0x002E, 0x0032, 0x0034, 0x0037,
00886 0x003A, 0x003C, 0x003F, 0x0001, 0x0003, 0x0006, 0x0008, 0x000A,
00887 0x000C, 0x000B, 0x0009, 0x0007, 0x0004, 0x0002, 0x0000, 0x003D,
00888 0x003B, 0x0038, 0x0035, 0x0033, 0x002F, 0x002D, 0x002A, 0x0026,
00889 0x0024, 0x0020, 0x001D, 0x001A, 0x007D, 0x006D, 0x0062, 0x0057,
00890 0x004F, 0x0044, 0x003C, 0x0015, 0x00E6, 0x00C6, 0x00A3, 0x008B,
00891 0x007B, 0x006C, 0x01C9, 0x0181, 0x0141, 0x010A, 0x00DA, 0x031E,
00892 0x0286, 0x0217, 0x0210, 0x0738, 0x0638, 0x0508, 0x036D, 0x0C7D,
00893 0x0A1D, 0x0845, 0x1CE6, 0x18E6, 0x1426, 0x39CF, 0x31CF, 0x284E,
00894 0x7393, 0x7390, 0x5091, 0xE723, 0xC724, 0xC725, 0xC722, 0xC723,
00895 0xC721,
00896 };
00897 static const uint16_t bitalloc_129_codes_f[129] =
00898 {
00899 0x762C, 0x3B17, 0x1555, 0x0608, 0x0AAB, 0x0FF2, 0x0305, 0x0307,
00900 0x0763, 0x0046, 0x010C, 0x01BC, 0x02AB, 0x03B6, 0x03FD, 0x0080,
00901 0x0087, 0x00DF, 0x0156, 0x01D9, 0x01F8, 0x01FF, 0x002A, 0x0041,
00902 0x0061, 0x0094, 0x00D4, 0x00EA, 0x00F2, 0x00FD, 0x0009, 0x000B,
00903 0x001A, 0x0026, 0x0031, 0x0040, 0x004B, 0x006B, 0x0073, 0x0077,
00904 0x007A, 0x007C, 0x0000, 0x0002, 0x0006, 0x0008, 0x000B, 0x000E,
00905 0x0011, 0x0014, 0x0016, 0x0019, 0x001C, 0x001E, 0x0021, 0x0023,
00906 0x0026, 0x0028, 0x002B, 0x002D, 0x002F, 0x0031, 0x0033, 0x0036,
00907 0x0038, 0x0037, 0x0034, 0x0032, 0x0030, 0x002E, 0x002C, 0x0029,
00908 0x0027, 0x0024, 0x0022, 0x001F, 0x001D, 0x001A, 0x0017, 0x0015,
00909 0x0012, 0x000F, 0x000C, 0x0009, 0x0007, 0x0003, 0x0001, 0x007D,
00910 0x007B, 0x0078, 0x0074, 0x0072, 0x0054, 0x0041, 0x0036, 0x0027,
00911 0x001B, 0x0014, 0x000A, 0x00FE, 0x00F3, 0x00EB, 0x00D5, 0x0095,
00912 0x006E, 0x0042, 0x002B, 0x0010, 0x01F9, 0x01DA, 0x0157, 0x0154,
00913 0x00C0, 0x0081, 0x0022, 0x03B7, 0x03B0, 0x01BD, 0x010D, 0x0047,
00914 0x07F8, 0x0554, 0x0306, 0x0FF3, 0x0EC4, 0x0609, 0x1D8A, 0x1554,
00915 0x762D,
00916 };
00917 static const uint16_t bitalloc_129_codes_g[129] =
00918 {
00919 0x1E20, 0x1E5E, 0x031C, 0x051A, 0x0718, 0x0916, 0x0B14, 0x0D12,
00920 0x0F11, 0x0090, 0x018F, 0x028E, 0x038D, 0x048C, 0x058B, 0x068A,
00921 0x0789, 0x0049, 0x00C8, 0x0148, 0x01C7, 0x0247, 0x02C6, 0x0346,
00922 0x03C5, 0x0025, 0x0065, 0x00A5, 0x00E4, 0x0124, 0x0164, 0x01A4,
00923 0x01E3, 0x0013, 0x0033, 0x0053, 0x0073, 0x0093, 0x00B3, 0x00D3,
00924 0x00F3, 0x000A, 0x001A, 0x002A, 0x003A, 0x004A, 0x005A, 0x006A,
00925 0x007A, 0x0006, 0x000E, 0x0016, 0x001E, 0x0026, 0x002E, 0x0036,
00926 0x003E, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C,
00927 0x0000, 0x001D, 0x0019, 0x0015, 0x0011, 0x000D, 0x0009, 0x0005,
00928 0x003F, 0x0037, 0x002F, 0x0027, 0x001F, 0x0017, 0x000F, 0x0007,
00929 0x007B, 0x006B, 0x005B, 0x004B, 0x003B, 0x002B, 0x001B, 0x000B,
00930 0x0008, 0x00F0, 0x00D0, 0x00B0, 0x0090, 0x0070, 0x0050, 0x0030,
00931 0x01E4, 0x01A5, 0x0165, 0x0125, 0x00E5, 0x00E2, 0x00A2, 0x0062,
00932 0x03CA, 0x0347, 0x02C7, 0x02C4, 0x0244, 0x0149, 0x00C9, 0x00C6,
00933 0x0796, 0x068B, 0x0688, 0x048D, 0x048A, 0x028F, 0x028C, 0x0091,
00934 0x0F2E, 0x0D13, 0x0B15, 0x0917, 0x0719, 0x051B, 0x031D, 0x1E5F,
00935 0x1E21,
00936 };
00937 static const uint8_t bitalloc_129_bits_a[129] =
00938 {
00939 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00940 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8,
00941 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7,
00942 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4,
00943 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7,
00944 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
00945 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10,
00946 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11,
00947 11,
00948 };
00949 static const uint8_t bitalloc_129_bits_b[129] =
00950 {
00951 14, 13, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9,
00952 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
00953 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6,
00954 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5,
00955 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00956 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
00957 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
00958 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12,
00959 14,
00960 };
00961 static const uint8_t bitalloc_129_bits_c[129] =
00962 {
00963 13, 12, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9,
00964 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7,
00965 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6,
00966 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00967 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00968 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
00969 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
00970 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11,
00971 13,
00972 };
00973 static const uint8_t bitalloc_129_bits_d[129] =
00974 {
00975 16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13,
00976 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 10, 10, 10,
00977 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7, 7,
00978 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4,
00979 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7,
00980 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10,
00981 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13,
00982 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16,
00983 16,
00984 };
00985 static const uint8_t bitalloc_129_bits_e[129] =
00986 {
00987 16, 16, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12,
00988 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9,
00989 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6,
00990 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5,
00991 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6,
00992 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
00993 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12,
00994 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16,
00995 16,
00996 };
00997 static const uint8_t bitalloc_129_bits_f[129] =
00998 {
00999 15, 14, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 10, 10, 9,
01000 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7,
01001 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6,
01002 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
01003 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
01004 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7,
01005 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
01006 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13,
01007 15,
01008 };
01009 static const uint8_t bitalloc_129_bits_g[129] =
01010 {
01011 13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11,
01012 11, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9,
01013 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7,
01014 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5,
01015 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6,
01016 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8,
01017 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
01018 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13,
01019 13,
01020 };
01021
01022 static const uint8_t bitalloc_sizes[10] = { 3, 5, 7, 9, 13, 17, 25, 33, 65, 129 };
01023
01024 static const int8_t bitalloc_offsets[10] =
01025 { -1, -2, -3, -4, -6, -8, -12, -16, -32, -64 };
01026
01027 static const uint8_t bitalloc_maxbits[10][7] = {
01028 { 2 },
01029 { 4, 3, 3 },
01030 { 5, 5, 4 },
01031 { 6, 5, 6 },
01032 { 7, 6, 5 },
01033 { 9, 8, 7, 9, 8, 8, 8 },
01034 { 9, 9, 8, 9, 8, 9, 9 },
01035 { 9, 9, 9, 9, 9, 9, 9 },
01036 { 9, 9, 9, 9, 9, 9, 9 },
01037 { 9, 9, 9, 9, 9, 9, 9 }
01038 };
01039
01040 static const uint16_t* const bitalloc_codes[10][8] = {
01041 { bitalloc_3_codes, NULL },
01042 { bitalloc_5_codes_a, bitalloc_5_codes_b, bitalloc_5_codes_c, NULL },
01043 { bitalloc_7_codes_a, bitalloc_7_codes_b, bitalloc_7_codes_c, NULL },
01044 { bitalloc_9_codes_a, bitalloc_9_codes_b, bitalloc_9_codes_c, NULL },
01045 { bitalloc_13_codes_a, bitalloc_13_codes_b, bitalloc_13_codes_c, NULL },
01046 { bitalloc_17_codes_a, bitalloc_17_codes_b, bitalloc_17_codes_c, bitalloc_17_codes_d,
01047 bitalloc_17_codes_e, bitalloc_17_codes_f, bitalloc_17_codes_g, NULL },
01048 { bitalloc_25_codes_a, bitalloc_25_codes_b, bitalloc_25_codes_c, bitalloc_25_codes_d,
01049 bitalloc_25_codes_e, bitalloc_25_codes_f, bitalloc_25_codes_g, NULL },
01050 { bitalloc_33_codes_a, bitalloc_33_codes_b, bitalloc_33_codes_c, bitalloc_33_codes_d,
01051 bitalloc_33_codes_e, bitalloc_33_codes_f, bitalloc_33_codes_g, NULL },
01052 { bitalloc_65_codes_a, bitalloc_65_codes_b, bitalloc_65_codes_c, bitalloc_65_codes_d,
01053 bitalloc_65_codes_e, bitalloc_65_codes_f, bitalloc_65_codes_g, NULL },
01054 { bitalloc_129_codes_a, bitalloc_129_codes_b, bitalloc_129_codes_c, bitalloc_129_codes_d,
01055 bitalloc_129_codes_e, bitalloc_129_codes_f, bitalloc_129_codes_g, NULL }
01056 };
01057
01058 static const uint8_t* const bitalloc_bits[10][8] = {
01059 { bitalloc_3_bits, NULL },
01060 { bitalloc_5_bits_a, bitalloc_5_bits_b, bitalloc_5_bits_c, NULL },
01061 { bitalloc_7_bits_a, bitalloc_7_bits_b, bitalloc_7_bits_c, NULL },
01062 { bitalloc_9_bits_a, bitalloc_9_bits_b, bitalloc_9_bits_c, NULL },
01063 { bitalloc_13_bits_a, bitalloc_13_bits_b, bitalloc_13_bits_c, NULL },
01064 { bitalloc_17_bits_a, bitalloc_17_bits_b, bitalloc_17_bits_c, bitalloc_17_bits_d,
01065 bitalloc_17_bits_e, bitalloc_17_bits_f, bitalloc_17_bits_g, NULL },
01066 { bitalloc_25_bits_a, bitalloc_25_bits_b, bitalloc_25_bits_c, bitalloc_25_bits_d,
01067 bitalloc_25_bits_e, bitalloc_25_bits_f, bitalloc_25_bits_g, NULL },
01068 { bitalloc_33_bits_a, bitalloc_33_bits_b, bitalloc_33_bits_c, bitalloc_33_bits_d,
01069 bitalloc_33_bits_e, bitalloc_33_bits_f, bitalloc_33_bits_g, NULL },
01070 { bitalloc_65_bits_a, bitalloc_65_bits_b, bitalloc_65_bits_c, bitalloc_65_bits_d,
01071 bitalloc_65_bits_e, bitalloc_65_bits_f, bitalloc_65_bits_g, NULL },
01072 { bitalloc_129_bits_a, bitalloc_129_bits_b, bitalloc_129_bits_c, bitalloc_129_bits_d,
01073 bitalloc_129_bits_e, bitalloc_129_bits_f, bitalloc_129_bits_g, NULL }
01074 };
01075
01076 #endif