2 * libmad - MPEG audio decoder library
3 * Copyright (C) 2000-2004 Underbit Technologies, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * $Id: huffman.c,v 1.10 2004/01/23 09:41:32 rob Exp $
31 * These are the Huffman code words for Layer III.
32 * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3.
34 * These tables support decoding up to 4 Huffman code bits at a time.
37 # if defined(__GNUC__) || \
38 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901)
39 # define PTR(offs, bits) { .ptr = { 0, bits, offs } }
40 # define V(v, w, x, y, hlen) { .value = { 1, hlen, v, w, x, y } }
42 # define PTR(offs, bits) { { 0, bits, offs } }
43 # if defined(WORDS_BIGENDIAN)
44 # define V(v, w, x, y, hlen) { { 1, hlen, (v << 11) | (w << 10) | \
45 (x << 9) | (y << 8) } }
47 # define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \
48 (x << 2) | (y << 3) } }
53 union huffquad const hufftabA[] = {
54 /* 0000 */ PTR(16, 2),
55 /* 0001 */ PTR(20, 2),
56 /* 0010 */ PTR(24, 1),
57 /* 0011 */ PTR(26, 1),
58 /* 0100 */ V(0, 0, 1, 0, 4),
59 /* 0101 */ V(0, 0, 0, 1, 4),
60 /* 0110 */ V(0, 1, 0, 0, 4),
61 /* 0111 */ V(1, 0, 0, 0, 4),
62 /* 1000 */ V(0, 0, 0, 0, 1),
63 /* 1001 */ V(0, 0, 0, 0, 1),
64 /* 1010 */ V(0, 0, 0, 0, 1),
65 /* 1011 */ V(0, 0, 0, 0, 1),
66 /* 1100 */ V(0, 0, 0, 0, 1),
67 /* 1101 */ V(0, 0, 0, 0, 1),
68 /* 1110 */ V(0, 0, 0, 0, 1),
69 /* 1111 */ V(0, 0, 0, 0, 1),
72 /* 00 */ V(1, 0, 1, 1, 2), /* 16 */
73 /* 01 */ V(1, 1, 1, 1, 2),
74 /* 10 */ V(1, 1, 0, 1, 2),
75 /* 11 */ V(1, 1, 1, 0, 2),
78 /* 00 */ V(0, 1, 1, 1, 2), /* 20 */
79 /* 01 */ V(0, 1, 0, 1, 2),
80 /* 10 */ V(1, 0, 0, 1, 1),
81 /* 11 */ V(1, 0, 0, 1, 1),
84 /* 0 */ V(0, 1, 1, 0, 1), /* 24 */
85 /* 1 */ V(0, 0, 1, 1, 1),
88 /* 0 */ V(1, 0, 1, 0, 1), /* 26 */
89 /* 1 */ V(1, 1, 0, 0, 1)
93 union huffquad const hufftabB[] = {
94 /* 0000 */ V(1, 1, 1, 1, 4),
95 /* 0001 */ V(1, 1, 1, 0, 4),
96 /* 0010 */ V(1, 1, 0, 1, 4),
97 /* 0011 */ V(1, 1, 0, 0, 4),
98 /* 0100 */ V(1, 0, 1, 1, 4),
99 /* 0101 */ V(1, 0, 1, 0, 4),
100 /* 0110 */ V(1, 0, 0, 1, 4),
101 /* 0111 */ V(1, 0, 0, 0, 4),
102 /* 1000 */ V(0, 1, 1, 1, 4),
103 /* 1001 */ V(0, 1, 1, 0, 4),
104 /* 1010 */ V(0, 1, 0, 1, 4),
105 /* 1011 */ V(0, 1, 0, 0, 4),
106 /* 1100 */ V(0, 0, 1, 1, 4),
107 /* 1101 */ V(0, 0, 1, 0, 4),
108 /* 1110 */ V(0, 0, 0, 1, 4),
109 /* 1111 */ V(0, 0, 0, 0, 4)
115 # if defined(__GNUC__) || \
116 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901)
117 # define PTR(offs, bits) { .ptr = { 0, bits, offs } }
118 # define V(x, y, hlen) { .value = { 1, hlen, x, y } }
120 # define PTR(offs, bits) { { 0, bits, offs } }
121 # if defined(WORDS_BIGENDIAN)
122 # define V(x, y, hlen) { { 1, hlen, (x << 8) | (y << 4) } }
124 # define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } }
129 union huffpair const hufftab0[] = {
134 union huffpair const hufftab1[] = {
135 /* 000 */ V(1, 1, 3),
136 /* 001 */ V(0, 1, 3),
137 /* 010 */ V(1, 0, 2),
138 /* 011 */ V(1, 0, 2),
139 /* 100 */ V(0, 0, 1),
140 /* 101 */ V(0, 0, 1),
141 /* 110 */ V(0, 0, 1),
146 union huffpair const hufftab2[] = {
148 /* 001 */ V(1, 1, 3),
149 /* 010 */ V(0, 1, 3),
150 /* 011 */ V(1, 0, 3),
151 /* 100 */ V(0, 0, 1),
152 /* 101 */ V(0, 0, 1),
153 /* 110 */ V(0, 0, 1),
154 /* 111 */ V(0, 0, 1),
157 /* 000 */ V(2, 2, 3), /* 8 */
158 /* 001 */ V(0, 2, 3),
159 /* 010 */ V(1, 2, 2),
160 /* 011 */ V(1, 2, 2),
161 /* 100 */ V(2, 1, 2),
162 /* 101 */ V(2, 1, 2),
163 /* 110 */ V(2, 0, 2),
168 union huffpair const hufftab3[] = {
170 /* 001 */ V(1, 0, 3),
171 /* 010 */ V(1, 1, 2),
172 /* 011 */ V(1, 1, 2),
173 /* 100 */ V(0, 1, 2),
174 /* 101 */ V(0, 1, 2),
175 /* 110 */ V(0, 0, 2),
176 /* 111 */ V(0, 0, 2),
179 /* 000 */ V(2, 2, 3), /* 8 */
180 /* 001 */ V(0, 2, 3),
181 /* 010 */ V(1, 2, 2),
182 /* 011 */ V(1, 2, 2),
183 /* 100 */ V(2, 1, 2),
184 /* 101 */ V(2, 1, 2),
185 /* 110 */ V(2, 0, 2),
190 union huffpair const hufftab5[] = {
192 /* 001 */ V(1, 1, 3),
193 /* 010 */ V(0, 1, 3),
194 /* 011 */ V(1, 0, 3),
195 /* 100 */ V(0, 0, 1),
196 /* 101 */ V(0, 0, 1),
197 /* 110 */ V(0, 0, 1),
198 /* 111 */ V(0, 0, 1),
201 /* 0000 */ PTR(24, 1), /* 8 */
202 /* 0001 */ V(3, 2, 4),
203 /* 0010 */ V(3, 1, 3),
204 /* 0011 */ V(3, 1, 3),
205 /* 0100 */ V(1, 3, 4),
206 /* 0101 */ V(0, 3, 4),
207 /* 0110 */ V(3, 0, 4),
208 /* 0111 */ V(2, 2, 4),
209 /* 1000 */ V(1, 2, 3),
210 /* 1001 */ V(1, 2, 3),
211 /* 1010 */ V(2, 1, 3),
212 /* 1011 */ V(2, 1, 3),
213 /* 1100 */ V(0, 2, 3),
214 /* 1101 */ V(0, 2, 3),
215 /* 1110 */ V(2, 0, 3),
216 /* 1111 */ V(2, 0, 3),
219 /* 0 */ V(3, 3, 1), /* 24 */
224 union huffpair const hufftab6[] = {
225 /* 0000 */ PTR(16, 3),
226 /* 0001 */ PTR(24, 1),
227 /* 0010 */ PTR(26, 1),
228 /* 0011 */ V(1, 2, 4),
229 /* 0100 */ V(2, 1, 4),
230 /* 0101 */ V(2, 0, 4),
231 /* 0110 */ V(0, 1, 3),
232 /* 0111 */ V(0, 1, 3),
233 /* 1000 */ V(1, 1, 2),
234 /* 1001 */ V(1, 1, 2),
235 /* 1010 */ V(1, 1, 2),
236 /* 1011 */ V(1, 1, 2),
237 /* 1100 */ V(1, 0, 3),
238 /* 1101 */ V(1, 0, 3),
239 /* 1110 */ V(0, 0, 3),
240 /* 1111 */ V(0, 0, 3),
243 /* 000 */ V(3, 3, 3), /* 16 */
244 /* 001 */ V(0, 3, 3),
245 /* 010 */ V(2, 3, 2),
246 /* 011 */ V(2, 3, 2),
247 /* 100 */ V(3, 2, 2),
248 /* 101 */ V(3, 2, 2),
249 /* 110 */ V(3, 0, 2),
250 /* 111 */ V(3, 0, 2),
253 /* 0 */ V(1, 3, 1), /* 24 */
257 /* 0 */ V(2, 2, 1), /* 26 */
262 union huffpair const hufftab7[] = {
263 /* 0000 */ PTR(16, 4),
264 /* 0001 */ PTR(32, 4),
265 /* 0010 */ PTR(48, 2),
266 /* 0011 */ V(1, 1, 4),
267 /* 0100 */ V(0, 1, 3),
268 /* 0101 */ V(0, 1, 3),
269 /* 0110 */ V(1, 0, 3),
270 /* 0111 */ V(1, 0, 3),
271 /* 1000 */ V(0, 0, 1),
272 /* 1001 */ V(0, 0, 1),
273 /* 1010 */ V(0, 0, 1),
274 /* 1011 */ V(0, 0, 1),
275 /* 1100 */ V(0, 0, 1),
276 /* 1101 */ V(0, 0, 1),
277 /* 1110 */ V(0, 0, 1),
278 /* 1111 */ V(0, 0, 1),
281 /* 0000 */ PTR(52, 2), /* 16 */
282 /* 0001 */ PTR(56, 1),
283 /* 0010 */ PTR(58, 1),
284 /* 0011 */ V(1, 5, 4),
285 /* 0100 */ V(5, 1, 4),
286 /* 0101 */ PTR(60, 1),
287 /* 0110 */ V(5, 0, 4),
288 /* 0111 */ PTR(62, 1),
289 /* 1000 */ V(2, 4, 4),
290 /* 1001 */ V(4, 2, 4),
291 /* 1010 */ V(1, 4, 3),
292 /* 1011 */ V(1, 4, 3),
293 /* 1100 */ V(4, 1, 3),
294 /* 1101 */ V(4, 1, 3),
295 /* 1110 */ V(4, 0, 3),
296 /* 1111 */ V(4, 0, 3),
299 /* 0000 */ V(0, 4, 4), /* 32 */
300 /* 0001 */ V(2, 3, 4),
301 /* 0010 */ V(3, 2, 4),
302 /* 0011 */ V(0, 3, 4),
303 /* 0100 */ V(1, 3, 3),
304 /* 0101 */ V(1, 3, 3),
305 /* 0110 */ V(3, 1, 3),
306 /* 0111 */ V(3, 1, 3),
307 /* 1000 */ V(3, 0, 3),
308 /* 1001 */ V(3, 0, 3),
309 /* 1010 */ V(2, 2, 3),
310 /* 1011 */ V(2, 2, 3),
311 /* 1100 */ V(1, 2, 2),
312 /* 1101 */ V(1, 2, 2),
313 /* 1110 */ V(1, 2, 2),
314 /* 1111 */ V(1, 2, 2),
317 /* 00 */ V(2, 1, 1), /* 48 */
323 /* 00 */ V(5, 5, 2), /* 52 */
329 /* 0 */ V(3, 5, 1), /* 56 */
333 /* 0 */ V(2, 5, 1), /* 58 */
337 /* 0 */ V(0, 5, 1), /* 60 */
341 /* 0 */ V(4, 3, 1), /* 62 */
346 /* this version saves 8 entries (16 bytes) at the expense of
347 an extra lookup in 4 out of 36 cases */
349 union huffpair const hufftab8[] = {
350 /* 0000 */ PTR(16, 4),
351 /* 0001 */ PTR(32, 2),
352 /* 0010 */ V(1, 2, 4),
353 /* 0011 */ V(2, 1, 4),
354 /* 0100 */ V(1, 1, 2),
355 /* 0101 */ V(1, 1, 2),
356 /* 0110 */ V(1, 1, 2),
357 /* 0111 */ V(1, 1, 2),
358 /* 1000 */ V(0, 1, 3),
359 /* 1001 */ V(0, 1, 3),
360 /* 1010 */ V(1, 0, 3),
361 /* 1011 */ V(1, 0, 3),
362 /* 1100 */ V(0, 0, 2),
363 /* 1101 */ V(0, 0, 2),
364 /* 1110 */ V(0, 0, 2),
365 /* 1111 */ V(0, 0, 2),
368 /* 0000 */ PTR(36, 3), /* 16 */
369 /* 0001 */ PTR(44, 2),
370 /* 0010 */ PTR(48, 1),
371 /* 0011 */ V(1, 5, 4),
372 /* 0100 */ V(5, 1, 4),
373 /* 0101 */ PTR(50, 1),
374 /* 0110 */ PTR(52, 1),
375 /* 0111 */ V(2, 4, 4),
376 /* 1000 */ V(4, 2, 4),
377 /* 1001 */ V(1, 4, 4),
378 /* 1010 */ V(4, 1, 3),
379 /* 1011 */ V(4, 1, 3),
380 /* 1100 */ V(0, 4, 4),
381 /* 1101 */ V(4, 0, 4),
382 /* 1110 */ V(2, 3, 4),
383 /* 1111 */ V(3, 2, 4),
386 /* 00 */ PTR(54, 2), /* 32 */
392 /* 000 */ V(5, 5, 3), /* 36 */
393 /* 001 */ V(5, 4, 3),
394 /* 010 */ V(4, 5, 2),
395 /* 011 */ V(4, 5, 2),
396 /* 100 */ V(5, 3, 1),
397 /* 101 */ V(5, 3, 1),
398 /* 110 */ V(5, 3, 1),
399 /* 111 */ V(5, 3, 1),
402 /* 00 */ V(3, 5, 2), /* 44 */
408 /* 0 */ V(5, 2, 1), /* 48 */
412 /* 0 */ V(3, 4, 1), /* 50 */
416 /* 0 */ V(5, 0, 1), /* 52 */
420 /* 00 */ V(1, 3, 2), /* 54 */
427 union huffpair const hufftab8[] = {
428 /* 0000 */ PTR(16, 4),
429 /* 0001 */ PTR(32, 4),
430 /* 0010 */ V(1, 2, 4),
431 /* 0011 */ V(2, 1, 4),
432 /* 0100 */ V(1, 1, 2),
433 /* 0101 */ V(1, 1, 2),
434 /* 0110 */ V(1, 1, 2),
435 /* 0111 */ V(1, 1, 2),
436 /* 1000 */ V(0, 1, 3),
437 /* 1001 */ V(0, 1, 3),
438 /* 1010 */ V(1, 0, 3),
439 /* 1011 */ V(1, 0, 3),
440 /* 1100 */ V(0, 0, 2),
441 /* 1101 */ V(0, 0, 2),
442 /* 1110 */ V(0, 0, 2),
443 /* 1111 */ V(0, 0, 2),
446 /* 0000 */ PTR(48, 3), /* 16 */
447 /* 0001 */ PTR(56, 2),
448 /* 0010 */ PTR(60, 1),
449 /* 0011 */ V(1, 5, 4),
450 /* 0100 */ V(5, 1, 4),
451 /* 0101 */ PTR(62, 1),
452 /* 0110 */ PTR(64, 1),
453 /* 0111 */ V(2, 4, 4),
454 /* 1000 */ V(4, 2, 4),
455 /* 1001 */ V(1, 4, 4),
456 /* 1010 */ V(4, 1, 3),
457 /* 1011 */ V(4, 1, 3),
458 /* 1100 */ V(0, 4, 4),
459 /* 1101 */ V(4, 0, 4),
460 /* 1110 */ V(2, 3, 4),
461 /* 1111 */ V(3, 2, 4),
464 /* 0000 */ V(1, 3, 4), /* 32 */
465 /* 0001 */ V(3, 1, 4),
466 /* 0010 */ V(0, 3, 4),
467 /* 0011 */ V(3, 0, 4),
468 /* 0100 */ V(2, 2, 2),
469 /* 0101 */ V(2, 2, 2),
470 /* 0110 */ V(2, 2, 2),
471 /* 0111 */ V(2, 2, 2),
472 /* 1000 */ V(0, 2, 2),
473 /* 1001 */ V(0, 2, 2),
474 /* 1010 */ V(0, 2, 2),
475 /* 1011 */ V(0, 2, 2),
476 /* 1100 */ V(2, 0, 2),
477 /* 1101 */ V(2, 0, 2),
478 /* 1110 */ V(2, 0, 2),
479 /* 1111 */ V(2, 0, 2),
482 /* 000 */ V(5, 5, 3), /* 48 */
483 /* 001 */ V(5, 4, 3),
484 /* 010 */ V(4, 5, 2),
485 /* 011 */ V(4, 5, 2),
486 /* 100 */ V(5, 3, 1),
487 /* 101 */ V(5, 3, 1),
488 /* 110 */ V(5, 3, 1),
489 /* 111 */ V(5, 3, 1),
492 /* 00 */ V(3, 5, 2), /* 56 */
498 /* 0 */ V(5, 2, 1), /* 60 */
502 /* 0 */ V(3, 4, 1), /* 62 */
506 /* 0 */ V(5, 0, 1), /* 64 */
512 union huffpair const hufftab9[] = {
513 /* 0000 */ PTR(16, 4),
514 /* 0001 */ PTR(32, 3),
515 /* 0010 */ PTR(40, 2),
516 /* 0011 */ PTR(44, 2),
517 /* 0100 */ PTR(48, 1),
518 /* 0101 */ V(1, 2, 4),
519 /* 0110 */ V(2, 1, 4),
520 /* 0111 */ V(2, 0, 4),
521 /* 1000 */ V(1, 1, 3),
522 /* 1001 */ V(1, 1, 3),
523 /* 1010 */ V(0, 1, 3),
524 /* 1011 */ V(0, 1, 3),
525 /* 1100 */ V(1, 0, 3),
526 /* 1101 */ V(1, 0, 3),
527 /* 1110 */ V(0, 0, 3),
528 /* 1111 */ V(0, 0, 3),
531 /* 0000 */ PTR(50, 1), /* 16 */
532 /* 0001 */ V(3, 5, 4),
533 /* 0010 */ V(5, 3, 4),
534 /* 0011 */ PTR(52, 1),
535 /* 0100 */ V(4, 4, 4),
536 /* 0101 */ V(2, 5, 4),
537 /* 0110 */ V(5, 2, 4),
538 /* 0111 */ V(1, 5, 4),
539 /* 1000 */ V(5, 1, 3),
540 /* 1001 */ V(5, 1, 3),
541 /* 1010 */ V(3, 4, 3),
542 /* 1011 */ V(3, 4, 3),
543 /* 1100 */ V(4, 3, 3),
544 /* 1101 */ V(4, 3, 3),
545 /* 1110 */ V(5, 0, 4),
546 /* 1111 */ V(0, 4, 4),
549 /* 000 */ V(2, 4, 3), /* 32 */
550 /* 001 */ V(4, 2, 3),
551 /* 010 */ V(3, 3, 3),
552 /* 011 */ V(4, 0, 3),
553 /* 100 */ V(1, 4, 2),
554 /* 101 */ V(1, 4, 2),
555 /* 110 */ V(4, 1, 2),
556 /* 111 */ V(4, 1, 2),
559 /* 00 */ V(2, 3, 2), /* 40 */
565 /* 00 */ V(3, 1, 1), /* 44 */
571 /* 0 */ V(2, 2, 1), /* 48 */
575 /* 0 */ V(5, 5, 1), /* 50 */
579 /* 0 */ V(5, 4, 1), /* 52 */
584 union huffpair const hufftab10[] = {
585 /* 0000 */ PTR(16, 4),
586 /* 0001 */ PTR(32, 4),
587 /* 0010 */ PTR(48, 2),
588 /* 0011 */ V(1, 1, 4),
589 /* 0100 */ V(0, 1, 3),
590 /* 0101 */ V(0, 1, 3),
591 /* 0110 */ V(1, 0, 3),
592 /* 0111 */ V(1, 0, 3),
593 /* 1000 */ V(0, 0, 1),
594 /* 1001 */ V(0, 0, 1),
595 /* 1010 */ V(0, 0, 1),
596 /* 1011 */ V(0, 0, 1),
597 /* 1100 */ V(0, 0, 1),
598 /* 1101 */ V(0, 0, 1),
599 /* 1110 */ V(0, 0, 1),
600 /* 1111 */ V(0, 0, 1),
603 /* 0000 */ PTR(52, 3), /* 16 */
604 /* 0001 */ PTR(60, 2),
605 /* 0010 */ PTR(64, 3),
606 /* 0011 */ PTR(72, 1),
607 /* 0100 */ PTR(74, 2),
608 /* 0101 */ PTR(78, 2),
609 /* 0110 */ PTR(82, 2),
610 /* 0111 */ V(1, 7, 4),
611 /* 1000 */ V(7, 1, 4),
612 /* 1001 */ PTR(86, 1),
613 /* 1010 */ PTR(88, 2),
614 /* 1011 */ PTR(92, 2),
615 /* 1100 */ V(1, 6, 4),
616 /* 1101 */ V(6, 1, 4),
617 /* 1110 */ V(6, 0, 4),
618 /* 1111 */ PTR(96, 1),
621 /* 0000 */ PTR(98, 1), /* 32 */
622 /* 0001 */ PTR(100, 1),
623 /* 0010 */ V(1, 4, 4),
624 /* 0011 */ V(4, 1, 4),
625 /* 0100 */ V(4, 0, 4),
626 /* 0101 */ V(2, 3, 4),
627 /* 0110 */ V(3, 2, 4),
628 /* 0111 */ V(0, 3, 4),
629 /* 1000 */ V(1, 3, 3),
630 /* 1001 */ V(1, 3, 3),
631 /* 1010 */ V(3, 1, 3),
632 /* 1011 */ V(3, 1, 3),
633 /* 1100 */ V(3, 0, 3),
634 /* 1101 */ V(3, 0, 3),
635 /* 1110 */ V(2, 2, 3),
636 /* 1111 */ V(2, 2, 3),
639 /* 00 */ V(1, 2, 2), /* 48 */
645 /* 000 */ V(7, 7, 3), /* 52 */
646 /* 001 */ V(6, 7, 3),
647 /* 010 */ V(7, 6, 3),
648 /* 011 */ V(5, 7, 3),
649 /* 100 */ V(7, 5, 3),
650 /* 101 */ V(6, 6, 3),
651 /* 110 */ V(4, 7, 2),
652 /* 111 */ V(4, 7, 2),
655 /* 00 */ V(7, 4, 2), /* 60 */
661 /* 000 */ V(7, 3, 2), /* 64 */
662 /* 001 */ V(7, 3, 2),
663 /* 010 */ V(4, 6, 2),
664 /* 011 */ V(4, 6, 2),
665 /* 100 */ V(5, 5, 3),
666 /* 101 */ V(5, 4, 3),
667 /* 110 */ V(6, 3, 2),
668 /* 111 */ V(6, 3, 2),
671 /* 0 */ V(2, 7, 1), /* 72 */
675 /* 00 */ V(6, 4, 2), /* 74 */
681 /* 00 */ V(6, 2, 1), /* 78 */
687 /* 00 */ V(0, 6, 1), /* 82 */
693 /* 0 */ V(3, 6, 1), /* 86 */
697 /* 00 */ V(2, 5, 2), /* 88 */
703 /* 00 */ V(5, 1, 1), /* 92 */
709 /* 0 */ V(0, 5, 1), /* 96 */
713 /* 0 */ V(2, 4, 1), /* 98 */
717 /* 0 */ V(3, 3, 1), /* 100 */
722 union huffpair const hufftab11[] = {
723 /* 0000 */ PTR(16, 4),
724 /* 0001 */ PTR(32, 4),
725 /* 0010 */ PTR(48, 4),
726 /* 0011 */ PTR(64, 3),
727 /* 0100 */ V(1, 2, 4),
728 /* 0101 */ PTR(72, 1),
729 /* 0110 */ V(1, 1, 3),
730 /* 0111 */ V(1, 1, 3),
731 /* 1000 */ V(0, 1, 3),
732 /* 1001 */ V(0, 1, 3),
733 /* 1010 */ V(1, 0, 3),
734 /* 1011 */ V(1, 0, 3),
735 /* 1100 */ V(0, 0, 2),
736 /* 1101 */ V(0, 0, 2),
737 /* 1110 */ V(0, 0, 2),
738 /* 1111 */ V(0, 0, 2),
741 /* 0000 */ PTR(74, 2), /* 16 */
742 /* 0001 */ PTR(78, 3),
743 /* 0010 */ PTR(86, 2),
744 /* 0011 */ PTR(90, 1),
745 /* 0100 */ PTR(92, 2),
746 /* 0101 */ V(2, 7, 4),
747 /* 0110 */ V(7, 2, 4),
748 /* 0111 */ PTR(96, 1),
749 /* 1000 */ V(7, 1, 3),
750 /* 1001 */ V(7, 1, 3),
751 /* 1010 */ V(1, 7, 4),
752 /* 1011 */ V(7, 0, 4),
753 /* 1100 */ V(3, 6, 4),
754 /* 1101 */ V(6, 3, 4),
755 /* 1110 */ V(6, 0, 4),
756 /* 1111 */ PTR(98, 1),
759 /* 0000 */ PTR(100, 1), /* 32 */
760 /* 0001 */ V(1, 5, 4),
761 /* 0010 */ V(6, 2, 3),
762 /* 0011 */ V(6, 2, 3),
763 /* 0100 */ V(2, 6, 4),
764 /* 0101 */ V(0, 6, 4),
765 /* 0110 */ V(1, 6, 3),
766 /* 0111 */ V(1, 6, 3),
767 /* 1000 */ V(6, 1, 3),
768 /* 1001 */ V(6, 1, 3),
769 /* 1010 */ V(5, 1, 4),
770 /* 1011 */ V(3, 4, 4),
771 /* 1100 */ V(5, 0, 4),
772 /* 1101 */ PTR(102, 1),
773 /* 1110 */ V(2, 4, 4),
774 /* 1111 */ V(4, 2, 4),
777 /* 0000 */ V(1, 4, 4), /* 48 */
778 /* 0001 */ V(4, 1, 4),
779 /* 0010 */ V(0, 4, 4),
780 /* 0011 */ V(4, 0, 4),
781 /* 0100 */ V(2, 3, 3),
782 /* 0101 */ V(2, 3, 3),
783 /* 0110 */ V(3, 2, 3),
784 /* 0111 */ V(3, 2, 3),
785 /* 1000 */ V(1, 3, 2),
786 /* 1001 */ V(1, 3, 2),
787 /* 1010 */ V(1, 3, 2),
788 /* 1011 */ V(1, 3, 2),
789 /* 1100 */ V(3, 1, 2),
790 /* 1101 */ V(3, 1, 2),
791 /* 1110 */ V(3, 1, 2),
792 /* 1111 */ V(3, 1, 2),
795 /* 000 */ V(0, 3, 3), /* 64 */
796 /* 001 */ V(3, 0, 3),
797 /* 010 */ V(2, 2, 2),
798 /* 011 */ V(2, 2, 2),
799 /* 100 */ V(2, 1, 1),
800 /* 101 */ V(2, 1, 1),
801 /* 110 */ V(2, 1, 1),
802 /* 111 */ V(2, 1, 1),
805 /* 0 */ V(0, 2, 1), /* 72 */
809 /* 00 */ V(7, 7, 2), /* 74 */
815 /* 000 */ V(6, 6, 2), /* 78 */
816 /* 001 */ V(6, 6, 2),
817 /* 010 */ V(4, 7, 2),
818 /* 011 */ V(4, 7, 2),
819 /* 100 */ V(7, 4, 2),
820 /* 101 */ V(7, 4, 2),
821 /* 110 */ V(5, 7, 3),
822 /* 111 */ V(5, 5, 3),
825 /* 00 */ V(5, 6, 2), /* 86 */
831 /* 0 */ V(7, 3, 1), /* 90 */
835 /* 00 */ V(4, 5, 2), /* 92 */
841 /* 0 */ V(6, 4, 1), /* 96 */
845 /* 0 */ V(4, 4, 1), /* 98 */
849 /* 0 */ V(5, 2, 1), /* 100 */
853 /* 0 */ V(4, 3, 1), /* 102 */
858 union huffpair const hufftab12[] = {
859 /* 0000 */ PTR(16, 4),
860 /* 0001 */ PTR(32, 4),
861 /* 0010 */ PTR(48, 4),
862 /* 0011 */ PTR(64, 2),
863 /* 0100 */ PTR(68, 3),
864 /* 0101 */ PTR(76, 1),
865 /* 0110 */ V(1, 2, 4),
866 /* 0111 */ V(2, 1, 4),
867 /* 1000 */ PTR(78, 1),
868 /* 1001 */ V(0, 0, 4),
869 /* 1010 */ V(1, 1, 3),
870 /* 1011 */ V(1, 1, 3),
871 /* 1100 */ V(0, 1, 3),
872 /* 1101 */ V(0, 1, 3),
873 /* 1110 */ V(1, 0, 3),
874 /* 1111 */ V(1, 0, 3),
877 /* 0000 */ PTR(80, 2), /* 16 */
878 /* 0001 */ PTR(84, 1),
879 /* 0010 */ PTR(86, 1),
880 /* 0011 */ PTR(88, 1),
881 /* 0100 */ V(5, 6, 4),
882 /* 0101 */ V(3, 7, 4),
883 /* 0110 */ PTR(90, 1),
884 /* 0111 */ V(2, 7, 4),
885 /* 1000 */ V(7, 2, 4),
886 /* 1001 */ V(4, 6, 4),
887 /* 1010 */ V(6, 4, 4),
888 /* 1011 */ V(1, 7, 4),
889 /* 1100 */ V(7, 1, 4),
890 /* 1101 */ PTR(92, 1),
891 /* 1110 */ V(3, 6, 4),
892 /* 1111 */ V(6, 3, 4),
895 /* 0000 */ V(4, 5, 4), /* 32 */
896 /* 0001 */ V(5, 4, 4),
897 /* 0010 */ V(4, 4, 4),
898 /* 0011 */ PTR(94, 1),
899 /* 0100 */ V(2, 6, 3),
900 /* 0101 */ V(2, 6, 3),
901 /* 0110 */ V(6, 2, 3),
902 /* 0111 */ V(6, 2, 3),
903 /* 1000 */ V(6, 1, 3),
904 /* 1001 */ V(6, 1, 3),
905 /* 1010 */ V(1, 6, 4),
906 /* 1011 */ V(6, 0, 4),
907 /* 1100 */ V(3, 5, 4),
908 /* 1101 */ V(5, 3, 4),
909 /* 1110 */ V(2, 5, 4),
910 /* 1111 */ V(5, 2, 4),
913 /* 0000 */ V(1, 5, 3), /* 48 */
914 /* 0001 */ V(1, 5, 3),
915 /* 0010 */ V(5, 1, 3),
916 /* 0011 */ V(5, 1, 3),
917 /* 0100 */ V(3, 4, 3),
918 /* 0101 */ V(3, 4, 3),
919 /* 0110 */ V(4, 3, 3),
920 /* 0111 */ V(4, 3, 3),
921 /* 1000 */ V(5, 0, 4),
922 /* 1001 */ V(0, 4, 4),
923 /* 1010 */ V(2, 4, 3),
924 /* 1011 */ V(2, 4, 3),
925 /* 1100 */ V(4, 2, 3),
926 /* 1101 */ V(4, 2, 3),
927 /* 1110 */ V(1, 4, 3),
928 /* 1111 */ V(1, 4, 3),
931 /* 00 */ V(3, 3, 2), /* 64 */
937 /* 000 */ V(4, 0, 3), /* 68 */
938 /* 001 */ V(0, 3, 3),
939 /* 010 */ V(3, 0, 2),
940 /* 011 */ V(3, 0, 2),
941 /* 100 */ V(1, 3, 1),
942 /* 101 */ V(1, 3, 1),
943 /* 110 */ V(1, 3, 1),
944 /* 111 */ V(1, 3, 1),
947 /* 0 */ V(3, 1, 1), /* 76 */
951 /* 0 */ V(0, 2, 1), /* 78 */
955 /* 00 */ V(7, 7, 2), /* 80 */
961 /* 0 */ V(5, 7, 1), /* 84 */
965 /* 0 */ V(6, 6, 1), /* 86 */
969 /* 0 */ V(7, 4, 1), /* 88 */
973 /* 0 */ V(7, 3, 1), /* 90 */
977 /* 0 */ V(0, 7, 1), /* 92 */
981 /* 0 */ V(0, 6, 1), /* 94 */
986 union huffpair const hufftab13[] = {
987 /* 0000 */ PTR(16, 4),
988 /* 0001 */ PTR(32, 4),
989 /* 0010 */ PTR(48, 4),
990 /* 0011 */ PTR(64, 2),
991 /* 0100 */ V(1, 1, 4),
992 /* 0101 */ V(0, 1, 4),
993 /* 0110 */ V(1, 0, 3),
994 /* 0111 */ V(1, 0, 3),
995 /* 1000 */ V(0, 0, 1),
996 /* 1001 */ V(0, 0, 1),
997 /* 1010 */ V(0, 0, 1),
998 /* 1011 */ V(0, 0, 1),
999 /* 1100 */ V(0, 0, 1),
1000 /* 1101 */ V(0, 0, 1),
1001 /* 1110 */ V(0, 0, 1),
1002 /* 1111 */ V(0, 0, 1),
1005 /* 0000 */ PTR(68, 4), /* 16 */
1006 /* 0001 */ PTR(84, 4),
1007 /* 0010 */ PTR(100, 4),
1008 /* 0011 */ PTR(116, 4),
1009 /* 0100 */ PTR(132, 4),
1010 /* 0101 */ PTR(148, 4),
1011 /* 0110 */ PTR(164, 3),
1012 /* 0111 */ PTR(172, 3),
1013 /* 1000 */ PTR(180, 3),
1014 /* 1001 */ PTR(188, 3),
1015 /* 1010 */ PTR(196, 3),
1016 /* 1011 */ PTR(204, 3),
1017 /* 1100 */ PTR(212, 1),
1018 /* 1101 */ PTR(214, 2),
1019 /* 1110 */ PTR(218, 3),
1020 /* 1111 */ PTR(226, 1),
1023 /* 0000 */ PTR(228, 2), /* 32 */
1024 /* 0001 */ PTR(232, 2),
1025 /* 0010 */ PTR(236, 2),
1026 /* 0011 */ PTR(240, 2),
1027 /* 0100 */ V(8, 1, 4),
1028 /* 0101 */ PTR(244, 1),
1029 /* 0110 */ PTR(246, 1),
1030 /* 0111 */ PTR(248, 1),
1031 /* 1000 */ PTR(250, 2),
1032 /* 1001 */ PTR(254, 1),
1033 /* 1010 */ V(1, 5, 4),
1034 /* 1011 */ V(5, 1, 4),
1035 /* 1100 */ PTR(256, 1),
1036 /* 1101 */ PTR(258, 1),
1037 /* 1110 */ PTR(260, 1),
1038 /* 1111 */ V(1, 4, 4),
1041 /* 0000 */ V(4, 1, 3), /* 48 */
1042 /* 0001 */ V(4, 1, 3),
1043 /* 0010 */ V(0, 4, 4),
1044 /* 0011 */ V(4, 0, 4),
1045 /* 0100 */ V(2, 3, 4),
1046 /* 0101 */ V(3, 2, 4),
1047 /* 0110 */ V(1, 3, 3),
1048 /* 0111 */ V(1, 3, 3),
1049 /* 1000 */ V(3, 1, 3),
1050 /* 1001 */ V(3, 1, 3),
1051 /* 1010 */ V(0, 3, 3),
1052 /* 1011 */ V(0, 3, 3),
1053 /* 1100 */ V(3, 0, 3),
1054 /* 1101 */ V(3, 0, 3),
1055 /* 1110 */ V(2, 2, 3),
1056 /* 1111 */ V(2, 2, 3),
1059 /* 00 */ V(1, 2, 2), /* 64 */
1060 /* 01 */ V(2, 1, 2),
1061 /* 10 */ V(0, 2, 2),
1062 /* 11 */ V(2, 0, 2),
1065 /* 0000 */ PTR(262, 4), /* 68 */
1066 /* 0001 */ PTR(278, 4),
1067 /* 0010 */ PTR(294, 4),
1068 /* 0011 */ PTR(310, 3),
1069 /* 0100 */ PTR(318, 2),
1070 /* 0101 */ PTR(322, 2),
1071 /* 0110 */ PTR(326, 3),
1072 /* 0111 */ PTR(334, 2),
1073 /* 1000 */ PTR(338, 1),
1074 /* 1001 */ PTR(340, 2),
1075 /* 1010 */ PTR(344, 2),
1076 /* 1011 */ PTR(348, 2),
1077 /* 1100 */ PTR(352, 2),
1078 /* 1101 */ PTR(356, 2),
1079 /* 1110 */ V(1, 15, 4),
1080 /* 1111 */ V(15, 1, 4),
1083 /* 0000 */ V(15, 0, 4), /* 84 */
1084 /* 0001 */ PTR(360, 1),
1085 /* 0010 */ PTR(362, 1),
1086 /* 0011 */ PTR(364, 1),
1087 /* 0100 */ V(14, 2, 4),
1088 /* 0101 */ PTR(366, 1),
1089 /* 0110 */ V(1, 14, 4),
1090 /* 0111 */ V(14, 1, 4),
1091 /* 1000 */ PTR(368, 1),
1092 /* 1001 */ PTR(370, 1),
1093 /* 1010 */ PTR(372, 1),
1094 /* 1011 */ PTR(374, 1),
1095 /* 1100 */ PTR(376, 1),
1096 /* 1101 */ PTR(378, 1),
1097 /* 1110 */ V(12, 6, 4),
1098 /* 1111 */ V(3, 13, 4),
1101 /* 0000 */ PTR(380, 1), /* 100 */
1102 /* 0001 */ V(2, 13, 4),
1103 /* 0010 */ V(13, 2, 4),
1104 /* 0011 */ V(1, 13, 4),
1105 /* 0100 */ V(11, 7, 4),
1106 /* 0101 */ PTR(382, 1),
1107 /* 0110 */ PTR(384, 1),
1108 /* 0111 */ V(12, 3, 4),
1109 /* 1000 */ PTR(386, 1),
1110 /* 1001 */ V(4, 11, 4),
1111 /* 1010 */ V(13, 1, 3),
1112 /* 1011 */ V(13, 1, 3),
1113 /* 1100 */ V(0, 13, 4),
1114 /* 1101 */ V(13, 0, 4),
1115 /* 1110 */ V(8, 10, 4),
1116 /* 1111 */ V(10, 8, 4),
1119 /* 0000 */ V(4, 12, 4), /* 116 */
1120 /* 0001 */ V(12, 4, 4),
1121 /* 0010 */ V(6, 11, 4),
1122 /* 0011 */ V(11, 6, 4),
1123 /* 0100 */ V(3, 12, 3),
1124 /* 0101 */ V(3, 12, 3),
1125 /* 0110 */ V(2, 12, 3),
1126 /* 0111 */ V(2, 12, 3),
1127 /* 1000 */ V(12, 2, 3),
1128 /* 1001 */ V(12, 2, 3),
1129 /* 1010 */ V(5, 11, 3),
1130 /* 1011 */ V(5, 11, 3),
1131 /* 1100 */ V(11, 5, 4),
1132 /* 1101 */ V(8, 9, 4),
1133 /* 1110 */ V(1, 12, 3),
1134 /* 1111 */ V(1, 12, 3),
1137 /* 0000 */ V(12, 1, 3), /* 132 */
1138 /* 0001 */ V(12, 1, 3),
1139 /* 0010 */ V(9, 8, 4),
1140 /* 0011 */ V(0, 12, 4),
1141 /* 0100 */ V(12, 0, 3),
1142 /* 0101 */ V(12, 0, 3),
1143 /* 0110 */ V(11, 4, 4),
1144 /* 0111 */ V(6, 10, 4),
1145 /* 1000 */ V(10, 6, 4),
1146 /* 1001 */ V(7, 9, 4),
1147 /* 1010 */ V(3, 11, 3),
1148 /* 1011 */ V(3, 11, 3),
1149 /* 1100 */ V(11, 3, 3),
1150 /* 1101 */ V(11, 3, 3),
1151 /* 1110 */ V(8, 8, 4),
1152 /* 1111 */ V(5, 10, 4),
1155 /* 0000 */ V(2, 11, 3), /* 148 */
1156 /* 0001 */ V(2, 11, 3),
1157 /* 0010 */ V(10, 5, 4),
1158 /* 0011 */ V(6, 9, 4),
1159 /* 0100 */ V(10, 4, 3),
1160 /* 0101 */ V(10, 4, 3),
1161 /* 0110 */ V(7, 8, 4),
1162 /* 0111 */ V(8, 7, 4),
1163 /* 1000 */ V(9, 4, 3),
1164 /* 1001 */ V(9, 4, 3),
1165 /* 1010 */ V(7, 7, 4),
1166 /* 1011 */ V(7, 6, 4),
1167 /* 1100 */ V(11, 2, 2),
1168 /* 1101 */ V(11, 2, 2),
1169 /* 1110 */ V(11, 2, 2),
1170 /* 1111 */ V(11, 2, 2),
1173 /* 000 */ V(1, 11, 2), /* 164 */
1174 /* 001 */ V(1, 11, 2),
1175 /* 010 */ V(11, 1, 2),
1176 /* 011 */ V(11, 1, 2),
1177 /* 100 */ V(0, 11, 3),
1178 /* 101 */ V(11, 0, 3),
1179 /* 110 */ V(9, 6, 3),
1180 /* 111 */ V(4, 10, 3),
1183 /* 000 */ V(3, 10, 3), /* 172 */
1184 /* 001 */ V(10, 3, 3),
1185 /* 010 */ V(5, 9, 3),
1186 /* 011 */ V(9, 5, 3),
1187 /* 100 */ V(2, 10, 2),
1188 /* 101 */ V(2, 10, 2),
1189 /* 110 */ V(10, 2, 2),
1190 /* 111 */ V(10, 2, 2),
1193 /* 000 */ V(1, 10, 2), /* 180 */
1194 /* 001 */ V(1, 10, 2),
1195 /* 010 */ V(10, 1, 2),
1196 /* 011 */ V(10, 1, 2),
1197 /* 100 */ V(0, 10, 3),
1198 /* 101 */ V(6, 8, 3),
1199 /* 110 */ V(10, 0, 2),
1200 /* 111 */ V(10, 0, 2),
1203 /* 000 */ V(8, 6, 3), /* 188 */
1204 /* 001 */ V(4, 9, 3),
1205 /* 010 */ V(9, 3, 2),
1206 /* 011 */ V(9, 3, 2),
1207 /* 100 */ V(3, 9, 3),
1208 /* 101 */ V(5, 8, 3),
1209 /* 110 */ V(8, 5, 3),
1210 /* 111 */ V(6, 7, 3),
1213 /* 000 */ V(2, 9, 2), /* 196 */
1214 /* 001 */ V(2, 9, 2),
1215 /* 010 */ V(9, 2, 2),
1216 /* 011 */ V(9, 2, 2),
1217 /* 100 */ V(5, 7, 3),
1218 /* 101 */ V(7, 5, 3),
1219 /* 110 */ V(3, 8, 2),
1220 /* 111 */ V(3, 8, 2),
1223 /* 000 */ V(8, 3, 2), /* 204 */
1224 /* 001 */ V(8, 3, 2),
1225 /* 010 */ V(6, 6, 3),
1226 /* 011 */ V(4, 7, 3),
1227 /* 100 */ V(7, 4, 3),
1228 /* 101 */ V(5, 6, 3),
1229 /* 110 */ V(6, 5, 3),
1230 /* 111 */ V(7, 3, 3),
1233 /* 0 */ V(1, 9, 1), /* 212 */
1237 /* 00 */ V(0, 9, 2), /* 214 */
1238 /* 01 */ V(9, 0, 2),
1239 /* 10 */ V(4, 8, 2),
1240 /* 11 */ V(8, 4, 2),
1243 /* 000 */ V(7, 2, 2), /* 218 */
1244 /* 001 */ V(7, 2, 2),
1245 /* 010 */ V(4, 6, 3),
1246 /* 011 */ V(6, 4, 3),
1247 /* 100 */ V(2, 8, 1),
1248 /* 101 */ V(2, 8, 1),
1249 /* 110 */ V(2, 8, 1),
1250 /* 111 */ V(2, 8, 1),
1253 /* 0 */ V(8, 2, 1), /* 226 */
1257 /* 00 */ V(3, 7, 2), /* 228 */
1258 /* 01 */ V(2, 7, 2),
1259 /* 10 */ V(1, 7, 1),
1260 /* 11 */ V(1, 7, 1),
1263 /* 00 */ V(7, 1, 1), /* 232 */
1264 /* 01 */ V(7, 1, 1),
1265 /* 10 */ V(5, 5, 2),
1266 /* 11 */ V(0, 7, 2),
1269 /* 00 */ V(7, 0, 2), /* 236 */
1270 /* 01 */ V(3, 6, 2),
1271 /* 10 */ V(6, 3, 2),
1272 /* 11 */ V(4, 5, 2),
1275 /* 00 */ V(5, 4, 2), /* 240 */
1276 /* 01 */ V(2, 6, 2),
1277 /* 10 */ V(6, 2, 2),
1278 /* 11 */ V(3, 5, 2),
1281 /* 0 */ V(0, 8, 1), /* 244 */
1285 /* 0 */ V(1, 6, 1), /* 246 */
1289 /* 0 */ V(0, 6, 1), /* 248 */
1293 /* 00 */ V(5, 3, 2), /* 250 */
1294 /* 01 */ V(4, 4, 2),
1295 /* 10 */ V(2, 5, 1),
1296 /* 11 */ V(2, 5, 1),
1299 /* 0 */ V(5, 2, 1), /* 254 */
1303 /* 0 */ V(3, 4, 1), /* 256 */
1307 /* 0 */ V(5, 0, 1), /* 258 */
1311 /* 0 */ V(4, 2, 1), /* 260 */
1314 /* 0000 0000 0000 ... */
1315 /* 0000 */ PTR(388, 3), /* 262 */
1316 /* 0001 */ V(15, 15, 4),
1317 /* 0010 */ V(14, 15, 4),
1318 /* 0011 */ V(13, 15, 4),
1319 /* 0100 */ V(14, 14, 4),
1320 /* 0101 */ V(12, 15, 4),
1321 /* 0110 */ V(13, 14, 4),
1322 /* 0111 */ V(11, 15, 4),
1323 /* 1000 */ V(15, 11, 4),
1324 /* 1001 */ V(12, 14, 4),
1325 /* 1010 */ V(13, 12, 4),
1326 /* 1011 */ PTR(396, 1),
1327 /* 1100 */ V(14, 12, 3),
1328 /* 1101 */ V(14, 12, 3),
1329 /* 1110 */ V(13, 13, 3),
1330 /* 1111 */ V(13, 13, 3),
1332 /* 0000 0000 0001 ... */
1333 /* 0000 */ V(15, 10, 4), /* 278 */
1334 /* 0001 */ V(12, 13, 4),
1335 /* 0010 */ V(11, 14, 3),
1336 /* 0011 */ V(11, 14, 3),
1337 /* 0100 */ V(14, 11, 3),
1338 /* 0101 */ V(14, 11, 3),
1339 /* 0110 */ V(9, 15, 3),
1340 /* 0111 */ V(9, 15, 3),
1341 /* 1000 */ V(15, 9, 3),
1342 /* 1001 */ V(15, 9, 3),
1343 /* 1010 */ V(14, 10, 3),
1344 /* 1011 */ V(14, 10, 3),
1345 /* 1100 */ V(11, 13, 3),
1346 /* 1101 */ V(11, 13, 3),
1347 /* 1110 */ V(13, 11, 3),
1348 /* 1111 */ V(13, 11, 3),
1350 /* 0000 0000 0010 ... */
1351 /* 0000 */ V(8, 15, 3), /* 294 */
1352 /* 0001 */ V(8, 15, 3),
1353 /* 0010 */ V(15, 8, 3),
1354 /* 0011 */ V(15, 8, 3),
1355 /* 0100 */ V(12, 12, 3),
1356 /* 0101 */ V(12, 12, 3),
1357 /* 0110 */ V(10, 14, 4),
1358 /* 0111 */ V(9, 14, 4),
1359 /* 1000 */ V(8, 14, 3),
1360 /* 1001 */ V(8, 14, 3),
1361 /* 1010 */ V(7, 15, 4),
1362 /* 1011 */ V(7, 14, 4),
1363 /* 1100 */ V(15, 7, 2),
1364 /* 1101 */ V(15, 7, 2),
1365 /* 1110 */ V(15, 7, 2),
1366 /* 1111 */ V(15, 7, 2),
1368 /* 0000 0000 0011 ... */
1369 /* 000 */ V(13, 10, 2), /* 310 */
1370 /* 001 */ V(13, 10, 2),
1371 /* 010 */ V(10, 13, 3),
1372 /* 011 */ V(11, 12, 3),
1373 /* 100 */ V(12, 11, 3),
1374 /* 101 */ V(15, 6, 3),
1375 /* 110 */ V(6, 15, 2),
1376 /* 111 */ V(6, 15, 2),
1378 /* 0000 0000 0100 ... */
1379 /* 00 */ V(14, 8, 2), /* 318 */
1380 /* 01 */ V(5, 15, 2),
1381 /* 10 */ V(9, 13, 2),
1382 /* 11 */ V(13, 9, 2),
1384 /* 0000 0000 0101 ... */
1385 /* 00 */ V(15, 5, 2), /* 322 */
1386 /* 01 */ V(14, 7, 2),
1387 /* 10 */ V(10, 12, 2),
1388 /* 11 */ V(11, 11, 2),
1390 /* 0000 0000 0110 ... */
1391 /* 000 */ V(4, 15, 2), /* 326 */
1392 /* 001 */ V(4, 15, 2),
1393 /* 010 */ V(15, 4, 2),
1394 /* 011 */ V(15, 4, 2),
1395 /* 100 */ V(12, 10, 3),
1396 /* 101 */ V(14, 6, 3),
1397 /* 110 */ V(15, 3, 2),
1398 /* 111 */ V(15, 3, 2),
1400 /* 0000 0000 0111 ... */
1401 /* 00 */ V(3, 15, 1), /* 334 */
1402 /* 01 */ V(3, 15, 1),
1403 /* 10 */ V(8, 13, 2),
1404 /* 11 */ V(13, 8, 2),
1406 /* 0000 0000 1000 ... */
1407 /* 0 */ V(2, 15, 1), /* 338 */
1408 /* 1 */ V(15, 2, 1),
1410 /* 0000 0000 1001 ... */
1411 /* 00 */ V(6, 14, 2), /* 340 */
1412 /* 01 */ V(9, 12, 2),
1413 /* 10 */ V(0, 15, 1),
1414 /* 11 */ V(0, 15, 1),
1416 /* 0000 0000 1010 ... */
1417 /* 00 */ V(12, 9, 2), /* 344 */
1418 /* 01 */ V(5, 14, 2),
1419 /* 10 */ V(10, 11, 1),
1420 /* 11 */ V(10, 11, 1),
1422 /* 0000 0000 1011 ... */
1423 /* 00 */ V(7, 13, 2), /* 348 */
1424 /* 01 */ V(13, 7, 2),
1425 /* 10 */ V(4, 14, 1),
1426 /* 11 */ V(4, 14, 1),
1428 /* 0000 0000 1100 ... */
1429 /* 00 */ V(12, 8, 2), /* 352 */
1430 /* 01 */ V(13, 6, 2),
1431 /* 10 */ V(3, 14, 1),
1432 /* 11 */ V(3, 14, 1),
1434 /* 0000 0000 1101 ... */
1435 /* 00 */ V(11, 9, 1), /* 356 */
1436 /* 01 */ V(11, 9, 1),
1437 /* 10 */ V(9, 11, 2),
1438 /* 11 */ V(10, 10, 2),
1440 /* 0000 0001 0001 ... */
1441 /* 0 */ V(11, 10, 1), /* 360 */
1442 /* 1 */ V(14, 5, 1),
1444 /* 0000 0001 0010 ... */
1445 /* 0 */ V(14, 4, 1), /* 362 */
1446 /* 1 */ V(8, 12, 1),
1448 /* 0000 0001 0011 ... */
1449 /* 0 */ V(6, 13, 1), /* 364 */
1450 /* 1 */ V(14, 3, 1),
1452 /* 0000 0001 0101 ... */
1453 /* 0 */ V(2, 14, 1), /* 366 */
1454 /* 1 */ V(0, 14, 1),
1456 /* 0000 0001 1000 ... */
1457 /* 0 */ V(14, 0, 1), /* 368 */
1458 /* 1 */ V(5, 13, 1),
1460 /* 0000 0001 1001 ... */
1461 /* 0 */ V(13, 5, 1), /* 370 */
1462 /* 1 */ V(7, 12, 1),
1464 /* 0000 0001 1010 ... */
1465 /* 0 */ V(12, 7, 1), /* 372 */
1466 /* 1 */ V(4, 13, 1),
1468 /* 0000 0001 1011 ... */
1469 /* 0 */ V(8, 11, 1), /* 374 */
1470 /* 1 */ V(11, 8, 1),
1472 /* 0000 0001 1100 ... */
1473 /* 0 */ V(13, 4, 1), /* 376 */
1474 /* 1 */ V(9, 10, 1),
1476 /* 0000 0001 1101 ... */
1477 /* 0 */ V(10, 9, 1), /* 378 */
1478 /* 1 */ V(6, 12, 1),
1480 /* 0000 0010 0000 ... */
1481 /* 0 */ V(13, 3, 1), /* 380 */
1482 /* 1 */ V(7, 11, 1),
1484 /* 0000 0010 0101 ... */
1485 /* 0 */ V(5, 12, 1), /* 382 */
1486 /* 1 */ V(12, 5, 1),
1488 /* 0000 0010 0110 ... */
1489 /* 0 */ V(9, 9, 1), /* 384 */
1490 /* 1 */ V(7, 10, 1),
1492 /* 0000 0010 1000 ... */
1493 /* 0 */ V(10, 7, 1), /* 386 */
1496 /* 0000 0000 0000 0000 ... */
1497 /* 000 */ V(15, 14, 3), /* 388 */
1498 /* 001 */ V(15, 12, 3),
1499 /* 010 */ V(15, 13, 2),
1500 /* 011 */ V(15, 13, 2),
1501 /* 100 */ V(14, 13, 1),
1502 /* 101 */ V(14, 13, 1),
1503 /* 110 */ V(14, 13, 1),
1504 /* 111 */ V(14, 13, 1),
1506 /* 0000 0000 0000 1011 ... */
1507 /* 0 */ V(10, 15, 1), /* 396 */
1512 union huffpair const hufftab15[] = {
1513 /* 0000 */ PTR(16, 4),
1514 /* 0001 */ PTR(32, 4),
1515 /* 0010 */ PTR(48, 4),
1516 /* 0011 */ PTR(64, 4),
1517 /* 0100 */ PTR(80, 4),
1518 /* 0101 */ PTR(96, 3),
1519 /* 0110 */ PTR(104, 3),
1520 /* 0111 */ PTR(112, 2),
1521 /* 1000 */ PTR(116, 1),
1522 /* 1001 */ PTR(118, 1),
1523 /* 1010 */ V(1, 1, 3),
1524 /* 1011 */ V(1, 1, 3),
1525 /* 1100 */ V(0, 1, 4),
1526 /* 1101 */ V(1, 0, 4),
1527 /* 1110 */ V(0, 0, 3),
1528 /* 1111 */ V(0, 0, 3),
1531 /* 0000 */ PTR(120, 4), /* 16 */
1532 /* 0001 */ PTR(136, 4),
1533 /* 0010 */ PTR(152, 4),
1534 /* 0011 */ PTR(168, 4),
1535 /* 0100 */ PTR(184, 4),
1536 /* 0101 */ PTR(200, 3),
1537 /* 0110 */ PTR(208, 3),
1538 /* 0111 */ PTR(216, 4),
1539 /* 1000 */ PTR(232, 3),
1540 /* 1001 */ PTR(240, 3),
1541 /* 1010 */ PTR(248, 3),
1542 /* 1011 */ PTR(256, 3),
1543 /* 1100 */ PTR(264, 2),
1544 /* 1101 */ PTR(268, 3),
1545 /* 1110 */ PTR(276, 3),
1546 /* 1111 */ PTR(284, 2),
1549 /* 0000 */ PTR(288, 2), /* 32 */
1550 /* 0001 */ PTR(292, 2),
1551 /* 0010 */ PTR(296, 2),
1552 /* 0011 */ PTR(300, 2),
1553 /* 0100 */ PTR(304, 2),
1554 /* 0101 */ PTR(308, 2),
1555 /* 0110 */ PTR(312, 2),
1556 /* 0111 */ PTR(316, 2),
1557 /* 1000 */ PTR(320, 1),
1558 /* 1001 */ PTR(322, 1),
1559 /* 1010 */ PTR(324, 1),
1560 /* 1011 */ PTR(326, 2),
1561 /* 1100 */ PTR(330, 1),
1562 /* 1101 */ PTR(332, 1),
1563 /* 1110 */ PTR(334, 2),
1564 /* 1111 */ PTR(338, 1),
1567 /* 0000 */ PTR(340, 1), /* 48 */
1568 /* 0001 */ PTR(342, 1),
1569 /* 0010 */ V(9, 1, 4),
1570 /* 0011 */ PTR(344, 1),
1571 /* 0100 */ PTR(346, 1),
1572 /* 0101 */ PTR(348, 1),
1573 /* 0110 */ PTR(350, 1),
1574 /* 0111 */ PTR(352, 1),
1575 /* 1000 */ V(2, 8, 4),
1576 /* 1001 */ V(8, 2, 4),
1577 /* 1010 */ V(1, 8, 4),
1578 /* 1011 */ V(8, 1, 4),
1579 /* 1100 */ PTR(354, 1),
1580 /* 1101 */ PTR(356, 1),
1581 /* 1110 */ PTR(358, 1),
1582 /* 1111 */ PTR(360, 1),
1585 /* 0000 */ V(2, 7, 4), /* 64 */
1586 /* 0001 */ V(7, 2, 4),
1587 /* 0010 */ V(6, 4, 4),
1588 /* 0011 */ V(1, 7, 4),
1589 /* 0100 */ V(5, 5, 4),
1590 /* 0101 */ V(7, 1, 4),
1591 /* 0110 */ PTR(362, 1),
1592 /* 0111 */ V(3, 6, 4),
1593 /* 1000 */ V(6, 3, 4),
1594 /* 1001 */ V(4, 5, 4),
1595 /* 1010 */ V(5, 4, 4),
1596 /* 1011 */ V(2, 6, 4),
1597 /* 1100 */ V(6, 2, 4),
1598 /* 1101 */ V(1, 6, 4),
1599 /* 1110 */ PTR(364, 1),
1600 /* 1111 */ V(3, 5, 4),
1603 /* 0000 */ V(6, 1, 3), /* 80 */
1604 /* 0001 */ V(6, 1, 3),
1605 /* 0010 */ V(5, 3, 4),
1606 /* 0011 */ V(4, 4, 4),
1607 /* 0100 */ V(2, 5, 3),
1608 /* 0101 */ V(2, 5, 3),
1609 /* 0110 */ V(5, 2, 3),
1610 /* 0111 */ V(5, 2, 3),
1611 /* 1000 */ V(1, 5, 3),
1612 /* 1001 */ V(1, 5, 3),
1613 /* 1010 */ V(5, 1, 3),
1614 /* 1011 */ V(5, 1, 3),
1615 /* 1100 */ V(0, 5, 4),
1616 /* 1101 */ V(5, 0, 4),
1617 /* 1110 */ V(3, 4, 3),
1618 /* 1111 */ V(3, 4, 3),
1621 /* 000 */ V(4, 3, 3), /* 96 */
1622 /* 001 */ V(2, 4, 3),
1623 /* 010 */ V(4, 2, 3),
1624 /* 011 */ V(3, 3, 3),
1625 /* 100 */ V(4, 1, 2),
1626 /* 101 */ V(4, 1, 2),
1627 /* 110 */ V(1, 4, 3),
1628 /* 111 */ V(0, 4, 3),
1631 /* 000 */ V(2, 3, 2), /* 104 */
1632 /* 001 */ V(2, 3, 2),
1633 /* 010 */ V(3, 2, 2),
1634 /* 011 */ V(3, 2, 2),
1635 /* 100 */ V(4, 0, 3),
1636 /* 101 */ V(0, 3, 3),
1637 /* 110 */ V(1, 3, 2),
1638 /* 111 */ V(1, 3, 2),
1641 /* 00 */ V(3, 1, 2), /* 112 */
1642 /* 01 */ V(3, 0, 2),
1643 /* 10 */ V(2, 2, 1),
1644 /* 11 */ V(2, 2, 1),
1647 /* 0 */ V(1, 2, 1), /* 116 */
1651 /* 0 */ V(0, 2, 1), /* 118 */
1655 /* 0000 */ PTR(366, 1), /* 120 */
1656 /* 0001 */ PTR(368, 1),
1657 /* 0010 */ V(14, 14, 4),
1658 /* 0011 */ PTR(370, 1),
1659 /* 0100 */ PTR(372, 1),
1660 /* 0101 */ PTR(374, 1),
1661 /* 0110 */ V(15, 11, 4),
1662 /* 0111 */ PTR(376, 1),
1663 /* 1000 */ V(13, 13, 4),
1664 /* 1001 */ V(10, 15, 4),
1665 /* 1010 */ V(15, 10, 4),
1666 /* 1011 */ V(11, 14, 4),
1667 /* 1100 */ V(14, 11, 4),
1668 /* 1101 */ V(12, 13, 4),
1669 /* 1110 */ V(13, 12, 4),
1670 /* 1111 */ V(9, 15, 4),
1673 /* 0000 */ V(15, 9, 4), /* 136 */
1674 /* 0001 */ V(14, 10, 4),
1675 /* 0010 */ V(11, 13, 4),
1676 /* 0011 */ V(13, 11, 4),
1677 /* 0100 */ V(8, 15, 4),
1678 /* 0101 */ V(15, 8, 4),
1679 /* 0110 */ V(12, 12, 4),
1680 /* 0111 */ V(9, 14, 4),
1681 /* 1000 */ V(14, 9, 4),
1682 /* 1001 */ V(7, 15, 4),
1683 /* 1010 */ V(15, 7, 4),
1684 /* 1011 */ V(10, 13, 4),
1685 /* 1100 */ V(13, 10, 4),
1686 /* 1101 */ V(11, 12, 4),
1687 /* 1110 */ V(6, 15, 4),
1688 /* 1111 */ PTR(378, 1),
1691 /* 0000 */ V(12, 11, 3), /* 152 */
1692 /* 0001 */ V(12, 11, 3),
1693 /* 0010 */ V(15, 6, 3),
1694 /* 0011 */ V(15, 6, 3),
1695 /* 0100 */ V(8, 14, 4),
1696 /* 0101 */ V(14, 8, 4),
1697 /* 0110 */ V(5, 15, 4),
1698 /* 0111 */ V(9, 13, 4),
1699 /* 1000 */ V(15, 5, 3),
1700 /* 1001 */ V(15, 5, 3),
1701 /* 1010 */ V(7, 14, 3),
1702 /* 1011 */ V(7, 14, 3),
1703 /* 1100 */ V(14, 7, 3),
1704 /* 1101 */ V(14, 7, 3),
1705 /* 1110 */ V(10, 12, 3),
1706 /* 1111 */ V(10, 12, 3),
1709 /* 0000 */ V(12, 10, 3), /* 168 */
1710 /* 0001 */ V(12, 10, 3),
1711 /* 0010 */ V(11, 11, 3),
1712 /* 0011 */ V(11, 11, 3),
1713 /* 0100 */ V(13, 9, 4),
1714 /* 0101 */ V(8, 13, 4),
1715 /* 0110 */ V(4, 15, 3),
1716 /* 0111 */ V(4, 15, 3),
1717 /* 1000 */ V(15, 4, 3),
1718 /* 1001 */ V(15, 4, 3),
1719 /* 1010 */ V(3, 15, 3),
1720 /* 1011 */ V(3, 15, 3),
1721 /* 1100 */ V(15, 3, 3),
1722 /* 1101 */ V(15, 3, 3),
1723 /* 1110 */ V(13, 8, 3),
1724 /* 1111 */ V(13, 8, 3),
1727 /* 0000 */ V(14, 6, 3), /* 184 */
1728 /* 0001 */ V(14, 6, 3),
1729 /* 0010 */ V(2, 15, 3),
1730 /* 0011 */ V(2, 15, 3),
1731 /* 0100 */ V(15, 2, 3),
1732 /* 0101 */ V(15, 2, 3),
1733 /* 0110 */ V(6, 14, 4),
1734 /* 0111 */ V(15, 0, 4),
1735 /* 1000 */ V(1, 15, 3),
1736 /* 1001 */ V(1, 15, 3),
1737 /* 1010 */ V(15, 1, 3),
1738 /* 1011 */ V(15, 1, 3),
1739 /* 1100 */ V(9, 12, 3),
1740 /* 1101 */ V(9, 12, 3),
1741 /* 1110 */ V(12, 9, 3),
1742 /* 1111 */ V(12, 9, 3),
1745 /* 000 */ V(5, 14, 3), /* 200 */
1746 /* 001 */ V(10, 11, 3),
1747 /* 010 */ V(11, 10, 3),
1748 /* 011 */ V(14, 5, 3),
1749 /* 100 */ V(7, 13, 3),
1750 /* 101 */ V(13, 7, 3),
1751 /* 110 */ V(4, 14, 3),
1752 /* 111 */ V(14, 4, 3),
1755 /* 000 */ V(8, 12, 3), /* 208 */
1756 /* 001 */ V(12, 8, 3),
1757 /* 010 */ V(3, 14, 3),
1758 /* 011 */ V(6, 13, 3),
1759 /* 100 */ V(13, 6, 3),
1760 /* 101 */ V(14, 3, 3),
1761 /* 110 */ V(9, 11, 3),
1762 /* 111 */ V(11, 9, 3),
1765 /* 0000 */ V(2, 14, 3), /* 216 */
1766 /* 0001 */ V(2, 14, 3),
1767 /* 0010 */ V(10, 10, 3),
1768 /* 0011 */ V(10, 10, 3),
1769 /* 0100 */ V(14, 2, 3),
1770 /* 0101 */ V(14, 2, 3),
1771 /* 0110 */ V(1, 14, 3),
1772 /* 0111 */ V(1, 14, 3),
1773 /* 1000 */ V(14, 1, 3),
1774 /* 1001 */ V(14, 1, 3),
1775 /* 1010 */ V(0, 14, 4),
1776 /* 1011 */ V(14, 0, 4),
1777 /* 1100 */ V(5, 13, 3),
1778 /* 1101 */ V(5, 13, 3),
1779 /* 1110 */ V(13, 5, 3),
1780 /* 1111 */ V(13, 5, 3),
1783 /* 000 */ V(7, 12, 3), /* 232 */
1784 /* 001 */ V(12, 7, 3),
1785 /* 010 */ V(4, 13, 3),
1786 /* 011 */ V(8, 11, 3),
1787 /* 100 */ V(13, 4, 2),
1788 /* 101 */ V(13, 4, 2),
1789 /* 110 */ V(11, 8, 3),
1790 /* 111 */ V(9, 10, 3),
1793 /* 000 */ V(10, 9, 3), /* 240 */
1794 /* 001 */ V(6, 12, 3),
1795 /* 010 */ V(12, 6, 3),
1796 /* 011 */ V(3, 13, 3),
1797 /* 100 */ V(13, 3, 2),
1798 /* 101 */ V(13, 3, 2),
1799 /* 110 */ V(13, 2, 2),
1800 /* 111 */ V(13, 2, 2),
1803 /* 000 */ V(2, 13, 3), /* 248 */
1804 /* 001 */ V(0, 13, 3),
1805 /* 010 */ V(1, 13, 2),
1806 /* 011 */ V(1, 13, 2),
1807 /* 100 */ V(7, 11, 2),
1808 /* 101 */ V(7, 11, 2),
1809 /* 110 */ V(11, 7, 2),
1810 /* 111 */ V(11, 7, 2),
1813 /* 000 */ V(13, 1, 2), /* 256 */
1814 /* 001 */ V(13, 1, 2),
1815 /* 010 */ V(5, 12, 3),
1816 /* 011 */ V(13, 0, 3),
1817 /* 100 */ V(12, 5, 2),
1818 /* 101 */ V(12, 5, 2),
1819 /* 110 */ V(8, 10, 2),
1820 /* 111 */ V(8, 10, 2),
1823 /* 00 */ V(10, 8, 2), /* 264 */
1824 /* 01 */ V(4, 12, 2),
1825 /* 10 */ V(12, 4, 2),
1826 /* 11 */ V(6, 11, 2),
1829 /* 000 */ V(11, 6, 2), /* 268 */
1830 /* 001 */ V(11, 6, 2),
1831 /* 010 */ V(9, 9, 3),
1832 /* 011 */ V(0, 12, 3),
1833 /* 100 */ V(3, 12, 2),
1834 /* 101 */ V(3, 12, 2),
1835 /* 110 */ V(12, 3, 2),
1836 /* 111 */ V(12, 3, 2),
1839 /* 000 */ V(7, 10, 2), /* 276 */
1840 /* 001 */ V(7, 10, 2),
1841 /* 010 */ V(10, 7, 2),
1842 /* 011 */ V(10, 7, 2),
1843 /* 100 */ V(10, 6, 2),
1844 /* 101 */ V(10, 6, 2),
1845 /* 110 */ V(12, 0, 3),
1846 /* 111 */ V(0, 11, 3),
1849 /* 00 */ V(12, 2, 1), /* 284 */
1850 /* 01 */ V(12, 2, 1),
1851 /* 10 */ V(2, 12, 2),
1852 /* 11 */ V(5, 11, 2),
1855 /* 00 */ V(11, 5, 2), /* 288 */
1856 /* 01 */ V(1, 12, 2),
1857 /* 10 */ V(8, 9, 2),
1858 /* 11 */ V(9, 8, 2),
1861 /* 00 */ V(12, 1, 2), /* 292 */
1862 /* 01 */ V(4, 11, 2),
1863 /* 10 */ V(11, 4, 2),
1864 /* 11 */ V(6, 10, 2),
1867 /* 00 */ V(3, 11, 2), /* 296 */
1868 /* 01 */ V(7, 9, 2),
1869 /* 10 */ V(11, 3, 1),
1870 /* 11 */ V(11, 3, 1),
1873 /* 00 */ V(9, 7, 2), /* 300 */
1874 /* 01 */ V(8, 8, 2),
1875 /* 10 */ V(2, 11, 2),
1876 /* 11 */ V(5, 10, 2),
1879 /* 00 */ V(11, 2, 1), /* 304 */
1880 /* 01 */ V(11, 2, 1),
1881 /* 10 */ V(10, 5, 2),
1882 /* 11 */ V(1, 11, 2),
1885 /* 00 */ V(11, 1, 1), /* 308 */
1886 /* 01 */ V(11, 1, 1),
1887 /* 10 */ V(11, 0, 2),
1888 /* 11 */ V(6, 9, 2),
1891 /* 00 */ V(9, 6, 2), /* 312 */
1892 /* 01 */ V(4, 10, 2),
1893 /* 10 */ V(10, 4, 2),
1894 /* 11 */ V(7, 8, 2),
1897 /* 00 */ V(8, 7, 2), /* 316 */
1898 /* 01 */ V(3, 10, 2),
1899 /* 10 */ V(10, 3, 1),
1900 /* 11 */ V(10, 3, 1),
1903 /* 0 */ V(5, 9, 1), /* 320 */
1907 /* 0 */ V(2, 10, 1), /* 322 */
1908 /* 1 */ V(10, 2, 1),
1911 /* 0 */ V(1, 10, 1), /* 324 */
1912 /* 1 */ V(10, 1, 1),
1915 /* 00 */ V(0, 10, 2), /* 326 */
1916 /* 01 */ V(10, 0, 2),
1917 /* 10 */ V(6, 8, 1),
1918 /* 11 */ V(6, 8, 1),
1921 /* 0 */ V(8, 6, 1), /* 330 */
1925 /* 0 */ V(9, 4, 1), /* 332 */
1929 /* 00 */ V(9, 3, 1), /* 334 */
1930 /* 01 */ V(9, 3, 1),
1931 /* 10 */ V(7, 7, 2),
1932 /* 11 */ V(0, 9, 2),
1935 /* 0 */ V(5, 8, 1), /* 338 */
1939 /* 0 */ V(2, 9, 1), /* 340 */
1943 /* 0 */ V(7, 6, 1), /* 342 */
1947 /* 0 */ V(1, 9, 1), /* 344 */
1951 /* 0 */ V(4, 8, 1), /* 346 */
1955 /* 0 */ V(5, 7, 1), /* 348 */
1959 /* 0 */ V(3, 8, 1), /* 350 */
1963 /* 0 */ V(6, 6, 1), /* 352 */
1967 /* 0 */ V(7, 4, 1), /* 354 */
1971 /* 0 */ V(8, 0, 1), /* 356 */
1975 /* 0 */ V(6, 5, 1), /* 358 */
1979 /* 0 */ V(7, 3, 1), /* 360 */
1983 /* 0 */ V(0, 7, 1), /* 362 */
1987 /* 0 */ V(0, 6, 1), /* 364 */
1990 /* 0000 0000 0000 ... */
1991 /* 0 */ V(15, 15, 1), /* 366 */
1992 /* 1 */ V(14, 15, 1),
1994 /* 0000 0000 0001 ... */
1995 /* 0 */ V(15, 14, 1), /* 368 */
1996 /* 1 */ V(13, 15, 1),
1998 /* 0000 0000 0011 ... */
1999 /* 0 */ V(15, 13, 1), /* 370 */
2000 /* 1 */ V(12, 15, 1),
2002 /* 0000 0000 0100 ... */
2003 /* 0 */ V(15, 12, 1), /* 372 */
2004 /* 1 */ V(13, 14, 1),
2006 /* 0000 0000 0101 ... */
2007 /* 0 */ V(14, 13, 1), /* 374 */
2008 /* 1 */ V(11, 15, 1),
2010 /* 0000 0000 0111 ... */
2011 /* 0 */ V(12, 14, 1), /* 376 */
2012 /* 1 */ V(14, 12, 1),
2014 /* 0000 0001 1111 ... */
2015 /* 0 */ V(10, 14, 1), /* 378 */
2020 union huffpair const hufftab16[] = {
2021 /* 0000 */ PTR(16, 4),
2022 /* 0001 */ PTR(32, 4),
2023 /* 0010 */ PTR(48, 4),
2024 /* 0011 */ PTR(64, 2),
2025 /* 0100 */ V(1, 1, 4),
2026 /* 0101 */ V(0, 1, 4),
2027 /* 0110 */ V(1, 0, 3),
2028 /* 0111 */ V(1, 0, 3),
2029 /* 1000 */ V(0, 0, 1),
2030 /* 1001 */ V(0, 0, 1),
2031 /* 1010 */ V(0, 0, 1),
2032 /* 1011 */ V(0, 0, 1),
2033 /* 1100 */ V(0, 0, 1),
2034 /* 1101 */ V(0, 0, 1),
2035 /* 1110 */ V(0, 0, 1),
2036 /* 1111 */ V(0, 0, 1),
2039 /* 0000 */ PTR(68, 3), /* 16 */
2040 /* 0001 */ PTR(76, 3),
2041 /* 0010 */ PTR(84, 2),
2042 /* 0011 */ V(15, 15, 4),
2043 /* 0100 */ PTR(88, 2),
2044 /* 0101 */ PTR(92, 1),
2045 /* 0110 */ PTR(94, 4),
2046 /* 0111 */ V(15, 2, 4),
2047 /* 1000 */ PTR(110, 1),
2048 /* 1001 */ V(1, 15, 4),
2049 /* 1010 */ V(15, 1, 4),
2050 /* 1011 */ PTR(112, 4),
2051 /* 1100 */ PTR(128, 4),
2052 /* 1101 */ PTR(144, 4),
2053 /* 1110 */ PTR(160, 4),
2054 /* 1111 */ PTR(176, 4),
2057 /* 0000 */ PTR(192, 4), /* 32 */
2058 /* 0001 */ PTR(208, 3),
2059 /* 0010 */ PTR(216, 3),
2060 /* 0011 */ PTR(224, 3),
2061 /* 0100 */ PTR(232, 3),
2062 /* 0101 */ PTR(240, 3),
2063 /* 0110 */ PTR(248, 3),
2064 /* 0111 */ PTR(256, 3),
2065 /* 1000 */ PTR(264, 2),
2066 /* 1001 */ PTR(268, 2),
2067 /* 1010 */ PTR(272, 1),
2068 /* 1011 */ PTR(274, 2),
2069 /* 1100 */ PTR(278, 2),
2070 /* 1101 */ PTR(282, 1),
2071 /* 1110 */ V(5, 1, 4),
2072 /* 1111 */ PTR(284, 1),
2075 /* 0000 */ PTR(286, 1), /* 48 */
2076 /* 0001 */ PTR(288, 1),
2077 /* 0010 */ PTR(290, 1),
2078 /* 0011 */ V(1, 4, 4),
2079 /* 0100 */ V(4, 1, 4),
2080 /* 0101 */ PTR(292, 1),
2081 /* 0110 */ V(2, 3, 4),
2082 /* 0111 */ V(3, 2, 4),
2083 /* 1000 */ V(1, 3, 3),
2084 /* 1001 */ V(1, 3, 3),
2085 /* 1010 */ V(3, 1, 3),
2086 /* 1011 */ V(3, 1, 3),
2087 /* 1100 */ V(0, 3, 4),
2088 /* 1101 */ V(3, 0, 4),
2089 /* 1110 */ V(2, 2, 3),
2090 /* 1111 */ V(2, 2, 3),
2093 /* 00 */ V(1, 2, 2), /* 64 */
2094 /* 01 */ V(2, 1, 2),
2095 /* 10 */ V(0, 2, 2),
2096 /* 11 */ V(2, 0, 2),
2099 /* 000 */ V(14, 15, 3), /* 68 */
2100 /* 001 */ V(15, 14, 3),
2101 /* 010 */ V(13, 15, 3),
2102 /* 011 */ V(15, 13, 3),
2103 /* 100 */ V(12, 15, 3),
2104 /* 101 */ V(15, 12, 3),
2105 /* 110 */ V(11, 15, 3),
2106 /* 111 */ V(15, 11, 3),
2109 /* 000 */ V(10, 15, 2), /* 76 */
2110 /* 001 */ V(10, 15, 2),
2111 /* 010 */ V(15, 10, 3),
2112 /* 011 */ V(9, 15, 3),
2113 /* 100 */ V(15, 9, 3),
2114 /* 101 */ V(15, 8, 3),
2115 /* 110 */ V(8, 15, 2),
2116 /* 111 */ V(8, 15, 2),
2119 /* 00 */ V(7, 15, 2), /* 84 */
2120 /* 01 */ V(15, 7, 2),
2121 /* 10 */ V(6, 15, 2),
2122 /* 11 */ V(15, 6, 2),
2125 /* 00 */ V(5, 15, 2), /* 88 */
2126 /* 01 */ V(15, 5, 2),
2127 /* 10 */ V(4, 15, 1),
2128 /* 11 */ V(4, 15, 1),
2131 /* 0 */ V(15, 4, 1), /* 92 */
2132 /* 1 */ V(15, 3, 1),
2135 /* 0000 */ V(15, 0, 1), /* 94 */
2136 /* 0001 */ V(15, 0, 1),
2137 /* 0010 */ V(15, 0, 1),
2138 /* 0011 */ V(15, 0, 1),
2139 /* 0100 */ V(15, 0, 1),
2140 /* 0101 */ V(15, 0, 1),
2141 /* 0110 */ V(15, 0, 1),
2142 /* 0111 */ V(15, 0, 1),
2143 /* 1000 */ V(3, 15, 2),
2144 /* 1001 */ V(3, 15, 2),
2145 /* 1010 */ V(3, 15, 2),
2146 /* 1011 */ V(3, 15, 2),
2147 /* 1100 */ PTR(294, 4),
2148 /* 1101 */ PTR(310, 3),
2149 /* 1110 */ PTR(318, 3),
2150 /* 1111 */ PTR(326, 3),
2153 /* 0 */ V(2, 15, 1), /* 110 */
2154 /* 1 */ V(0, 15, 1),
2157 /* 0000 */ PTR(334, 2), /* 112 */
2158 /* 0001 */ PTR(338, 2),
2159 /* 0010 */ PTR(342, 2),
2160 /* 0011 */ PTR(346, 1),
2161 /* 0100 */ PTR(348, 2),
2162 /* 0101 */ PTR(352, 2),
2163 /* 0110 */ PTR(356, 1),
2164 /* 0111 */ PTR(358, 2),
2165 /* 1000 */ PTR(362, 2),
2166 /* 1001 */ PTR(366, 2),
2167 /* 1010 */ PTR(370, 2),
2168 /* 1011 */ V(14, 3, 4),
2169 /* 1100 */ PTR(374, 1),
2170 /* 1101 */ PTR(376, 1),
2171 /* 1110 */ PTR(378, 1),
2172 /* 1111 */ PTR(380, 1),
2175 /* 0000 */ PTR(382, 1), /* 128 */
2176 /* 0001 */ PTR(384, 1),
2177 /* 0010 */ PTR(386, 1),
2178 /* 0011 */ V(0, 13, 4),
2179 /* 0100 */ PTR(388, 1),
2180 /* 0101 */ PTR(390, 1),
2181 /* 0110 */ PTR(392, 1),
2182 /* 0111 */ V(3, 12, 4),
2183 /* 1000 */ PTR(394, 1),
2184 /* 1001 */ V(1, 12, 4),
2185 /* 1010 */ V(12, 0, 4),
2186 /* 1011 */ PTR(396, 1),
2187 /* 1100 */ V(14, 2, 3),
2188 /* 1101 */ V(14, 2, 3),
2189 /* 1110 */ V(2, 14, 4),
2190 /* 1111 */ V(1, 14, 4),
2193 /* 0000 */ V(13, 3, 4), /* 144 */
2194 /* 0001 */ V(2, 13, 4),
2195 /* 0010 */ V(13, 2, 4),
2196 /* 0011 */ V(13, 1, 4),
2197 /* 0100 */ V(3, 11, 4),
2198 /* 0101 */ PTR(398, 1),
2199 /* 0110 */ V(1, 13, 3),
2200 /* 0111 */ V(1, 13, 3),
2201 /* 1000 */ V(12, 4, 4),
2202 /* 1001 */ V(6, 11, 4),
2203 /* 1010 */ V(12, 3, 4),
2204 /* 1011 */ V(10, 7, 4),
2205 /* 1100 */ V(2, 12, 3),
2206 /* 1101 */ V(2, 12, 3),
2207 /* 1110 */ V(12, 2, 4),
2208 /* 1111 */ V(11, 5, 4),
2211 /* 0000 */ V(12, 1, 4), /* 160 */
2212 /* 0001 */ V(0, 12, 4),
2213 /* 0010 */ V(4, 11, 4),
2214 /* 0011 */ V(11, 4, 4),
2215 /* 0100 */ V(6, 10, 4),
2216 /* 0101 */ V(10, 6, 4),
2217 /* 0110 */ V(11, 3, 3),
2218 /* 0111 */ V(11, 3, 3),
2219 /* 1000 */ V(5, 10, 4),
2220 /* 1001 */ V(10, 5, 4),
2221 /* 1010 */ V(2, 11, 3),
2222 /* 1011 */ V(2, 11, 3),
2223 /* 1100 */ V(11, 2, 3),
2224 /* 1101 */ V(11, 2, 3),
2225 /* 1110 */ V(1, 11, 3),
2226 /* 1111 */ V(1, 11, 3),
2229 /* 0000 */ V(11, 1, 3), /* 176 */
2230 /* 0001 */ V(11, 1, 3),
2231 /* 0010 */ V(0, 11, 4),
2232 /* 0011 */ V(11, 0, 4),
2233 /* 0100 */ V(6, 9, 4),
2234 /* 0101 */ V(9, 6, 4),
2235 /* 0110 */ V(4, 10, 4),
2236 /* 0111 */ V(10, 4, 4),
2237 /* 1000 */ V(7, 8, 4),
2238 /* 1001 */ V(8, 7, 4),
2239 /* 1010 */ V(10, 3, 3),
2240 /* 1011 */ V(10, 3, 3),
2241 /* 1100 */ V(3, 10, 4),
2242 /* 1101 */ V(5, 9, 4),
2243 /* 1110 */ V(2, 10, 3),
2244 /* 1111 */ V(2, 10, 3),
2247 /* 0000 */ V(9, 5, 4), /* 192 */
2248 /* 0001 */ V(6, 8, 4),
2249 /* 0010 */ V(10, 1, 3),
2250 /* 0011 */ V(10, 1, 3),
2251 /* 0100 */ V(8, 6, 4),
2252 /* 0101 */ V(7, 7, 4),
2253 /* 0110 */ V(9, 4, 3),
2254 /* 0111 */ V(9, 4, 3),
2255 /* 1000 */ V(4, 9, 4),
2256 /* 1001 */ V(5, 7, 4),
2257 /* 1010 */ V(6, 7, 3),
2258 /* 1011 */ V(6, 7, 3),
2259 /* 1100 */ V(10, 2, 2),
2260 /* 1101 */ V(10, 2, 2),
2261 /* 1110 */ V(10, 2, 2),
2262 /* 1111 */ V(10, 2, 2),
2265 /* 000 */ V(1, 10, 2), /* 208 */
2266 /* 001 */ V(1, 10, 2),
2267 /* 010 */ V(0, 10, 3),
2268 /* 011 */ V(10, 0, 3),
2269 /* 100 */ V(3, 9, 3),
2270 /* 101 */ V(9, 3, 3),
2271 /* 110 */ V(5, 8, 3),
2272 /* 111 */ V(8, 5, 3),
2275 /* 000 */ V(2, 9, 2), /* 216 */
2276 /* 001 */ V(2, 9, 2),
2277 /* 010 */ V(9, 2, 2),
2278 /* 011 */ V(9, 2, 2),
2279 /* 100 */ V(7, 6, 3),
2280 /* 101 */ V(0, 9, 3),
2281 /* 110 */ V(1, 9, 2),
2282 /* 111 */ V(1, 9, 2),
2285 /* 000 */ V(9, 1, 2), /* 224 */
2286 /* 001 */ V(9, 1, 2),
2287 /* 010 */ V(9, 0, 3),
2288 /* 011 */ V(4, 8, 3),
2289 /* 100 */ V(8, 4, 3),
2290 /* 101 */ V(7, 5, 3),
2291 /* 110 */ V(3, 8, 3),
2292 /* 111 */ V(8, 3, 3),
2295 /* 000 */ V(6, 6, 3), /* 232 */
2296 /* 001 */ V(2, 8, 3),
2297 /* 010 */ V(8, 2, 2),
2298 /* 011 */ V(8, 2, 2),
2299 /* 100 */ V(4, 7, 3),
2300 /* 101 */ V(7, 4, 3),
2301 /* 110 */ V(1, 8, 2),
2302 /* 111 */ V(1, 8, 2),
2305 /* 000 */ V(8, 1, 2), /* 240 */
2306 /* 001 */ V(8, 1, 2),
2307 /* 010 */ V(8, 0, 2),
2308 /* 011 */ V(8, 0, 2),
2309 /* 100 */ V(0, 8, 3),
2310 /* 101 */ V(5, 6, 3),
2311 /* 110 */ V(3, 7, 2),
2312 /* 111 */ V(3, 7, 2),
2315 /* 000 */ V(7, 3, 2), /* 248 */
2316 /* 001 */ V(7, 3, 2),
2317 /* 010 */ V(6, 5, 3),
2318 /* 011 */ V(4, 6, 3),
2319 /* 100 */ V(2, 7, 2),
2320 /* 101 */ V(2, 7, 2),
2321 /* 110 */ V(7, 2, 2),
2322 /* 111 */ V(7, 2, 2),
2325 /* 000 */ V(6, 4, 3), /* 256 */
2326 /* 001 */ V(5, 5, 3),
2327 /* 010 */ V(0, 7, 2),
2328 /* 011 */ V(0, 7, 2),
2329 /* 100 */ V(1, 7, 1),
2330 /* 101 */ V(1, 7, 1),
2331 /* 110 */ V(1, 7, 1),
2332 /* 111 */ V(1, 7, 1),
2335 /* 00 */ V(7, 1, 1), /* 264 */
2336 /* 01 */ V(7, 1, 1),
2337 /* 10 */ V(7, 0, 2),
2338 /* 11 */ V(3, 6, 2),
2341 /* 00 */ V(6, 3, 2), /* 268 */
2342 /* 01 */ V(4, 5, 2),
2343 /* 10 */ V(5, 4, 2),
2344 /* 11 */ V(2, 6, 2),
2347 /* 0 */ V(6, 2, 1), /* 272 */
2351 /* 00 */ V(6, 1, 1), /* 274 */
2352 /* 01 */ V(6, 1, 1),
2353 /* 10 */ V(0, 6, 2),
2354 /* 11 */ V(6, 0, 2),
2357 /* 00 */ V(5, 3, 1), /* 278 */
2358 /* 01 */ V(5, 3, 1),
2359 /* 10 */ V(3, 5, 2),
2360 /* 11 */ V(4, 4, 2),
2363 /* 0 */ V(2, 5, 1), /* 282 */
2367 /* 0 */ V(1, 5, 1), /* 284 */
2371 /* 0 */ V(3, 4, 1), /* 286 */
2375 /* 0 */ V(5, 0, 1), /* 288 */
2379 /* 0 */ V(4, 2, 1), /* 290 */
2383 /* 0 */ V(0, 4, 1), /* 292 */
2386 /* 0000 0110 1100 ... */
2387 /* 0000 */ V(12, 14, 4), /* 294 */
2388 /* 0001 */ PTR(400, 1),
2389 /* 0010 */ V(13, 14, 3),
2390 /* 0011 */ V(13, 14, 3),
2391 /* 0100 */ V(14, 9, 3),
2392 /* 0101 */ V(14, 9, 3),
2393 /* 0110 */ V(14, 10, 4),
2394 /* 0111 */ V(13, 9, 4),
2395 /* 1000 */ V(14, 14, 2),
2396 /* 1001 */ V(14, 14, 2),
2397 /* 1010 */ V(14, 14, 2),
2398 /* 1011 */ V(14, 14, 2),
2399 /* 1100 */ V(14, 13, 3),
2400 /* 1101 */ V(14, 13, 3),
2401 /* 1110 */ V(14, 11, 3),
2402 /* 1111 */ V(14, 11, 3),
2404 /* 0000 0110 1101 ... */
2405 /* 000 */ V(11, 14, 2), /* 310 */
2406 /* 001 */ V(11, 14, 2),
2407 /* 010 */ V(12, 13, 2),
2408 /* 011 */ V(12, 13, 2),
2409 /* 100 */ V(13, 12, 3),
2410 /* 101 */ V(13, 11, 3),
2411 /* 110 */ V(10, 14, 2),
2412 /* 111 */ V(10, 14, 2),
2414 /* 0000 0110 1110 ... */
2415 /* 000 */ V(12, 12, 2), /* 318 */
2416 /* 001 */ V(12, 12, 2),
2417 /* 010 */ V(10, 13, 3),
2418 /* 011 */ V(13, 10, 3),
2419 /* 100 */ V(7, 14, 3),
2420 /* 101 */ V(10, 12, 3),
2421 /* 110 */ V(12, 10, 2),
2422 /* 111 */ V(12, 10, 2),
2424 /* 0000 0110 1111 ... */
2425 /* 000 */ V(12, 9, 3), /* 326 */
2426 /* 001 */ V(7, 13, 3),
2427 /* 010 */ V(5, 14, 2),
2428 /* 011 */ V(5, 14, 2),
2429 /* 100 */ V(11, 13, 1),
2430 /* 101 */ V(11, 13, 1),
2431 /* 110 */ V(11, 13, 1),
2432 /* 111 */ V(11, 13, 1),
2434 /* 0000 1011 0000 ... */
2435 /* 00 */ V(9, 14, 1), /* 334 */
2436 /* 01 */ V(9, 14, 1),
2437 /* 10 */ V(11, 12, 2),
2438 /* 11 */ V(12, 11, 2),
2440 /* 0000 1011 0001 ... */
2441 /* 00 */ V(8, 14, 2), /* 338 */
2442 /* 01 */ V(14, 8, 2),
2443 /* 10 */ V(9, 13, 2),
2444 /* 11 */ V(14, 7, 2),
2446 /* 0000 1011 0010 ... */
2447 /* 00 */ V(11, 11, 2), /* 342 */
2448 /* 01 */ V(8, 13, 2),
2449 /* 10 */ V(13, 8, 2),
2450 /* 11 */ V(6, 14, 2),
2452 /* 0000 1011 0011 ... */
2453 /* 0 */ V(14, 6, 1), /* 346 */
2454 /* 1 */ V(9, 12, 1),
2456 /* 0000 1011 0100 ... */
2457 /* 00 */ V(10, 11, 2), /* 348 */
2458 /* 01 */ V(11, 10, 2),
2459 /* 10 */ V(14, 5, 2),
2460 /* 11 */ V(13, 7, 2),
2462 /* 0000 1011 0101 ... */
2463 /* 00 */ V(4, 14, 1), /* 352 */
2464 /* 01 */ V(4, 14, 1),
2465 /* 10 */ V(14, 4, 2),
2466 /* 11 */ V(8, 12, 2),
2468 /* 0000 1011 0110 ... */
2469 /* 0 */ V(12, 8, 1), /* 356 */
2470 /* 1 */ V(3, 14, 1),
2472 /* 0000 1011 0111 ... */
2473 /* 00 */ V(6, 13, 1), /* 358 */
2474 /* 01 */ V(6, 13, 1),
2475 /* 10 */ V(13, 6, 2),
2476 /* 11 */ V(9, 11, 2),
2478 /* 0000 1011 1000 ... */
2479 /* 00 */ V(11, 9, 2), /* 362 */
2480 /* 01 */ V(10, 10, 2),
2481 /* 10 */ V(14, 1, 1),
2482 /* 11 */ V(14, 1, 1),
2484 /* 0000 1011 1001 ... */
2485 /* 00 */ V(13, 4, 1), /* 366 */
2486 /* 01 */ V(13, 4, 1),
2487 /* 10 */ V(11, 8, 2),
2488 /* 11 */ V(10, 9, 2),
2490 /* 0000 1011 1010 ... */
2491 /* 00 */ V(7, 11, 1), /* 370 */
2492 /* 01 */ V(7, 11, 1),
2493 /* 10 */ V(11, 7, 2),
2494 /* 11 */ V(13, 0, 2),
2496 /* 0000 1011 1100 ... */
2497 /* 0 */ V(0, 14, 1), /* 374 */
2498 /* 1 */ V(14, 0, 1),
2500 /* 0000 1011 1101 ... */
2501 /* 0 */ V(5, 13, 1), /* 376 */
2502 /* 1 */ V(13, 5, 1),
2504 /* 0000 1011 1110 ... */
2505 /* 0 */ V(7, 12, 1), /* 378 */
2506 /* 1 */ V(12, 7, 1),
2508 /* 0000 1011 1111 ... */
2509 /* 0 */ V(4, 13, 1), /* 380 */
2510 /* 1 */ V(8, 11, 1),
2512 /* 0000 1100 0000 ... */
2513 /* 0 */ V(9, 10, 1), /* 382 */
2514 /* 1 */ V(6, 12, 1),
2516 /* 0000 1100 0001 ... */
2517 /* 0 */ V(12, 6, 1), /* 384 */
2518 /* 1 */ V(3, 13, 1),
2520 /* 0000 1100 0010 ... */
2521 /* 0 */ V(5, 12, 1), /* 386 */
2522 /* 1 */ V(12, 5, 1),
2524 /* 0000 1100 0100 ... */
2525 /* 0 */ V(8, 10, 1), /* 388 */
2526 /* 1 */ V(10, 8, 1),
2528 /* 0000 1100 0101 ... */
2529 /* 0 */ V(9, 9, 1), /* 390 */
2530 /* 1 */ V(4, 12, 1),
2532 /* 0000 1100 0110 ... */
2533 /* 0 */ V(11, 6, 1), /* 392 */
2534 /* 1 */ V(7, 10, 1),
2536 /* 0000 1100 1000 ... */
2537 /* 0 */ V(5, 11, 1), /* 394 */
2540 /* 0000 1100 1011 ... */
2541 /* 0 */ V(9, 8, 1), /* 396 */
2544 /* 0000 1101 0101 ... */
2545 /* 0 */ V(9, 7, 1), /* 398 */
2548 /* 0000 0110 1100 0001 ... */
2549 /* 0 */ V(14, 12, 1), /* 400 */
2550 /* 1 */ V(13, 13, 1)
2554 union huffpair const hufftab24[] = {
2555 /* 0000 */ PTR(16, 4),
2556 /* 0001 */ PTR(32, 4),
2557 /* 0010 */ PTR(48, 4),
2558 /* 0011 */ V(15, 15, 4),
2559 /* 0100 */ PTR(64, 4),
2560 /* 0101 */ PTR(80, 4),
2561 /* 0110 */ PTR(96, 4),
2562 /* 0111 */ PTR(112, 4),
2563 /* 1000 */ PTR(128, 4),
2564 /* 1001 */ PTR(144, 4),
2565 /* 1010 */ PTR(160, 3),
2566 /* 1011 */ PTR(168, 2),
2567 /* 1100 */ V(1, 1, 4),
2568 /* 1101 */ V(0, 1, 4),
2569 /* 1110 */ V(1, 0, 4),
2570 /* 1111 */ V(0, 0, 4),
2573 /* 0000 */ V(14, 15, 4), /* 16 */
2574 /* 0001 */ V(15, 14, 4),
2575 /* 0010 */ V(13, 15, 4),
2576 /* 0011 */ V(15, 13, 4),
2577 /* 0100 */ V(12, 15, 4),
2578 /* 0101 */ V(15, 12, 4),
2579 /* 0110 */ V(11, 15, 4),
2580 /* 0111 */ V(15, 11, 4),
2581 /* 1000 */ V(15, 10, 3),
2582 /* 1001 */ V(15, 10, 3),
2583 /* 1010 */ V(10, 15, 4),
2584 /* 1011 */ V(9, 15, 4),
2585 /* 1100 */ V(15, 9, 3),
2586 /* 1101 */ V(15, 9, 3),
2587 /* 1110 */ V(15, 8, 3),
2588 /* 1111 */ V(15, 8, 3),
2591 /* 0000 */ V(8, 15, 4), /* 32 */
2592 /* 0001 */ V(7, 15, 4),
2593 /* 0010 */ V(15, 7, 3),
2594 /* 0011 */ V(15, 7, 3),
2595 /* 0100 */ V(6, 15, 3),
2596 /* 0101 */ V(6, 15, 3),
2597 /* 0110 */ V(15, 6, 3),
2598 /* 0111 */ V(15, 6, 3),
2599 /* 1000 */ V(5, 15, 3),
2600 /* 1001 */ V(5, 15, 3),
2601 /* 1010 */ V(15, 5, 3),
2602 /* 1011 */ V(15, 5, 3),
2603 /* 1100 */ V(4, 15, 3),
2604 /* 1101 */ V(4, 15, 3),
2605 /* 1110 */ V(15, 4, 3),
2606 /* 1111 */ V(15, 4, 3),
2609 /* 0000 */ V(3, 15, 3), /* 48 */
2610 /* 0001 */ V(3, 15, 3),
2611 /* 0010 */ V(15, 3, 3),
2612 /* 0011 */ V(15, 3, 3),
2613 /* 0100 */ V(2, 15, 3),
2614 /* 0101 */ V(2, 15, 3),
2615 /* 0110 */ V(15, 2, 3),
2616 /* 0111 */ V(15, 2, 3),
2617 /* 1000 */ V(15, 1, 3),
2618 /* 1001 */ V(15, 1, 3),
2619 /* 1010 */ V(1, 15, 4),
2620 /* 1011 */ V(15, 0, 4),
2621 /* 1100 */ PTR(172, 3),
2622 /* 1101 */ PTR(180, 3),
2623 /* 1110 */ PTR(188, 3),
2624 /* 1111 */ PTR(196, 3),
2627 /* 0000 */ PTR(204, 4), /* 64 */
2628 /* 0001 */ PTR(220, 3),
2629 /* 0010 */ PTR(228, 3),
2630 /* 0011 */ PTR(236, 3),
2631 /* 0100 */ PTR(244, 2),
2632 /* 0101 */ PTR(248, 2),
2633 /* 0110 */ PTR(252, 2),
2634 /* 0111 */ PTR(256, 2),
2635 /* 1000 */ PTR(260, 2),
2636 /* 1001 */ PTR(264, 2),
2637 /* 1010 */ PTR(268, 2),
2638 /* 1011 */ PTR(272, 2),
2639 /* 1100 */ PTR(276, 2),
2640 /* 1101 */ PTR(280, 3),
2641 /* 1110 */ PTR(288, 2),
2642 /* 1111 */ PTR(292, 2),
2645 /* 0000 */ PTR(296, 2), /* 80 */
2646 /* 0001 */ PTR(300, 3),
2647 /* 0010 */ PTR(308, 2),
2648 /* 0011 */ PTR(312, 3),
2649 /* 0100 */ PTR(320, 1),
2650 /* 0101 */ PTR(322, 2),
2651 /* 0110 */ PTR(326, 2),
2652 /* 0111 */ PTR(330, 1),
2653 /* 1000 */ PTR(332, 2),
2654 /* 1001 */ PTR(336, 1),
2655 /* 1010 */ PTR(338, 1),
2656 /* 1011 */ PTR(340, 1),
2657 /* 1100 */ PTR(342, 1),
2658 /* 1101 */ PTR(344, 1),
2659 /* 1110 */ PTR(346, 1),
2660 /* 1111 */ PTR(348, 1),
2663 /* 0000 */ PTR(350, 1), /* 96 */
2664 /* 0001 */ PTR(352, 1),
2665 /* 0010 */ PTR(354, 1),
2666 /* 0011 */ PTR(356, 1),
2667 /* 0100 */ PTR(358, 1),
2668 /* 0101 */ PTR(360, 1),
2669 /* 0110 */ PTR(362, 1),
2670 /* 0111 */ PTR(364, 1),
2671 /* 1000 */ PTR(366, 1),
2672 /* 1001 */ PTR(368, 1),
2673 /* 1010 */ PTR(370, 2),
2674 /* 1011 */ PTR(374, 1),
2675 /* 1100 */ PTR(376, 2),
2676 /* 1101 */ V(7, 3, 4),
2677 /* 1110 */ PTR(380, 1),
2678 /* 1111 */ V(7, 2, 4),
2681 /* 0000 */ V(4, 6, 4), /* 112 */
2682 /* 0001 */ V(6, 4, 4),
2683 /* 0010 */ V(5, 5, 4),
2684 /* 0011 */ V(7, 1, 4),
2685 /* 0100 */ V(3, 6, 4),
2686 /* 0101 */ V(6, 3, 4),
2687 /* 0110 */ V(4, 5, 4),
2688 /* 0111 */ V(5, 4, 4),
2689 /* 1000 */ V(2, 6, 4),
2690 /* 1001 */ V(6, 2, 4),
2691 /* 1010 */ V(1, 6, 4),
2692 /* 1011 */ V(6, 1, 4),
2693 /* 1100 */ PTR(382, 1),
2694 /* 1101 */ V(3, 5, 4),
2695 /* 1110 */ V(5, 3, 4),
2696 /* 1111 */ V(4, 4, 4),
2699 /* 0000 */ V(2, 5, 4), /* 128 */
2700 /* 0001 */ V(5, 2, 4),
2701 /* 0010 */ V(1, 5, 4),
2702 /* 0011 */ PTR(384, 1),
2703 /* 0100 */ V(5, 1, 3),
2704 /* 0101 */ V(5, 1, 3),
2705 /* 0110 */ V(3, 4, 4),
2706 /* 0111 */ V(4, 3, 4),
2707 /* 1000 */ V(2, 4, 3),
2708 /* 1001 */ V(2, 4, 3),
2709 /* 1010 */ V(4, 2, 3),
2710 /* 1011 */ V(4, 2, 3),
2711 /* 1100 */ V(3, 3, 3),
2712 /* 1101 */ V(3, 3, 3),
2713 /* 1110 */ V(1, 4, 3),
2714 /* 1111 */ V(1, 4, 3),
2717 /* 0000 */ V(4, 1, 3), /* 144 */
2718 /* 0001 */ V(4, 1, 3),
2719 /* 0010 */ V(0, 4, 4),
2720 /* 0011 */ V(4, 0, 4),
2721 /* 0100 */ V(2, 3, 3),
2722 /* 0101 */ V(2, 3, 3),
2723 /* 0110 */ V(3, 2, 3),
2724 /* 0111 */ V(3, 2, 3),
2725 /* 1000 */ V(1, 3, 2),
2726 /* 1001 */ V(1, 3, 2),
2727 /* 1010 */ V(1, 3, 2),
2728 /* 1011 */ V(1, 3, 2),
2729 /* 1100 */ V(3, 1, 2),
2730 /* 1101 */ V(3, 1, 2),
2731 /* 1110 */ V(3, 1, 2),
2732 /* 1111 */ V(3, 1, 2),
2735 /* 000 */ V(0, 3, 3), /* 160 */
2736 /* 001 */ V(3, 0, 3),
2737 /* 010 */ V(2, 2, 2),
2738 /* 011 */ V(2, 2, 2),
2739 /* 100 */ V(1, 2, 1),
2740 /* 101 */ V(1, 2, 1),
2741 /* 110 */ V(1, 2, 1),
2742 /* 111 */ V(1, 2, 1),
2745 /* 00 */ V(2, 1, 1), /* 168 */
2746 /* 01 */ V(2, 1, 1),
2747 /* 10 */ V(0, 2, 2),
2748 /* 11 */ V(2, 0, 2),
2751 /* 000 */ V(0, 15, 1), /* 172 */
2752 /* 001 */ V(0, 15, 1),
2753 /* 010 */ V(0, 15, 1),
2754 /* 011 */ V(0, 15, 1),
2755 /* 100 */ V(14, 14, 3),
2756 /* 101 */ V(13, 14, 3),
2757 /* 110 */ V(14, 13, 3),
2758 /* 111 */ V(12, 14, 3),
2761 /* 000 */ V(14, 12, 3), /* 180 */
2762 /* 001 */ V(13, 13, 3),
2763 /* 010 */ V(11, 14, 3),
2764 /* 011 */ V(14, 11, 3),
2765 /* 100 */ V(12, 13, 3),
2766 /* 101 */ V(13, 12, 3),
2767 /* 110 */ V(10, 14, 3),
2768 /* 111 */ V(14, 10, 3),
2771 /* 000 */ V(11, 13, 3), /* 188 */
2772 /* 001 */ V(13, 11, 3),
2773 /* 010 */ V(12, 12, 3),
2774 /* 011 */ V(9, 14, 3),
2775 /* 100 */ V(14, 9, 3),
2776 /* 101 */ V(10, 13, 3),
2777 /* 110 */ V(13, 10, 3),
2778 /* 111 */ V(11, 12, 3),
2781 /* 000 */ V(12, 11, 3), /* 196 */
2782 /* 001 */ V(8, 14, 3),
2783 /* 010 */ V(14, 8, 3),
2784 /* 011 */ V(9, 13, 3),
2785 /* 100 */ V(13, 9, 3),
2786 /* 101 */ V(7, 14, 3),
2787 /* 110 */ V(14, 7, 3),
2788 /* 111 */ V(10, 12, 3),
2791 /* 0000 */ V(12, 10, 3), /* 204 */
2792 /* 0001 */ V(12, 10, 3),
2793 /* 0010 */ V(11, 11, 3),
2794 /* 0011 */ V(11, 11, 3),
2795 /* 0100 */ V(8, 13, 3),
2796 /* 0101 */ V(8, 13, 3),
2797 /* 0110 */ V(13, 8, 3),
2798 /* 0111 */ V(13, 8, 3),
2799 /* 1000 */ V(0, 14, 4),
2800 /* 1001 */ V(14, 0, 4),
2801 /* 1010 */ V(0, 13, 3),
2802 /* 1011 */ V(0, 13, 3),
2803 /* 1100 */ V(14, 6, 2),
2804 /* 1101 */ V(14, 6, 2),
2805 /* 1110 */ V(14, 6, 2),
2806 /* 1111 */ V(14, 6, 2),
2809 /* 000 */ V(6, 14, 3), /* 220 */
2810 /* 001 */ V(9, 12, 3),
2811 /* 010 */ V(12, 9, 2),
2812 /* 011 */ V(12, 9, 2),
2813 /* 100 */ V(5, 14, 2),
2814 /* 101 */ V(5, 14, 2),
2815 /* 110 */ V(11, 10, 2),
2816 /* 111 */ V(11, 10, 2),
2819 /* 000 */ V(14, 5, 2), /* 228 */
2820 /* 001 */ V(14, 5, 2),
2821 /* 010 */ V(10, 11, 3),
2822 /* 011 */ V(7, 13, 3),
2823 /* 100 */ V(13, 7, 2),
2824 /* 101 */ V(13, 7, 2),
2825 /* 110 */ V(14, 4, 2),
2826 /* 111 */ V(14, 4, 2),
2829 /* 000 */ V(8, 12, 2), /* 236 */
2830 /* 001 */ V(8, 12, 2),
2831 /* 010 */ V(12, 8, 2),
2832 /* 011 */ V(12, 8, 2),
2833 /* 100 */ V(4, 14, 3),
2834 /* 101 */ V(2, 14, 3),
2835 /* 110 */ V(3, 14, 2),
2836 /* 111 */ V(3, 14, 2),
2839 /* 00 */ V(6, 13, 2), /* 244 */
2840 /* 01 */ V(13, 6, 2),
2841 /* 10 */ V(14, 3, 2),
2842 /* 11 */ V(9, 11, 2),
2845 /* 00 */ V(11, 9, 2), /* 248 */
2846 /* 01 */ V(10, 10, 2),
2847 /* 10 */ V(14, 2, 2),
2848 /* 11 */ V(1, 14, 2),
2851 /* 00 */ V(14, 1, 2), /* 252 */
2852 /* 01 */ V(5, 13, 2),
2853 /* 10 */ V(13, 5, 2),
2854 /* 11 */ V(7, 12, 2),
2857 /* 00 */ V(12, 7, 2), /* 256 */
2858 /* 01 */ V(4, 13, 2),
2859 /* 10 */ V(8, 11, 2),
2860 /* 11 */ V(11, 8, 2),
2863 /* 00 */ V(13, 4, 2), /* 260 */
2864 /* 01 */ V(9, 10, 2),
2865 /* 10 */ V(10, 9, 2),
2866 /* 11 */ V(6, 12, 2),
2869 /* 00 */ V(12, 6, 2), /* 264 */
2870 /* 01 */ V(3, 13, 2),
2871 /* 10 */ V(13, 3, 2),
2872 /* 11 */ V(2, 13, 2),
2875 /* 00 */ V(13, 2, 2), /* 268 */
2876 /* 01 */ V(1, 13, 2),
2877 /* 10 */ V(7, 11, 2),
2878 /* 11 */ V(11, 7, 2),
2881 /* 00 */ V(13, 1, 2), /* 272 */
2882 /* 01 */ V(5, 12, 2),
2883 /* 10 */ V(12, 5, 2),
2884 /* 11 */ V(8, 10, 2),
2887 /* 00 */ V(10, 8, 2), /* 276 */
2888 /* 01 */ V(9, 9, 2),
2889 /* 10 */ V(4, 12, 2),
2890 /* 11 */ V(12, 4, 2),
2893 /* 000 */ V(6, 11, 2), /* 280 */
2894 /* 001 */ V(6, 11, 2),
2895 /* 010 */ V(11, 6, 2),
2896 /* 011 */ V(11, 6, 2),
2897 /* 100 */ V(13, 0, 3),
2898 /* 101 */ V(0, 12, 3),
2899 /* 110 */ V(3, 12, 2),
2900 /* 111 */ V(3, 12, 2),
2903 /* 00 */ V(12, 3, 2), /* 288 */
2904 /* 01 */ V(7, 10, 2),
2905 /* 10 */ V(10, 7, 2),
2906 /* 11 */ V(2, 12, 2),
2909 /* 00 */ V(12, 2, 2), /* 292 */
2910 /* 01 */ V(5, 11, 2),
2911 /* 10 */ V(11, 5, 2),
2912 /* 11 */ V(1, 12, 2),
2915 /* 00 */ V(8, 9, 2), /* 296 */
2916 /* 01 */ V(9, 8, 2),
2917 /* 10 */ V(12, 1, 2),
2918 /* 11 */ V(4, 11, 2),
2921 /* 000 */ V(12, 0, 3), /* 300 */
2922 /* 001 */ V(0, 11, 3),
2923 /* 010 */ V(3, 11, 2),
2924 /* 011 */ V(3, 11, 2),
2925 /* 100 */ V(11, 0, 3),
2926 /* 101 */ V(0, 10, 3),
2927 /* 110 */ V(1, 10, 2),
2928 /* 111 */ V(1, 10, 2),
2931 /* 00 */ V(11, 4, 1), /* 308 */
2932 /* 01 */ V(11, 4, 1),
2933 /* 10 */ V(6, 10, 2),
2934 /* 11 */ V(10, 6, 2),
2937 /* 000 */ V(7, 9, 2), /* 312 */
2938 /* 001 */ V(7, 9, 2),
2939 /* 010 */ V(9, 7, 2),
2940 /* 011 */ V(9, 7, 2),
2941 /* 100 */ V(10, 0, 3),
2942 /* 101 */ V(0, 9, 3),
2943 /* 110 */ V(9, 0, 2),
2944 /* 111 */ V(9, 0, 2),
2947 /* 0 */ V(11, 3, 1), /* 320 */
2951 /* 00 */ V(2, 11, 2), /* 322 */
2952 /* 01 */ V(5, 10, 2),
2953 /* 10 */ V(11, 2, 1),
2954 /* 11 */ V(11, 2, 1),
2957 /* 00 */ V(10, 5, 2), /* 326 */
2958 /* 01 */ V(1, 11, 2),
2959 /* 10 */ V(11, 1, 2),
2960 /* 11 */ V(6, 9, 2),
2963 /* 0 */ V(9, 6, 1), /* 330 */
2964 /* 1 */ V(10, 4, 1),
2967 /* 00 */ V(4, 10, 2), /* 332 */
2968 /* 01 */ V(7, 8, 2),
2969 /* 10 */ V(8, 7, 1),
2970 /* 11 */ V(8, 7, 1),
2973 /* 0 */ V(3, 10, 1), /* 336 */
2974 /* 1 */ V(10, 3, 1),
2977 /* 0 */ V(5, 9, 1), /* 338 */
2981 /* 0 */ V(2, 10, 1), /* 340 */
2982 /* 1 */ V(10, 2, 1),
2985 /* 0 */ V(10, 1, 1), /* 342 */
2989 /* 0 */ V(8, 6, 1), /* 344 */
2993 /* 0 */ V(4, 9, 1), /* 346 */
2997 /* 0 */ V(3, 9, 1), /* 348 */
3001 /* 0 */ V(5, 8, 1), /* 350 */
3005 /* 0 */ V(2, 9, 1), /* 352 */
3009 /* 0 */ V(7, 6, 1), /* 354 */
3013 /* 0 */ V(1, 9, 1), /* 356 */
3017 /* 0 */ V(4, 8, 1), /* 358 */
3021 /* 0 */ V(5, 7, 1), /* 360 */
3025 /* 0 */ V(3, 8, 1), /* 362 */
3029 /* 0 */ V(6, 6, 1), /* 364 */
3033 /* 0 */ V(8, 2, 1), /* 366 */
3037 /* 0 */ V(4, 7, 1), /* 368 */
3041 /* 00 */ V(8, 1, 1), /* 370 */
3042 /* 01 */ V(8, 1, 1),
3043 /* 10 */ V(0, 8, 2),
3044 /* 11 */ V(8, 0, 2),
3047 /* 0 */ V(5, 6, 1), /* 374 */
3051 /* 00 */ V(1, 7, 1), /* 376 */
3052 /* 01 */ V(1, 7, 1),
3053 /* 10 */ V(0, 7, 2),
3054 /* 11 */ V(7, 0, 2),
3057 /* 0 */ V(3, 7, 1), /* 380 */
3061 /* 0 */ V(0, 6, 1), /* 382 */
3065 /* 0 */ V(0, 5, 1), /* 384 */
3072 /* external tables */
3074 union huffquad const *const mad_huff_quad_table[2] = { hufftabA, hufftabB };
3076 struct hufftable const mad_huff_pair_table[32] = {
3077 /* 0 */ { hufftab0, 0, 0 },
3078 /* 1 */ { hufftab1, 0, 3 },
3079 /* 2 */ { hufftab2, 0, 3 },
3080 /* 3 */ { hufftab3, 0, 3 },
3081 /* 4 */ { 0 /* not used */ },
3082 /* 5 */ { hufftab5, 0, 3 },
3083 /* 6 */ { hufftab6, 0, 4 },
3084 /* 7 */ { hufftab7, 0, 4 },
3085 /* 8 */ { hufftab8, 0, 4 },
3086 /* 9 */ { hufftab9, 0, 4 },
3087 /* 10 */ { hufftab10, 0, 4 },
3088 /* 11 */ { hufftab11, 0, 4 },
3089 /* 12 */ { hufftab12, 0, 4 },
3090 /* 13 */ { hufftab13, 0, 4 },
3091 /* 14 */ { 0 /* not used */ },
3092 /* 15 */ { hufftab15, 0, 4 },
3093 /* 16 */ { hufftab16, 1, 4 },
3094 /* 17 */ { hufftab16, 2, 4 },
3095 /* 18 */ { hufftab16, 3, 4 },
3096 /* 19 */ { hufftab16, 4, 4 },
3097 /* 20 */ { hufftab16, 6, 4 },
3098 /* 21 */ { hufftab16, 8, 4 },
3099 /* 22 */ { hufftab16, 10, 4 },
3100 /* 23 */ { hufftab16, 13, 4 },
3101 /* 24 */ { hufftab24, 4, 4 },
3102 /* 25 */ { hufftab24, 5, 4 },
3103 /* 26 */ { hufftab24, 6, 4 },
3104 /* 27 */ { hufftab24, 7, 4 },
3105 /* 28 */ { hufftab24, 8, 4 },
3106 /* 29 */ { hufftab24, 9, 4 },
3107 /* 30 */ { hufftab24, 11, 4 },
3108 /* 31 */ { hufftab24, 13, 4 }