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_1.h,v 1.5 2007/11/01 12:34:11 menno Exp $
31 /* 2-step huffman table HCB_1 */
37 * Used to find offset into 2nd step table and number of extra bits to get
39 static hcb hcb1_1[] = {
67 { /* 11001 */ 13, 2 },
68 { /* 11010 */ 17, 2 },
69 { /* 11011 */ 21, 2 },
70 { /* 11100 */ 25, 2 },
71 { /* 11101 */ 29, 2 },
74 { /* 11110 */ 33, 4 },
76 /* 9/10/11 bit codewords */
82 * Gives size of codeword and actual data (x,y,v,w)
84 static hcb_2_quad hcb1_2[] = {
99 /* first 5 bits: 11000 */
104 /* first 5 bits: 11001 */
109 /* first 5 bits: 11010 */
114 /* first 5 bits: 11011 */
119 /* first 5 bits: 11100 */
124 /* first 5 bits: 11101 */
131 /* first 5 bits: 11110 */
149 /* 9/10/11 bit codewords */
150 /* first 5 bits: 11111 */
151 /* 9 bit: reading 11 bits -> 2 too much so 4 entries for each codeword */
152 { 9, -1, 1, 0, -1 }, { 9, -1, 1, 0, -1 }, { 9, -1, 1, 0, -1 }, { 9, -1, 1, 0, -1 },
153 { 9, -1, -1, -1, 0 }, { 9, -1, -1, -1, 0 }, { 9, -1, -1, -1, 0 }, { 9, -1, -1, -1, 0 },
154 { 9, 0, -1, -1, -1 }, { 9, 0, -1, -1, -1 }, { 9, 0, -1, -1, -1 }, { 9, 0, -1, -1, -1 },
155 { 9, 0, 1, 1, 1 }, { 9, 0, 1, 1, 1 }, { 9, 0, 1, 1, 1 }, { 9, 0, 1, 1, 1 },
156 { 9, 1, 0, 1, -1 }, { 9, 1, 0, 1, -1 }, { 9, 1, 0, 1, -1 }, { 9, 1, 0, 1, -1 },
157 { 9, 1, 1, 0, 1 }, { 9, 1, 1, 0, 1 }, { 9, 1, 1, 0, 1 }, { 9, 1, 1, 0, 1 },
158 { 9, -1, 1, 0, 1 }, { 9, -1, 1, 0, 1 }, { 9, -1, 1, 0, 1 }, { 9, -1, 1, 0, 1 },
159 { 9, 1, 1, 1, 0 }, { 9, 1, 1, 1, 0 }, { 9, 1, 1, 1, 0 }, { 9, 1, 1, 1, 0 },
160 /* 10 bit: reading 11 bits -> 1 too much so 2 entries for each codeword */
161 { 10, -1, -1, 0, 1 }, { 10, -1, -1, 0, 1 },
162 { 10, -1, 0, -1, -1 }, { 10, -1, 0, -1, -1 },
163 { 10, 1, 1, 0, -1 }, { 10, 1, 1, 0, -1 },
164 { 10, 1, 0, -1, -1 }, { 10, 1, 0, -1, -1 },
165 { 10, -1, 0, -1, 1 }, { 10, -1, 0, -1, 1 },
166 { 10, -1, -1, 0, -1 }, { 10, -1, -1, 0, -1 },
167 { 10, -1, 0, 1, 1 }, { 10, -1, 0, 1, 1 },
168 { 10, 1, 0, 1, 1 }, { 10, 1, 0, 1, 1 },
170 { 11, 1, -1, 1, -1 },
171 { 11, -1, 1, -1, 1 },
172 { 11, -1, 1, 1, -1 },
173 { 11, 1, -1, -1, 1 },
175 { 11, -1, -1, 1, 1 },
176 { 11, 1, 1, -1, -1 },
177 { 11, -1, -1, 1, -1 },
178 { 11, -1, -1, -1, -1 },
182 { 11, -1, 1, -1, -1 },
183 { 11, -1, -1, -1, 1 },
184 { 11, 1, -1, -1, -1 },