comparison ac3dec.c @ 5967:15ed47af1838 libavcodec

Misc spelling fixes, prefer American over British English.
author diego
date Sun, 02 Dec 2007 15:43:08 +0000
parents ed3e9456f295
children 29635f7c3d9c
comparison
equal deleted inserted replaced
5966:1275461ae6f8 5967:15ed47af1838
71 }; 71 };
72 72
73 /** dynamic range table. converts codes to scale factors. */ 73 /** dynamic range table. converts codes to scale factors. */
74 static float dynrng_tab[256]; 74 static float dynrng_tab[256];
75 75
76 /** dialogue normalization table */ 76 /** dialog normalization table */
77 static float dialnorm_tab[32]; 77 static float dialnorm_tab[32];
78 78
79 /** Adjustments in dB gain */ 79 /** Adjustments in dB gain */
80 #define LEVEL_MINUS_3DB 0.7071067811865476 80 #define LEVEL_MINUS_3DB 0.7071067811865476
81 #define LEVEL_MINUS_4POINT5DB 0.5946035575013605 81 #define LEVEL_MINUS_4POINT5DB 0.5946035575013605
159 int lfe_ch; ///< index of LFE channel 159 int lfe_ch; ///< index of LFE channel
160 int output_mode; ///< output channel configuration 160 int output_mode; ///< output channel configuration
161 int out_channels; ///< number of output channels 161 int out_channels; ///< number of output channels
162 162
163 float downmix_coeffs[AC3_MAX_CHANNELS][2]; ///< stereo downmix coefficients 163 float downmix_coeffs[AC3_MAX_CHANNELS][2]; ///< stereo downmix coefficients
164 float dialnorm[2]; ///< dialogue normalization 164 float dialnorm[2]; ///< dialog normalization
165 float dynrng[2]; ///< dynamic range 165 float dynrng[2]; ///< dynamic range
166 float cplco[AC3_MAX_CHANNELS][18]; ///< coupling coordinates 166 float cplco[AC3_MAX_CHANNELS][18]; ///< coupling coordinates
167 int ncplbnd; ///< number of coupling bands 167 int ncplbnd; ///< number of coupling bands
168 int ncplsubnd; ///< number of coupling sub bands 168 int ncplsubnd; ///< number of coupling sub bands
169 int startmant[AC3_MAX_CHANNELS]; ///< start frequency bin 169 int startmant[AC3_MAX_CHANNELS]; ///< start frequency bin
274 for(i=0; i<256; i++) { 274 for(i=0; i<256; i++) {
275 int v = (i >> 5) - ((i >> 7) << 3) - 5; 275 int v = (i >> 5) - ((i >> 7) << 3) - 5;
276 dynrng_tab[i] = powf(2.0f, v) * ((i & 0x1F) | 0x20); 276 dynrng_tab[i] = powf(2.0f, v) * ((i & 0x1F) | 0x20);
277 } 277 }
278 278
279 /* generate dialogue normalization table 279 /* generate dialog normalization table
280 references: Section 5.4.2.8 dialnorm 280 references: Section 5.4.2.8 dialnorm
281 Section 7.6 Dialogue Normalization */ 281 Section 7.6 Dialogue Normalization */
282 for(i=1; i<32; i++) { 282 for(i=1; i<32; i++) {
283 dialnorm_tab[i] = expf((i-31) * M_LN10 / 20.0f); 283 dialnorm_tab[i] = expf((i-31) * M_LN10 / 20.0f);
284 } 284 }
380 skip_bits1(gb); // skip lfeon 380 skip_bits1(gb); // skip lfeon
381 381
382 /* read the rest of the bsi. read twice for dual mono mode. */ 382 /* read the rest of the bsi. read twice for dual mono mode. */
383 i = !(ctx->acmod); 383 i = !(ctx->acmod);
384 do { 384 do {
385 ctx->dialnorm[i] = dialnorm_tab[get_bits(gb, 5)]; // dialogue normalization 385 ctx->dialnorm[i] = dialnorm_tab[get_bits(gb, 5)]; // dialog normalization
386 if (get_bits1(gb)) 386 if (get_bits1(gb))
387 skip_bits(gb, 8); //skip compression 387 skip_bits(gb, 8); //skip compression
388 if (get_bits1(gb)) 388 if (get_bits1(gb))
389 skip_bits(gb, 8); //skip language code 389 skip_bits(gb, 8); //skip language code
390 if (get_bits1(gb)) 390 if (get_bits1(gb))