Mercurial > libavcodec.hg
comparison ac3tab.c @ 6002:29635f7c3d9c libavcodec
cosmetics: rename ac3 tables
author | jbr |
---|---|
date | Sun, 09 Dec 2007 03:21:33 +0000 |
parents | 7dfd69f9af60 |
children | 2d0b86dfe5bb |
comparison
equal
deleted
inserted
replaced
6001:f4859c13426b | 6002:29635f7c3d9c |
---|---|
28 | 28 |
29 /** | 29 /** |
30 * Possible frame sizes. | 30 * Possible frame sizes. |
31 * from ATSC A/52 Table 5.18 Frame Size Code Table. | 31 * from ATSC A/52 Table 5.18 Frame Size Code Table. |
32 */ | 32 */ |
33 const uint16_t ff_ac3_frame_sizes[38][3] = { | 33 const uint16_t ff_ac3_frame_size_tab[38][3] = { |
34 { 64, 69, 96 }, | 34 { 64, 69, 96 }, |
35 { 64, 70, 96 }, | 35 { 64, 70, 96 }, |
36 { 80, 87, 120 }, | 36 { 80, 87, 120 }, |
37 { 80, 88, 120 }, | 37 { 80, 88, 120 }, |
38 { 96, 104, 144 }, | 38 { 96, 104, 144 }, |
73 | 73 |
74 /** | 74 /** |
75 * Maps audio coding mode (acmod) to number of full-bandwidth channels. | 75 * Maps audio coding mode (acmod) to number of full-bandwidth channels. |
76 * from ATSC A/52 Table 5.8 Audio Coding Mode | 76 * from ATSC A/52 Table 5.8 Audio Coding Mode |
77 */ | 77 */ |
78 const uint8_t ff_ac3_channels[8] = { | 78 const uint8_t ff_ac3_channels_tab[8] = { |
79 2, 1, 2, 3, 3, 4, 4, 5 | 79 2, 1, 2, 3, 3, 4, 4, 5 |
80 }; | 80 }; |
81 | 81 |
82 /* possible frequencies */ | 82 /* possible frequencies */ |
83 const uint16_t ff_ac3_freqs[3] = { 48000, 44100, 32000 }; | 83 const uint16_t ff_ac3_sample_rate_tab[3] = { 48000, 44100, 32000 }; |
84 | 84 |
85 /* possible bitrates */ | 85 /* possible bitrates */ |
86 const uint16_t ff_ac3_bitratetab[19] = { | 86 const uint16_t ff_ac3_bitrate_tab[19] = { |
87 32, 40, 48, 56, 64, 80, 96, 112, 128, | 87 32, 40, 48, 56, 64, 80, 96, 112, 128, |
88 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 | 88 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 |
89 }; | 89 }; |
90 | 90 |
91 /* AC3 MDCT window */ | 91 /* AC3 MDCT window */ |
124 32766,32766,32766,32766,32767,32767,32767,32767, | 124 32766,32766,32766,32766,32767,32767,32767,32767, |
125 32767,32767,32767,32767,32767,32767,32767,32767, | 125 32767,32767,32767,32767,32767,32767,32767,32767, |
126 32767,32767,32767,32767,32767,32767,32767,32767, | 126 32767,32767,32767,32767,32767,32767,32767,32767, |
127 }; | 127 }; |
128 | 128 |
129 const uint8_t ff_ac3_latab[260]= { | 129 const uint8_t ff_ac3_log_add_tab[260]= { |
130 0x40,0x3f,0x3e,0x3d,0x3c,0x3b,0x3a,0x39,0x38,0x37, | 130 0x40,0x3f,0x3e,0x3d,0x3c,0x3b,0x3a,0x39,0x38,0x37, |
131 0x36,0x35,0x34,0x34,0x33,0x32,0x31,0x30,0x2f,0x2f, | 131 0x36,0x35,0x34,0x34,0x33,0x32,0x31,0x30,0x2f,0x2f, |
132 0x2e,0x2d,0x2c,0x2c,0x2b,0x2a,0x29,0x29,0x28,0x27, | 132 0x2e,0x2d,0x2c,0x2c,0x2b,0x2a,0x29,0x29,0x28,0x27, |
133 0x26,0x26,0x25,0x24,0x24,0x23,0x23,0x22,0x21,0x21, | 133 0x26,0x26,0x25,0x24,0x24,0x23,0x23,0x22,0x21,0x21, |
134 0x20,0x20,0x1f,0x1e,0x1e,0x1d,0x1d,0x1c,0x1c,0x1b, | 134 0x20,0x20,0x1f,0x1e,0x1e,0x1d,0x1d,0x1c,0x1c,0x1b, |
153 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | 153 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
154 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | 154 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
155 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | 155 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
156 }; | 156 }; |
157 | 157 |
158 const uint16_t ff_ac3_hth[50][3]= { | 158 const uint16_t ff_ac3_hearing_threshold_tab[50][3]= { |
159 { 0x04d0,0x04f0,0x0580 }, | 159 { 0x04d0,0x04f0,0x0580 }, |
160 { 0x04d0,0x04f0,0x0580 }, | 160 { 0x04d0,0x04f0,0x0580 }, |
161 { 0x0440,0x0460,0x04b0 }, | 161 { 0x0440,0x0460,0x04b0 }, |
162 { 0x0400,0x0410,0x0450 }, | 162 { 0x0400,0x0410,0x0450 }, |
163 { 0x03e0,0x03e0,0x0420 }, | 163 { 0x03e0,0x03e0,0x0420 }, |
206 { 0x0800,0x0630,0x0440 }, | 206 { 0x0800,0x0630,0x0440 }, |
207 { 0x0840,0x0840,0x0450 }, | 207 { 0x0840,0x0840,0x0450 }, |
208 { 0x0840,0x0840,0x04e0 }, | 208 { 0x0840,0x0840,0x04e0 }, |
209 }; | 209 }; |
210 | 210 |
211 const uint8_t ff_ac3_baptab[64]= { | 211 const uint8_t ff_ac3_bap_tab[64]= { |
212 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, | 212 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, |
213 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, | 213 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, |
214 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, | 214 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, |
215 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, | 215 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, |
216 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, | 216 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, |
217 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, | 217 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, |
218 15, 15, 15, 15, | 218 15, 15, 15, 15, |
219 }; | 219 }; |
220 | 220 |
221 const uint8_t ff_sdecaytab[4]={ | 221 const uint8_t ff_ac3_slow_decay_tab[4]={ |
222 0x0f, 0x11, 0x13, 0x15, | 222 0x0f, 0x11, 0x13, 0x15, |
223 }; | 223 }; |
224 | 224 |
225 const uint8_t ff_fdecaytab[4]={ | 225 const uint8_t ff_ac3_fast_decay_tab[4]={ |
226 0x3f, 0x53, 0x67, 0x7b, | 226 0x3f, 0x53, 0x67, 0x7b, |
227 }; | 227 }; |
228 | 228 |
229 const uint16_t ff_sgaintab[4]= { | 229 const uint16_t ff_ac3_slow_gain_tab[4]= { |
230 0x540, 0x4d8, 0x478, 0x410, | 230 0x540, 0x4d8, 0x478, 0x410, |
231 }; | 231 }; |
232 | 232 |
233 const uint16_t ff_dbkneetab[4]= { | 233 const uint16_t ff_ac3_db_per_bit_tab[4]= { |
234 0x000, 0x700, 0x900, 0xb00, | 234 0x000, 0x700, 0x900, 0xb00, |
235 }; | 235 }; |
236 | 236 |
237 const int16_t ff_floortab[8]= { | 237 const int16_t ff_ac3_floor_tab[8]= { |
238 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, | 238 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, |
239 }; | 239 }; |
240 | 240 |
241 const uint16_t ff_fgaintab[8]= { | 241 const uint16_t ff_ac3_fast_gain_tab[8]= { |
242 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, | 242 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, |
243 }; | 243 }; |
244 | 244 |
245 const uint8_t ff_ac3_bndsz[50]={ | 245 const uint8_t ff_ac3_critical_band_size_tab[50]={ |
246 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 246 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
247 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, | 247 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, |
248 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24 | 248 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24 |
249 }; | 249 }; |