Mercurial > libavcodec.hg
changeset 6958:1c523b5212cd libavcodec
set lfe params at frame init instead of in every block
author | jbr |
---|---|
date | Sat, 31 May 2008 21:57:45 +0000 |
parents | 6eb895971766 |
children | 3ba980378d90 |
files | ac3dec.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ac3dec.c Sat May 31 21:53:31 2008 +0000 +++ b/ac3dec.c Sat May 31 21:57:45 2008 +0000 @@ -325,6 +325,13 @@ s->center_mix_level = hdr.center_mix_level; s->surround_mix_level = hdr.surround_mix_level; + if(s->lfe_on) { + s->start_freq[s->lfe_ch] = 0; + s->end_freq[s->lfe_ch] = 7; + s->num_exp_groups[s->lfe_ch] = 2; + s->channel_in_cpl[s->lfe_ch] = 0; + } + /* read the rest of the bsi. read twice for dual mono mode. */ i = !(s->channel_mode); do { @@ -926,9 +933,6 @@ memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); } } - s->start_freq[s->lfe_ch] = 0; - s->end_freq[s->lfe_ch] = 7; - s->num_exp_groups[s->lfe_ch] = 2; if (s->cpl_in_use && s->exp_strategy[CPL_CH] != EXP_REUSE) { s->num_exp_groups[CPL_CH] = (s->end_freq[CPL_CH] - s->start_freq[CPL_CH]) / (3 << (s->exp_strategy[CPL_CH] - 1));