diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2008-08-27 01:36:20 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2008-08-27 01:36:20 +0000 |
commit | e43b29ab26e831abdbba7cc481d1c704c0d86ee5 (patch) | |
tree | e0441cbb69d86a03a40dae439eb87683b53512b7 /libavcodec/ac3dec.c | |
parent | 6a68105e2b4783b5e17e470a70f67401b28f4681 (diff) | |
download | ffmpeg-e43b29ab26e831abdbba7cc481d1c704c0d86ee5.tar.gz |
add more OKed parts of the E-AC-3 decoder: structural changes to support AHT mode mantissa decoding
Originally committed as revision 14989 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r-- | libavcodec/ac3dec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 98c917f1b0..e4a1e754db 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -443,7 +443,7 @@ typedef struct { * Get the transform coefficients for a particular channel * reference: Section 7.3 Quantization and Decoding of Mantissas */ -static void decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, mant_groups *m) +static void ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, mant_groups *m) { GetBitContext *gbc = &s->gbc; int i, gcode, tbap, start, end; @@ -548,7 +548,6 @@ static void remove_dithering(AC3DecodeContext *s) { } } -#if 0 static void decode_transform_coeffs_ch(AC3DecodeContext *s, int blk, int ch, mant_groups *m) { @@ -558,19 +557,20 @@ static void decode_transform_coeffs_ch(AC3DecodeContext *s, int blk, int ch, /* if AHT is used, mantissas for all blocks are encoded in the first block of the frame. */ int bin; + /* if (!blk) ff_eac3_decode_transform_coeffs_aht_ch(s, ch); + */ for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) { s->fixed_coeffs[ch][bin] = s->pre_mantissa[ch][bin][blk] >> s->dexps[ch][bin]; } } } -#endif /** * Get the transform coefficients. */ -static void decode_transform_coeffs(AC3DecodeContext *s) +static void decode_transform_coeffs(AC3DecodeContext *s, int blk) { int ch, end; int got_cplchan = 0; @@ -580,12 +580,12 @@ static void decode_transform_coeffs(AC3DecodeContext *s) for (ch = 1; ch <= s->channels; ch++) { /* transform coefficients for full-bandwidth channel */ - decode_transform_coeffs_ch(s, ch, &m); + decode_transform_coeffs_ch(s, blk, ch, &m); /* tranform coefficients for coupling channel come right after the coefficients for the first coupled channel*/ if (s->channel_in_cpl[ch]) { if (!got_cplchan) { - decode_transform_coeffs_ch(s, CPL_CH, &m); + decode_transform_coeffs_ch(s, blk, CPL_CH, &m); calc_transform_coeffs_cpl(s); got_cplchan = 1; } @@ -1075,7 +1075,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk) /* unpack the transform coefficients this also uncouples channels if coupling is in use. */ - decode_transform_coeffs(s); + decode_transform_coeffs(s, blk); /* TODO: generate enhanced coupling coordinates and uncouple */ |