# HG changeset patch # User jbr # Date 1189815561 0 # Node ID 53c43e7156bca6860f9873b59b38040df8da3932 # Parent b031d95d8faeedbe24924819cbd6b00fdbf28225 cosmetics: rename variables. tbl->tab for consistency with other AC3 tables diff -r b031d95d8fae -r 53c43e7156bc ac3dec.c --- a/ac3dec.c Sat Sep 15 00:00:57 2007 +0000 +++ b/ac3dec.c Sat Sep 15 00:19:21 2007 +0000 @@ -42,7 +42,7 @@ * Table of bin locations for rematrixing bands * reference: Section 7.5.2 Rematrixing : Frequency Band Definitions */ -static const uint8_t rematrix_band_tbl[5] = { 13, 25, 37, 61, 253 }; +static const uint8_t rematrix_band_tab[5] = { 13, 25, 37, 61, 253 }; /** * table for exponent to scale_factor mapping @@ -51,7 +51,7 @@ static float scale_factors[25]; /** table for grouping exponents */ -static uint8_t exp_ungroup_tbl[128][3]; +static uint8_t exp_ungroup_tab[128][3]; /** tables for ungrouping mantissas */ @@ -71,10 +71,10 @@ }; /** dynamic range table. converts codes to scale factors. */ -static float dynrng_tbl[256]; +static float dynrng_tab[256]; /** dialogue normalization table */ -static float dialnorm_tbl[32]; +static float dialnorm_tab[32]; /** Adjustments in dB gain */ #define LEVEL_MINUS_3DB 0.7071067811865476 @@ -273,16 +273,16 @@ reference: Section 7.7.1 Dynamic Range Control */ for(i=0; i<256; i++) { int v = (i >> 5) - ((i >> 7) << 3) - 5; - dynrng_tbl[i] = powf(2.0f, v) * ((i & 0x1F) | 0x20); + dynrng_tab[i] = powf(2.0f, v) * ((i & 0x1F) | 0x20); } /* generate dialogue normalization table references: Section 5.4.2.8 dialnorm Section 7.6 Dialogue Normalization */ for(i=1; i<32; i++) { - dialnorm_tbl[i] = expf((i-31) * M_LN10 / 20.0f); + dialnorm_tab[i] = expf((i-31) * M_LN10 / 20.0f); } - dialnorm_tbl[0] = dialnorm_tbl[31]; + dialnorm_tab[0] = dialnorm_tab[31]; /* generate scale factors for exponents and asymmetrical dequantization reference: Section 7.3.2 Expansion of Mantissas for Asymmetric Quantization */ @@ -292,9 +292,9 @@ /* generate exponent tables reference: Section 7.1.3 Exponent Decoding */ for(i=0; i<128; i++) { - exp_ungroup_tbl[i][0] = i / 25; - exp_ungroup_tbl[i][1] = (i % 25) / 5; - exp_ungroup_tbl[i][2] = (i % 25) % 5; + exp_ungroup_tab[i][0] = i / 25; + exp_ungroup_tab[i][1] = (i % 25) / 5; + exp_ungroup_tab[i][2] = (i % 25) % 5; } } @@ -382,7 +382,7 @@ /* read the rest of the bsi. read twice for dual mono mode. */ i = !(ctx->acmod); do { - ctx->dialnorm[i] = dialnorm_tbl[get_bits(gb, 5)]; // dialogue normalization + ctx->dialnorm[i] = dialnorm_tab[get_bits(gb, 5)]; // dialogue normalization if (get_bits1(gb)) skip_bits(gb, 8); //skip compression if (get_bits1(gb)) @@ -444,9 +444,9 @@ grpsize = expstr + (expstr == EXP_D45); for(grp=0,i=0; grpnrematbnd; bnd++) { if(ctx->rematflg[bnd]) { - bndend = FFMIN(end, rematrix_band_tbl[bnd+1]); - for(i=rematrix_band_tbl[bnd]; itransform_coeffs[1][i]; tmp1 = ctx->transform_coeffs[2][i]; ctx->transform_coeffs[1][i] = tmp0 + tmp1; @@ -804,7 +804,7 @@ i = !(ctx->acmod); do { if(get_bits1(gb)) { - ctx->dynrng[i] = dynrng_tbl[get_bits(gb, 8)]; + ctx->dynrng[i] = dynrng_tab[get_bits(gb, 8)]; } else if(blk == 0) { ctx->dynrng[i] = 1.0f; }