annotate libfaad2/codebook/hcb_6.h @ 30678:056d0932b4dc

FFmpeg Bink video now supports alpha channel
author kostya
date Tue, 23 Feb 2010 09:04:18 +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_6.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_6 */
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 hcb6_1[] = {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
37 /* 4 bit codewords */
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 { /* 00010 */ 1, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
41 { /* */ 1, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
42 { /* 00100 */ 2, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
43 { /* */ 2, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
44 { /* 00110 */ 3, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
45 { /* */ 3, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
46 { /* 01000 */ 4, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
47 { /* */ 4, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
48 { /* 01010 */ 5, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
49 { /* */ 5, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
50 { /* 01100 */ 6, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
51 { /* */ 6, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
52 { /* 01110 */ 7, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
53 { /* */ 7, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
54 { /* 10000 */ 8, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
55 { /* */ 8, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
56
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
57 /* 6 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
58 { /* 10010 */ 9, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
59 { /* 10011 */ 11, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
60 { /* 10100 */ 13, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
61 { /* 10101 */ 15, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
62 { /* 10110 */ 17, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
63 { /* 10111 */ 19, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
64 { /* 11000 */ 21, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
65 { /* 11001 */ 23, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
66
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
67 /* 7 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
68 { /* 11010 */ 25, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
69 { /* 11011 */ 29, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
70 { /* 11100 */ 33, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
71
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
72 /* 7/8 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
73 { /* 11101 */ 37, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
74
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
75 /* 8/9 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
76 { /* 11110 */ 45, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
77
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
78 /* 9/10/11 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
79 { /* 11111 */ 61, 6 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
80 };
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
81
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
82 /* 2nd step table
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
83 *
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
84 * Gives size of codeword and actual data (x,y,v,w)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
85 */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
86 static hcb_2_pair hcb6_2[] = {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
87 /* 4 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
88 { 4, 0, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
89 { 4, 1, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
90 { 4, 0, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
91 { 4, 0, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
92 { 4, -1, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
93 { 4, 1, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
94 { 4, -1, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
95 { 4, 1, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
96 { 4, -1, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
97
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
98 /* 6 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
99 { 6, 2, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
100 { 6, 2, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
101 { 6, -2, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
102 { 6, -2, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
103 { 6, -2, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
104 { 6, -1, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
105 { 6, 2, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
106 { 6, 1, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
107 { 6, 1, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
108 { 6, 0, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
109 { 6, -1, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
110 { 6, 0, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
111 { 6, 2, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
112 { 6, -2, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
113 { 6, -2, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
114 { 6, 2, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
115
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
116 /* 7 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
117 { 7, -3, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
118 { 7, 3, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
119 { 7, 3, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
120 { 7, -1, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
121 { 7, -3, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
122 { 7, 1, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
123 { 7, 1, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
124 { 7, -1, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
125 { 7, 3, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
126 { 7, -3, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
127 { 7, 0, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
128 { 7, 0, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
129
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
130 /* 7/8 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
131 { 7, 3, 2 }, { 7, 3, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
132 { 8, -3, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
133 { 8, -2, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
134 { 8, 2, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
135 { 8, 3, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
136 { 8, 2, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
137 { 8, -2, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
138
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
139 /* 8 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
140 { 8, -3, 2 }, { 8, -3, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
141 { 8, 3, 3 }, { 8, 3, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
142 { 9, 3, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
143 { 9, -3, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
144 { 9, -3, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
145 { 9, 1, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
146 { 9, -1, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
147 { 9, 4, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
148 { 9, -4, 1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
149 { 9, -4, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
150 { 9, 1, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
151 { 9, 4, -1 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
152 { 9, -1, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
153 { 9, 0, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
154
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
155 /* 9/10/11 bit codewords */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
156 { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
157 { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
158 { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
159 { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
160 { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
161 { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
162 { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
163 { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
164 { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
165 { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
166 { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
167 { 10, -3, -4 }, { 10, -3, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
168 { 10, -3, 4 }, { 10, -3, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
169 { 10, 3, -4 }, { 10, 3, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
170 { 10, 4, -3 }, { 10, 4, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
171 { 10, 3, 4 }, { 10, 3, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
172 { 10, 4, 3 }, { 10, 4, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
173 { 10, -4, 3 }, { 10, -4, 3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
174 { 10, -4, -3 }, { 10, -4, -3 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
175 { 11, 4, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
176 { 11, -4, 4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
177 { 11, -4, -4 },
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
178 { 11, 4, -4 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
179 };