comparison ac3tab.h @ 4643:1e175640dad3 libavcodec

Remove common code from AC-3 encoder and utilize ac3.c.
author jbr
date Fri, 09 Mar 2007 13:57:42 +0000
parents c8c591fe26f8
children 056127e5df89
comparison
equal deleted inserted replaced
4642:7e140e4cd8cb 4643:1e175640dad3
23 * @file ac3tab.h 23 * @file ac3tab.h
24 * tables taken directly from AC3 spec. 24 * tables taken directly from AC3 spec.
25 */ 25 */
26 26
27 /* possible frequencies */ 27 /* possible frequencies */
28 static const uint16_t ac3_freqs[3] = { 48000, 44100, 32000 }; 28 const uint16_t ff_ac3_freqs[3] = { 48000, 44100, 32000 };
29 29
30 /* possible bitrates */ 30 /* possible bitrates */
31 static const uint16_t ac3_bitratetab[19] = { 31 const uint16_t ff_ac3_bitratetab[19] = {
32 32, 40, 48, 56, 64, 80, 96, 112, 128, 32 32, 40, 48, 56, 64, 80, 96, 112, 128,
33 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 33 160, 192, 224, 256, 320, 384, 448, 512, 576, 640
34 }; 34 };
35 35
36 /* AC3 MDCT window */ 36 /* AC3 MDCT window */
37 37
38 /* MDCT window */ 38 /* MDCT window */
39 static const int16_t ac3_window[256] = { 39 const int16_t ff_ac3_window[256] = {
40 4, 7, 12, 16, 21, 28, 34, 42, 40 4, 7, 12, 16, 21, 28, 34, 42,
41 51, 61, 72, 84, 97, 111, 127, 145, 41 51, 61, 72, 84, 97, 111, 127, 145,
42 164, 184, 207, 231, 257, 285, 315, 347, 42 164, 184, 207, 231, 257, 285, 315, 347,
43 382, 419, 458, 500, 544, 591, 641, 694, 43 382, 419, 458, 500, 544, 591, 641, 694,
44 750, 810, 872, 937, 1007, 1079, 1155, 1235, 44 750, 810, 872, 937, 1007, 1079, 1155, 1235,
163 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 163 12, 12, 12, 13, 13, 13, 13, 14, 14, 14,
164 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 164 14, 14, 14, 14, 14, 15, 15, 15, 15, 15,
165 15, 15, 15, 15, 165 15, 15, 15, 15,
166 }; 166 };
167 167
168 static const uint8_t sdecaytab[4]={ 168 const uint8_t ff_sdecaytab[4]={
169 0x0f, 0x11, 0x13, 0x15, 169 0x0f, 0x11, 0x13, 0x15,
170 }; 170 };
171 171
172 static const uint8_t fdecaytab[4]={ 172 const uint8_t ff_fdecaytab[4]={
173 0x3f, 0x53, 0x67, 0x7b, 173 0x3f, 0x53, 0x67, 0x7b,
174 }; 174 };
175 175
176 static const uint16_t sgaintab[4]= { 176 const uint16_t ff_sgaintab[4]= {
177 0x540, 0x4d8, 0x478, 0x410, 177 0x540, 0x4d8, 0x478, 0x410,
178 }; 178 };
179 179
180 static const uint16_t dbkneetab[4]= { 180 const uint16_t ff_dbkneetab[4]= {
181 0x000, 0x700, 0x900, 0xb00, 181 0x000, 0x700, 0x900, 0xb00,
182 }; 182 };
183 183
184 static const int16_t floortab[8]= { 184 const int16_t ff_floortab[8]= {
185 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, 185 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800,
186 }; 186 };
187 187
188 static const uint16_t fgaintab[8]= { 188 const uint16_t ff_fgaintab[8]= {
189 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 189 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400,
190 }; 190 };
191 191
192 static const uint8_t bndsz[50]={ 192 static const uint8_t bndsz[50]={
193 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 193 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
194 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 194 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
195 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24 195 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24
196 }; 196 };
197 197
198 static uint8_t bndtab[51]; 198 static uint8_t bndtab[51];
199
200 /* fft & mdct sin cos tables */
201 static int16_t costab[64];
202 static int16_t sintab[64];
203 static int16_t fft_rev[512];
204 static int16_t xcos1[128];
205 static int16_t xsin1[128];