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_8 */
34 * Used to find offset into 2nd step table and number of extra bits to get
36 static hcb hcb8_1
[] = {
60 { /* 10010 */ 10, 0 },
61 { /* 10011 */ 11, 0 },
62 { /* 10100 */ 12, 0 },
65 { /* 10101 */ 13, 1 },
66 { /* 10110 */ 15, 1 },
67 { /* 10111 */ 17, 1 },
68 { /* 11000 */ 19, 1 },
69 { /* 11001 */ 21, 1 },
72 { /* 11010 */ 23, 2 },
73 { /* 11011 */ 27, 2 },
74 { /* 11100 */ 31, 2 },
76 /* 7/8 bit codewords */
77 { /* 11101 */ 35, 3 },
80 { /* 11110 */ 43, 3 },
82 /* 8/9/10 bit codewords */
88 * Gives size of codeword and actual data (x,y,v,w)
90 static hcb_2_pair hcb8_2
[] = {
101 /* 5 bit codewords */
110 /* 6 bit codewords */
122 /* 7 bit codewords */
136 /* 7/8 bit codewords */
137 { 7, 6, 1 }, { 7, 6, 1 },
138 { 7, 1, 6 }, { 7, 1, 6 },
144 /* 8 bit codewords */
154 /* 8/9/10 bit codewords */
155 { 8, 1, 7 }, { 8, 1, 7 }, { 8, 1, 7 }, { 8, 1, 7 },
156 { 8, 5, 6 }, { 8, 5, 6 }, { 8, 5, 6 }, { 8, 5, 6 },
157 { 8, 3, 7 }, { 8, 3, 7 }, { 8, 3, 7 }, { 8, 3, 7 },
158 { 9, 6, 6 }, { 9, 6, 6 },
159 { 9, 7, 4 }, { 9, 7, 4 },
160 { 9, 6, 0 }, { 9, 6, 0 },
161 { 9, 4, 7 }, { 9, 4, 7 },
162 { 9, 0, 6 }, { 9, 0, 6 },
163 { 9, 7, 5 }, { 9, 7, 5 },
164 { 9, 7, 6 }, { 9, 7, 6 },
165 { 9, 6, 7 }, { 9, 6, 7 },