annotate libfaad2/codebook/hcb_8.h @ 32285:150de764e80b

Simplify ENCA check.
author diego
date Sun, 26 Sep 2010 20:48:15 +0000
parents e83eef58b30a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
1 /*
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
3 ** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 14726
diff changeset
4 **
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
5 ** This program is free software; you can redistribute it and/or modify
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
6 ** it under the terms of the GNU General Public License as published by
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
7 ** the Free Software Foundation; either version 2 of the License, or
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
8 ** (at your option) any later version.
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 14726
diff changeset
9 **
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
10 ** This program is distributed in the hope that it will be useful,
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
13 ** GNU General Public License for more details.
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 14726
diff changeset
14 **
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
15 ** You should have received a copy of the GNU General Public License
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 14726
diff changeset
16 ** along with this program; if not, write to the Free Software
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
18 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
19 ** Any non-GPL usage of this software or parts of this software is strictly
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
20 ** forbidden.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
21 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
22 ** Commercial non-GPL licensing of this software is possible.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
24 **
14726
1d5a49e6d9db Remove modification notice from files that have not been locally modified.
diego
parents: 12625
diff changeset
25 ** $Id: hcb_8.h,v 1.3 2003/09/09 18:12:01 menno Exp $
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
26 **/
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
27
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
28 /* 2-step huffman table HCB_8 */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
29
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
30
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
31 /* 1st step: 5 bits
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
32 * 2^5 = 32 entries
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
33 *
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
34 * Used to find offset into 2nd step table and number of extra bits to get
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
35 */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
36 static hcb hcb8_1[] = {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
37 /* 3 bit codeword */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
38 { /* 00000 */ 0, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
39 { /* */ 0, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
40 { /* */ 0, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
41 { /* */ 0, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
42
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
43 /* 4 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
44 { /* 00100 */ 1, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
45 { /* */ 1, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
46 { /* 00110 */ 2, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
47 { /* */ 2, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
48 { /* 01000 */ 3, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
49 { /* */ 3, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
50 { /* 01010 */ 4, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
51 { /* */ 4, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
52 { /* 01100 */ 5, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
53 { /* */ 5, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
54
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
55 /* 5 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
56 { /* 01110 */ 6, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
57 { /* 01111 */ 7, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
58 { /* 10000 */ 8, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
59 { /* 10001 */ 9, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
60 { /* 10010 */ 10, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
61 { /* 10011 */ 11, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
62 { /* 10100 */ 12, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
63
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
64 /* 6 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
65 { /* 10101 */ 13, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
66 { /* 10110 */ 15, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
67 { /* 10111 */ 17, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
68 { /* 11000 */ 19, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
69 { /* 11001 */ 21, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
70
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
71 /* 7 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
72 { /* 11010 */ 23, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
73 { /* 11011 */ 27, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
74 { /* 11100 */ 31, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
75
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
76 /* 7/8 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
77 { /* 11101 */ 35, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
78
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
79 /* 8 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
80 { /* 11110 */ 43, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
81
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
82 /* 8/9/10 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
83 { /* 11111 */ 51, 5 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
84 };
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
85
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
86 /* 2nd step table
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
87 *
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
88 * Gives size of codeword and actual data (x,y,v,w)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
89 */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
90 static hcb_2_pair hcb8_2[] = {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
91 /* 3 bit codeword */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
92 { 3, 1, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
93
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
94 /* 4 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
95 { 4, 2, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
96 { 4, 1, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
97 { 4, 1, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
98 { 4, 0, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
99 { 4, 2, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
100
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
101 /* 5 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
102 { 5, 0, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
103 { 5, 2, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
104 { 5, 0, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
105 { 5, 3, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
106 { 5, 1, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
107 { 5, 3, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
108 { 5, 2, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
109
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
110 /* 6 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
111 { 6, 3, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
112 { 6, 4, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
113 { 6, 1, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
114 { 6, 4, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
115 { 6, 2, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
116 { 6, 3, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
117 { 6, 0, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
118 { 6, 4, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
119 { 6, 3, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
120 { 6, 5, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
121
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
122 /* 7 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
123 { 7, 5, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
124 { 7, 2, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
125 { 7, 1, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
126 { 7, 5, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
127 { 7, 3, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
128 { 7, 4, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
129 { 7, 5, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
130 { 7, 0, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
131 { 7, 4, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
132 { 7, 4, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
133 { 7, 2, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
134 { 7, 6, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
135
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
136 /* 7/8 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
137 { 7, 6, 1 }, { 7, 6, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
138 { 7, 1, 6 }, { 7, 1, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
139 { 8, 3, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
140 { 8, 6, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
141 { 8, 5, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
142 { 8, 5, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
143
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
144 /* 8 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
145 { 8, 6, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
146 { 8, 0, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
147 { 8, 4, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
148 { 8, 7, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
149 { 8, 7, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
150 { 8, 2, 7 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
151 { 8, 6, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
152 { 8, 7, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
153
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
154 /* 8/9/10 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
155 { 8, 1, 7 }, { 8, 1, 7 }, { 8, 1, 7 }, { 8, 1, 7 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
156 { 8, 5, 6 }, { 8, 5, 6 }, { 8, 5, 6 }, { 8, 5, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
157 { 8, 3, 7 }, { 8, 3, 7 }, { 8, 3, 7 }, { 8, 3, 7 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
158 { 9, 6, 6 }, { 9, 6, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
159 { 9, 7, 4 }, { 9, 7, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
160 { 9, 6, 0 }, { 9, 6, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
161 { 9, 4, 7 }, { 9, 4, 7 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
162 { 9, 0, 6 }, { 9, 0, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
163 { 9, 7, 5 }, { 9, 7, 5 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
164 { 9, 7, 6 }, { 9, 7, 6 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
165 { 9, 6, 7 }, { 9, 6, 7 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
166 { 10, 5, 7 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
167 { 10, 7, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
168 { 10, 0, 7 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
169 { 10, 7, 7 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
170 };