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