ScummVM API documentation
wmadata.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 // Based on xoreos' WMA code
23 
24 #ifndef AUDIO_DECODERS_WMADATA_H
25 #define AUDIO_DECODERS_WMADATA_H
26 
27 #include "common/types.h"
28 
29 namespace Audio {
30 
31 const uint16 wmaCriticalFreqs[25] = {
32  100, 200, 300, 400, 510, 630, 770, 920,
33  1080, 1270, 1480, 1720, 2000, 2320, 2700, 3150,
34  3700, 4400, 5300, 6400, 7700, 9500, 12000, 15500,
35  24500
36 };
37 
38 /* First value is number of bands */
39 static const uint8 exponentBand22050[3][25] = {
40  { 10, 4, 8, 4, 8, 8, 12, 20, 24, 24, 16 },
41  { 14, 4, 8, 8, 4, 12, 12, 16, 24, 16, 20, 24, 32, 40, 36 },
42  { 23, 4, 4, 4, 8, 4, 4, 8, 8, 8, 8, 8, 12, 12, 16, 16, 24, 24, 32, 44, 48, 60, 84, 72 }
43 };
44 
45 static const uint8 exponentBand32000[3][25] = {
46  { 11, 4, 4, 8, 4, 4, 12, 16, 24, 20, 28, 4 },
47  { 15, 4, 8, 4, 4, 8, 8, 16, 20, 12, 20, 20, 28, 40, 56, 8 },
48  { 16, 8, 4, 8, 8, 12, 16, 20, 24, 40, 32, 32, 44, 56, 80, 112, 16 }
49 };
50 
51 static const uint8 exponentBand44100[3][25] = {
52  { 12, 4, 4, 4, 4, 4, 8, 8, 8, 12, 16, 20, 36 },
53  { 15, 4, 8, 4, 8, 8, 4, 8, 8, 12, 12, 12, 24, 28, 40, 76 },
54  { 17, 4, 8, 8, 4, 12, 12, 8, 8, 24, 16, 20, 24, 32, 40, 60, 80, 152 }
55 };
56 
57 static const uint32 coef0Huffcodes[666] = {
58  0x00258, 0x0003D, 0x00000, 0x00005, 0x00008, 0x00008, 0x0000C, 0x0001B,
59  0x0001F, 0x00015, 0x00024, 0x00032, 0x0003A, 0x00026, 0x0002C, 0x0002F,
60  0x0004A, 0x0004D, 0x00061, 0x00070, 0x00073, 0x00048, 0x00052, 0x0005A,
61  0x0005D, 0x0006E, 0x00099, 0x0009E, 0x000C1, 0x000CE, 0x000E4, 0x000F0,
62  0x00093, 0x0009E, 0x000A2, 0x000A1, 0x000B8, 0x000D2, 0x000D3, 0x0012E,
63  0x00130, 0x000DE, 0x0012D, 0x0019B, 0x001E4, 0x00139, 0x0013A, 0x0013F,
64  0x0014F, 0x0016D, 0x001A2, 0x0027C, 0x0027E, 0x00332, 0x0033C, 0x0033F,
65  0x0038B, 0x00396, 0x003C5, 0x00270, 0x0027C, 0x0025A, 0x00395, 0x00248,
66  0x004BD, 0x004FB, 0x00662, 0x00661, 0x0071B, 0x004E6, 0x004FF, 0x00666,
67  0x0071C, 0x0071A, 0x0071F, 0x00794, 0x00536, 0x004E2, 0x0078E, 0x004EE,
68  0x00518, 0x00535, 0x004FB, 0x0078D, 0x00530, 0x00680, 0x0068F, 0x005CB,
69  0x00965, 0x006A6, 0x00967, 0x0097F, 0x00682, 0x006AE, 0x00CD0, 0x00E28,
70  0x00F13, 0x00F1F, 0x009F5, 0x00CD3, 0x00F11, 0x00926, 0x00964, 0x00F32,
71  0x00F12, 0x00F30, 0x00966, 0x00D0B, 0x00A68, 0x00B91, 0x009C7, 0x00B73,
72  0x012FA, 0x0131D, 0x013F9, 0x01CA0, 0x0199C, 0x01C7A, 0x0198C, 0x01248,
73  0x01C74, 0x01C64, 0x0139E, 0x012FD, 0x00A77, 0x012FC, 0x01C7B, 0x012CA,
74  0x014CC, 0x014D2, 0x014E3, 0x014DC, 0x012DC, 0x03344, 0x02598, 0x0263C,
75  0x0333B, 0x025E6, 0x01A1C, 0x01E3C, 0x014E2, 0x033D4, 0x01A11, 0x03349,
76  0x03CCE, 0x014E1, 0x01A34, 0x0273E, 0x02627, 0x0273F, 0x038EE, 0x03971,
77  0x03C67, 0x03C61, 0x0333D, 0x038C2, 0x0263F, 0x038CD, 0x02638, 0x02E41,
78  0x0351F, 0x03348, 0x03C66, 0x03562, 0x02989, 0x027D5, 0x0333C, 0x02E4F,
79  0x0343B, 0x02DDF, 0x04BC8, 0x029C0, 0x02E57, 0x04C72, 0x025B7, 0x03547,
80  0x03540, 0x029D3, 0x04C45, 0x025BB, 0x06600, 0x04C73, 0x04BCE, 0x0357B,
81  0x029A6, 0x029D2, 0x0263E, 0x0298A, 0x07183, 0x06602, 0x07958, 0x04B66,
82  0x0537D, 0x05375, 0x04FE9, 0x04B67, 0x0799F, 0x04BC9, 0x051FE, 0x06A3B,
83  0x05BB6, 0x04FA8, 0x0728F, 0x05376, 0x0492C, 0x0537E, 0x0795A, 0x06A3C,
84  0x0E515, 0x07887, 0x0683A, 0x051F9, 0x051FD, 0x0CC6A, 0x06A8A, 0x0CC6D,
85  0x05BB3, 0x0683B, 0x051FC, 0x05378, 0x0728E, 0x07886, 0x05BB7, 0x0F2A4,
86  0x0795B, 0x0683C, 0x09FC1, 0x0683D, 0x0B752, 0x09678, 0x0A3E8, 0x06AC7,
87  0x051F0, 0x0B759, 0x06AF3, 0x04B6B, 0x0F2A0, 0x0F2AD, 0x096C3, 0x0E518,
88  0x0B75C, 0x0D458, 0x0CC6B, 0x0537C, 0x067AA, 0x04FEA, 0x0343A, 0x0CC71,
89  0x0967F, 0x09FC4, 0x096C2, 0x0E516, 0x0F2A1, 0x0D45C, 0x0D45D, 0x0D45E,
90  0x12FB9, 0x0967E, 0x1982F, 0x09883, 0x096C4, 0x0B753, 0x12FB8, 0x0F2A8,
91  0x1CA21, 0x096C5, 0x0E51A, 0x1CA27, 0x12F3C, 0x0D471, 0x0F2AA, 0x0B75B,
92  0x12FBB, 0x0F2A9, 0x0F2AC, 0x0D45A, 0x0B74F, 0x096C8, 0x16E91, 0x096CA,
93  0x12FBF, 0x0D0A7, 0x13103, 0x0D516, 0x16E99, 0x12CBD, 0x0A3EA, 0x19829,
94  0x0B755, 0x29BA7, 0x1CA28, 0x29BA5, 0x16E93, 0x1982C, 0x19828, 0x25994,
95  0x0A3EB, 0x1CA29, 0x16E90, 0x1CA25, 0x1982D, 0x1CA26, 0x16E9B, 0x0B756,
96  0x0967C, 0x25997, 0x0B75F, 0x198D3, 0x0B757, 0x19A2A, 0x0D45B, 0x0E517,
97  0x1CA24, 0x1CA23, 0x1CA22, 0x0B758, 0x16E97, 0x0CD14, 0x13100, 0x00007,
98  0x0003B, 0x0006B, 0x00097, 0x00138, 0x00125, 0x00173, 0x00258, 0x00335,
99  0x0028E, 0x004C6, 0x00715, 0x00729, 0x004EF, 0x00519, 0x004ED, 0x00532,
100  0x0068C, 0x00686, 0x00978, 0x00E5D, 0x00E31, 0x009F4, 0x00B92, 0x012F8,
101  0x00D06, 0x00A67, 0x00D44, 0x00A76, 0x00D59, 0x012CD, 0x01C78, 0x01C75,
102  0x0199F, 0x0198F, 0x01C67, 0x014C6, 0x01C79, 0x01C76, 0x00B94, 0x00D1B,
103  0x01E32, 0x01E31, 0x01AB0, 0x01A05, 0x01AA1, 0x0333A, 0x025E5, 0x02626,
104  0x03541, 0x03544, 0x03421, 0x03546, 0x02E55, 0x02E56, 0x0492D, 0x02DDE,
105  0x0299B, 0x02DDC, 0x0357A, 0x0249C, 0x0668B, 0x1C77F, 0x1CA20, 0x0D45F,
106  0x09886, 0x16E9A, 0x0F2A7, 0x0B751, 0x0A3EE, 0x0CF59, 0x0CF57, 0x0B754,
107  0x0D0A6, 0x16E98, 0x0B760, 0x06AC6, 0x0A3F0, 0x12FBE, 0x13104, 0x0F2A5,
108  0x0A3EF, 0x0D472, 0x12CBA, 0x1982E, 0x16E9C, 0x1C77E, 0x198D0, 0x13105,
109  0x16E92, 0x0B75D, 0x0D459, 0x0001A, 0x000C0, 0x0016C, 0x003CD, 0x00350,
110  0x0067B, 0x0051E, 0x006A9, 0x009F4, 0x00B72, 0x00D09, 0x01249, 0x01E3D,
111  0x01CA1, 0x01A1F, 0x01721, 0x01A8A, 0x016E8, 0x03347, 0x01A35, 0x0249D,
112  0x0299A, 0x02596, 0x02E4E, 0x0298B, 0x07182, 0x04C46, 0x025BA, 0x02E40,
113  0x027D6, 0x04FE8, 0x06607, 0x05310, 0x09884, 0x072E1, 0x06A3D, 0x04B6A,
114  0x04C7A, 0x06603, 0x04C7B, 0x03428, 0x06605, 0x09664, 0x09FC0, 0x071DE,
115  0x06601, 0x05BB2, 0x09885, 0x0A3E2, 0x1C61F, 0x12CBB, 0x0B750, 0x0CF58,
116  0x0967D, 0x25995, 0x668AD, 0x0B75A, 0x09FC2, 0x0537F, 0x0B75E, 0x13FAE,
117  0x12FBC, 0x00031, 0x001C4, 0x004C5, 0x005B8, 0x00CF4, 0x0096F, 0x00D46,
118  0x01E57, 0x01A04, 0x02625, 0x03346, 0x028F9, 0x04C47, 0x072E0, 0x04B69,
119  0x03420, 0x07957, 0x06639, 0x0799E, 0x07959, 0x07881, 0x04B68, 0x09FC3,
120  0x09FD6, 0x0CC70, 0x0A3F1, 0x12CBE, 0x0E30E, 0x0E51B, 0x06AF2, 0x12CBC,
121  0x1C77D, 0x0F2AB, 0x12FBD, 0x1AA2F, 0x0A3EC, 0x0D473, 0x05377, 0x0A3E9,
122  0x1982B, 0x0E300, 0x12F3F, 0x0CF5F, 0x096C0, 0x38C3C, 0x16E94, 0x16E95,
123  0x12F3D, 0x29BA4, 0x29BA6, 0x1C77C, 0x6A8BA, 0x3545C, 0x33457, 0x668AC,
124  0x6A8BB, 0x16E9D, 0x0E519, 0x25996, 0x12F3E, 0x00036, 0x0033E, 0x006AD,
125  0x00D03, 0x012C8, 0x0124A, 0x03C42, 0x03CCD, 0x06606, 0x07880, 0x06852,
126  0x06A3A, 0x05BB4, 0x0F2A2, 0x09FC7, 0x12CB9, 0x0CC6C, 0x0A6E8, 0x096C1,
127  0x0004A, 0x00355, 0x012F9, 0x014E8, 0x01ABE, 0x025B6, 0x0492E, 0x09FC6,
128  0x051FF, 0x0CC6F, 0x096CB, 0x0D071, 0x198D1, 0x12CB8, 0x38C3D, 0x13FAF,
129  0x096C9, 0x0009D, 0x00539, 0x012CE, 0x0341F, 0x029C1, 0x04B33, 0x0A3E3,
130  0x0D070, 0x16E96, 0x0B763, 0x000A0, 0x009CE, 0x038CC, 0x0343D, 0x051FA,
131  0x09888, 0x12FBA, 0x000DF, 0x00A75, 0x029A7, 0x09FC5, 0x0E301, 0x0967B,
132  0x001E7, 0x012C9, 0x051FB, 0x09889, 0x0F2A6, 0x0016F, 0x01CB9, 0x0CF5A,
133  0x12CBF, 0x09679, 0x00272, 0x01A15, 0x0967A, 0x003CB, 0x025F6, 0x0B762,
134  0x0028D, 0x03C60, 0x0CF5E, 0x00352, 0x03CCC, 0x0072F, 0x07186, 0x004EC,
135  0x05379, 0x0068E, 0x09887, 0x006A7, 0x06AF1, 0x00E29, 0x0CF5B, 0x00F31,
136  0x0D470, 0x009C6, 0x013FB, 0x13102, 0x019A5, 0x13101, 0x01983, 0x01C65,
137  0x0124F, 0x014C7, 0x01726, 0x01ABF, 0x03304, 0x02624, 0x03C41, 0x027D7,
138  0x02DDD, 0x02E54, 0x0343C, 0x06604, 0x07181, 0x0663A, 0x04FA9, 0x0663B,
139  0x05311, 0x0537A, 0x06839, 0x05BB5, 0x0492F, 0x06AF0, 0x096C7, 0x0CC6E,
140  0x0537B, 0x0CF5C, 0x0CF56, 0x198D2, 0x0CF5D, 0x0A3ED, 0x0F2A3, 0x1982A,
141  0x0B761, 0x096C6
142 };
143 
144 static const uint8 coef0Huffbits[666] = {
145  11, 6, 2, 3, 4, 5, 5, 5,
146  5, 6, 6, 6, 6, 7, 7, 7,
147  7, 7, 7, 7, 7, 8, 8, 8,
148  8, 8, 8, 8, 8, 8, 8, 8,
149  9, 9, 9, 9, 9, 9, 9, 9,
150  9, 9, 9, 9, 9, 10, 10, 10,
151  10, 10, 10, 10, 10, 10, 10, 10,
152  10, 10, 10, 11, 11, 11, 10, 11,
153  11, 11, 11, 11, 11, 11, 11, 11,
154  11, 11, 11, 11, 12, 12, 11, 12,
155  12, 12, 12, 11, 12, 12, 12, 12,
156  12, 12, 12, 12, 12, 12, 12, 12,
157  12, 12, 12, 12, 12, 13, 13, 12,
158  12, 12, 13, 13, 13, 13, 13, 13,
159  13, 13, 13, 13, 13, 13, 13, 14,
160  13, 13, 13, 13, 13, 13, 13, 14,
161  14, 14, 14, 14, 14, 14, 14, 14,
162  14, 14, 14, 13, 14, 14, 14, 14,
163  14, 14, 14, 14, 14, 14, 14, 14,
164  14, 14, 14, 14, 14, 14, 14, 15,
165  15, 14, 14, 15, 15, 15, 14, 15,
166  15, 15, 15, 15, 15, 15, 15, 15,
167  15, 15, 15, 15, 15, 15, 15, 15,
168  15, 15, 14, 15, 15, 15, 15, 16,
169  16, 16, 15, 16, 15, 15, 16, 16,
170  16, 16, 15, 16, 16, 16, 15, 16,
171  16, 15, 16, 16, 16, 16, 16, 16,
172  16, 16, 16, 16, 15, 15, 16, 16,
173  15, 16, 16, 16, 17, 17, 17, 16,
174  16, 17, 16, 16, 16, 16, 17, 16,
175  17, 17, 16, 16, 15, 15, 15, 16,
176  17, 16, 17, 16, 16, 17, 17, 17,
177  17, 17, 17, 16, 17, 17, 17, 16,
178  17, 17, 16, 17, 17, 17, 16, 17,
179  17, 16, 16, 17, 17, 17, 18, 17,
180  17, 17, 17, 17, 18, 18, 17, 17,
181  17, 19, 17, 19, 18, 17, 17, 18,
182  17, 17, 18, 17, 17, 17, 18, 17,
183  17, 18, 17, 17, 17, 17, 17, 16,
184  17, 17, 17, 17, 18, 16, 17, 4,
185  6, 8, 9, 9, 10, 10, 10, 10,
186  11, 11, 11, 11, 12, 12, 12, 12,
187  12, 12, 12, 12, 12, 13, 13, 13,
188  13, 13, 13, 13, 13, 13, 13, 13,
189  13, 13, 13, 14, 13, 13, 13, 13,
190  13, 13, 14, 14, 14, 14, 14, 14,
191  15, 15, 15, 15, 15, 15, 16, 15,
192  15, 15, 15, 15, 15, 17, 17, 17,
193  16, 18, 16, 17, 17, 16, 16, 17,
194  17, 18, 17, 16, 17, 17, 17, 16,
195  17, 17, 18, 17, 18, 17, 17, 17,
196  18, 17, 17, 5, 8, 10, 10, 11,
197  11, 12, 12, 12, 13, 13, 14, 13,
198  13, 14, 14, 14, 14, 14, 14, 15,
199  15, 15, 15, 15, 15, 15, 15, 15,
200  15, 15, 15, 16, 16, 15, 16, 16,
201  15, 15, 15, 15, 15, 16, 16, 15,
202  15, 16, 16, 17, 17, 18, 17, 16,
203  17, 18, 19, 17, 16, 16, 17, 17,
204  17, 6, 9, 11, 12, 12, 13, 13,
205  13, 14, 14, 14, 15, 15, 15, 16,
206  15, 15, 15, 15, 15, 15, 16, 16,
207  16, 16, 17, 18, 16, 16, 16, 18,
208  17, 16, 17, 18, 17, 17, 16, 17,
209  17, 16, 17, 16, 17, 18, 18, 18,
210  17, 19, 19, 17, 20, 19, 18, 19,
211  20, 18, 16, 18, 17, 7, 10, 12,
212  13, 13, 14, 14, 14, 15, 15, 16,
213  16, 16, 16, 16, 18, 16, 17, 17,
214  8, 11, 13, 14, 14, 15, 16, 16,
215  16, 16, 17, 17, 17, 18, 18, 17,
216  17, 8, 12, 14, 15, 15, 15, 17,
217  17, 18, 17, 9, 12, 14, 15, 16,
218  16, 17, 9, 13, 15, 16, 16, 17,
219  9, 13, 16, 16, 16, 10, 13, 16,
220  18, 17, 10, 14, 17, 10, 14, 17,
221  11, 14, 16, 11, 14, 11, 15, 12,
222  16, 12, 16, 12, 16, 12, 16, 12,
223  17, 13, 13, 17, 13, 17, 13, 13,
224  14, 14, 14, 14, 14, 14, 14, 15,
225  15, 15, 15, 15, 15, 15, 16, 15,
226  16, 16, 16, 16, 16, 16, 17, 16,
227  16, 16, 16, 17, 16, 17, 16, 17,
228  17, 17
229 };
230 
231 static const uint32 coef1Huffcodes[555] = {
232  0x00115, 0x00002, 0x00001, 0x00000, 0x0000D, 0x00007, 0x00013, 0x0001D,
233  0x00008, 0x0000C, 0x00023, 0x0002B, 0x0003F, 0x00017, 0x0001B, 0x00043,
234  0x00049, 0x00050, 0x00055, 0x00054, 0x00067, 0x00064, 0x0007B, 0x0002D,
235  0x00028, 0x0002A, 0x00085, 0x00089, 0x0002B, 0x00035, 0x00090, 0x00091,
236  0x00094, 0x00088, 0x000C1, 0x000C6, 0x000F2, 0x000E3, 0x000C5, 0x000E2,
237  0x00036, 0x000F0, 0x000A7, 0x000CD, 0x000FB, 0x00059, 0x00116, 0x00103,
238  0x00108, 0x0012B, 0x0012D, 0x00188, 0x0012E, 0x0014C, 0x001C3, 0x00187,
239  0x001E7, 0x0006F, 0x00094, 0x00069, 0x001E6, 0x001CA, 0x00147, 0x00195,
240  0x000A7, 0x00213, 0x00209, 0x00303, 0x00295, 0x00289, 0x0028C, 0x0028D,
241  0x00312, 0x00330, 0x0029B, 0x00308, 0x00328, 0x0029A, 0x0025E, 0x003C5,
242  0x00384, 0x0039F, 0x00397, 0x00296, 0x0032E, 0x00332, 0x003C6, 0x003E6,
243  0x0012D, 0x000D1, 0x00402, 0x000DD, 0x00161, 0x0012B, 0x00127, 0x0045D,
244  0x00601, 0x004AB, 0x0045F, 0x00410, 0x004BF, 0x00528, 0x0045C, 0x00424,
245  0x00400, 0x00511, 0x00618, 0x0073D, 0x0063A, 0x00614, 0x0073C, 0x007C0,
246  0x007CF, 0x00802, 0x00966, 0x00964, 0x00951, 0x008A0, 0x00346, 0x00803,
247  0x00A52, 0x0024A, 0x007C1, 0x0063F, 0x00126, 0x00406, 0x00789, 0x008A2,
248  0x00960, 0x00967, 0x00C05, 0x00C70, 0x00C79, 0x00A5D, 0x00C26, 0x00C4D,
249  0x00372, 0x008A5, 0x00C08, 0x002C5, 0x00F11, 0x00CC4, 0x00F8E, 0x00E16,
250  0x00496, 0x00E77, 0x00F9C, 0x00C25, 0x00F1E, 0x00C27, 0x00F1F, 0x00E17,
251  0x00CCD, 0x00355, 0x00C09, 0x00C78, 0x00F90, 0x00521, 0x00357, 0x00356,
252  0x0068E, 0x00F9D, 0x00C04, 0x00E58, 0x00A20, 0x00A2C, 0x00C4C, 0x0052F,
253  0x00F8D, 0x01178, 0x01053, 0x01097, 0x0180F, 0x0180D, 0x012FB, 0x012AA,
254  0x0202A, 0x00A40, 0x018ED, 0x01CEB, 0x01455, 0x018E3, 0x012A1, 0x00354,
255  0x00353, 0x00F1C, 0x00C7B, 0x00C37, 0x0101D, 0x012CB, 0x01142, 0x0197D,
256  0x01095, 0x01E3B, 0x0186B, 0x00588, 0x01C2A, 0x014B8, 0x01E3A, 0x018EC,
257  0x01F46, 0x012FA, 0x00A53, 0x01CE8, 0x00A55, 0x01C29, 0x0117B, 0x01052,
258  0x012A0, 0x00589, 0x00950, 0x01C2B, 0x00A50, 0x0208B, 0x0180E, 0x02027,
259  0x02556, 0x01E20, 0x006E7, 0x01C28, 0x0197A, 0x00684, 0x020A2, 0x01F22,
260  0x03018, 0x039CF, 0x03E25, 0x02557, 0x0294C, 0x028A6, 0x00D11, 0x028A9,
261  0x02979, 0x00D46, 0x00A56, 0x039CE, 0x030CC, 0x0329A, 0x0149D, 0x0510F,
262  0x0451C, 0x02028, 0x03299, 0x01CED, 0x014B9, 0x00F85, 0x00C7A, 0x01800,
263  0x00341, 0x012CA, 0x039C8, 0x0329D, 0x00D0D, 0x03E20, 0x05144, 0x00D45,
264  0x030D0, 0x0186D, 0x030D5, 0x00D0F, 0x00D40, 0x04114, 0x020A1, 0x0297F,
265  0x03E24, 0x032F1, 0x04047, 0x030D4, 0x028A8, 0x00D0E, 0x0451D, 0x04044,
266  0x0297E, 0x04042, 0x030D2, 0x030CF, 0x03E21, 0x03E26, 0x028A5, 0x0451A,
267  0x00D48, 0x01A16, 0x00D44, 0x04518, 0x0149B, 0x039CA, 0x01498, 0x0403D,
268  0x0451B, 0x0149C, 0x032F3, 0x030CB, 0x08073, 0x03E22, 0x0529A, 0x020AA,
269  0x039CC, 0x0738A, 0x06530, 0x07389, 0x06193, 0x08071, 0x04043, 0x030CE,
270  0x05147, 0x07388, 0x05145, 0x08072, 0x04521, 0x00D47, 0x0297C, 0x030CD,
271  0x030CA, 0x0000B, 0x0000C, 0x00083, 0x000E4, 0x00048, 0x00102, 0x001CC,
272  0x001F5, 0x00097, 0x0020B, 0x00124, 0x00453, 0x00627, 0x00639, 0x00605,
273  0x00517, 0x001B8, 0x00663, 0x00667, 0x007C3, 0x00823, 0x00961, 0x00963,
274  0x00E5A, 0x00E59, 0x00A2B, 0x00CBF, 0x00292, 0x00A2D, 0x007D0, 0x00953,
275  0x00CC5, 0x00F84, 0x004AB, 0x014A7, 0x0068A, 0x0117A, 0x0052E, 0x01442,
276  0x0052C, 0x00C77, 0x00F8F, 0x004AA, 0x01094, 0x01801, 0x012C4, 0x0297B,
277  0x00952, 0x01F19, 0x006A5, 0x01149, 0x012C5, 0x01803, 0x022F2, 0x0329B,
278  0x04520, 0x0149E, 0x00D13, 0x01F16, 0x01CE9, 0x0101C, 0x006E6, 0x039C9,
279  0x06191, 0x07C8E, 0x06192, 0x0CA63, 0x039CD, 0x06190, 0x06884, 0x06885,
280  0x07382, 0x00D49, 0x00D41, 0x0450C, 0x0149A, 0x030D1, 0x08077, 0x03E23,
281  0x01A15, 0x0E701, 0x0E702, 0x08079, 0x0822A, 0x0A218, 0x07887, 0x0403F,
282  0x0520B, 0x0529B, 0x0E700, 0x04519, 0x00007, 0x000E0, 0x000D0, 0x0039B,
283  0x003E5, 0x00163, 0x0063E, 0x007C9, 0x00806, 0x00954, 0x01044, 0x01F44,
284  0x0197C, 0x01F45, 0x00A51, 0x01F47, 0x00951, 0x0052D, 0x02291, 0x0092F,
285  0x00A54, 0x00D12, 0x0297D, 0x00D0C, 0x01499, 0x0329E, 0x032F0, 0x02025,
286  0x039C6, 0x00A57, 0x03E46, 0x00D42, 0x0738B, 0x05146, 0x04046, 0x08078,
287  0x0510E, 0x07886, 0x02904, 0x04156, 0x04157, 0x06032, 0x030D3, 0x08BCE,
288  0x04040, 0x0403E, 0x0A414, 0x10457, 0x08075, 0x06887, 0x07C8F, 0x039C7,
289  0x07387, 0x08070, 0x08BCF, 0x1482A, 0x10456, 0x1482B, 0x01A17, 0x06886,
290  0x0450D, 0x00013, 0x0006B, 0x00615, 0x0080B, 0x0082B, 0x00952, 0x00E5B,
291  0x018E2, 0x0186C, 0x01F18, 0x0329F, 0x00D43, 0x03E29, 0x05140, 0x05141,
292  0x0CA62, 0x06033, 0x03C42, 0x03E28, 0x0450F, 0x0A21A, 0x07384, 0x0A219,
293  0x0E703, 0x0A21B, 0x01A14, 0x07383, 0x045E6, 0x0007A, 0x0012C, 0x00CCC,
294  0x0068F, 0x01802, 0x00A52, 0x00953, 0x04045, 0x01A20, 0x0451F, 0x000A4,
295  0x00735, 0x01CEC, 0x02029, 0x020A3, 0x0451E, 0x00069, 0x00C24, 0x02024,
296  0x032F2, 0x05142, 0x00196, 0x00523, 0x000A6, 0x0197B, 0x0030B, 0x0092E,
297  0x003E9, 0x03E27, 0x00160, 0x05143, 0x00652, 0x04041, 0x00734, 0x028A7,
298  0x0080F, 0x01483, 0x0097C, 0x00340, 0x0068B, 0x00522, 0x01054, 0x01096,
299  0x01F17, 0x0202B, 0x01CEA, 0x020A0, 0x02978, 0x02026, 0x0297A, 0x039CB,
300  0x03E2B, 0x0149F, 0x0329C, 0x07385, 0x08074, 0x0450E, 0x03E2A, 0x05149,
301  0x08076, 0x07386, 0x05148
302 };
303 
304 static const uint8 coef1Huffbits[555] = {
305  9, 5, 2, 4, 4, 5, 5, 5,
306  6, 6, 6, 6, 6, 7, 7, 7,
307  7, 7, 7, 7, 7, 7, 7, 8,
308  8, 8, 8, 8, 8, 8, 8, 8,
309  8, 8, 8, 8, 8, 8, 8, 8,
310  9, 8, 8, 8, 8, 9, 9, 9,
311  9, 9, 9, 9, 9, 9, 9, 9,
312  9, 10, 10, 10, 9, 9, 9, 9,
313  10, 10, 10, 10, 10, 10, 10, 10,
314  10, 10, 10, 10, 10, 10, 10, 10,
315  10, 10, 10, 10, 10, 10, 10, 10,
316  11, 11, 11, 11, 11, 11, 11, 11,
317  11, 11, 11, 11, 11, 11, 11, 11,
318  11, 11, 11, 11, 11, 11, 11, 11,
319  11, 12, 12, 12, 12, 12, 12, 12,
320  12, 12, 11, 11, 11, 11, 11, 12,
321  12, 12, 12, 12, 12, 12, 12, 12,
322  13, 12, 12, 12, 12, 12, 12, 12,
323  13, 12, 12, 12, 12, 12, 12, 12,
324  12, 13, 12, 12, 12, 13, 13, 13,
325  13, 12, 12, 12, 12, 12, 12, 13,
326  12, 13, 13, 13, 13, 13, 13, 13,
327  14, 14, 13, 13, 13, 13, 13, 13,
328  13, 12, 12, 12, 13, 13, 13, 13,
329  13, 13, 13, 13, 13, 13, 13, 13,
330  13, 13, 14, 13, 14, 13, 13, 13,
331  13, 13, 14, 13, 14, 14, 13, 14,
332  14, 13, 14, 13, 13, 14, 14, 13,
333  14, 14, 14, 14, 14, 14, 14, 14,
334  14, 15, 14, 14, 14, 14, 15, 15,
335  15, 14, 14, 13, 13, 12, 12, 13,
336  13, 13, 14, 14, 15, 14, 15, 15,
337  14, 13, 14, 15, 15, 15, 14, 14,
338  14, 14, 15, 14, 14, 15, 15, 15,
339  14, 15, 14, 14, 14, 14, 14, 15,
340  15, 16, 15, 15, 15, 14, 15, 15,
341  15, 15, 14, 14, 16, 14, 15, 14,
342  14, 15, 15, 15, 15, 16, 15, 14,
343  15, 15, 15, 16, 15, 15, 14, 14,
344  14, 4, 7, 8, 8, 9, 9, 9,
345  9, 10, 10, 11, 11, 11, 11, 11,
346  11, 12, 11, 11, 11, 12, 12, 12,
347  12, 12, 12, 12, 12, 12, 11, 12,
348  12, 12, 13, 13, 13, 13, 13, 13,
349  13, 12, 12, 13, 13, 13, 13, 14,
350  14, 13, 14, 13, 13, 13, 14, 14,
351  15, 15, 14, 13, 13, 13, 14, 14,
352  15, 15, 15, 16, 14, 15, 17, 17,
353  15, 15, 15, 15, 15, 14, 16, 14,
354  16, 16, 16, 16, 16, 16, 15, 15,
355  17, 15, 16, 15, 6, 8, 10, 10,
356  10, 11, 11, 11, 12, 12, 13, 13,
357  13, 13, 14, 13, 14, 13, 14, 14,
358  14, 14, 14, 15, 15, 14, 14, 14,
359  14, 14, 14, 15, 15, 15, 15, 16,
360  15, 15, 16, 15, 15, 15, 14, 16,
361  15, 15, 18, 17, 16, 17, 15, 14,
362  15, 16, 16, 19, 17, 19, 16, 17,
363  15, 7, 10, 11, 12, 12, 12, 12,
364  13, 13, 13, 14, 15, 14, 15, 15,
365  16, 15, 14, 14, 15, 16, 15, 16,
366  16, 16, 16, 15, 15, 7, 11, 12,
367  13, 13, 14, 14, 15, 15, 15, 8,
368  11, 13, 14, 14, 15, 9, 12, 14,
369  14, 15, 9, 13, 10, 13, 10, 14,
370  10, 14, 11, 15, 11, 15, 11, 14,
371  12, 15, 12, 13, 13, 13, 13, 13,
372  13, 14, 13, 14, 14, 14, 14, 14,
373  14, 15, 14, 15, 16, 15, 14, 15,
374  16, 15, 15
375 };
376 
377 static const uint32 coef2Huffcodes[1336] = {
378  0x0003E6, 0x0000F6, 0x000000, 0x000002, 0x000006, 0x00000F, 0x00001B, 0x000028,
379  0x000039, 0x00003F, 0x00006B, 0x000076, 0x0000B7, 0x0000E8, 0x0000EF, 0x000169,
380  0x0001A7, 0x0001D4, 0x0001DC, 0x0002C4, 0x000349, 0x000355, 0x000391, 0x0003DC,
381  0x000581, 0x0005B2, 0x000698, 0x00070C, 0x000755, 0x00073A, 0x000774, 0x0007CF,
382  0x000B0A, 0x000B66, 0x000D2E, 0x000D5E, 0x000E1B, 0x000EAC, 0x000E5A, 0x000F7E,
383  0x000FA1, 0x00163E, 0x001A37, 0x001A52, 0x001C39, 0x001AB3, 0x001D5F, 0x001CB6,
384  0x001F52, 0x001DD9, 0x002C04, 0x002C2E, 0x002C2D, 0x002C23, 0x003467, 0x0034A3,
385  0x00351B, 0x003501, 0x003A5D, 0x00351C, 0x003875, 0x003DEA, 0x00397B, 0x0039DB,
386  0x003DF1, 0x0039D8, 0x003BB4, 0x00580A, 0x00584D, 0x005842, 0x005B13, 0x0058EA,
387  0x00697D, 0x006A06, 0x0068CC, 0x006AC7, 0x006A96, 0x0072F4, 0x007543, 0x0072B4,
388  0x007D20, 0x00B003, 0x0073B5, 0x007BE6, 0x00D180, 0x007BD1, 0x007CB8, 0x007D06,
389  0x007D25, 0x00D2F2, 0x00D19A, 0x00D334, 0x00E1DC, 0x00D529, 0x00D584, 0x00E1D2,
390  0x00E5E3, 0x00EEC4, 0x00E564, 0x00FA49, 0x016001, 0x00EEDC, 0x00F7FA, 0x01A32C,
391  0x016131, 0x016003, 0x00F9C8, 0x01EF80, 0x01D2A0, 0x01AA4B, 0x00F7CE, 0x01ABFE,
392  0x01AA50, 0x01A458, 0x01A816, 0x01CAE4, 0x01D2FE, 0x01D52E, 0x01AA4C, 0x02C245,
393  0x01D2A1, 0x01A35D, 0x01CA1B, 0x01D5D8, 0x01F531, 0x01CA1C, 0x01F389, 0x01F4AF,
394  0x03A5E7, 0x0351FB, 0x02C24B, 0x034BCE, 0x02C24D, 0x02C249, 0x02C24A, 0x072DFC,
395  0x0357EF, 0x035002, 0x03A5E6, 0x039431, 0x05843B, 0x034A77, 0x058431, 0x03A5F3,
396  0x03A5DD, 0x03E5E5, 0x0356BD, 0x03976E, 0x06A3D2, 0x03500D, 0x0694C4, 0x0580BD,
397  0x03E5E8, 0x074B95, 0x034A6E, 0x03977C, 0x039432, 0x05B0D2, 0x06A3D8, 0x0580B8,
398  0x05B0CB, 0x05B0D7, 0x072DEE, 0x072DED, 0x072DEC, 0x074B9C, 0x03977F, 0x072DEA,
399  0x074B9E, 0x07BE7D, 0x0580BF, 0x05B0D5, 0x07CBA8, 0x074B91, 0x03E5DD, 0x0B6171,
400  0x0D46B3, 0x0D46B9, 0x07CBA1, 0x074B9F, 0x072DE1, 0x0E59F5, 0x03E5EB, 0x000004,
401  0x000015, 0x000038, 0x000075, 0x0000E8, 0x0001D3, 0x000347, 0x00039C, 0x000690,
402  0x00074A, 0x000B60, 0x000E93, 0x000F74, 0x00163D, 0x001A5A, 0x001D24, 0x001CBE,
403  0x001F4B, 0x003468, 0x003562, 0x003947, 0x003E82, 0x005804, 0x005B12, 0x005803,
404  0x00696D, 0x006A9E, 0x00697C, 0x006978, 0x006AFB, 0x0074B2, 0x0072F5, 0x0073C0,
405  0x007541, 0x006944, 0x0074B7, 0x0070D3, 0x007BA9, 0x00B0B1, 0x00D1AF, 0x00E1DD,
406  0x00E5E2, 0x00E1A3, 0x00EEC3, 0x01612F, 0x00E961, 0x00EEDA, 0x00E78E, 0x00FA48,
407  0x01612C, 0x00E511, 0x00E565, 0x00E953, 0x01AA4A, 0x00E59D, 0x01D52C, 0x01A811,
408  0x01CAE7, 0x01ABFC, 0x01D52D, 0x01CACF, 0x01CF05, 0x02C254, 0x034A72, 0x01F4AC,
409  0x03976B, 0x034A71, 0x02C6D9, 0x02D873, 0x034A6A, 0x0357E7, 0x03464C, 0x03E5F5,
410  0x058433, 0x01F53A, 0x03500A, 0x0357EA, 0x034A73, 0x03942F, 0x0357E5, 0x039775,
411  0x0694CD, 0x039772, 0x07CBA5, 0x06A3EF, 0x035483, 0x074B98, 0x05B0C1, 0x039770,
412  0x03A5D7, 0x039433, 0x039434, 0x0694CE, 0x0580BE, 0x03E5FF, 0x06A3EC, 0x0B616F,
413  0x0D46B1, 0x06A3D1, 0x072DE5, 0x074B6E, 0x072DE9, 0x03E700, 0x0D46B6, 0x06A3E9,
414  0x074B69, 0x0E5675, 0x0D46B8, 0x07CBAA, 0x03A5D1, 0x00000C, 0x00003C, 0x0000EB,
415  0x0001F1, 0x0003A4, 0x0006A8, 0x0007D5, 0x000D43, 0x000E77, 0x0016C5, 0x001CB1,
416  0x002C5D, 0x003A55, 0x003A56, 0x003E51, 0x003BB5, 0x005B0A, 0x006A9F, 0x0074B8,
417  0x007D28, 0x00D187, 0x00D40E, 0x00D52E, 0x00D425, 0x00EAE3, 0x00E1D3, 0x01612E,
418  0x00E59E, 0x00EEC2, 0x00E578, 0x00E51A, 0x00E579, 0x00E515, 0x00E960, 0x00D183,
419  0x00D220, 0x00D2CB, 0x00E512, 0x016C3E, 0x016002, 0x016C42, 0x01CAE9, 0x03461A,
420  0x01D2FA, 0x01A308, 0x01A849, 0x01CF07, 0x01F38F, 0x034B65, 0x02C253, 0x01EF9E,
421  0x01CBC3, 0x01CBC1, 0x02C255, 0x01F384, 0x058435, 0x02C5CD, 0x03A5F7, 0x02C252,
422  0x03959C, 0x02C6D8, 0x03A5D3, 0x06AD78, 0x06A3F2, 0x07CBA9, 0x0B6176, 0x072DEB,
423  0x039764, 0x03E5F6, 0x03A5D8, 0x074A8C, 0x06A3E6, 0x0694D1, 0x06AD79, 0x1A4592,
424  0x0E59FB, 0x07CBB3, 0x05B0CD, 0x000017, 0x0000B5, 0x0002C3, 0x0005B7, 0x000B1C,
425  0x000E5C, 0x00163F, 0x001AB2, 0x001EFA, 0x00348A, 0x00396E, 0x0058DA, 0x006963,
426  0x006A30, 0x0072CD, 0x0073CF, 0x007CE7, 0x00D2CA, 0x00D2D8, 0x00E764, 0x00E794,
427  0x016008, 0x016167, 0x01617E, 0x01AA49, 0x01A30B, 0x01A813, 0x02C6DA, 0x01A580,
428  0x01CBC2, 0x00F9CA, 0x01617F, 0x01D2FE, 0x00F7FC, 0x016C40, 0x00E513, 0x00EEC5,
429  0x00F7C3, 0x01D508, 0x01A81E, 0x01D2FD, 0x039430, 0x035486, 0x03E5FD, 0x02C24C,
430  0x02C75A, 0x034A74, 0x03A5F4, 0x03464D, 0x0694CA, 0x03A5F1, 0x01D509, 0x01D5C0,
431  0x034648, 0x03464E, 0x06A3D5, 0x06A3E8, 0x06A3E7, 0x05B0C3, 0x02C248, 0x01F38A,
432  0x03A5F2, 0x06A3E5, 0x000029, 0x000168, 0x00058C, 0x000B67, 0x000F9D, 0x001C3D,
433  0x001CBF, 0x002C20, 0x00351D, 0x003DF6, 0x006AF9, 0x0072B5, 0x00B1D7, 0x00B0B2,
434  0x00D40A, 0x00D52B, 0x00E952, 0x00E797, 0x0163C3, 0x01C3A0, 0x01F386, 0x01CA21,
435  0x034655, 0x02C247, 0x01F53B, 0x02C250, 0x02C24F, 0x01F385, 0x01EF5D, 0x01CF15,
436  0x01CAEA, 0x01AB0A, 0x01CF19, 0x01F53D, 0x01D5C2, 0x01D2FB, 0x01EF58, 0x034A78,
437  0x0357EC, 0x01F533, 0x03A5E1, 0x0694D2, 0x058482, 0x03A5EE, 0x02C6DC, 0x0357EB,
438  0x05B0C4, 0x039778, 0x06A3E1, 0x07CBB4, 0x03A5E1, 0x074B68, 0x03A5EF, 0x03A5D2,
439  0x039424, 0x072DE2, 0x0E59F6, 0x0E59F7, 0x03E702, 0x03E5EC, 0x01F38B, 0x00003B,
440  0x0001F0, 0x000777, 0x000FA8, 0x001CB2, 0x002D84, 0x003A57, 0x003DD6, 0x006917,
441  0x006A11, 0x007D07, 0x00EAE2, 0x00E796, 0x00F9C9, 0x00F7FB, 0x016166, 0x016160,
442  0x01AB1B, 0x01ABFA, 0x02D87B, 0x01D2F7, 0x039768, 0x01F38C, 0x034653, 0x034651,
443  0x06A3D9, 0x035001, 0x03ABBD, 0x038742, 0x039426, 0x034A76, 0x03A5EC, 0x034A75,
444  0x035000, 0x035488, 0x01CF10, 0x02C6DB, 0x0357ED, 0x0357E8, 0x0357E9, 0x03A5F0,
445  0x0694C2, 0x0B6178, 0x072DF5, 0x039425, 0x03942B, 0x074B6D, 0x074B6F, 0x0B6177,
446  0x0B6179, 0x074B6A, 0x0B6172, 0x058487, 0x03E5EE, 0x03E5ED, 0x072DF2, 0x072DF4,
447  0x07CBAE, 0x06A3CA, 0x070E86, 0x034BCF, 0x06A3C8, 0x000059, 0x000384, 0x000D5B,
448  0x001C38, 0x003560, 0x00395B, 0x00584E, 0x006964, 0x0073CD, 0x00B1E7, 0x00E798,
449  0x00E78D, 0x00FA43, 0x01A848, 0x01A32F, 0x01AA4E, 0x03464A, 0x01F4AB, 0x01F38D,
450  0x03A5EB, 0x03A5D4, 0x03548A, 0x06A3C7, 0x05B0D0, 0x06A3C5, 0x07CBB0, 0x0694CB,
451  0x03A5E5, 0x03E5E2, 0x03942C, 0x02D872, 0x01F4AE, 0x03A5D5, 0x0694D3, 0x058481,
452  0x035009, 0x039774, 0x058432, 0x0B616C, 0x05B0DB, 0x03548B, 0x0B6174, 0x1D5D95,
453  0x0B004C, 0x07CBB2, 0x03A5E5, 0x074A8F, 0x0E59F9, 0x072DF6, 0x0E59FD, 0x07CBAD,
454  0x0D427D, 0x072CFF, 0x03977A, 0x05B0D9, 0x0B616D, 0x0B616B, 0x1A4593, 0x07CBAF,
455  0x05B0DA, 0x000071, 0x0003EB, 0x001603, 0x002C6C, 0x003961, 0x0068C8, 0x006A31,
456  0x0072BD, 0x00D2C2, 0x00E51B, 0x00E5E6, 0x01ABFB, 0x01D2FF, 0x01CAE5, 0x01EF5C,
457  0x01EF5E, 0x01CF13, 0x034A6D, 0x03976D, 0x0B616A, 0x03E5F2, 0x06A3C4, 0x0B6169,
458  0x03E5DC, 0x0580B9, 0x074B99, 0x075764, 0x058434, 0x03A5D9, 0x06945A, 0x069459,
459  0x03548C, 0x03A5E9, 0x069457, 0x072DF1, 0x06945E, 0x06A35E, 0x03E701, 0x0B6168,
460  0x05B0DD, 0x03A5DE, 0x06A3C2, 0x0D4278, 0x06A3CC, 0x072DFD, 0x0B6165, 0x16009A,
461  0x07CBB1, 0x0D427C, 0x0B6162, 0x0E765E, 0x1CECBE, 0x07CBB6, 0x069454, 0x0B6160,
462  0x0D427A, 0x1D5D96, 0x0B1D6D, 0x0E59F4, 0x072DE8, 0x03A5DB, 0x00007A, 0x0006AE,
463  0x001C3C, 0x003ABA, 0x0058E9, 0x0072CC, 0x00D2DD, 0x00D22D, 0x00EEC1, 0x00EEDB,
464  0x01D2A2, 0x01EF5B, 0x0357E2, 0x03ABBF, 0x01D2F9, 0x035004, 0x03A5DC, 0x0351FC,
465  0x03976C, 0x06A3C6, 0x06A3CB, 0x03E5EA, 0x0E59F3, 0x06A3CE, 0x069452, 0x0E59F0,
466  0x074B90, 0x0D4279, 0x0D427B, 0x07CBB5, 0x05B0C5, 0x03A5E3, 0x03A5E2, 0x0000D0,
467  0x000775, 0x001EFE, 0x003DD5, 0x00728C, 0x007CB9, 0x00E1A2, 0x00EA85, 0x00EED8,
468  0x01A30A, 0x01AA4F, 0x03A5DF, 0x035008, 0x03A5E0, 0x03E5F4, 0x03E5F7, 0x0B1D6C,
469  0x05843E, 0x034A70, 0x072DF8, 0x074B6B, 0x0D427F, 0x072DF0, 0x05B0BF, 0x05B0C0,
470  0x0D46B0, 0x072DEF, 0x0E59F8, 0x162E64, 0x0B1D6F, 0x03A5E0, 0x039427, 0x069166,
471  0x06A3E2, 0x06A3E3, 0x074A8D, 0x0D427E, 0x1D5D97, 0x0D46B4, 0x05B0D8, 0x06A3D3,
472  0x0000E0, 0x000B63, 0x0034CC, 0x006A33, 0x0073C9, 0x00E1A0, 0x00F7FD, 0x00F9CC,
473  0x01617D, 0x01CAEB, 0x01F4A9, 0x03ABB3, 0x069450, 0x039420, 0x039777, 0x03E5E0,
474  0x06A3D4, 0x06A3ED, 0x0B6166, 0x0E59F1, 0x0B1D6E, 0x0E5676, 0x06A3EA, 0x0E5674,
475  0x0B6163, 0x0D46B7, 0x07CBA6, 0x0D46BA, 0x1D5D94, 0x0B6164, 0x06A3F1, 0x07CBA2,
476  0x069451, 0x072DFA, 0x0D46BB, 0x072DF7, 0x074B94, 0x1CECBF, 0x0E59FA, 0x16009B,
477  0x06A3E4, 0x0000E6, 0x000E94, 0x003876, 0x0070EF, 0x00D52A, 0x016015, 0x016014,
478  0x01ABF9, 0x01CF17, 0x034A79, 0x034650, 0x03E705, 0x06A3D0, 0x058430, 0x074B9D,
479  0x07BE7E, 0x05B0BE, 0x039773, 0x06A3DE, 0x0000FB, 0x000F7B, 0x003DD7, 0x007BD0,
480  0x00E59C, 0x00F9CD, 0x01CF18, 0x01D2FF, 0x034A7A, 0x039429, 0x03500C, 0x072DE0,
481  0x069456, 0x07BE7C, 0x0D46B5, 0x0D46B2, 0x06A3DD, 0x0001A2, 0x00163B, 0x006913,
482  0x00B016, 0x00FA42, 0x01A32D, 0x01CF06, 0x034A7C, 0x034A7D, 0x0B6161, 0x035481,
483  0x03E5FA, 0x07CBA0, 0x07BE7F, 0x07CBA3, 0x07CBA7, 0x05B0D3, 0x072DE6, 0x06A3DC,
484  0x0001A9, 0x001AB4, 0x006A34, 0x00D46A, 0x016130, 0x01EF5F, 0x01F532, 0x01F536,
485  0x03942E, 0x058436, 0x06A3DB, 0x06945B, 0x0001C9, 0x001CA0, 0x00728B, 0x00EED9,
486  0x01F539, 0x01CA1D, 0x039765, 0x039766, 0x058439, 0x06945D, 0x039767, 0x0001D3,
487  0x001F2C, 0x007BFC, 0x016161, 0x034652, 0x03A5ED, 0x03548D, 0x058438, 0x06A3DA,
488  0x0002C1, 0x002C5E, 0x00D335, 0x01AB1A, 0x02D874, 0x035006, 0x035484, 0x05B0CC,
489  0x074B9A, 0x072DF3, 0x06A3D6, 0x0002DA, 0x0034B3, 0x00D5AE, 0x01CAEE, 0x02D871,
490  0x0357E3, 0x074B97, 0x072DF9, 0x0580BA, 0x05B0D4, 0x00034D, 0x00354E, 0x00F750,
491  0x01CBC0, 0x03A5E7, 0x03A5E4, 0x000385, 0x003A58, 0x016C41, 0x02C5CF, 0x03E5E1,
492  0x074B6C, 0x0E5677, 0x06A3DF, 0x000390, 0x003E50, 0x0163C2, 0x02D876, 0x035482,
493  0x05B0D6, 0x05843A, 0x00039F, 0x00585E, 0x01A583, 0x03500F, 0x074B93, 0x039771,
494  0x0003E4, 0x006912, 0x016C43, 0x0357E1, 0x00058A, 0x00696F, 0x01F538, 0x05B0C9,
495  0x06A3CF, 0x0005B6, 0x006AF8, 0x01F534, 0x058483, 0x06A3E0, 0x000695, 0x007D02,
496  0x01CAE8, 0x058485, 0x0006A2, 0x00754A, 0x0357EE, 0x03977B, 0x000748, 0x0074B2,
497  0x034A7B, 0x000729, 0x00B1E0, 0x034649, 0x03E5E3, 0x00073D, 0x00D2C4, 0x03E5E6,
498  0x0007BB, 0x00B099, 0x039762, 0x05B0CE, 0x06945F, 0x0007D1, 0x00D5AB, 0x039779,
499  0x0007D3, 0x00D52F, 0x039763, 0x06945C, 0x000B1A, 0x00D2C5, 0x035489, 0x000D23,
500  0x00EAED, 0x03E5F8, 0x000D32, 0x016016, 0x03E5FB, 0x000D41, 0x00E768, 0x03A5ED,
501  0x000E1F, 0x016017, 0x058027, 0x000EAD, 0x00FA07, 0x069455, 0x000E54, 0x01612B,
502  0x000E55, 0x01A581, 0x000F78, 0x01A32B, 0x0580BC, 0x06A3EE, 0x000F79, 0x01ABFD,
503  0x000F95, 0x01AB18, 0x06A3F0, 0x001637, 0x01AA4D, 0x00162D, 0x01F53C, 0x06A3F3,
504  0x001A31, 0x01A810, 0x039769, 0x001A50, 0x01CAEF, 0x001A36, 0x01A32E, 0x001A67,
505  0x01F38E, 0x001A85, 0x01EF59, 0x001AA6, 0x01EF83, 0x001D51, 0x02C012, 0x001D53,
506  0x02D879, 0x001D5E, 0x035005, 0x001CBA, 0x01CF04, 0x069453, 0x001D2D, 0x0351FF,
507  0x001F2D, 0x02D86F, 0x001F29, 0x035007, 0x002C22, 0x0351FA, 0x002C03, 0x03A5EC,
508  0x002C5F, 0x03A5EB, 0x002C58, 0x034A6B, 0x003469, 0x0356BE, 0x002C59, 0x034A6C,
509  0x00346A, 0x03A5EA, 0x0034BD, 0x0034BF, 0x0356BF, 0x00386A, 0x003AB9, 0x05843F,
510  0x00386B, 0x03A5F5, 0x003A4B, 0x039421, 0x003AA4, 0x03A5E9, 0x003A5A, 0x003960,
511  0x03977E, 0x003DE9, 0x003958, 0x003DF7, 0x0039E1, 0x03E5E4, 0x00395F, 0x069458,
512  0x003E91, 0x003DF2, 0x039428, 0x0058F2, 0x003E80, 0x06A3C3, 0x003E93, 0x0694C0,
513  0x0058B8, 0x05B0CA, 0x00584F, 0x0694C1, 0x0058F1, 0x0068D6, 0x006A10, 0x006AC3,
514  0x006A32, 0x0070D2, 0x006911, 0x0074B1, 0x007494, 0x006AD4, 0x006AD6, 0x0072B8,
515  0x006AFA, 0x0074B3, 0x007540, 0x0073CE, 0x00B005, 0x0074B3, 0x007495, 0x0074B9,
516  0x00D336, 0x007BFF, 0x007763, 0x0073C8, 0x007D29, 0x00B622, 0x00D221, 0x00D181,
517  0x00B1D1, 0x0074B8, 0x00B1D0, 0x00D19B, 0x00D2C3, 0x00B172, 0x00D2DC, 0x00B623,
518  0x00D5AA, 0x00D426, 0x00D182, 0x00E795, 0x00E1D1, 0x00D337, 0x00E96C, 0x00E5E4,
519  0x00E514, 0x00EAEE, 0x016000, 0x00E767, 0x00E1A1, 0x00E78F, 0x016004, 0x00F7C2,
520  0x00E799, 0x00E5E7, 0x00E566, 0x00E769, 0x00F751, 0x00EEDE, 0x00FA06, 0x016005,
521  0x00FA9F, 0x01A5E6, 0x00E766, 0x01636F, 0x00EEDD, 0x00EEC0, 0x01A309, 0x01CECA,
522  0x0163CD, 0x00F9CB, 0x00EEDF, 0x01A582, 0x01612D, 0x00E5E5, 0x01ABF8, 0x01A30C,
523  0x01CA1F, 0x0163CC, 0x01A35C, 0x01CA1E, 0x01AA51, 0x0163AC, 0x01A84E, 0x01A53F,
524  0x01CF16, 0x01D2FC, 0x01A5B3, 0x01AB19, 0x01A81F, 0x01D5C3, 0x016C3F, 0x01D5C1,
525  0x01D2FC, 0x01F4AA, 0x01A812, 0x01F535, 0x01CF12, 0x01A817, 0x01617C, 0x01AB0B,
526  0x01D2F8, 0x01EF82, 0x02D87A, 0x01D52F, 0x01F530, 0x01AA48, 0x035487, 0x01D2FD,
527  0x01F4AD, 0x01CF11, 0x03461B, 0x035485, 0x01CA20, 0x01CAED, 0x01CAE6, 0x01ABFF,
528  0x03464F, 0x034A6F, 0x01EF81, 0x03464B, 0x039D96, 0x01F383, 0x01F537, 0x01CF14,
529  0x02C5CE, 0x03500E, 0x02C251, 0x01CAEC, 0x01F387, 0x034654, 0x0357E4, 0x02D878,
530  0x03500B, 0x035480, 0x03A5E8, 0x03548E, 0x034B64, 0x01F4A8, 0x035003, 0x03E5DF,
531  0x02D870, 0x0357E6, 0x03E5F0, 0x01EF5A, 0x03A5EA, 0x01F388, 0x03E703, 0x02C24E,
532  0x03A5E2, 0x0351FD, 0x02C6DD, 0x03E704, 0x0351FE, 0x02D875, 0x05B0C7, 0x03976A,
533  0x03A5E6, 0x039423, 0x058480, 0x02C246, 0x03A5E3, 0x02D877, 0x03E5F1, 0x03ABBE,
534  0x058489, 0x03E5F9, 0x0357E0, 0x03ABBC, 0x05B0C6, 0x069167, 0x069165, 0x03E5E9,
535  0x039422, 0x03976F, 0x03977D, 0x03E5DE, 0x06A3C9, 0x058B98, 0x03A5F6, 0x03A5D0,
536  0x058486, 0x06A3C1, 0x03E5FC, 0x05B0DC, 0x03548F, 0x03942D, 0x0694C9, 0x058484,
537  0x03A5E8, 0x074B9B, 0x074B96, 0x0694D0, 0x058488, 0x03A5E4, 0x03942A, 0x072EC2,
538  0x039776, 0x05B0D1, 0x05B0CF, 0x03A5D6, 0x0E59FC, 0x05B0C8, 0x03E5E7, 0x07CBB7,
539  0x070E87, 0x07CBAB, 0x05B0C2, 0x0694C3, 0x074A8E, 0x03E5F3, 0x06A3CD, 0x072DFE,
540  0x073B2E, 0x072EC0, 0x0694C5, 0x058437, 0x0694C8, 0x072DFF, 0x039435, 0x05843D,
541  0x06A3D7, 0x072EC1, 0x0D22C8, 0x0694CF, 0x0B6173, 0x03E5FE, 0x0580BB, 0x0E59F2,
542  0x0B616E, 0x0B6175, 0x03A5DA, 0x05B0BD, 0x0694CC, 0x05843C, 0x0694C7, 0x074B92,
543  0x072EC3, 0x0694C6, 0x0B6170, 0x07CBAC, 0x0B1733, 0x07CBA4, 0x0B6167, 0x072DE7,
544  0x072DE4, 0x06A3C0, 0x03E5EF, 0x162E65, 0x072DE3, 0x072DFB, 0x06A35F, 0x06A3EB
545 };
546 
547 static const uint8 coef2Huffbits[1336] = {
548  11, 9, 2, 3, 4, 4, 5, 6,
549  6, 7, 7, 8, 8, 8, 9, 9,
550  9, 9, 10, 10, 10, 10, 11, 11,
551  11, 11, 11, 11, 11, 12, 12, 12,
552  12, 12, 12, 12, 12, 12, 13, 13,
553  13, 13, 13, 13, 13, 13, 13, 14,
554  14, 14, 14, 14, 14, 14, 14, 14,
555  14, 14, 14, 14, 14, 15, 15, 15,
556  15, 15, 15, 15, 15, 15, 15, 15,
557  15, 15, 15, 15, 15, 16, 15, 16,
558  16, 16, 16, 16, 16, 16, 16, 16,
559  16, 16, 16, 16, 16, 16, 16, 16,
560  17, 17, 17, 17, 17, 17, 17, 17,
561  17, 17, 17, 18, 17, 17, 17, 17,
562  17, 17, 17, 18, 18, 17, 17, 18,
563  17, 17, 18, 17, 18, 18, 18, 18,
564  19, 18, 18, 18, 18, 18, 18, 20,
565  18, 18, 18, 19, 19, 18, 19, 18,
566  19, 19, 18, 19, 19, 18, 19, 19,
567  19, 19, 18, 19, 19, 19, 19, 19,
568  19, 19, 20, 20, 20, 19, 19, 20,
569  19, 20, 19, 19, 20, 19, 19, 20,
570  20, 20, 20, 19, 20, 21, 19, 3,
571  5, 7, 8, 9, 9, 10, 11, 11,
572  12, 12, 12, 13, 13, 13, 13, 14,
573  14, 14, 14, 15, 15, 15, 15, 15,
574  15, 15, 15, 15, 15, 15, 16, 16,
575  15, 15, 15, 15, 16, 16, 16, 16,
576  17, 16, 17, 17, 16, 17, 17, 17,
577  17, 17, 17, 16, 17, 17, 17, 17,
578  18, 17, 17, 18, 18, 18, 18, 18,
579  19, 18, 18, 18, 18, 18, 18, 19,
580  19, 18, 18, 18, 18, 19, 18, 19,
581  19, 19, 20, 19, 18, 19, 19, 19,
582  19, 19, 19, 19, 19, 19, 19, 20,
583  20, 19, 20, 19, 20, 19, 20, 19,
584  19, 21, 20, 20, 19, 4, 7, 8,
585  10, 11, 11, 12, 12, 13, 13, 14,
586  14, 14, 14, 15, 15, 15, 15, 15,
587  16, 16, 16, 16, 16, 16, 16, 17,
588  17, 17, 17, 17, 17, 17, 16, 16,
589  16, 16, 17, 17, 17, 17, 18, 18,
590  18, 17, 17, 18, 18, 18, 18, 18,
591  18, 18, 18, 18, 19, 18, 18, 18,
592  19, 18, 19, 19, 19, 20, 20, 20,
593  19, 19, 19, 19, 19, 19, 19, 21,
594  21, 20, 19, 5, 8, 10, 11, 12,
595  13, 13, 13, 14, 14, 15, 15, 15,
596  15, 16, 16, 16, 16, 16, 17, 17,
597  17, 17, 17, 17, 17, 17, 18, 17,
598  18, 17, 17, 17, 17, 17, 17, 17,
599  17, 17, 17, 17, 19, 18, 19, 18,
600  18, 18, 18, 18, 19, 18, 17, 17,
601  18, 18, 19, 19, 19, 19, 18, 18,
602  18, 19, 6, 9, 11, 12, 13, 13,
603  14, 14, 14, 15, 15, 16, 16, 16,
604  16, 16, 16, 17, 17, 17, 18, 18,
605  18, 18, 18, 18, 18, 18, 18, 18,
606  18, 17, 18, 18, 17, 18, 18, 18,
607  18, 18, 18, 19, 19, 18, 18, 18,
608  19, 19, 19, 20, 19, 19, 18, 19,
609  19, 20, 21, 21, 19, 19, 18, 6,
610  10, 12, 13, 14, 14, 14, 15, 15,
611  15, 16, 16, 17, 17, 17, 17, 17,
612  17, 17, 18, 18, 19, 18, 18, 18,
613  19, 18, 18, 18, 19, 18, 18, 18,
614  18, 18, 18, 18, 18, 18, 18, 18,
615  19, 20, 20, 19, 19, 19, 19, 20,
616  20, 19, 20, 19, 19, 19, 20, 20,
617  20, 19, 19, 18, 19, 7, 10, 12,
618  13, 14, 15, 15, 15, 16, 16, 17,
619  17, 17, 17, 17, 17, 18, 18, 18,
620  18, 19, 18, 19, 19, 19, 20, 19,
621  18, 19, 19, 18, 18, 19, 19, 19,
622  18, 19, 19, 20, 19, 18, 20, 21,
623  20, 20, 19, 19, 21, 20, 21, 20,
624  20, 20, 19, 19, 20, 20, 21, 20,
625  19, 7, 11, 13, 14, 15, 15, 15,
626  16, 16, 17, 17, 17, 17, 18, 18,
627  18, 18, 18, 19, 20, 19, 19, 20,
628  19, 19, 19, 19, 19, 19, 19, 19,
629  18, 18, 19, 20, 19, 19, 19, 20,
630  19, 19, 19, 20, 19, 20, 20, 21,
631  20, 20, 20, 21, 22, 20, 19, 20,
632  20, 21, 20, 21, 20, 19, 8, 11,
633  13, 14, 15, 16, 16, 16, 17, 17,
634  17, 18, 18, 18, 18, 18, 19, 18,
635  19, 19, 19, 19, 21, 19, 19, 21,
636  19, 20, 20, 20, 19, 18, 18, 8,
637  12, 14, 15, 16, 16, 16, 16, 17,
638  17, 17, 19, 18, 18, 19, 19, 20,
639  19, 18, 20, 19, 20, 20, 19, 19,
640  20, 20, 21, 21, 20, 19, 19, 19,
641  19, 19, 19, 20, 21, 20, 19, 19,
642  8, 12, 14, 15, 16, 16, 17, 17,
643  17, 18, 18, 18, 19, 19, 19, 19,
644  19, 19, 20, 21, 20, 21, 19, 21,
645  20, 20, 20, 20, 21, 20, 19, 20,
646  19, 20, 20, 20, 19, 22, 21, 21,
647  19, 9, 12, 14, 15, 16, 17, 17,
648  17, 18, 18, 18, 19, 19, 19, 19,
649  20, 19, 19, 19, 9, 13, 15, 16,
650  17, 17, 18, 18, 18, 19, 18, 20,
651  19, 20, 20, 20, 19, 9, 13, 15,
652  16, 17, 17, 18, 18, 18, 20, 18,
653  19, 20, 20, 20, 20, 19, 20, 19,
654  9, 13, 15, 16, 17, 18, 18, 18,
655  19, 19, 19, 19, 10, 14, 16, 17,
656  18, 18, 19, 19, 19, 19, 19, 10,
657  14, 16, 17, 18, 18, 18, 19, 19,
658  10, 14, 16, 17, 18, 18, 18, 19,
659  19, 20, 19, 10, 14, 16, 18, 18,
660  18, 19, 20, 19, 19, 10, 14, 17,
661  18, 18, 18, 10, 15, 17, 18, 19,
662  19, 21, 19, 11, 15, 17, 18, 18,
663  19, 19, 11, 15, 17, 18, 19, 19,
664  11, 15, 17, 18, 11, 15, 18, 19,
665  19, 11, 15, 18, 19, 19, 11, 16,
666  18, 19, 11, 15, 18, 19, 11, 16,
667  18, 12, 16, 18, 19, 12, 16, 19,
668  12, 16, 19, 19, 19, 12, 16, 19,
669  12, 16, 19, 19, 12, 16, 18, 12,
670  16, 19, 12, 17, 19, 12, 17, 19,
671  12, 17, 19, 12, 17, 19, 13, 17,
672  13, 17, 13, 17, 19, 19, 13, 17,
673  13, 17, 19, 13, 17, 13, 18, 19,
674  13, 17, 19, 13, 18, 13, 17, 13,
675  18, 13, 18, 13, 18, 13, 18, 13,
676  18, 13, 18, 14, 18, 19, 14, 18,
677  14, 18, 14, 18, 14, 18, 14, 19,
678  14, 19, 14, 18, 14, 18, 14, 18,
679  14, 19, 14, 14, 18, 14, 14, 19,
680  14, 18, 14, 19, 14, 19, 14, 15,
681  19, 15, 15, 15, 15, 19, 15, 19,
682  15, 15, 19, 15, 15, 19, 15, 19,
683  15, 19, 15, 19, 15, 15, 15, 15,
684  15, 15, 15, 15, 15, 15, 15, 16,
685  15, 15, 15, 16, 16, 16, 15, 16,
686  16, 16, 16, 16, 16, 16, 16, 16,
687  16, 16, 16, 16, 16, 16, 16, 16,
688  16, 16, 16, 17, 16, 16, 16, 17,
689  17, 16, 17, 17, 16, 17, 17, 17,
690  17, 17, 17, 17, 17, 17, 17, 17,
691  17, 17, 17, 17, 17, 17, 17, 18,
692  17, 17, 17, 17, 17, 17, 17, 17,
693  18, 17, 17, 18, 17, 17, 17, 17,
694  18, 18, 17, 17, 17, 17, 17, 17,
695  17, 18, 17, 18, 18, 17, 17, 17,
696  18, 18, 18, 17, 18, 17, 18, 18,
697  18, 18, 18, 18, 18, 18, 18, 17,
698  18, 18, 18, 18, 19, 18, 18, 18,
699  18, 18, 18, 18, 18, 18, 18, 18,
700  18, 18, 18, 18, 18, 18, 18, 19,
701  18, 18, 19, 18, 18, 18, 19, 18,
702  19, 18, 18, 19, 18, 18, 19, 19,
703  19, 19, 19, 18, 19, 18, 19, 18,
704  19, 19, 18, 18, 19, 19, 19, 19,
705  19, 19, 19, 19, 19, 19, 18, 19,
706  19, 19, 19, 19, 18, 19, 19, 19,
707  19, 19, 19, 19, 19, 19, 19, 20,
708  19, 19, 19, 19, 21, 19, 19, 20,
709  19, 20, 19, 19, 19, 19, 19, 20,
710  20, 20, 19, 19, 19, 20, 19, 19,
711  19, 20, 20, 19, 20, 19, 19, 21,
712  20, 20, 19, 19, 19, 19, 19, 19,
713  20, 19, 20, 20, 20, 20, 20, 20,
714  20, 19, 19, 21, 20, 20, 19, 19
715 };
716 
717 static const uint32 coef3Huffcodes[1072] = {
718  0x001B2, 0x00069, 0x00000, 0x00004, 0x00006, 0x0000E, 0x00014, 0x00019,
719  0x00016, 0x0002B, 0x00030, 0x0003D, 0x0003C, 0x0005A, 0x0005F, 0x0006D,
720  0x0007E, 0x0005F, 0x0007F, 0x000B6, 0x000BC, 0x000D8, 0x000F2, 0x000FE,
721  0x000BC, 0x000FC, 0x00161, 0x0016E, 0x00174, 0x00176, 0x001A2, 0x001E3,
722  0x001F3, 0x00174, 0x0017A, 0x001EA, 0x002A8, 0x002C4, 0x002E6, 0x00314,
723  0x00346, 0x00367, 0x003E9, 0x002E5, 0x002EE, 0x003D6, 0x00555, 0x00554,
724  0x00557, 0x005C3, 0x005D6, 0x006E0, 0x0062F, 0x006E2, 0x00799, 0x00789,
725  0x007FA, 0x005CE, 0x007FE, 0x005EC, 0x007CC, 0x007AF, 0x00AA7, 0x00B19,
726  0x00B94, 0x00B85, 0x00B9F, 0x00C48, 0x00C45, 0x00DD8, 0x00C4C, 0x00C4B,
727  0x00D99, 0x00D1F, 0x00DC2, 0x00F95, 0x00FA2, 0x00BB5, 0x00B9F, 0x00F5D,
728  0x00BBF, 0x00F47, 0x0154A, 0x00FD5, 0x00F45, 0x00F7F, 0x0160D, 0x01889,
729  0x01757, 0x01722, 0x018B3, 0x0172D, 0x01A39, 0x01A18, 0x01BB3, 0x01B30,
730  0x01E63, 0x0173C, 0x01B35, 0x01723, 0x01E80, 0x01FEE, 0x01761, 0x01FFC,
731  0x01F7F, 0x02C7C, 0x01FA1, 0x0177B, 0x01755, 0x0175A, 0x01FA6, 0x02EAB,
732  0x0310A, 0x02C69, 0x03669, 0x03127, 0x03103, 0x02E43, 0x03662, 0x03165,
733  0x03124, 0x0313B, 0x03111, 0x03668, 0x0343B, 0x03C52, 0x03EFC, 0x02E6C,
734  0x03FDA, 0x03EF8, 0x02E7B, 0x03EE2, 0x03CC5, 0x03D72, 0x058C0, 0x03DF8,
735  0x02EA9, 0x03E7E, 0x0556D, 0x05C82, 0x03D71, 0x03E7B, 0x03C42, 0x058D7,
736  0x03F4E, 0x06200, 0x03D70, 0x05CB2, 0x05C96, 0x05CB0, 0x03F45, 0x05CB1,
737  0x02E6D, 0x03110, 0x02F68, 0x05C90, 0x07CA6, 0x07C88, 0x06204, 0x062C8,
738  0x078A6, 0x07986, 0x079D5, 0x0B1AD, 0x07989, 0x0B079, 0x05CDD, 0x0AAD4,
739  0x05DE8, 0x07DCD, 0x07987, 0x05D67, 0x05D99, 0x0B91D, 0x07CF1, 0x05D9B,
740  0x079D7, 0x0B07B, 0x05C85, 0x05D9A, 0x07DCC, 0x07EBF, 0x07DCE, 0x07DFB,
741  0x07EC0, 0x07D1A, 0x07A07, 0x05C84, 0x0C471, 0x07CF2, 0x0BAEF, 0x0B9D2,
742  0x05DEB, 0x07BD6, 0x0B845, 0x05D98, 0x0B91A, 0x0BAE8, 0x0C4E0, 0x0DC31,
743  0x0F93D, 0x0BBCE, 0x0D1D2, 0x0F7A9, 0x0D9B9, 0x0BBCB, 0x0B900, 0x0AAD7,
744  0x0BABD, 0x0C4E1, 0x0F46F, 0x0C588, 0x0C58B, 0x160E6, 0x0BBCF, 0x0BAC3,
745  0x0F945, 0x0F7A3, 0x0D1C1, 0x0FB8E, 0x0F7A4, 0x0FB8C, 0x0F40C, 0x0C473,
746  0x0FD72, 0x0BBCD, 0x0FFFA, 0x0F940, 0x0BBC9, 0x0F7A8, 0x1A1ED, 0x0BBC5,
747  0x1F26F, 0x163FD, 0x160C7, 0x1A1F5, 0x0F947, 0x163FC, 0x154B3, 0x0FFF6,
748  0x163F6, 0x160E9, 0x1A1F0, 0x0BAB9, 0x0BABA, 0x17086, 0x0B903, 0x0FD75,
749  0x0F308, 0x176F3, 0x163FF, 0x0FD7D, 0x1BB78, 0x163FB, 0x188DB, 0x1A1F7,
750  0x154B2, 0x172FD, 0x163F4, 0x1BB73, 0x172FF, 0x0BABC, 0x0F97D, 0x1A1F3,
751  0x1BB6D, 0x1FFD5, 0x1A1F4, 0x1F272, 0x17380, 0x17382, 0x1FFE7, 0x0BAC8,
752  0x0BBC4, 0x188D3, 0x160E0, 0x0FD7B, 0x1725F, 0x172F5, 0x1BB79, 0x1FAD9,
753  0x1F269, 0x188D0, 0x0BAC4, 0x0BAC5, 0x31185, 0x188D2, 0x188CC, 0x31187,
754  0x3E7FE, 0x188D1, 0x1BB6C, 0x1F268, 0x1FAD2, 0x1FFD9, 0x1A1EA, 0x1BB68,
755  0x1FACB, 0x3FDB2, 0x1E81A, 0x188CE, 0x172FB, 0x1A1EF, 0x1FACE, 0x1BB70,
756  0x0BAC1, 0x1BB6B, 0x172F8, 0x1BB66, 0x1FFDF, 0x1BB6A, 0x1FFD7, 0x1F266,
757  0x176F8, 0x37653, 0x1FA7E, 0x31182, 0x1FAC8, 0x2C7E3, 0x370EE, 0x176EC,
758  0x176E9, 0x2E4BC, 0x160C5, 0x3765A, 0x3CE9C, 0x17373, 0x176E8, 0x188D4,
759  0x176F1, 0x176EF, 0x37659, 0x1BB7C, 0x1FFDE, 0x176F2, 0x3118B, 0x2C7D4,
760  0x37651, 0x5CE9F, 0x37650, 0x31191, 0x3F4F6, 0x3F4F5, 0x7A06C, 0x1FAC1,
761  0x5C97B, 0x2C7E0, 0x79D3A, 0x3E7FD, 0x2C7DF, 0x3F4F0, 0x7A06D, 0x376C1,
762  0x79D3B, 0x00004, 0x00014, 0x00059, 0x000AB, 0x000B8, 0x00177, 0x001F5,
763  0x001F2, 0x00315, 0x003FC, 0x005BD, 0x0062D, 0x006E8, 0x007DD, 0x00B04,
764  0x007CD, 0x00B1E, 0x00D1E, 0x00F15, 0x00F3B, 0x00F41, 0x01548, 0x018B0,
765  0x0173B, 0x01884, 0x01A1C, 0x01BB4, 0x01F25, 0x017B5, 0x0176D, 0x01EF8,
766  0x02E73, 0x03107, 0x03125, 0x03105, 0x02E49, 0x03CE8, 0x03EF9, 0x03E5E,
767  0x02E72, 0x03471, 0x03FD9, 0x0623F, 0x078A0, 0x06867, 0x05CB3, 0x06272,
768  0x068EC, 0x06E9A, 0x079D4, 0x06E98, 0x0B1AA, 0x06E1A, 0x07985, 0x068EE,
769  0x06E9B, 0x05C88, 0x0B1AC, 0x07DFA, 0x05D65, 0x07CF0, 0x07CBF, 0x0C475,
770  0x160EB, 0x1BB7E, 0x0F7A6, 0x1FEDD, 0x160E3, 0x0FFFB, 0x0FB8D, 0x0FFF9,
771  0x0D1C0, 0x0C58C, 0x1A1E9, 0x0BAB8, 0x0F5CF, 0x0FFF5, 0x376C5, 0x1A1EC,
772  0x160ED, 0x1FEDE, 0x1FAC9, 0x1A1EB, 0x1F224, 0x176EE, 0x0FD79, 0x17080,
773  0x17387, 0x1BB7A, 0x1FFE9, 0x176F7, 0x17385, 0x17781, 0x2C7D5, 0x17785,
774  0x1FFE3, 0x163F5, 0x1FAC2, 0x3E7F9, 0x3118D, 0x3FDB1, 0x1FFE2, 0x1F226,
775  0x3118A, 0x2C7D9, 0x31190, 0x3118C, 0x3F4F3, 0x1BB7F, 0x1BB72, 0x31184,
776  0xB92F4, 0x3E7FB, 0x6E1D9, 0x1FACA, 0x62300, 0x3FDB8, 0x3D037, 0x3E7FC,
777  0x62301, 0x3F4F2, 0x1F26A, 0x0000E, 0x00063, 0x000F8, 0x001EE, 0x00377,
778  0x003F7, 0x006E3, 0x005CC, 0x00B05, 0x00DD2, 0x00FD4, 0x0172E, 0x0172A,
779  0x01E23, 0x01F2D, 0x01763, 0x01769, 0x0176C, 0x02E75, 0x03104, 0x02EC1,
780  0x03E58, 0x0583F, 0x03F62, 0x03F44, 0x058C5, 0x0623C, 0x05CF4, 0x07BD7,
781  0x05D9D, 0x0AAD2, 0x05D66, 0x0B1A9, 0x0B078, 0x07CFE, 0x0B918, 0x0C46F,
782  0x0B919, 0x0B847, 0x06E1B, 0x0B84B, 0x0AAD8, 0x0FD74, 0x172F4, 0x17081,
783  0x0F97C, 0x1F273, 0x0F7A0, 0x0FD7C, 0x172F7, 0x0FD7A, 0x1BB77, 0x172FE,
784  0x1F270, 0x0FD73, 0x1BB7B, 0x1A1BC, 0x1BB7D, 0x0BBC3, 0x172F6, 0x0BAEB,
785  0x0FB8F, 0x3F4F4, 0x3FDB4, 0x376C8, 0x3E7FA, 0x1FFD0, 0x62303, 0xB92F5,
786  0x1F261, 0x31189, 0x3FDB5, 0x2C7DB, 0x376C9, 0x1FAD6, 0x1FAD1, 0x00015,
787  0x000F0, 0x002E0, 0x0058E, 0x005D7, 0x00C4D, 0x00FA1, 0x00BDB, 0x01756,
788  0x01F70, 0x02C19, 0x0313C, 0x0370F, 0x03CC0, 0x02EA8, 0x058C6, 0x058C7,
789  0x02EB7, 0x058D0, 0x07D18, 0x0AA58, 0x0B848, 0x05D9E, 0x05D6C, 0x0B84C,
790  0x0C589, 0x0B901, 0x163F8, 0x0BAC9, 0x0B9C5, 0x0F93C, 0x188D8, 0x0BBC7,
791  0x160EC, 0x0FD6F, 0x188D9, 0x160EA, 0x0F7A7, 0x0F944, 0x0BAAB, 0x0DC3A,
792  0x188CF, 0x176FB, 0x2C7D8, 0x2C7D7, 0x1BB75, 0x5CE9E, 0x62302, 0x370ED,
793  0x176F4, 0x1FFD1, 0x370EF, 0x3F4F8, 0x376C7, 0x1FFE1, 0x376C6, 0x176FF,
794  0x6E1D8, 0x176F6, 0x17087, 0x0F5CD, 0x00035, 0x001A0, 0x0058B, 0x00AAC,
795  0x00B9A, 0x0175F, 0x01E22, 0x01E8C, 0x01FB2, 0x0310B, 0x058D1, 0x0552E,
796  0x05C27, 0x0686E, 0x07CA7, 0x0C474, 0x0DC33, 0x07BF2, 0x05DE9, 0x07A35,
797  0x0BAAA, 0x0B9EB, 0x0FB95, 0x0B9B8, 0x17381, 0x1F262, 0x188CD, 0x17088,
798  0x172FA, 0x0F7A2, 0x1FAD3, 0x0BAC0, 0x3765C, 0x1FEDF, 0x1F225, 0x1FAD4,
799  0x2C7DA, 0x5CE9D, 0x3E7F8, 0x1E203, 0x188D7, 0x00054, 0x002C0, 0x007A1,
800  0x00F78, 0x01B36, 0x01FA3, 0x0313A, 0x03436, 0x0343A, 0x07D1D, 0x07BD8,
801  0x05CDF, 0x0B846, 0x0B189, 0x0D9B8, 0x0FFF8, 0x0D9BE, 0x0C58A, 0x05DEA,
802  0x0D1D3, 0x160E4, 0x1F26B, 0x188DA, 0x1E202, 0x2C7D2, 0x163FE, 0x31193,
803  0x17782, 0x376C2, 0x2C7D1, 0x3FDB0, 0x3765D, 0x2C7D0, 0x1FAD0, 0x1E201,
804  0x188DD, 0x2C7E2, 0x37657, 0x37655, 0x376C4, 0x376C0, 0x176EA, 0x0006F,
805  0x003CF, 0x00DD5, 0x01F23, 0x02C61, 0x02ED0, 0x05D54, 0x0552D, 0x07883,
806  0x0B1A8, 0x0B91C, 0x0BABF, 0x0B902, 0x0F7AA, 0x0F7A5, 0x1A1E8, 0x1FFD6,
807  0x0BABE, 0x1A1BF, 0x163F3, 0x1FFD8, 0x1FAD7, 0x1F275, 0x1FFDC, 0x0007D,
808  0x005BC, 0x01549, 0x02A99, 0x03DEF, 0x06273, 0x079D6, 0x07D1B, 0x0AAD3,
809  0x0D0FC, 0x2C7DD, 0x188D6, 0x0BAC2, 0x2C7E1, 0x1BB76, 0x1A1BD, 0x31186,
810  0x0FD78, 0x1A1BE, 0x31183, 0x3FDB6, 0x3F4F1, 0x37652, 0x1FAD5, 0x3F4F9,
811  0x3E7FF, 0x5CE9C, 0x3765B, 0x31188, 0x17372, 0x000BD, 0x0078B, 0x01F21,
812  0x03C43, 0x03DED, 0x0AAD6, 0x07EC1, 0x0F942, 0x05C86, 0x17089, 0x0BABB,
813  0x1FFE8, 0x2C7DE, 0x1F26E, 0x1FAC4, 0x3F4F7, 0x37656, 0x1FA7D, 0x376C3,
814  0x3FDB3, 0x3118F, 0x1FAC6, 0x000F8, 0x007ED, 0x01EFD, 0x03E7A, 0x05C91,
815  0x0AAD9, 0x0BAEC, 0x0DC32, 0x0F46E, 0x1E200, 0x176FA, 0x3765E, 0x3FDB7,
816  0x2C7D6, 0x3FDB9, 0x37654, 0x37658, 0x3118E, 0x1FFDB, 0x000F6, 0x00C43,
817  0x03106, 0x068EF, 0x0B84D, 0x0B188, 0x0BBCC, 0x1F264, 0x1BB69, 0x17386,
818  0x1FAC0, 0x00171, 0x00F39, 0x03E41, 0x068ED, 0x0D9BC, 0x0F7A1, 0x1BB67,
819  0x1FFDD, 0x176F9, 0x001B9, 0x00F7D, 0x03F63, 0x0D0FD, 0x0B9EA, 0x188DC,
820  0x1FAC3, 0x1A1F2, 0x31192, 0x1FFE4, 0x001F6, 0x01754, 0x06865, 0x0F309,
821  0x160E5, 0x176F5, 0x3765F, 0x1FACC, 0x001E9, 0x01A1A, 0x06201, 0x0F105,
822  0x176F0, 0x002DF, 0x01756, 0x05D6D, 0x163FA, 0x176ED, 0x00342, 0x02E40,
823  0x0D0FF, 0x17082, 0x003CD, 0x02A98, 0x0FFFC, 0x2C7DC, 0x1FA7F, 0x003FE,
824  0x03764, 0x0FFFD, 0x176FC, 0x1FAC5, 0x002F7, 0x02ED1, 0x0FB97, 0x0058A,
825  0x02EDC, 0x0BBC8, 0x005D4, 0x0623D, 0x160E8, 0x0062E, 0x05830, 0x163F9,
826  0x006EB, 0x06205, 0x1F274, 0x007DE, 0x062C9, 0x1F265, 0x005C9, 0x05CDE,
827  0x1FFD3, 0x005D4, 0x07988, 0x007CE, 0x0B849, 0x00B1B, 0x05C89, 0x1FAC7,
828  0x00B93, 0x05C83, 0x00B9E, 0x0F14F, 0x00C4A, 0x0B9C7, 0x00DD4, 0x0C470,
829  0x1F271, 0x00F38, 0x0FB96, 0x176EB, 0x00FA0, 0x163F7, 0x00BB2, 0x0B91B,
830  0x00BBE, 0x0F102, 0x00F44, 0x0F946, 0x1FACD, 0x00F79, 0x0D9BD, 0x0154D,
831  0x0BBC6, 0x00FD2, 0x160E7, 0x0172B, 0x188CB, 0x0175E, 0x0FD76, 0x0175C,
832  0x1BB71, 0x0189F, 0x1A1EE, 0x01F24, 0x1A1F6, 0x01BA7, 0x0BBCA, 0x01F7D,
833  0x0FFFF, 0x01F2E, 0x1BB65, 0x01BB5, 0x172F9, 0x01FEF, 0x1F26C, 0x01F3E,
834  0x0FD77, 0x01762, 0x1BB6E, 0x01EF9, 0x172FC, 0x01FA0, 0x02AB7, 0x02E4A,
835  0x1F267, 0x01FB3, 0x1FFDA, 0x02E42, 0x03101, 0x17780, 0x0313D, 0x03475,
836  0x17784, 0x03126, 0x1FACF, 0x03C51, 0x17783, 0x03E40, 0x1FFE5, 0x03663,
837  0x1FFE0, 0x03E8F, 0x1F26D, 0x0343C, 0x03CC1, 0x176FD, 0x03E45, 0x02EC0,
838  0x03F61, 0x03DEE, 0x03FD8, 0x0583E, 0x02E45, 0x03E59, 0x03D02, 0x05CE8,
839  0x05568, 0x176FE, 0x02F69, 0x1FAD8, 0x058C1, 0x05C83, 0x1FFE6, 0x06271,
840  0x06E1C, 0x062C7, 0x068E1, 0x0552F, 0x06864, 0x06866, 0x06E99, 0x05CBC,
841  0x07CA5, 0x078A1, 0x05C82, 0x07DCF, 0x0623B, 0x0623E, 0x068E8, 0x07A36,
842  0x05D9C, 0x0B077, 0x07CF3, 0x07A34, 0x07CA4, 0x07D19, 0x079D2, 0x07D1C,
843  0x07BD9, 0x0B84A, 0x0FB94, 0x0AAD5, 0x0DC30, 0x07BF3, 0x0BAEE, 0x0B07A,
844  0x0C472, 0x0B91E, 0x0D9BA, 0x05D9F, 0x0D0FE, 0x0B9C6, 0x05C87, 0x0F14E,
845  0x0BAED, 0x0B92E, 0x0F103, 0x0B9C4, 0x0FB91, 0x0D9BB, 0x0B1AB, 0x0C58D,
846  0x0FFFE, 0x0F93B, 0x0F941, 0x0BAEA, 0x0B91F, 0x0F5CC, 0x0D9BF, 0x0F943,
847  0x0F104, 0x1F260, 0x0FB92, 0x0F93F, 0x0F3A6, 0x0BAC7, 0x0F7AB, 0x0BAC6,
848  0x17383, 0x0FD6D, 0x0BAE9, 0x0FD6E, 0x1E74F, 0x188CA, 0x1F227, 0x0FB93,
849  0x0FB90, 0x0FFF7, 0x17085, 0x17083, 0x160E1, 0x17084, 0x0F93E, 0x160E2,
850  0x160C6, 0x1A1F1, 0x1BB6F, 0x17384, 0x0FD70, 0x1F263, 0x188D5, 0x173A6,
851  0x0F5CE, 0x163F2, 0x0FD71, 0x1FFD2, 0x160C4, 0x1FFD4, 0x2C7D3, 0x1BB74
852 };
853 
854 static const uint8 coef3Huffbits[1072] = {
855  9, 7, 2, 3, 4, 4, 5, 5,
856  6, 6, 6, 6, 7, 7, 7, 7,
857  7, 8, 8, 8, 8, 8, 8, 8,
858  9, 9, 9, 9, 9, 9, 9, 9,
859  9, 10, 10, 10, 10, 10, 10, 10,
860  10, 10, 10, 11, 11, 11, 11, 11,
861  11, 11, 11, 11, 11, 11, 11, 11,
862  11, 12, 11, 12, 12, 12, 12, 12,
863  12, 12, 12, 12, 12, 12, 12, 12,
864  12, 12, 12, 12, 12, 13, 13, 13,
865  13, 13, 13, 13, 13, 13, 13, 13,
866  13, 13, 13, 13, 13, 13, 13, 13,
867  13, 14, 13, 14, 14, 13, 14, 13,
868  13, 14, 14, 14, 14, 14, 14, 14,
869  14, 14, 14, 14, 14, 14, 14, 14,
870  14, 14, 14, 14, 14, 14, 14, 15,
871  14, 14, 15, 14, 14, 15, 15, 15,
872  15, 15, 15, 15, 15, 15, 14, 15,
873  15, 15, 15, 15, 15, 15, 15, 15,
874  15, 14, 15, 15, 15, 15, 15, 15,
875  15, 15, 15, 16, 15, 16, 16, 16,
876  16, 15, 15, 16, 16, 16, 16, 16,
877  15, 16, 16, 16, 15, 16, 15, 15,
878  16, 15, 16, 16, 16, 16, 16, 16,
879  16, 16, 16, 16, 16, 16, 16, 16,
880  16, 17, 16, 17, 16, 17, 17, 16,
881  17, 16, 17, 16, 16, 17, 17, 17,
882  16, 17, 16, 16, 17, 16, 17, 16,
883  17, 17, 16, 16, 17, 17, 17, 17,
884  17, 17, 17, 17, 16, 17, 17, 16,
885  17, 17, 17, 17, 17, 17, 17, 17,
886  16, 18, 17, 17, 17, 17, 17, 17,
887  17, 17, 17, 17, 17, 17, 16, 17,
888  17, 17, 17, 17, 17, 17, 17, 17,
889  17, 17, 17, 17, 17, 17, 17, 18,
890  17, 17, 17, 17, 18, 17, 17, 18,
891  19, 17, 17, 17, 18, 17, 17, 17,
892  18, 18, 18, 17, 17, 17, 18, 17,
893  17, 17, 17, 17, 17, 17, 17, 17,
894  18, 18, 18, 18, 18, 18, 18, 18,
895  18, 18, 17, 18, 18, 18, 18, 17,
896  18, 18, 18, 17, 17, 18, 18, 18,
897  18, 19, 18, 18, 19, 19, 20, 18,
898  19, 18, 19, 19, 18, 19, 20, 18,
899  19, 4, 6, 7, 8, 9, 9, 9,
900  10, 10, 10, 11, 11, 11, 11, 12,
901  12, 12, 12, 12, 12, 13, 13, 13,
902  13, 13, 13, 13, 13, 14, 14, 14,
903  14, 14, 14, 14, 14, 14, 14, 14,
904  14, 14, 14, 15, 15, 15, 15, 15,
905  15, 15, 15, 15, 16, 15, 15, 15,
906  15, 16, 16, 15, 16, 16, 15, 16,
907  17, 17, 17, 17, 17, 16, 16, 16,
908  16, 16, 17, 17, 17, 16, 18, 17,
909  17, 17, 18, 17, 17, 18, 17, 17,
910  17, 17, 17, 18, 17, 18, 18, 18,
911  17, 17, 18, 19, 18, 18, 17, 17,
912  18, 18, 18, 18, 19, 17, 17, 18,
913  20, 19, 19, 18, 19, 18, 19, 19,
914  19, 19, 17, 5, 7, 9, 10, 10,
915  11, 11, 12, 12, 12, 13, 13, 13,
916  13, 13, 14, 14, 14, 14, 14, 15,
917  14, 15, 15, 15, 15, 15, 16, 16,
918  16, 16, 16, 16, 16, 16, 16, 16,
919  16, 16, 15, 16, 16, 17, 17, 17,
920  16, 17, 17, 17, 17, 17, 17, 17,
921  17, 17, 17, 17, 17, 17, 17, 16,
922  16, 19, 18, 18, 19, 17, 19, 20,
923  17, 18, 18, 18, 18, 18, 18, 6,
924  8, 10, 11, 12, 12, 12, 13, 13,
925  13, 14, 14, 14, 14, 15, 15, 15,
926  15, 15, 15, 16, 16, 16, 16, 16,
927  16, 17, 17, 17, 16, 16, 17, 17,
928  17, 17, 17, 17, 17, 16, 16, 16,
929  17, 18, 18, 18, 17, 19, 19, 18,
930  18, 17, 18, 19, 18, 17, 18, 18,
931  19, 18, 17, 17, 6, 9, 11, 12,
932  13, 13, 13, 14, 14, 14, 15, 15,
933  15, 15, 15, 16, 16, 16, 16, 16,
934  16, 17, 16, 17, 17, 17, 17, 17,
935  17, 17, 18, 17, 18, 17, 17, 18,
936  18, 19, 19, 17, 17, 7, 10, 12,
937  13, 13, 14, 14, 14, 14, 15, 16,
938  16, 16, 16, 16, 16, 16, 16, 16,
939  16, 17, 17, 17, 17, 18, 17, 18,
940  18, 18, 18, 18, 18, 18, 18, 17,
941  17, 18, 18, 18, 18, 18, 18, 7,
942  10, 12, 13, 14, 15, 15, 15, 15,
943  16, 16, 17, 17, 17, 17, 17, 17,
944  17, 17, 17, 17, 18, 17, 17, 8,
945  11, 13, 14, 15, 15, 15, 15, 16,
946  16, 18, 17, 17, 18, 17, 17, 18,
947  17, 17, 18, 18, 19, 18, 18, 19,
948  19, 19, 18, 18, 18, 8, 11, 13,
949  14, 15, 16, 16, 16, 16, 17, 17,
950  17, 18, 17, 18, 19, 18, 18, 18,
951  18, 18, 18, 8, 12, 14, 15, 15,
952  16, 16, 16, 17, 17, 18, 18, 18,
953  18, 18, 18, 18, 18, 17, 9, 12,
954  14, 15, 16, 16, 17, 17, 17, 17,
955  18, 9, 12, 14, 15, 16, 17, 17,
956  17, 18, 9, 13, 15, 16, 17, 17,
957  18, 17, 18, 17, 9, 13, 15, 16,
958  17, 18, 18, 18, 10, 13, 15, 16,
959  18, 10, 14, 16, 17, 18, 10, 14,
960  16, 17, 10, 14, 16, 18, 18, 10,
961  14, 16, 18, 18, 11, 15, 16, 11,
962  15, 17, 11, 15, 17, 11, 15, 17,
963  11, 15, 17, 11, 15, 17, 12, 16,
964  17, 12, 15, 12, 16, 12, 16, 18,
965  12, 16, 12, 16, 12, 16, 12, 16,
966  17, 12, 16, 18, 12, 17, 13, 16,
967  13, 16, 13, 16, 18, 13, 16, 13,
968  17, 13, 17, 13, 17, 13, 17, 13,
969  17, 13, 17, 13, 17, 13, 17, 13,
970  16, 13, 17, 13, 17, 13, 17, 14,
971  17, 14, 17, 14, 17, 14, 14, 14,
972  17, 14, 17, 14, 14, 18, 14, 14,
973  18, 14, 18, 14, 18, 14, 17, 14,
974  17, 14, 17, 14, 14, 18, 14, 15,
975  15, 15, 14, 15, 15, 14, 15, 15,
976  15, 18, 15, 18, 15, 15, 17, 15,
977  15, 15, 15, 15, 15, 15, 15, 15,
978  15, 15, 16, 15, 15, 15, 15, 16,
979  16, 16, 16, 16, 15, 15, 15, 15,
980  16, 16, 16, 16, 16, 16, 16, 16,
981  16, 16, 16, 16, 16, 16, 16, 16,
982  16, 16, 16, 16, 16, 16, 16, 16,
983  16, 16, 16, 16, 16, 17, 16, 16,
984  16, 17, 16, 16, 16, 17, 17, 17,
985  17, 17, 16, 17, 17, 17, 17, 16,
986  16, 16, 17, 17, 17, 17, 16, 17,
987  17, 17, 17, 17, 17, 17, 17, 17,
988  17, 17, 17, 17, 17, 17, 18, 17
989 };
990 
991 static const uint32 coef4Huffcodes[476] = {
992  0x00F01, 0x0001E, 0x00000, 0x00004, 0x00006, 0x0000D, 0x0000A, 0x00017,
993  0x0001D, 0x00017, 0x0002C, 0x00031, 0x00039, 0x0003E, 0x00039, 0x0005A,
994  0x00066, 0x00070, 0x0007B, 0x00070, 0x00077, 0x000AF, 0x000C9, 0x000F2,
995  0x000F4, 0x000B2, 0x000E3, 0x0015B, 0x0015D, 0x00181, 0x0019D, 0x001E3,
996  0x001C5, 0x002B5, 0x002DB, 0x00338, 0x003C3, 0x003CC, 0x003F0, 0x002CD,
997  0x003FA, 0x003A1, 0x005B4, 0x00657, 0x007AB, 0x0074D, 0x0074C, 0x00AC1,
998  0x00AC5, 0x0076B, 0x00CA8, 0x00F04, 0x00F00, 0x00FE3, 0x00F3C, 0x00F10,
999  0x00F39, 0x00FE6, 0x00E26, 0x00E90, 0x016C5, 0x01827, 0x01954, 0x015C5,
1000  0x01958, 0x01F8A, 0x01C4A, 0x02B0F, 0x02B41, 0x02B0E, 0x033C6, 0x03050,
1001  0x01C4F, 0x02D88, 0x0305C, 0x03C18, 0x02B4F, 0x02CC2, 0x03A47, 0x05680,
1002  0x0569D, 0x06442, 0x06443, 0x06446, 0x0656E, 0x06444, 0x07120, 0x0748A,
1003  0x0C1BA, 0x07E22, 0x07AA6, 0x07F25, 0x07AA7, 0x07E20, 0x0C11B, 0x0C118,
1004  0x07AA5, 0x0AD0A, 0x0F389, 0x19EBB, 0x0CAAD, 0x0FE42, 0x0FE40, 0x16C34,
1005  0x2B4E5, 0x33D65, 0x16C30, 0x1E7AE, 0x1E25C, 0x18370, 0x1E703, 0x19EBA,
1006  0x16C37, 0x0E234, 0x16C6E, 0x00004, 0x0002A, 0x00061, 0x00075, 0x000CB,
1007  0x000FF, 0x00190, 0x001EB, 0x001D1, 0x002B9, 0x00307, 0x00339, 0x0033F,
1008  0x003FB, 0x003B4, 0x0060C, 0x00679, 0x00645, 0x0067D, 0x0078A, 0x007E3,
1009  0x00749, 0x00AC4, 0x00AD2, 0x00AE3, 0x00C10, 0x00C16, 0x00AD1, 0x00CF4,
1010  0x00FE2, 0x01586, 0x00E9D, 0x019F1, 0x01664, 0x01E26, 0x01D38, 0x02B4D,
1011  0x033C5, 0x01FC2, 0x01FC3, 0x01D28, 0x03C1D, 0x0598E, 0x0F094, 0x07AA4,
1012  0x0AD38, 0x0AC0C, 0x0C11A, 0x079EA, 0x0C881, 0x0FE44, 0x0B635, 0x0AC0D,
1013  0x0B61E, 0x05987, 0x07121, 0x0F382, 0x0F387, 0x0E237, 0x0FE47, 0x0F383,
1014  0x0F091, 0x0F385, 0x0E233, 0x182EE, 0x19EB8, 0x1663E, 0x0F093, 0x00014,
1015  0x00058, 0x00159, 0x00167, 0x00300, 0x003D4, 0x005B5, 0x0079D, 0x0076A,
1016  0x00B67, 0x00B60, 0x00F05, 0x00CF0, 0x00F17, 0x00E95, 0x01822, 0x01913,
1017  0x016C2, 0x0182F, 0x01959, 0x01FCB, 0x01E27, 0x01C40, 0x033C7, 0x01E7B,
1018  0x01C49, 0x02D89, 0x01E23, 0x01660, 0x03F12, 0x02CC6, 0x033E1, 0x05B34,
1019  0x0609A, 0x06569, 0x07488, 0x07E21, 0x0CF5F, 0x0712C, 0x0389D, 0x067CF,
1020  0x07F28, 0x1663F, 0x33D67, 0x1663D, 0x1E25D, 0x3C1AB, 0x15C44, 0x16C36,
1021  0x0001F, 0x000EC, 0x00323, 0x005B2, 0x0079F, 0x00AC2, 0x00F16, 0x00E9E,
1022  0x01956, 0x01E0F, 0x019EA, 0x01666, 0x02B89, 0x02B02, 0x02D8C, 0x03C1B,
1023  0x03C19, 0x032B5, 0x03F9C, 0x02CCF, 0x03897, 0x05B35, 0x0AD02, 0x07F29,
1024  0x06441, 0x03884, 0x07888, 0x0784E, 0x06568, 0x0C1BB, 0x05986, 0x067CC,
1025  0x0FE49, 0x0FE48, 0x0C1BC, 0x0FE41, 0x18371, 0x1663C, 0x0E231, 0x0711E,
1026  0x0AD09, 0x0F092, 0x0002D, 0x001DB, 0x00781, 0x00C1A, 0x00F55, 0x01580,
1027  0x01EA8, 0x02D9B, 0x032AF, 0x03F16, 0x03C1C, 0x07834, 0x03C45, 0x0389C,
1028  0x067CE, 0x06445, 0x0C1B9, 0x07889, 0x07F3A, 0x0784F, 0x07F2B, 0x0AD0B,
1029  0x0F090, 0x0C11D, 0x0E94E, 0x0711F, 0x0E9F1, 0x0F38E, 0x079E9, 0x0AD03,
1030  0x0F09B, 0x0CAAE, 0x0FE46, 0x2B4E6, 0x0E9F0, 0x19EB6, 0x67AC1, 0x67AC0,
1031  0x33D66, 0x0F388, 0x00071, 0x003A0, 0x00CA9, 0x01829, 0x01D39, 0x02B43,
1032  0x02CC4, 0x06554, 0x0F09A, 0x0B61F, 0x067CD, 0x0711C, 0x0B636, 0x07F2A,
1033  0x0B634, 0x0C11F, 0x0CF5E, 0x0B61D, 0x0F06B, 0x0CAAB, 0x0C1BE, 0x0E94C,
1034  0x0F099, 0x182ED, 0x0E94F, 0x0C119, 0x0E232, 0x2B4E4, 0x0F38A, 0x19EB4,
1035  0x1E25F, 0x0E94D, 0x000B7, 0x00785, 0x016CC, 0x03051, 0x033C4, 0x0656F,
1036  0x03891, 0x0711D, 0x0CAAF, 0x0F097, 0x07489, 0x0F098, 0x0C880, 0x0CAAA,
1037  0x0F386, 0x19EB7, 0x16C6F, 0x0F384, 0x182E8, 0x182E9, 0x0E230, 0x1E700,
1038  0x33D62, 0x33D63, 0x33D64, 0x16C33, 0x0E216, 0x000FD, 0x00C15, 0x01665,
1039  0x03C4A, 0x07F3B, 0x07896, 0x0C11C, 0x0E215, 0x16C32, 0x0F38B, 0x0F38D,
1040  0x182EA, 0x1E701, 0x712DF, 0x15C46, 0x00194, 0x00FE0, 0x03F13, 0x0748B,
1041  0x0F096, 0x0CF80, 0x1E25E, 0xE25BD, 0x33D61, 0x16C31, 0x001F9, 0x01912,
1042  0x05710, 0x0F3D0, 0x0C1BF, 0x00301, 0x01E24, 0x0AD08, 0x003CD, 0x01C41,
1043  0x0C1BD, 0x00563, 0x03A52, 0x0F3D1, 0x00570, 0x02CCE, 0x0E217, 0x0067B,
1044  0x0655D, 0x0074B, 0x06447, 0x00C12, 0x074FB, 0x00F08, 0x0B61C, 0x00E22,
1045  0x0FE43, 0x016C7, 0x01836, 0x019F2, 0x01C43, 0x01D3F, 0x01FCF, 0x02B4C,
1046  0x0304C, 0x032B6, 0x03A46, 0x05607, 0x03F17, 0x02CC5, 0x0609B, 0x0655C,
1047  0x07E23, 0x067C1, 0x07F26, 0x07F27, 0x0F095, 0x0E9F3, 0x0CF81, 0x0C11E,
1048  0x0CAAC, 0x0F38F, 0x0E9F2, 0x074FA, 0x0E236, 0x0FE45, 0x1C428, 0x0E235,
1049  0x182EF, 0x19EB5, 0x0F3D6, 0x182EC, 0x16C35, 0x0F38C, 0x2B4E7, 0x15C47,
1050  0xE25BC, 0x1E702, 0x1C4B6, 0x0E25A, 0x3C1AA, 0x15C45, 0x1C429, 0x19EB9,
1051  0x1E7AF, 0x182EB, 0x1E0D4, 0x3896E
1052 };
1053 
1054 static const uint8 coef4Huffbits[476] = {
1055  12, 6, 2, 3, 4, 4, 5, 5,
1056  5, 6, 6, 6, 6, 6, 7, 7,
1057  7, 7, 7, 8, 8, 8, 8, 8,
1058  8, 9, 9, 9, 9, 9, 9, 9,
1059  10, 10, 10, 10, 10, 10, 10, 11,
1060  10, 11, 11, 11, 11, 12, 12, 12,
1061  12, 12, 12, 12, 12, 12, 12, 12,
1062  12, 12, 13, 13, 13, 13, 13, 13,
1063  13, 13, 14, 14, 14, 14, 14, 14,
1064  14, 14, 14, 14, 14, 15, 15, 15,
1065  15, 15, 15, 15, 15, 15, 16, 16,
1066  16, 15, 15, 15, 15, 15, 16, 16,
1067  15, 16, 16, 17, 16, 16, 16, 17,
1068  18, 18, 17, 17, 17, 17, 17, 17,
1069  17, 17, 17, 4, 6, 7, 8, 8,
1070  8, 9, 9, 10, 10, 10, 10, 10,
1071  10, 11, 11, 11, 11, 11, 11, 11,
1072  12, 12, 12, 12, 12, 12, 12, 12,
1073  12, 13, 13, 13, 14, 13, 14, 14,
1074  14, 13, 13, 14, 14, 16, 16, 15,
1075  16, 16, 16, 15, 16, 16, 16, 16,
1076  16, 16, 16, 16, 16, 17, 16, 16,
1077  16, 16, 17, 17, 17, 18, 16, 5,
1078  8, 9, 10, 10, 10, 11, 11, 12,
1079  12, 12, 12, 12, 12, 13, 13, 13,
1080  13, 13, 13, 13, 13, 14, 14, 13,
1081  14, 14, 13, 14, 14, 15, 14, 15,
1082  15, 15, 16, 15, 16, 16, 15, 15,
1083  15, 18, 18, 18, 17, 18, 17, 17,
1084  6, 9, 10, 11, 11, 12, 12, 13,
1085  13, 13, 13, 14, 14, 14, 14, 14,
1086  14, 14, 14, 15, 15, 15, 16, 15,
1087  15, 15, 15, 15, 15, 16, 16, 15,
1088  16, 16, 16, 16, 17, 18, 17, 16,
1089  16, 16, 7, 10, 11, 12, 12, 13,
1090  13, 14, 14, 14, 14, 15, 14, 15,
1091  15, 15, 16, 15, 15, 15, 15, 16,
1092  16, 16, 17, 16, 17, 16, 15, 16,
1093  16, 16, 16, 18, 17, 17, 19, 19,
1094  18, 16, 7, 11, 12, 13, 14, 14,
1095  15, 15, 16, 16, 15, 16, 16, 15,
1096  16, 16, 16, 16, 16, 16, 16, 17,
1097  16, 17, 17, 16, 17, 18, 16, 17,
1098  17, 17, 8, 11, 13, 14, 14, 15,
1099  15, 16, 16, 16, 16, 16, 16, 16,
1100  16, 17, 17, 16, 17, 17, 17, 17,
1101  18, 18, 18, 17, 17, 8, 12, 14,
1102  14, 15, 15, 16, 17, 17, 16, 16,
1103  17, 17, 20, 17, 9, 12, 14, 16,
1104  16, 16, 17, 21, 18, 17, 9, 13,
1105  15, 16, 16, 10, 13, 16, 10, 14,
1106  16, 11, 15, 16, 11, 15, 17, 11,
1107  15, 12, 15, 12, 16, 12, 16, 13,
1108  16, 13, 13, 13, 14, 14, 13, 14,
1109  14, 14, 15, 15, 14, 15, 15, 15,
1110  15, 15, 15, 15, 16, 17, 16, 16,
1111  16, 16, 17, 16, 17, 16, 18, 17,
1112  17, 17, 16, 17, 17, 16, 18, 17,
1113  21, 17, 18, 17, 18, 17, 18, 17,
1114  17, 17, 17, 19
1115 };
1116 
1117 static const uint32 coef5Huffcodes[435] = {
1118  0x00347, 0x0000B, 0x00001, 0x00001, 0x0000C, 0x00004, 0x00010, 0x00015,
1119  0x0001F, 0x0000B, 0x00023, 0x00026, 0x00029, 0x00035, 0x00037, 0x00001,
1120  0x00015, 0x0001A, 0x0001D, 0x0001C, 0x0001E, 0x0004E, 0x00049, 0x00051,
1121  0x00078, 0x00004, 0x00000, 0x00008, 0x0000D, 0x0007B, 0x00005, 0x00032,
1122  0x00095, 0x00091, 0x00096, 0x000A1, 0x000D9, 0x00003, 0x00019, 0x00061,
1123  0x00066, 0x00060, 0x00017, 0x0000E, 0x00063, 0x001A0, 0x001B7, 0x001E6,
1124  0x001E7, 0x001B6, 0x00018, 0x001E8, 0x00038, 0x00031, 0x00005, 0x0003D,
1125  0x00027, 0x001EA, 0x0001A, 0x000C5, 0x000F9, 0x000FF, 0x000DB, 0x00250,
1126  0x000FC, 0x0025C, 0x00008, 0x00075, 0x003D7, 0x003D3, 0x001B0, 0x0007C,
1127  0x003CA, 0x00036, 0x00189, 0x004A6, 0x004A2, 0x004FB, 0x000C0, 0x0007F,
1128  0x0009A, 0x00311, 0x0006E, 0x0009B, 0x0068C, 0x006C0, 0x00484, 0x00012,
1129  0x000C3, 0x0094F, 0x00979, 0x009F9, 0x00D09, 0x00DA6, 0x00DA8, 0x00901,
1130  0x000C1, 0x00373, 0x00D08, 0x009FA, 0x00D8B, 0x00D85, 0x00D86, 0x000DF,
1131  0x006E2, 0x000CE, 0x00F24, 0x009FE, 0x001F7, 0x007C1, 0x000CF, 0x009FC,
1132  0x009FF, 0x00D89, 0x00DA9, 0x009FD, 0x001F8, 0x01A36, 0x0128C, 0x0129D,
1133  0x01A37, 0x00196, 0x003EA, 0x00F8B, 0x00D93, 0x01E45, 0x01E58, 0x01E4B,
1134  0x01E59, 0x013F1, 0x00309, 0x00265, 0x00308, 0x0243A, 0x027E1, 0x00F89,
1135  0x00324, 0x03CBC, 0x03C86, 0x03695, 0x0243C, 0x0243B, 0x0243E, 0x01E4A,
1136  0x003A5, 0x03468, 0x03428, 0x03C84, 0x027E0, 0x025E2, 0x01880, 0x00197,
1137  0x00325, 0x03CB7, 0x0791E, 0x007EC, 0x06C75, 0x004C8, 0x04BC7, 0x004C6,
1138  0x00983, 0x0481E, 0x01B53, 0x0251B, 0x01B58, 0x00984, 0x04FA8, 0x03CBB,
1139  0x00F8A, 0x00322, 0x0346A, 0x0243D, 0x00326, 0x03469, 0x0481F, 0x0481D,
1140  0x00746, 0x09032, 0x01B50, 0x01D13, 0x0D8E4, 0x0481B, 0x06C74, 0x0796B,
1141  0x07969, 0x00985, 0x0D8E3, 0x00986, 0x00FA2, 0x01301, 0x06C7C, 0x00987,
1142  0x03CB8, 0x0F4AF, 0x00E88, 0x1B1C0, 0x00FCE, 0x033EB, 0x03F6A, 0x03F69,
1143  0x00FCF, 0x0791F, 0x004C9, 0x04871, 0x00FCD, 0x00982, 0x00FCC, 0x00FA3,
1144  0x01D12, 0x0796C, 0x01B47, 0x00321, 0x0796A, 0x0D8E2, 0x04872, 0x04873,
1145  0x0000E, 0x00014, 0x0000A, 0x000A0, 0x00012, 0x0007D, 0x001A2, 0x0003B,
1146  0x0025F, 0x000DD, 0x0027C, 0x00343, 0x00368, 0x0036B, 0x0003E, 0x001FA,
1147  0x00485, 0x001B3, 0x0007F, 0x001B1, 0x0019E, 0x004BA, 0x007AD, 0x00339,
1148  0x00066, 0x007A4, 0x00793, 0x006C6, 0x0007E, 0x000F1, 0x00372, 0x009FB,
1149  0x00D83, 0x00D8A, 0x00947, 0x009F4, 0x001D0, 0x01B09, 0x01B4B, 0x007EC,
1150  0x003E1, 0x000CA, 0x003EC, 0x02539, 0x04FA9, 0x01B57, 0x03429, 0x03D2A,
1151  0x00D97, 0x003A7, 0x00DC0, 0x00D96, 0x00DC1, 0x007EB, 0x03CBA, 0x00C43,
1152  0x00C41, 0x01B52, 0x007EF, 0x00323, 0x03CB9, 0x03C83, 0x007D0, 0x007ED,
1153  0x06C7F, 0x09033, 0x03F6C, 0x36383, 0x1E95D, 0x06C78, 0x00747, 0x01B51,
1154  0x00022, 0x00016, 0x00039, 0x00252, 0x00079, 0x00486, 0x00338, 0x00369,
1155  0x00D88, 0x00026, 0x00D87, 0x00F4B, 0x00D82, 0x00027, 0x001E1, 0x01A15,
1156  0x007C7, 0x012F0, 0x001E0, 0x006D0, 0x01A16, 0x01E44, 0x01E5F, 0x03690,
1157  0x00D90, 0x00C42, 0x00DAF, 0x00D92, 0x00F80, 0x00CFB, 0x0342F, 0x0487F,
1158  0x01B46, 0x07968, 0x00D95, 0x00D91, 0x01B55, 0x03F68, 0x04BC6, 0x03CBD,
1159  0x00F81, 0x00320, 0x00069, 0x000FE, 0x006D5, 0x0033F, 0x000DE, 0x007C6,
1160  0x01E40, 0x00D94, 0x00F88, 0x03C8E, 0x03694, 0x00DAE, 0x00DAD, 0x00267,
1161  0x003A6, 0x00327, 0x0487E, 0x007EE, 0x00749, 0x004C7, 0x03692, 0x01B56,
1162  0x00FD1, 0x07A56, 0x06C77, 0x09031, 0x00748, 0x06C7A, 0x0796D, 0x033EA,
1163  0x06C76, 0x00FD0, 0x36382, 0x1E417, 0x00745, 0x04FAF, 0x0D8E1, 0x03F6B,
1164  0x1E95C, 0x04FAD, 0x0009E, 0x004BD, 0x0067C, 0x01B08, 0x003EB, 0x01B45,
1165  0x03691, 0x0D8E5, 0x07904, 0x00981, 0x007EA, 0x019F4, 0x06C7D, 0x04FAB,
1166  0x04FAC, 0x06C7E, 0x01300, 0x06C7B, 0x0006F, 0x003F7, 0x03C85, 0x004C4,
1167  0x0001E, 0x006E1, 0x03693, 0x01B44, 0x00241, 0x01E46, 0x0019D, 0x00266,
1168  0x004BB, 0x02538, 0x007AC, 0x01B54, 0x00902, 0x04870, 0x00DA7, 0x00900,
1169  0x00185, 0x06C79, 0x006E3, 0x003E9, 0x01E94, 0x003ED, 0x003F2, 0x0342E,
1170  0x0346B, 0x0251A, 0x004C5, 0x01881, 0x0481C, 0x01B59, 0x03C87, 0x04FAE,
1171  0x007E9, 0x03F6D, 0x0F20A, 0x09030, 0x04FAA, 0x0D8E6, 0x03F6F, 0x0481A,
1172  0x03F6E, 0x1E416, 0x0D8E7
1173 };
1174 
1175 static const uint8 coef5Huffbits[435] = {
1176  10, 4, 2, 4, 4, 5, 5, 5,
1177  5, 6, 6, 6, 6, 6, 6, 7,
1178  7, 7, 7, 7, 7, 7, 7, 7,
1179  7, 8, 8, 8, 8, 7, 8, 8,
1180  8, 8, 8, 8, 8, 9, 9, 9,
1181  9, 9, 9, 9, 9, 9, 9, 9,
1182  9, 9, 10, 9, 10, 10, 10, 10,
1183  10, 9, 10, 10, 10, 10, 10, 10,
1184  10, 10, 11, 11, 10, 10, 11, 11,
1185  10, 11, 11, 11, 11, 11, 12, 12,
1186  12, 12, 12, 12, 11, 11, 11, 12,
1187  12, 12, 12, 12, 12, 12, 12, 12,
1188  12, 12, 12, 12, 12, 12, 12, 13,
1189  13, 13, 12, 12, 13, 13, 13, 12,
1190  12, 12, 12, 12, 13, 13, 13, 13,
1191  13, 14, 14, 14, 14, 13, 13, 13,
1192  13, 13, 14, 14, 14, 14, 14, 14,
1193  15, 14, 14, 14, 14, 14, 14, 13,
1194  14, 14, 14, 14, 14, 14, 15, 14,
1195  15, 14, 15, 15, 15, 15, 15, 15,
1196  16, 15, 15, 14, 15, 16, 15, 14,
1197  14, 15, 14, 14, 15, 14, 15, 15,
1198  15, 16, 15, 17, 16, 15, 15, 15,
1199  15, 16, 16, 16, 16, 17, 15, 16,
1200  14, 16, 16, 17, 16, 16, 16, 16,
1201  16, 15, 15, 15, 16, 16, 16, 16,
1202  17, 15, 15, 15, 15, 16, 15, 15,
1203  4, 7, 8, 8, 9, 9, 9, 10,
1204  10, 10, 10, 10, 10, 10, 11, 11,
1205  11, 11, 11, 11, 11, 11, 11, 12,
1206  12, 11, 11, 11, 12, 12, 12, 12,
1207  12, 12, 12, 12, 13, 13, 13, 13,
1208  12, 13, 14, 14, 15, 15, 14, 14,
1209  14, 14, 14, 14, 14, 15, 14, 14,
1210  14, 15, 15, 15, 14, 14, 15, 15,
1211  15, 16, 16, 18, 17, 15, 15, 15,
1212  6, 9, 10, 10, 11, 11, 12, 12,
1213  12, 13, 12, 12, 12, 13, 13, 13,
1214  13, 13, 13, 13, 13, 13, 13, 14,
1215  14, 14, 14, 14, 14, 14, 14, 15,
1216  15, 15, 14, 14, 15, 16, 15, 14,
1217  14, 15, 7, 10, 11, 12, 13, 13,
1218  13, 14, 14, 14, 14, 14, 14, 14,
1219  14, 15, 15, 15, 15, 15, 14, 15,
1220  16, 15, 15, 16, 15, 15, 15, 16,
1221  15, 16, 18, 17, 15, 15, 16, 16,
1222  17, 15, 8, 11, 13, 13, 14, 15,
1223  14, 16, 15, 16, 15, 15, 15, 15,
1224  15, 15, 17, 15, 9, 12, 14, 15,
1225  10, 13, 14, 15, 10, 13, 11, 14,
1226  11, 14, 11, 15, 12, 15, 12, 12,
1227  13, 15, 13, 14, 13, 14, 14, 14,
1228  14, 14, 15, 15, 15, 15, 14, 15,
1229  15, 16, 16, 16, 15, 16, 16, 15,
1230  16, 17, 16
1231 };
1232 
1233 static const uint16 levels0[60] = {
1234  317, 92, 62, 60, 19, 17, 10, 7,
1235  6, 5, 5, 3, 3, 3, 2, 2,
1236  2, 2, 2, 2, 2, 1, 2, 2,
1237  1, 1, 1, 1, 1, 1, 1, 1,
1238  1, 1, 1, 1, 1, 1, 1, 1,
1239  1, 1, 1, 1, 1, 1, 1, 1,
1240  1, 1, 1, 1, 1, 1, 1, 1,
1241  1, 1, 1, 1
1242 };
1243 
1244 static const uint16 levels1[40] = {
1245  311, 91, 61, 28, 10, 6, 5, 2,
1246  2, 2, 2, 2, 2, 2, 2, 1,
1247  1, 1, 1, 1, 1, 1, 1, 1,
1248  1, 1, 1, 1, 1, 1, 1, 1,
1249  1, 1, 1, 1, 1, 1, 1, 1
1250 };
1251 
1252 static const uint16 levels2[340] = {
1253  181, 110, 78, 63, 61, 62, 60, 61,
1254  33, 41, 41, 19, 17, 19, 12, 11,
1255  9, 11, 10, 6, 8, 7, 6, 4,
1256  5, 5, 4, 4, 3, 4, 3, 5,
1257  3, 4, 3, 3, 3, 3, 3, 3,
1258  2, 2, 4, 2, 3, 2, 3, 3,
1259  2, 2, 2, 2, 2, 2, 2, 2,
1260  3, 2, 2, 2, 2, 2, 2, 2,
1261  2, 2, 2, 1, 2, 1, 2, 2,
1262  2, 2, 1, 2, 1, 1, 1, 2,
1263  2, 1, 2, 1, 2, 2, 2, 2,
1264  1, 1, 1, 1, 1, 1, 1, 1,
1265  1, 1, 1, 1, 1, 1, 1, 1,
1266  1, 1, 1, 1, 1, 1, 1, 1,
1267  1, 1, 1, 1, 1, 1, 1, 1,
1268  1, 1, 1, 1, 1, 1, 1, 1,
1269  1, 1, 1, 1, 1, 1, 1, 1,
1270  1, 1, 1, 1, 1, 1, 1, 1,
1271  1, 1, 1, 1, 1, 1, 1, 1,
1272  1, 1, 1, 1, 1, 1, 1, 1,
1273  1, 1, 1, 1, 1, 1, 1, 1,
1274  1, 1, 1, 1, 1, 1, 1, 1,
1275  1, 1, 1, 1, 1, 1, 1, 1,
1276  1, 1, 1, 1, 1, 1, 1, 1,
1277  1, 1, 1, 1, 1, 1, 1, 1,
1278  1, 1, 1, 1, 1, 1, 1, 1,
1279  1, 1, 1, 1, 1, 1, 1, 1,
1280  1, 1, 1, 1, 1, 1, 1, 1,
1281  1, 1, 1, 1, 1, 1, 1, 1,
1282  1, 1, 1, 1, 1, 1, 1, 1,
1283  1, 1, 1, 1, 1, 1, 1, 1,
1284  1, 1, 1, 1, 1, 1, 1, 1,
1285  1, 1, 1, 1, 1, 1, 1, 1,
1286  1, 1, 1, 1, 1, 1, 1, 1,
1287  1, 1, 1, 1, 1, 1, 1, 1,
1288  1, 1, 1, 1, 1, 1, 1, 1,
1289  1, 1, 1, 1, 1, 1, 1, 1,
1290  1, 1, 1, 1, 1, 1, 1, 1,
1291  1, 1, 1, 1, 1, 1, 1, 1,
1292  1, 1, 1, 1, 1, 1, 1, 1,
1293  1, 1, 1, 1, 1, 1, 1, 1,
1294  1, 1, 1, 1, 1, 1, 1, 1,
1295  1, 1, 1, 1
1296 };
1297 
1298 static const uint16 levels3[180] = {
1299  351, 122, 76, 61, 41, 42, 24, 30,
1300  22, 19, 11, 9, 10, 8, 5, 5,
1301  4, 5, 5, 3, 3, 3, 3, 3,
1302  3, 3, 2, 2, 3, 2, 2, 2,
1303  3, 3, 2, 2, 2, 3, 2, 2,
1304  2, 2, 2, 2, 2, 2, 2, 2,
1305  2, 2, 2, 2, 2, 2, 1, 1,
1306  2, 2, 1, 2, 1, 2, 2, 2,
1307  2, 2, 2, 1, 2, 1, 1, 1,
1308  1, 1, 1, 1, 1, 1, 1, 2,
1309  2, 1, 2, 1, 1, 1, 1, 1,
1310  1, 1, 1, 1, 1, 1, 1, 1,
1311  1, 1, 1, 1, 1, 1, 1, 1,
1312  1, 1, 1, 1, 1, 1, 1, 1,
1313  1, 1, 1, 1, 1, 1, 1, 1,
1314  1, 1, 1, 1, 1, 1, 1, 1,
1315  1, 1, 1, 1, 1, 1, 1, 1,
1316  1, 1, 1, 1, 1, 1, 1, 1,
1317  1, 1, 1, 1, 1, 1, 1, 1,
1318  1, 1, 1, 1, 1, 1, 1, 1,
1319  1, 1, 1, 1, 1, 1, 1, 1,
1320  1, 1, 1, 1, 1, 1, 1, 1,
1321  1, 1, 1, 1
1322 };
1323 
1324 static const uint16 levels4[70] = {
1325  113, 68, 49, 42, 40, 32, 27, 15,
1326  10, 5, 3, 3, 3, 3, 2, 2,
1327  2, 2, 2, 1, 1, 1, 1, 1,
1328  1, 1, 1, 1, 1, 1, 1, 1,
1329  1, 1, 1, 1, 1, 1, 1, 1,
1330  1, 1, 1, 1, 1, 1, 1, 1,
1331  1, 1, 1, 1, 1, 1, 1, 1,
1332  1, 1, 1, 1, 1, 1, 1, 1,
1333  1, 1, 1, 1, 1, 1
1334 };
1335 
1336 static const uint16 levels5[40] = {
1337  214, 72, 42, 40, 18, 4, 4, 2,
1338  2, 2, 2, 2, 1, 1, 2, 1,
1339  1, 1, 1, 1, 1, 1, 1, 1,
1340  1, 1, 1, 1, 1, 1, 1, 1,
1341  1, 1, 1, 1, 1, 1, 1, 1
1342 };
1343 
1346  int n;
1347 
1348  int maxLevel;
1349 
1350  const uint32 *huffCodes;
1351  const uint8 *huffBits;
1352  const uint16 *levels;
1353 };
1354 
1355 static const WMACoefHuffmanParam coefHuffmanParam[6] = {
1356  { ARRAYSIZE(coef0Huffbits), ARRAYSIZE(levels0), coef0Huffcodes, coef0Huffbits, levels0 },
1357  { ARRAYSIZE(coef1Huffbits), ARRAYSIZE(levels1), coef1Huffcodes, coef1Huffbits, levels1 },
1358  { ARRAYSIZE(coef2Huffbits), ARRAYSIZE(levels2), coef2Huffcodes, coef2Huffbits, levels2 },
1359  { ARRAYSIZE(coef3Huffbits), ARRAYSIZE(levels3), coef3Huffcodes, coef3Huffbits, levels3 },
1360  { ARRAYSIZE(coef4Huffbits), ARRAYSIZE(levels4), coef4Huffcodes, coef4Huffbits, levels4 },
1361  { ARRAYSIZE(coef5Huffbits), ARRAYSIZE(levels5), coef5Huffcodes, coef5Huffbits, levels5 }
1362 };
1363 
1364 const uint32 hgainHuffCodes[37] = {
1365  0x00003, 0x002E7, 0x00001, 0x005CD, 0x0005D, 0x005C9, 0x0005E, 0x00003,
1366  0x00016, 0x0000B, 0x00001, 0x00006, 0x00001, 0x00006, 0x00004, 0x00005,
1367  0x00004, 0x00007, 0x00003, 0x00007, 0x00004, 0x0000A, 0x0000A, 0x00002,
1368  0x00003, 0x00000, 0x00005, 0x00002, 0x0005F, 0x00004, 0x00003, 0x00002,
1369  0x005C8, 0x000B8, 0x005CA, 0x005CB, 0x005CC
1370 };
1371 
1372 const uint8 hgainHuffBits[37] = {
1373  10, 12, 10, 13, 9, 13, 9, 8,
1374  7, 5, 5, 4, 4, 3, 3, 3,
1375  4, 3, 4, 4, 5, 5, 6, 8,
1376  7, 10, 8, 10, 9, 8, 9, 9,
1377  13, 10, 13, 13, 13
1378 };
1379 
1380 const uint32 scaleHuffCodes[121] = {
1381  0x3FFE8, 0x3FFE6, 0x3FFE7, 0x3FFE5, 0x7FFF5, 0x7FFF1, 0x7FFED, 0x7FFF6,
1382  0x7FFEE, 0x7FFEF, 0x7FFF0, 0x7FFFC, 0x7FFFD, 0x7FFFF, 0x7FFFE, 0x7FFF7,
1383  0x7FFF8, 0x7FFFB, 0x7FFF9, 0x3FFE4, 0x7FFFA, 0x3FFE3, 0x1FFEF, 0x1FFF0,
1384  0x0FFF5, 0x1FFEE, 0x0FFF2, 0x0FFF3, 0x0FFF4, 0x0FFF1, 0x07FF6, 0x07FF7,
1385  0x03FF9, 0x03FF5, 0x03FF7, 0x03FF3, 0x03FF6, 0x03FF2, 0x01FF7, 0x01FF5,
1386  0x00FF9, 0x00FF7, 0x00FF6, 0x007F9, 0x00FF4, 0x007F8, 0x003F9, 0x003F7,
1387  0x003F5, 0x001F8, 0x001F7, 0x000FA, 0x000F8, 0x000F6, 0x00079, 0x0003A,
1388  0x00038, 0x0001A, 0x0000B, 0x00004, 0x00000, 0x0000A, 0x0000C, 0x0001B,
1389  0x00039, 0x0003B, 0x00078, 0x0007A, 0x000F7, 0x000F9, 0x001F6, 0x001F9,
1390  0x003F4, 0x003F6, 0x003F8, 0x007F5, 0x007F4, 0x007F6, 0x007F7, 0x00FF5,
1391  0x00FF8, 0x01FF4, 0x01FF6, 0x01FF8, 0x03FF8, 0x03FF4, 0x0FFF0, 0x07FF4,
1392  0x0FFF6, 0x07FF5, 0x3FFE2, 0x7FFD9, 0x7FFDA, 0x7FFDB, 0x7FFDC, 0x7FFDD,
1393  0x7FFDE, 0x7FFD8, 0x7FFD2, 0x7FFD3, 0x7FFD4, 0x7FFD5, 0x7FFD6, 0x7FFF2,
1394  0x7FFDF, 0x7FFE7, 0x7FFE8, 0x7FFE9, 0x7FFEA, 0x7FFEB, 0x7FFE6, 0x7FFE0,
1395  0x7FFE1, 0x7FFE2, 0x7FFE3, 0x7FFE4, 0x7FFE5, 0x7FFD7, 0x7FFEC, 0x7FFF4,
1396  0x7FFF3
1397 };
1398 
1399 const uint8 scaleHuffBits[121] = {
1400  18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1401  19, 19, 19, 18, 19, 18, 17, 17, 16, 17, 16, 16, 16, 16, 15, 15,
1402  14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11, 12, 11, 10, 10,
1403  10, 9, 9, 8, 8, 8, 7, 6, 6, 5, 4, 3, 1, 4, 4, 5,
1404  6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12,
1405  12, 13, 13, 13, 14, 14, 16, 15, 16, 15, 18, 19, 19, 19, 19, 19,
1406  19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1407  19, 19, 19, 19, 19, 19, 19, 19, 19
1408 };
1409 
1410 static const int kLSPCoefCount = 10;
1411 
1412 const float lspCodebook[kLSPCoefCount][16] = {
1413  { 1.98732877f, 1.97944528f, 1.97179088f, 1.96260549f, 1.95038374f, 1.93336114f, 1.90719232f, 1.86191415f, },
1414  { 1.97260000f, 1.96083160f, 1.94982586f, 1.93806164f, 1.92516608f, 1.91010199f, 1.89232331f, 1.87149812f,
1415  1.84564818f, 1.81358067f, 1.77620070f, 1.73265264f, 1.67907855f, 1.60959081f, 1.50829650f, 1.33120330f, },
1416  { 1.90109110f, 1.86482426f, 1.83419671f, 1.80168452f, 1.76650116f, 1.72816320f, 1.68502700f, 1.63738256f,
1417  1.58501580f, 1.51795181f, 1.43679906f, 1.33950585f, 1.24176208f, 1.12260729f, 0.96749668f, 0.74048265f, },
1418  { 1.76943864f, 1.67822463f, 1.59946365f, 1.53560582f, 1.47470796f, 1.41210167f, 1.34509536f, 1.27339507f,
1419  1.19303814f, 1.09765169f, 0.98818722f, 0.87239446f, 0.74369172f, 0.59768184f, 0.43168630f, 0.17977021f, },
1420  { 1.43428349f, 1.32038354f, 1.21074086f, 1.10577988f, 1.00561746f, 0.90335924f, 0.80437489f, 0.70709671f,
1421  0.60427395f, 0.49814048f, 0.38509539f, 0.27106800f, 0.14407416f, 0.00219910f, -0.16725141f, -0.36936085f, },
1422  { 0.99895687f, 0.84188166f, 0.70753739f, 0.57906595f, 0.47055563f, 0.36966965f, 0.26826648f, 0.17163380f,
1423  0.07208392f, -0.03062936f, -1.40037388f, -0.25128968f, -0.37213937f, -0.51075646f, -0.64887512f, -0.80308031f, },
1424  { 0.26515280f, 0.06313551f, -0.08872080f, -0.21103548f, -0.31069678f, -0.39680323f, -0.47223474f, -0.54167135f,
1425  -0.61444740f, -0.68943343f, -0.76580211f, -0.85170082f, -0.95289061f, -1.06514703f, -1.20510707f, -1.37617746f, },
1426  { -0.53940301f, -0.73770929f, -0.88424876f, -1.01117930f, -1.13389091f, -1.26830073f, -1.42041987f, -1.62033919f,
1427  -1.10158808f, -1.16512566f, -1.23337128f, -1.30414401f, -1.37663312f, -1.46853845f, -1.57625798f, -1.66893638f, },
1428  { -0.38601997f, -0.56009350f, -0.66978483f, -0.76028471f, -0.83846064f, -0.90868087f, -0.97408881f, -1.03694962f, },
1429  { -1.56144989f, -1.65944032f, -1.72689685f, -1.77857740f, -1.82203011f, -1.86220079f, -1.90283983f, -1.94820479f, },
1430 };
1431 
1432 } // End of namespace Audio
1433 
1434 #endif // AUDIO_DECODERS_WMADATA_H
#define ARRAYSIZE(x)
Definition: util.h:91
int n
Number of codes.
Definition: wmadata.h:1346
const uint16 * levels
Table to build run/level tables.
Definition: wmadata.h:1352
const uint8 * huffBits
Bit sizes.
Definition: wmadata.h:1351
Definition: wmadata.h:1345
const uint32 * huffCodes
Bit values.
Definition: wmadata.h:1350
Definition: system.h:38