2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3 ** Copyright (C) 2003 M. Bakker, Ahead Software 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 ** Commercial non-GPL licensing of this software is possible.
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
28 /* 2-step huffman table HCB_6 */
34 * Used to find offset into 2nd step table and number of extra bits to get
36 static hcb hcb6_1
[] = {
59 { /* 10011 */ 11, 1 },
60 { /* 10100 */ 13, 1 },
61 { /* 10101 */ 15, 1 },
62 { /* 10110 */ 17, 1 },
63 { /* 10111 */ 19, 1 },
64 { /* 11000 */ 21, 1 },
65 { /* 11001 */ 23, 1 },
68 { /* 11010 */ 25, 2 },
69 { /* 11011 */ 29, 2 },
70 { /* 11100 */ 33, 2 },
72 /* 7/8 bit codewords */
73 { /* 11101 */ 37, 3 },
75 /* 8/9 bit codewords */
76 { /* 11110 */ 45, 4 },
78 /* 9/10/11 bit codewords */
84 * Gives size of codeword and actual data (x,y,v,w)
86 static hcb_2_pair hcb6_2
[] = {
116 /* 7 bit codewords */
130 /* 7/8 bit codewords */
131 { 7, 3, 2 }, { 7, 3, 2 },
139 /* 8 bit codewords */
140 { 8, -3, 2 }, { 8, -3, 2 },
141 { 8, 3, 3 }, { 8, 3, 3 },
155 /* 9/10/11 bit codewords */
156 { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 },
157 { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 },
158 { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 },
159 { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 },
160 { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 },
161 { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 },
162 { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 },
163 { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 },
164 { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 },
165 { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 },
166 { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 },
167 { 10, -3, -4 }, { 10, -3, -4 },
168 { 10, -3, 4 }, { 10, -3, 4 },
169 { 10, 3, -4 }, { 10, 3, -4 },
170 { 10, 4, -3 }, { 10, 4, -3 },
171 { 10, 3, 4 }, { 10, 3, 4 },
172 { 10, 4, 3 }, { 10, 4, 3 },
173 { 10, -4, 3 }, { 10, -4, 3 },
174 { 10, -4, -3 }, { 10, -4, -3 },