Commit 112018ef authored by jbr's avatar jbr

set lfe params at frame init instead of in every block

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13588 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9a99b125
...@@ -325,6 +325,13 @@ static int ac3_parse_header(AC3DecodeContext *s) ...@@ -325,6 +325,13 @@ static int ac3_parse_header(AC3DecodeContext *s)
s->center_mix_level = hdr.center_mix_level; s->center_mix_level = hdr.center_mix_level;
s->surround_mix_level = hdr.surround_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. */ /* read the rest of the bsi. read twice for dual mono mode. */
i = !(s->channel_mode); i = !(s->channel_mode);
do { do {
...@@ -926,9 +933,6 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk) ...@@ -926,9 +933,6 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); 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) { 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]) / s->num_exp_groups[CPL_CH] = (s->end_freq[CPL_CH] - s->start_freq[CPL_CH]) /
(3 << (s->exp_strategy[CPL_CH] - 1)); (3 << (s->exp_strategy[CPL_CH] - 1));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment