Mercurial > libavcodec.hg
comparison ac3tab.h @ 3269:c925a46f7594 libavcodec
Patch to generate the ac3 window, based on code by Justin Ruggles.
author | banan |
---|---|
date | Sat, 22 Apr 2006 21:21:16 +0000 |
parents | 1475eb5f8649 |
children | 894ef0dba687 |
comparison
equal
deleted
inserted
replaced
3268:f7a9d8dd476b | 3269:c925a46f7594 |
---|---|
8 | 8 |
9 /* possible bitrates */ | 9 /* possible bitrates */ |
10 static const uint16_t ac3_bitratetab[19] = { | 10 static const uint16_t ac3_bitratetab[19] = { |
11 32, 40, 48, 56, 64, 80, 96, 112, 128, | 11 32, 40, 48, 56, 64, 80, 96, 112, 128, |
12 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 | 12 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 |
13 }; | |
14 | |
15 /* AC3 MDCT window */ | |
16 | |
17 /* MDCT window */ | |
18 static const int16_t ac3_window[256] = { | |
19 4, 7, 12, 16, 21, 28, 34, 42, | |
20 51, 61, 72, 84, 97, 111, 127, 145, | |
21 164, 184, 207, 231, 257, 285, 315, 347, | |
22 382, 419, 458, 500, 544, 591, 641, 694, | |
23 750, 810, 872, 937, 1007, 1079, 1155, 1235, | |
24 1318, 1406, 1497, 1593, 1692, 1796, 1903, 2016, | |
25 2132, 2253, 2379, 2509, 2644, 2783, 2927, 3076, | |
26 3230, 3389, 3552, 3721, 3894, 4072, 4255, 4444, | |
27 4637, 4835, 5038, 5246, 5459, 5677, 5899, 6127, | |
28 6359, 6596, 6837, 7083, 7334, 7589, 7848, 8112, | |
29 8380, 8652, 8927, 9207, 9491, 9778,10069,10363, | |
30 10660,10960,11264,11570,11879,12190,12504,12820, | |
31 13138,13458,13780,14103,14427,14753,15079,15407, | |
32 15735,16063,16392,16720,17049,17377,17705,18032, | |
33 18358,18683,19007,19330,19651,19970,20287,20602, | |
34 20914,21225,21532,21837,22139,22438,22733,23025, | |
35 23314,23599,23880,24157,24430,24699,24964,25225, | |
36 25481,25732,25979,26221,26459,26691,26919,27142, | |
37 27359,27572,27780,27983,28180,28373,28560,28742, | |
38 28919,29091,29258,29420,29577,29729,29876,30018, | |
39 30155,30288,30415,30538,30657,30771,30880,30985, | |
40 31086,31182,31274,31363,31447,31528,31605,31678, | |
41 31747,31814,31877,31936,31993,32046,32097,32145, | |
42 32190,32232,32272,32310,32345,32378,32409,32438, | |
43 32465,32490,32513,32535,32556,32574,32592,32608, | |
44 32623,32636,32649,32661,32671,32681,32690,32698, | |
45 32705,32712,32718,32724,32729,32733,32737,32741, | |
46 32744,32747,32750,32752,32754,32756,32757,32759, | |
47 32760,32761,32762,32763,32764,32764,32765,32765, | |
48 32766,32766,32766,32766,32767,32767,32767,32767, | |
49 32767,32767,32767,32767,32767,32767,32767,32767, | |
50 32767,32767,32767,32767,32767,32767,32767,32767, | |
51 }; | 13 }; |
52 | 14 |
53 static uint8_t masktab[253]; | 15 static uint8_t masktab[253]; |
54 | 16 |
55 static const uint8_t latab[260]= { | 17 static const uint8_t latab[260]= { |
174 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24 | 136 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24 |
175 }; | 137 }; |
176 | 138 |
177 static uint8_t bndtab[51]; | 139 static uint8_t bndtab[51]; |
178 | 140 |
141 /* AC3 MDCT window */ | |
142 static int16_t ac3_window[256]; | |
143 | |
179 /* fft & mdct sin cos tables */ | 144 /* fft & mdct sin cos tables */ |
180 static int16_t costab[64]; | 145 static int16_t costab[64]; |
181 static int16_t sintab[64]; | 146 static int16_t sintab[64]; |
182 static int16_t fft_rev[512]; | 147 static int16_t fft_rev[512]; |
183 static int16_t xcos1[128]; | 148 static int16_t xcos1[128]; |