2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3 ** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
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 ** Any non-GPL usage of this software or parts of this software is strictly
22 ** The "appropriate copyright message" mentioned in section 2c of the GPLv2
23 ** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
25 ** Commercial non-GPL licensing of this software is possible.
26 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
28 ** $Id: hcb_10.h,v 1.5 2007/11/01 12:34:11 menno Exp $
31 /* 2-step huffman table HCB_10 */
37 * Used to find offset into 2nd step table and number of extra bits to get
39 static hcb hcb10_1[] = {
41 { /* 000000 */ 0, 0 },
45 { /* 000100 */ 1, 0 },
49 { /* 001000 */ 2, 0 },
54 { /* 001100 */ 3, 0 },
56 { /* 001110 */ 4, 0 },
58 { /* 010000 */ 5, 0 },
60 { /* 010010 */ 6, 0 },
62 { /* 010100 */ 7, 0 },
64 { /* 010110 */ 8, 0 },
66 { /* 011000 */ 9, 0 },
68 { /* 011010 */ 10, 0 },
71 { /* 011100 */ 11, 0 },
72 { /* 011101 */ 12, 0 },
73 { /* 011110 */ 13, 0 },
74 { /* 011111 */ 14, 0 },
75 { /* 100000 */ 15, 0 },
76 { /* 100001 */ 16, 0 },
77 { /* 100010 */ 17, 0 },
78 { /* 100011 */ 18, 0 },
79 { /* 100100 */ 19, 0 },
80 { /* 100101 */ 20, 0 },
81 { /* 100110 */ 21, 0 },
82 { /* 100111 */ 22, 0 },
83 { /* 101000 */ 23, 0 },
84 { /* 101001 */ 24, 0 },
86 { /* 101010 */ 25, 1 },
87 { /* 101011 */ 27, 1 },
88 { /* 101100 */ 29, 1 },
89 { /* 101101 */ 31, 1 },
90 { /* 101110 */ 33, 1 },
91 { /* 101111 */ 35, 1 },
92 { /* 110000 */ 37, 1 },
93 { /* 110001 */ 39, 1 },
94 /* 7/8 bit codewords */
95 { /* 110010 */ 41, 2 },
97 { /* 110011 */ 45, 2 },
98 { /* 110100 */ 49, 2 },
99 { /* 110101 */ 53, 2 },
100 { /* 110110 */ 57, 2 },
101 { /* 110111 */ 61, 2 },
102 /* 8/9 bit codewords */
103 { /* 111000 */ 65, 3 },
104 /* 9 bit codewords */
105 { /* 111001 */ 73, 3 },
106 { /* 111010 */ 81, 3 },
107 { /* 111011 */ 89, 3 },
108 /* 9/10 bit codewords */
109 { /* 111100 */ 97, 4 },
110 /* 10 bit codewords */
111 { /* 111101 */ 113, 4 },
112 { /* 111110 */ 129, 4 },
113 /* 10/11/12 bit codewords */
114 { /* 111111 */ 145, 6 }
119 * Gives size of codeword and actual data (x,y,v,w)
121 static hcb_2_pair hcb10_2[] = {
122 /* 4 bit codewords */
127 /* 5 bit codewords */
137 /* 6 bit codewords */
153 /* 7 bit codewords */
171 /* 7/8 bit codewords */
172 { 7, 4, 6 }, { 7, 4, 6 },
176 /* 8 bit codewords */
198 /* 8/9 bit codewords */
199 { 8, 5, 7 }, { 8, 5, 7 },
200 { 8, 8, 5 }, { 8, 8, 5 },
201 { 8, 5, 8 }, { 8, 5, 8 },
205 /* 9 bit codewords */
231 /* 9/10 bit codewords */
232 { 9, 6, 9 }, { 9, 6, 9 },
233 { 9, 8, 0 }, { 9, 8, 0 },
234 { 9, 4, 10 }, { 9, 4, 10 },
235 { 9, 7, 0 }, { 9, 7, 0 },
236 { 9, 11, 2 }, { 9, 11, 2 },
244 /* 10 bit codewords */
278 /* 10/11/12 bit codewords */
279 { 10, 12, 6 }, { 10, 12, 6 }, { 10, 12, 6 }, { 10, 12, 6 },
280 { 10, 2, 12 }, { 10, 2, 12 }, { 10, 2, 12 }, { 10, 2, 12 },
281 { 10, 8, 10 }, { 10, 8, 10 }, { 10, 8, 10 }, { 10, 8, 10 },
282 { 11, 9, 10 }, { 11, 9, 10 },
283 { 11, 1, 12 }, { 11, 1, 12 },
284 { 11, 11, 8 }, { 11, 11, 8 },
285 { 11, 12, 7 }, { 11, 12, 7 },
286 { 11, 7, 11 }, { 11, 7, 11 },
287 { 11, 5, 12 }, { 11, 5, 12 },
288 { 11, 6, 12 }, { 11, 6, 12 },
289 { 11, 10, 9 }, { 11, 10, 9 },
290 { 11, 8, 11 }, { 11, 8, 11 },
291 { 11, 12, 8 }, { 11, 12, 8 },
292 { 11, 0, 10 }, { 11, 0, 10 },
293 { 11, 7, 12 }, { 11, 7, 12 },
294 { 11, 11, 0 }, { 11, 11, 0 },
295 { 11, 10, 10 }, { 11, 10, 10 },
296 { 11, 11, 9 }, { 11, 11, 9 },
297 { 11, 11, 10 }, { 11, 11, 10 },
298 { 11, 0, 11 }, { 11, 0, 11 },
299 { 11, 11, 11 }, { 11, 11, 11 },
300 { 11, 9, 11 }, { 11, 9, 11 },
301 { 11, 10, 11 }, { 11, 10, 11 },
302 { 11, 12, 0 }, { 11, 12, 0 },
303 { 11, 8, 12 }, { 11, 8, 12 },