Mercurial > mplayer.hg
annotate libfaad2/codebook/hcb_2.h @ 13415:0e06453daf08
Cumulative patch 1.727 and 1.722
Better description of Loren Merritt's 3-pass mode, better qns desc., and a
couple of x264 encoding options (based a documentation I read)
author | gpoirier |
---|---|
date | Tue, 21 Sep 2004 09:42:33 +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_2.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_2 */ | |
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 hcb2_1[] = { | |
39 { /* 00000 */ 0, 0 }, | |
40 { /* */ 0, 0 }, | |
41 { /* */ 0, 0 }, | |
42 { /* */ 0, 0 }, | |
43 { /* 00100 */ 1, 0 }, | |
44 { /* */ 1, 0 }, | |
45 { /* 00110 */ 2, 0 }, | |
46 { /* 00111 */ 3, 0 }, | |
47 { /* 01000 */ 4, 0 }, | |
48 { /* 01001 */ 5, 0 }, | |
49 { /* 01010 */ 6, 0 }, | |
50 { /* 01011 */ 7, 0 }, | |
51 { /* 01100 */ 8, 0 }, | |
52 | |
53 /* 6 bit codewords */ | |
54 { /* 01101 */ 9, 1 }, | |
55 { /* 01110 */ 11, 1 }, | |
56 { /* 01111 */ 13, 1 }, | |
57 { /* 10000 */ 15, 1 }, | |
58 { /* 10001 */ 17, 1 }, | |
59 { /* 10010 */ 19, 1 }, | |
60 { /* 10011 */ 21, 1 }, | |
61 { /* 10100 */ 23, 1 }, | |
62 { /* 10101 */ 25, 1 }, | |
63 { /* 10110 */ 27, 1 }, | |
64 { /* 10111 */ 29, 1 }, | |
65 { /* 11000 */ 31, 1 }, | |
66 | |
67 /* 7 bit codewords */ | |
68 { /* 11001 */ 33, 2 }, | |
69 { /* 11010 */ 37, 2 }, | |
70 { /* 11011 */ 41, 2 }, | |
71 | |
72 /* 7/8 bit codewords */ | |
73 { /* 11100 */ 45, 3 }, | |
74 | |
75 /* 8 bit codewords */ | |
76 { /* 11101 */ 53, 3 }, | |
77 { /* 11110 */ 61, 3 }, | |
78 | |
79 /* 8/9 bit codewords */ | |
80 { /* 11111 */ 69, 4 } | |
81 }; | |
82 | |
83 /* 2nd step table | |
84 * | |
85 * Gives size of codeword and actual data (x,y,v,w) | |
86 */ | |
87 static hcb_2_quad hcb2_2[] = { | |
88 /* 3 bit codeword */ | |
89 { 3, 0, 0, 0, 0 }, | |
90 | |
91 /* 4 bit codeword */ | |
92 { 4, 1, 0, 0, 0 }, | |
93 | |
94 /* 5 bit codewords */ | |
95 { 5, -1, 0, 0, 0 }, | |
96 { 5, 0, 0, 0, 1 }, | |
97 { 5, 0, 0, -1, 0 }, | |
98 { 5, 0, 0, 0, -1 }, | |
99 { 5, 0, -1, 0, 0 }, | |
100 { 5, 0, 0, 1, 0 }, | |
101 { 5, 0, 1, 0, 0 }, | |
102 | |
103 /* 6 bit codewords */ | |
104 { 6, 0, -1, 1, 0 }, | |
105 { 6, -1, 1, 0, 0 }, | |
106 { 6, 0, 1, -1, 0 }, | |
107 { 6, 0, 0, 1, -1 }, | |
108 { 6, 0, 1, 0, -1 }, | |
109 { 6, 0, 0, -1, 1 }, | |
110 { 6, -1, 0, 0, -1 }, | |
111 { 6, 1, -1, 0, 0 }, | |
112 { 6, 1, 0, -1, 0 }, | |
113 { 6, -1, -1, 0, 0 }, | |
114 { 6, 0, 0, -1, -1 }, | |
115 { 6, 1, 0, 1, 0 }, | |
116 { 6, 1, 0, 0, 1 }, | |
117 { 6, 0, -1, 0, 1 }, | |
118 { 6, -1, 0, 1, 0 }, | |
119 { 6, 0, 1, 0, 1 }, | |
120 { 6, 0, -1, -1, 0 }, | |
121 { 6, -1, 0, 0, 1 }, | |
122 { 6, 0, -1, 0, -1 }, | |
123 { 6, -1, 0, -1, 0 }, | |
124 { 6, 1, 1, 0, 0 }, | |
125 { 6, 0, 1, 1, 0 }, | |
126 { 6, 0, 0, 1, 1 }, | |
127 { 6, 1, 0, 0, -1 }, | |
128 | |
129 /* 7 bit codewords */ | |
130 { 7, 0, 1, -1, 1 }, | |
131 { 7, 1, 0, -1, 1 }, | |
132 { 7, -1, 1, -1, 0 }, | |
133 { 7, 0, -1, 1, -1 }, | |
134 { 7, 1, -1, 1, 0 }, | |
135 { 7, 1, 1, 0, -1 }, | |
136 { 7, 1, 0, 1, 1 }, | |
137 { 7, -1, 1, 1, 0 }, | |
138 { 7, 0, -1, -1, 1 }, | |
139 { 7, 1, 1, 1, 0 }, | |
140 { 7, -1, 0, 1, -1 }, | |
141 { 7, -1, -1, -1, 0 }, | |
142 | |
143 /* 7/8 bit codewords */ | |
144 { 7, -1, 0, -1, 1 }, { 7, -1, 0, -1, 1 }, | |
145 { 7, 1, -1, -1, 0 }, { 7, 1, -1, -1, 0 }, | |
146 { 7, 1, 1, -1, 0 }, { 7, 1, 1, -1, 0 }, | |
147 { 8, 1, -1, 0, 1 }, | |
148 { 8, -1, 1, 0, -1 }, | |
149 | |
150 /* 8 bit codewords */ | |
151 { 8, -1, -1, 1, 0 }, | |
152 { 8, -1, 0, 1, 1 }, | |
153 { 8, -1, -1, 0, 1 }, | |
154 { 8, -1, -1, 0, -1 }, | |
155 { 8, 0, -1, -1, -1 }, | |
156 { 8, 1, 0, 1, -1 }, | |
157 { 8, 1, 0, -1, -1 }, | |
158 { 8, 0, 1, -1, -1 }, | |
159 { 8, 0, 1, 1, 1 }, | |
160 { 8, -1, 1, 0, 1 }, | |
161 { 8, -1, 0, -1, -1 }, | |
162 { 8, 0, 1, 1, -1 }, | |
163 { 8, 1, -1, 0, -1 }, | |
164 { 8, 0, -1, 1, 1 }, | |
165 { 8, 1, 1, 0, 1 }, | |
166 { 8, 1, -1, 1, -1 }, | |
167 | |
168 /* 8/9 bit codewords */ | |
169 { 8, -1, 1, -1, 1 }, { 8, -1, 1, -1, 1 }, | |
170 { 9, 1, -1, -1, 1 }, | |
171 { 9, -1, -1, -1, -1 }, | |
172 { 9, -1, 1, 1, -1 }, | |
173 { 9, -1, 1, 1, 1 }, | |
174 { 9, 1, 1, 1, 1 }, | |
175 { 9, -1, -1, 1, -1 }, | |
176 { 9, 1, -1, 1, 1 }, | |
177 { 9, -1, 1, -1, -1 }, | |
178 { 9, -1, -1, 1, 1 }, | |
179 { 9, 1, 1, -1, -1 }, | |
180 { 9, 1, -1, -1, -1 }, | |
181 { 9, -1, -1, -1, 1 }, | |
182 { 9, 1, 1, -1, 1 }, | |
183 { 9, 1, 1, 1, -1 } | |
184 }; |