summaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-05-31 21:57:45 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-05-31 21:57:45 +0000
commit6e74513a48bec5ccb99db1f8888b7b0669b9cae4 (patch)
tree6c44927aaf4e7daa4d5a6c93bd387288371b71dd /libavcodec/ac3dec.c
parentb85a15fe737d162524f3555d8d22cc2bfe086b52 (diff)
downloadffmpeg-streaming-6e74513a48bec5ccb99db1f8888b7b0669b9cae4.zip
ffmpeg-streaming-6e74513a48bec5ccb99db1f8888b7b0669b9cae4.tar.gz
set lfe params at frame init instead of in every block
Originally committed as revision 13588 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 40727e7..a7c5fa4 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -325,6 +325,13 @@ static int ac3_parse_header(AC3DecodeContext *s)
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 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
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));
OpenPOWER on IntegriCloud