diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index eaf669285a..7af8a91640 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -39,9 +39,6 @@ #include "dsputil.h" #include "random.h" -static uint8_t bndtab[51]; -static uint8_t masktab[253]; - static const int nfchans_tbl[8] = { 2, 1, 2, 3, 3, 4, 4, 5 }; /* table for exponent to scale_factor mapping @@ -49,8 +46,6 @@ static const int nfchans_tbl[8] = { 2, 1, 2, 3, 3, 4, 4, 5 }; */ static float scale_factors[25]; -static int16_t psdtab[25]; - static int8_t exp_1[128]; static int8_t exp_2[128]; static int8_t exp_3[128]; @@ -272,22 +267,7 @@ static void generate_quantizers_table_3(int16_t quantizers[], int level, int len */ static void ac3_tables_init(void) { - int i, j, k, l, v; - /* compute bndtab and masktab from bandsz */ - k = 0; - l = 0; - for(i=0;i<50;i++) { - bndtab[i] = l; - v = ff_ac3_bndsz[i]; - for(j=0;jcsnroffst) || (ctx->cplinu && ctx->cplfsnroffst) || - (ctx->lfeon && ctx->lfefsnroffst)) - return 0; - - for (i = 0; i < ctx->nfchans; i++) - if (ctx->fsnroffst[i]) - return 0; - - return 1; -} - typedef struct { /* grouped mantissas for 3-level 5-leve and 11-level quantization */ int16_t l3_quantizers[3]; int16_t l5_quantizers[3]; @@ -1674,12 +1638,6 @@ static int ac3_parse_audio_block(AC3DecodeContext * ctx) } if (bit_alloc_flags) { - if (is_snr_offsets_zero(ctx)) { - memset(ctx->cplbap, 0, sizeof (ctx->cplbap)); - memset(ctx->lfebap, 0, sizeof (ctx->lfebap)); - for (i = 0; i < nfchans; i++) - memset(ctx->bap[i], 0, sizeof(ctx->bap[i])); - } else { /* set bit allocation parameters */ ctx->bit_alloc_params.fscod = ctx->fscod; ctx->bit_alloc_params.halfratecod = 0; @@ -1698,7 +1656,6 @@ static int ac3_parse_audio_block(AC3DecodeContext * ctx) do_bit_allocation(ctx, i); if (ctx->lfeon && (bit_alloc_flags & 32)) do_bit_allocation(ctx, 6); - } } if (get_bits1(gb)) { /* unused dummy data */