OSDN Git Service

wwww
[proj16/16.git] / src / lib / doslib / ext / faad / codebook / hcb_10.h
1 /*
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3 ** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
4 **  
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.
9 ** 
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.
14 ** 
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.
18 **
19 ** Any non-GPL usage of this software or parts of this software is strictly
20 ** forbidden.
21 **
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"
24 **
25 ** Commercial non-GPL licensing of this software is possible.
26 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
27 **
28 ** $Id: hcb_10.h,v 1.5 2007/11/01 12:34:11 menno Exp $
29 **/
30
31 /* 2-step huffman table HCB_10 */
32
33
34 /* 1st step: 6 bits
35  *           2^6 = 64 entries
36  *
37  * Used to find offset into 2nd step table and number of extra bits to get
38  */
39 static hcb hcb10_1[] = {
40     /* 4 bit codewords */
41     { /* 000000 */ 0, 0 },
42     { /*        */ 0, 0 },
43     { /*        */ 0, 0 },
44     { /*        */ 0, 0 },
45     { /* 000100 */ 1, 0 },
46     { /*        */ 1, 0 },
47     { /*        */ 1, 0 },
48     { /*        */ 1, 0 },
49     { /* 001000 */ 2, 0 },
50     { /*        */ 2, 0 },
51     { /*        */ 2, 0 },
52     { /*        */ 2, 0 },
53     /* 5 bit codewords */
54     { /* 001100 */ 3, 0 },
55     { /*        */ 3, 0 },
56     { /* 001110 */ 4, 0 },
57     { /*        */ 4, 0 },
58     { /* 010000 */ 5, 0 },
59     { /*        */ 5, 0 },
60     { /* 010010 */ 6, 0 },
61     { /*        */ 6, 0 },
62     { /* 010100 */ 7, 0 },
63     { /*        */ 7, 0 },
64     { /* 010110 */ 8, 0 },
65     { /*        */ 8, 0 },
66     { /* 011000 */ 9, 0 },
67     { /*        */ 9, 0 },
68     { /* 011010 */ 10, 0 },
69     { /*        */ 10, 0 },
70     /* 6 bit codewords */
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 },
85     /* 7 bit codewords */
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 },
96     /* 8 bit codewords */
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 }
115 };
116
117 /* 2nd step table
118  *
119  * Gives size of codeword and actual data (x,y,v,w)
120  */
121 static hcb_2_pair hcb10_2[] = {
122     /* 4 bit codewords */
123     { 4,  1,  1 },
124     { 4,  1,  2 },
125     { 4,  2,  1 },
126
127     /* 5 bit codewords */
128     { 5,  2,  2 },
129     { 5,  1,  0 },
130     { 5,  0,  1 },
131     { 5,  1,  3 },
132     { 5,  3,  2 },
133     { 5,  3,  1 },
134     { 5,  2,  3 },
135     { 5,  3,  3 },
136
137     /* 6 bit codewords */
138     { 6,  2,  0 },
139     { 6,  0,  2 },
140     { 6,  2,  4 },
141     { 6,  4,  2 },
142     { 6,  1,  4 },
143     { 6,  4,  1 },
144     { 6,  0,  0 },
145     { 6,  4,  3 },
146     { 6,  3,  4 },
147     { 6,  3,  0 },
148     { 6,  0,  3 },
149     { 6,  4,  4 },
150     { 6,  2,  5 },
151     { 6,  5,  2 },
152
153     /* 7 bit codewords */
154     { 7,  1,  5 },
155     { 7,  5,  1 },
156     { 7,  5,  3 },
157     { 7,  3,  5 },
158     { 7,  5,  4 },
159     { 7,  4,  5 },
160     { 7,  6,  2 },
161     { 7,  2,  6 },
162     { 7,  6,  3 },
163     { 7,  4,  0 },
164     { 7,  6,  1 },
165     { 7,  0,  4 },
166     { 7,  1,  6 },
167     { 7,  3,  6 },
168     { 7,  5,  5 },
169     { 7,  6,  4 },
170
171     /* 7/8 bit codewords */
172     { 7,  4,  6 }, { 7,  4,  6 },
173     { 8,  6,  5 },
174     { 8,  7,  2 },
175
176     /* 8 bit codewords */
177     { 8,  3,  7 },
178     { 8,  2,  7 },
179     { 8,  5,  6 },
180     { 8,  8,  2 },
181     { 8,  7,  3 },
182     { 8,  5,  0 },
183     { 8,  7,  1 },
184     { 8,  0,  5 },
185     { 8,  8,  1 },
186     { 8,  1,  7 },
187     { 8,  8,  3 },
188     { 8,  7,  4 },
189     { 8,  4,  7 },
190     { 8,  2,  8 },
191     { 8,  6,  6 },
192     { 8,  7,  5 },
193     { 8,  1,  8 },
194     { 8,  3,  8 },
195     { 8,  8,  4 },
196     { 8,  4,  8 },
197
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 },
202     { 9,  7,  6 },
203     { 9,  6,  7 },
204
205     /* 9 bit codewords */
206     { 9,  9,  2 },
207     { 9,  6,  0 },
208     { 9,  6,  8 },
209     { 9,  9,  3 },
210     { 9,  3,  9 },
211     { 9,  9,  1 },
212     { 9,  2,  9 },
213     { 9,  0,  6 },
214     { 9,  8,  6 },
215     { 9,  9,  4 },
216     { 9,  4,  9 },
217     { 9, 10,  2 },
218     { 9,  1,  9 },
219     { 9,  7,  7 },
220     { 9,  8,  7 },
221     { 9,  9,  5 },
222     { 9,  7,  8 },
223     { 9, 10,  3 },
224     { 9,  5,  9 },
225     { 9, 10,  4 },
226     { 9,  2, 10 },
227     { 9, 10,  1 },
228     { 9,  3, 10 },
229     { 9,  9,  6 },
230
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 },
237     { 10,  7,  9 },
238     { 10, 11,  3 },
239     { 10, 10,  6 },
240     { 10,  1, 10 },
241     { 10, 11,  1 },
242     { 10,  9,  7 },
243
244     /* 10 bit codewords */
245     { 10,  0,  7 },
246     { 10,  8,  8 },
247     { 10, 10,  5 },
248     { 10,  3, 11 },
249     { 10,  5, 10 },
250     { 10,  8,  9 },
251     { 10, 11,  5 },
252     { 10,  0,  8 },
253     { 10, 11,  4 },
254     { 10,  2, 11 },
255     { 10,  7, 10 },
256     { 10,  6, 10 },
257     { 10, 10,  7 },
258     { 10,  4, 11 },
259     { 10,  1, 11 },
260     { 10, 12,  2 },
261     { 10,  9,  8 },
262     { 10, 12,  3 },
263     { 10, 11,  6 },
264     { 10,  5, 11 },
265     { 10, 12,  4 },
266     { 10, 11,  7 },
267     { 10, 12,  5 },
268     { 10,  3, 12 },
269     { 10,  6, 11 },
270     { 10,  9,  0 },
271     { 10, 10,  8 },
272     { 10, 10,  0 },
273     { 10, 12,  1 },
274     { 10,  0,  9 },
275     { 10,  4, 12 },
276     { 10,  9,  9 },
277
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 },
304     { 12, 12,  9 },
305     { 12, 10, 12 },
306     { 12,  9, 12 },
307     { 12, 11, 12 },
308     { 12, 12, 11 },
309     { 12,  0, 12 },
310     { 12, 12, 10 },
311     { 12, 12, 12 }
312 };