diff options
author | Sean Bartell <wingedtachikoma@gmail.com> | 2011-06-25 21:32:25 -0400 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-04-25 22:13:20 +0200 |
commit | f40bfc9267b13b54e6379dfe7539447662879d24 (patch) | |
tree | 9b20069d5e62809ff434061ad730096836f916f2 /lib/rbcodec/codecs/libfaad/codebook/hcb_2.h | |
parent | a0009907de7a0107d49040d8a180f140e2eff299 (diff) | |
download | rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.tar.gz rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.zip |
Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
Diffstat (limited to 'lib/rbcodec/codecs/libfaad/codebook/hcb_2.h')
-rw-r--r-- | lib/rbcodec/codecs/libfaad/codebook/hcb_2.h | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libfaad/codebook/hcb_2.h b/lib/rbcodec/codecs/libfaad/codebook/hcb_2.h new file mode 100644 index 0000000000..15e7d57084 --- /dev/null +++ b/lib/rbcodec/codecs/libfaad/codebook/hcb_2.h | |||
@@ -0,0 +1,182 @@ | |||
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 | ** | ||
25 | ** $Id$ | ||
26 | **/ | ||
27 | |||
28 | /* 2-step huffman table HCB_2 */ | ||
29 | |||
30 | |||
31 | /* 1st step: 5 bits | ||
32 | * 2^5 = 32 entries | ||
33 | * | ||
34 | * Used to find offset into 2nd step table and number of extra bits to get | ||
35 | */ | ||
36 | static hcb hcb2_1[] ICONST_ATTR_FAAD_LARGE_IRAM = { | ||
37 | { /* 00000 */ 0, 0 }, | ||
38 | { /* */ 0, 0 }, | ||
39 | { /* */ 0, 0 }, | ||
40 | { /* */ 0, 0 }, | ||
41 | { /* 00100 */ 1, 0 }, | ||
42 | { /* */ 1, 0 }, | ||
43 | { /* 00110 */ 2, 0 }, | ||
44 | { /* 00111 */ 3, 0 }, | ||
45 | { /* 01000 */ 4, 0 }, | ||
46 | { /* 01001 */ 5, 0 }, | ||
47 | { /* 01010 */ 6, 0 }, | ||
48 | { /* 01011 */ 7, 0 }, | ||
49 | { /* 01100 */ 8, 0 }, | ||
50 | |||
51 | /* 6 bit codewords */ | ||
52 | { /* 01101 */ 9, 1 }, | ||
53 | { /* 01110 */ 11, 1 }, | ||
54 | { /* 01111 */ 13, 1 }, | ||
55 | { /* 10000 */ 15, 1 }, | ||
56 | { /* 10001 */ 17, 1 }, | ||
57 | { /* 10010 */ 19, 1 }, | ||
58 | { /* 10011 */ 21, 1 }, | ||
59 | { /* 10100 */ 23, 1 }, | ||
60 | { /* 10101 */ 25, 1 }, | ||
61 | { /* 10110 */ 27, 1 }, | ||
62 | { /* 10111 */ 29, 1 }, | ||
63 | { /* 11000 */ 31, 1 }, | ||
64 | |||
65 | /* 7 bit codewords */ | ||
66 | { /* 11001 */ 33, 2 }, | ||
67 | { /* 11010 */ 37, 2 }, | ||
68 | { /* 11011 */ 41, 2 }, | ||
69 | |||
70 | /* 7/8 bit codewords */ | ||
71 | { /* 11100 */ 45, 3 }, | ||
72 | |||
73 | /* 8 bit codewords */ | ||
74 | { /* 11101 */ 53, 3 }, | ||
75 | { /* 11110 */ 61, 3 }, | ||
76 | |||
77 | /* 8/9 bit codewords */ | ||
78 | { /* 11111 */ 69, 4 } | ||
79 | }; | ||
80 | |||
81 | /* 2nd step table | ||
82 | * | ||
83 | * Gives size of codeword and actual data (x,y,v,w) | ||
84 | */ | ||
85 | static hcb_2_quad hcb2_2[] ICONST_ATTR_FAAD_LARGE_IRAM = { | ||
86 | /* 3 bit codeword */ | ||
87 | { 3, 0, 0, 0, 0 }, | ||
88 | |||
89 | /* 4 bit codeword */ | ||
90 | { 4, 1, 0, 0, 0 }, | ||
91 | |||
92 | /* 5 bit codewords */ | ||
93 | { 5, -1, 0, 0, 0 }, | ||
94 | { 5, 0, 0, 0, 1 }, | ||
95 | { 5, 0, 0, -1, 0 }, | ||
96 | { 5, 0, 0, 0, -1 }, | ||
97 | { 5, 0, -1, 0, 0 }, | ||
98 | { 5, 0, 0, 1, 0 }, | ||
99 | { 5, 0, 1, 0, 0 }, | ||
100 | |||
101 | /* 6 bit codewords */ | ||
102 | { 6, 0, -1, 1, 0 }, | ||
103 | { 6, -1, 1, 0, 0 }, | ||
104 | { 6, 0, 1, -1, 0 }, | ||
105 | { 6, 0, 0, 1, -1 }, | ||
106 | { 6, 0, 1, 0, -1 }, | ||
107 | { 6, 0, 0, -1, 1 }, | ||
108 | { 6, -1, 0, 0, -1 }, | ||
109 | { 6, 1, -1, 0, 0 }, | ||
110 | { 6, 1, 0, -1, 0 }, | ||
111 | { 6, -1, -1, 0, 0 }, | ||
112 | { 6, 0, 0, -1, -1 }, | ||
113 | { 6, 1, 0, 1, 0 }, | ||
114 | { 6, 1, 0, 0, 1 }, | ||
115 | { 6, 0, -1, 0, 1 }, | ||
116 | { 6, -1, 0, 1, 0 }, | ||
117 | { 6, 0, 1, 0, 1 }, | ||
118 | { 6, 0, -1, -1, 0 }, | ||
119 | { 6, -1, 0, 0, 1 }, | ||
120 | { 6, 0, -1, 0, -1 }, | ||
121 | { 6, -1, 0, -1, 0 }, | ||
122 | { 6, 1, 1, 0, 0 }, | ||
123 | { 6, 0, 1, 1, 0 }, | ||
124 | { 6, 0, 0, 1, 1 }, | ||
125 | { 6, 1, 0, 0, -1 }, | ||
126 | |||
127 | /* 7 bit codewords */ | ||
128 | { 7, 0, 1, -1, 1 }, | ||
129 | { 7, 1, 0, -1, 1 }, | ||
130 | { 7, -1, 1, -1, 0 }, | ||
131 | { 7, 0, -1, 1, -1 }, | ||
132 | { 7, 1, -1, 1, 0 }, | ||
133 | { 7, 1, 1, 0, -1 }, | ||
134 | { 7, 1, 0, 1, 1 }, | ||
135 | { 7, -1, 1, 1, 0 }, | ||
136 | { 7, 0, -1, -1, 1 }, | ||
137 | { 7, 1, 1, 1, 0 }, | ||
138 | { 7, -1, 0, 1, -1 }, | ||
139 | { 7, -1, -1, -1, 0 }, | ||
140 | |||
141 | /* 7/8 bit codewords */ | ||
142 | { 7, -1, 0, -1, 1 }, { 7, -1, 0, -1, 1 }, | ||
143 | { 7, 1, -1, -1, 0 }, { 7, 1, -1, -1, 0 }, | ||
144 | { 7, 1, 1, -1, 0 }, { 7, 1, 1, -1, 0 }, | ||
145 | { 8, 1, -1, 0, 1 }, | ||
146 | { 8, -1, 1, 0, -1 }, | ||
147 | |||
148 | /* 8 bit codewords */ | ||
149 | { 8, -1, -1, 1, 0 }, | ||
150 | { 8, -1, 0, 1, 1 }, | ||
151 | { 8, -1, -1, 0, 1 }, | ||
152 | { 8, -1, -1, 0, -1 }, | ||
153 | { 8, 0, -1, -1, -1 }, | ||
154 | { 8, 1, 0, 1, -1 }, | ||
155 | { 8, 1, 0, -1, -1 }, | ||
156 | { 8, 0, 1, -1, -1 }, | ||
157 | { 8, 0, 1, 1, 1 }, | ||
158 | { 8, -1, 1, 0, 1 }, | ||
159 | { 8, -1, 0, -1, -1 }, | ||
160 | { 8, 0, 1, 1, -1 }, | ||
161 | { 8, 1, -1, 0, -1 }, | ||
162 | { 8, 0, -1, 1, 1 }, | ||
163 | { 8, 1, 1, 0, 1 }, | ||
164 | { 8, 1, -1, 1, -1 }, | ||
165 | |||
166 | /* 8/9 bit codewords */ | ||
167 | { 8, -1, 1, -1, 1 }, { 8, -1, 1, -1, 1 }, | ||
168 | { 9, 1, -1, -1, 1 }, | ||
169 | { 9, -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 | }; | ||