Mercurial > mplayer.hg
annotate libfaad2/codebook/hcb_4.h @ 13757:40c44e178073
1.132: MSGTR_EdlCantOpenForWrite updated
1.133: mp_msg transition of unmaintained audio output drivers (referring to date 2004/09/18!)
file isn't yet up to date, will continue updating in steps..
author | kraymer |
---|---|
date | Mon, 25 Oct 2004 16:31:50 +0000 |
parents | d81145997036 |
children | 1d5a49e6d9db |
rev | line source |
---|---|
10725 | 1 /* |
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding | |
3 ** Copyright (C) 2003 M. Bakker, Ahead Software 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 ** Commercial non-GPL licensing of this software is possible. | |
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. | |
24 ** | |
12625
d81145997036
More information about modifications to comply more closely with GPL 2a.
diego
parents:
10725
diff
changeset
|
25 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30 |
d81145997036
More information about modifications to comply more closely with GPL 2a.
diego
parents:
10725
diff
changeset
|
26 ** $Id: hcb_4.h,v 1.1 2003/08/30 22:30:28 arpi Exp $ |
d81145997036
More information about modifications to comply more closely with GPL 2a.
diego
parents:
10725
diff
changeset
|
27 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/ |
10725 | 28 **/ |
29 | |
30 /* 2-step huffman table HCB_4 */ | |
31 | |
32 | |
33 /* 1st step: 5 bits | |
34 * 2^5 = 32 entries | |
35 * | |
36 * Used to find offset into 2nd step table and number of extra bits to get | |
37 */ | |
38 static hcb hcb4_1[] = { | |
39 /* 4 bit codewords */ | |
40 { /* 00000 */ 0, 0 }, | |
41 { /* */ 0, 0 }, | |
42 { /* 00010 */ 1, 0 }, | |
43 { /* */ 1, 0 }, | |
44 { /* 00100 */ 2, 0 }, | |
45 { /* */ 2, 0 }, | |
46 { /* 00110 */ 3, 0 }, | |
47 { /* */ 3, 0 }, | |
48 { /* 01000 */ 4, 0 }, | |
49 { /* */ 4, 0 }, | |
50 { /* 01010 */ 5, 0 }, | |
51 { /* */ 5, 0 }, | |
52 { /* 01100 */ 6, 0 }, | |
53 { /* */ 6, 0 }, | |
54 { /* 01110 */ 7, 0 }, | |
55 { /* */ 7, 0 }, | |
56 { /* 10000 */ 8, 0 }, | |
57 { /* */ 8, 0 }, | |
58 { /* 10010 */ 9, 0 }, | |
59 { /* */ 9, 0 }, | |
60 | |
61 /* 5 bit codewords */ | |
62 { /* 10100 */ 10, 0 }, | |
63 { /* 10101 */ 11, 0 }, | |
64 { /* 10110 */ 12, 0 }, | |
65 { /* 10111 */ 13, 0 }, | |
66 { /* 11000 */ 14, 0 }, | |
67 { /* 11001 */ 15, 0 }, | |
68 | |
69 /* 7 bit codewords */ | |
70 { /* 11010 */ 16, 2 }, | |
71 { /* 11011 */ 20, 2 }, | |
72 | |
73 /* 7/8 bit codewords */ | |
74 { /* 11100 */ 24, 3 }, | |
75 | |
76 /* 8 bit codewords */ | |
77 { /* 11101 */ 32, 3 }, | |
78 | |
79 /* 8/9 bit codewords */ | |
80 { /* 11110 */ 40, 4 }, | |
81 | |
82 /* 9/10/11/12 bit codewords */ | |
83 { /* 11111 */ 56, 7 } | |
84 }; | |
85 | |
86 /* 2nd step table | |
87 * | |
88 * Gives size of codeword and actual data (x,y,v,w) | |
89 */ | |
90 static hcb_2_quad hcb4_2[] = { | |
91 /* 4 bit codewords */ | |
92 { 4, 1, 1, 1, 1 }, | |
93 { 4, 0, 1, 1, 1 }, | |
94 { 4, 1, 1, 0, 1 }, | |
95 { 4, 1, 1, 1, 0 }, | |
96 { 4, 1, 0, 1, 1 }, | |
97 { 4, 1, 0, 0, 0 }, | |
98 { 4, 1, 1, 0, 0 }, | |
99 { 4, 0, 0, 0, 0 }, | |
100 { 4, 0, 0, 1, 1 }, | |
101 { 4, 1, 0, 1, 0 }, | |
102 | |
103 /* 5 bit codewords */ | |
104 { 5, 1, 0, 0, 1 }, | |
105 { 5, 0, 1, 1, 0 }, | |
106 { 5, 0, 0, 0, 1 }, | |
107 { 5, 0, 1, 0, 1 }, | |
108 { 5, 0, 0, 1, 0 }, | |
109 { 5, 0, 1, 0, 0 }, | |
110 | |
111 /* 7 bit codewords */ | |
112 /* first 5 bits: 11010 */ | |
113 { 7, 2, 1, 1, 1 }, | |
114 { 7, 1, 1, 2, 1 }, | |
115 { 7, 1, 2, 1, 1 }, | |
116 { 7, 1, 1, 1, 2 }, | |
117 /* first 5 bits: 11011 */ | |
118 { 7, 2, 1, 1, 0 }, | |
119 { 7, 2, 1, 0, 1 }, | |
120 { 7, 1, 2, 1, 0 }, | |
121 { 7, 2, 0, 1, 1 }, | |
122 | |
123 /* 7/8 bit codewords */ | |
124 /* first 5 bits: 11100 */ | |
125 { 7, 0, 1, 2, 1 }, { 7, 0, 1, 2, 1 }, | |
126 { 8, 0, 1, 1, 2 }, | |
127 { 8, 1, 1, 2, 0 }, | |
128 { 8, 0, 2, 1, 1 }, | |
129 { 8, 1, 0, 1, 2 }, | |
130 { 8, 1, 2, 0, 1 }, | |
131 { 8, 1, 1, 0, 2 }, | |
132 | |
133 /* 8 bit codewords */ | |
134 { 8, 1, 0, 2, 1 }, | |
135 { 8, 2, 1, 0, 0 }, | |
136 { 8, 2, 0, 1, 0 }, | |
137 { 8, 1, 2, 0, 0 }, | |
138 { 8, 2, 0, 0, 1 }, | |
139 { 8, 0, 1, 0, 2 }, | |
140 { 8, 0, 2, 1, 0 }, | |
141 { 8, 0, 0, 1, 2 }, | |
142 | |
143 /* 8/9 bit codewords */ | |
144 { 8, 0, 1, 2, 0 }, { 8, 0, 1, 2, 0 }, | |
145 { 8, 0, 2, 0, 1 }, { 8, 0, 2, 0, 1 }, | |
146 { 8, 1, 0, 0, 2 }, { 8, 1, 0, 0, 2 }, | |
147 { 8, 0, 0, 2, 1 }, { 8, 0, 0, 2, 1 }, | |
148 { 8, 1, 0, 2, 0 }, { 8, 1, 0, 2, 0 }, | |
149 { 8, 2, 0, 0, 0 }, { 8, 2, 0, 0, 0 }, | |
150 { 8, 0, 0, 0, 2 }, { 8, 0, 0, 0, 2 }, | |
151 { 9, 0, 2, 0, 0 }, | |
152 { 9, 0, 0, 2, 0 }, | |
153 | |
154 /* 9/10/11 bit codewords */ | |
155 /* 9 bit codewords repeated 2^3 = 8 times */ | |
156 { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, | |
157 { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, | |
158 { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, | |
159 { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, | |
160 { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, | |
161 { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, | |
162 { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, | |
163 { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, | |
164 { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, | |
165 { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, | |
166 { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, | |
167 { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, | |
168 /* 10 bit codewords repeated 2^2 = 4 times */ | |
169 { 10, 1, 2, 2, 0 }, { 10, 1, 2, 2, 0 }, { 10, 1, 2, 2, 0 }, { 10, 1, 2, 2, 0 }, | |
170 { 10, 2, 2, 1, 0 }, { 10, 2, 2, 1, 0 }, { 10, 2, 2, 1, 0 }, { 10, 2, 2, 1, 0 }, | |
171 { 10, 2, 1, 2, 0 }, { 10, 2, 1, 2, 0 }, { 10, 2, 1, 2, 0 }, { 10, 2, 1, 2, 0 }, | |
172 { 10, 0, 2, 2, 1 }, { 10, 0, 2, 2, 1 }, { 10, 0, 2, 2, 1 }, { 10, 0, 2, 2, 1 }, | |
173 { 10, 0, 1, 2, 2 }, { 10, 0, 1, 2, 2 }, { 10, 0, 1, 2, 2 }, { 10, 0, 1, 2, 2 }, | |
174 { 10, 2, 2, 0, 1 }, { 10, 2, 2, 0, 1 }, { 10, 2, 2, 0, 1 }, { 10, 2, 2, 0, 1 }, | |
175 { 10, 0, 2, 1, 2 }, { 10, 0, 2, 1, 2 }, { 10, 0, 2, 1, 2 }, { 10, 0, 2, 1, 2 }, | |
176 { 10, 2, 0, 2, 1 }, { 10, 2, 0, 2, 1 }, { 10, 2, 0, 2, 1 }, { 10, 2, 0, 2, 1 }, | |
177 { 10, 1, 0, 2, 2 }, { 10, 1, 0, 2, 2 }, { 10, 1, 0, 2, 2 }, { 10, 1, 0, 2, 2 }, | |
178 { 10, 2, 2, 2, 1 }, { 10, 2, 2, 2, 1 }, { 10, 2, 2, 2, 1 }, { 10, 2, 2, 2, 1 }, | |
179 { 10, 1, 2, 0, 2 }, { 10, 1, 2, 0, 2 }, { 10, 1, 2, 0, 2 }, { 10, 1, 2, 0, 2 }, | |
180 { 10, 2, 0, 1, 2 }, { 10, 2, 0, 1, 2 }, { 10, 2, 0, 1, 2 }, { 10, 2, 0, 1, 2 }, | |
181 { 10, 2, 1, 0, 2 }, { 10, 2, 1, 0, 2 }, { 10, 2, 1, 0, 2 }, { 10, 2, 1, 0, 2 }, | |
182 { 10, 1, 2, 2, 2 }, { 10, 1, 2, 2, 2 }, { 10, 1, 2, 2, 2 }, { 10, 1, 2, 2, 2 }, | |
183 /* 11 bit codewords repeated 2^1 = 2 times */ | |
184 { 11, 2, 1, 2, 2 }, { 11, 2, 1, 2, 2 }, | |
185 { 11, 2, 2, 1, 2 }, { 11, 2, 2, 1, 2 }, | |
186 { 11, 0, 2, 2, 0 }, { 11, 0, 2, 2, 0 }, | |
187 { 11, 2, 2, 0, 0 }, { 11, 2, 2, 0, 0 }, | |
188 { 11, 0, 0, 2, 2 }, { 11, 0, 0, 2, 2 }, | |
189 { 11, 2, 0, 2, 0 }, { 11, 2, 0, 2, 0 }, | |
190 { 11, 0, 2, 0, 2 }, { 11, 0, 2, 0, 2 }, | |
191 { 11, 2, 0, 0, 2 }, { 11, 2, 0, 0, 2 }, | |
192 { 11, 2, 2, 2, 2 }, { 11, 2, 2, 2, 2 }, | |
193 { 11, 0, 2, 2, 2 }, { 11, 0, 2, 2, 2 }, | |
194 { 11, 2, 2, 2, 0 }, { 11, 2, 2, 2, 0 }, | |
195 /* 12 bit codewords */ | |
196 { 12, 2, 2, 0, 2 }, | |
197 { 12, 2, 0, 2, 2 }, | |
198 }; |