diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-08-07 17:51:13 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-09-05 10:07:43 -0400 |
commit | a0d17b6d45b8550bd8826baa9f8eb4e1a596525a (patch) | |
tree | 18d1073d0bc3d1cd12939c64912b89f935d4a4f3 /libavcodec/ac3enc_float.c | |
parent | 3e5722a8cadd8b4a7f92110b9a0b2f48883f1243 (diff) | |
download | ffmpeg-a0d17b6d45b8550bd8826baa9f8eb4e1a596525a.tar.gz |
ac3enc: scale floating-point coupling channel coefficients in
scale_coefficients() rather than in apply_channel_coupling()
Diffstat (limited to 'libavcodec/ac3enc_float.c')
-rw-r--r-- | libavcodec/ac3enc_float.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c index 8e74aaf285..32ec558e70 100644 --- a/libavcodec/ac3enc_float.c +++ b/libavcodec/ac3enc_float.c @@ -104,9 +104,10 @@ static int normalize_samples(AC3EncodeContext *s) static void scale_coefficients(AC3EncodeContext *s) { int chan_size = AC3_MAX_COEFS * s->num_blocks; - s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size, - s->mdct_coef_buffer + chan_size, - chan_size * s->channels); + int cpl = s->cpl_on; + s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + (chan_size * !cpl), + s->mdct_coef_buffer + (chan_size * !cpl), + chan_size * (s->channels + cpl)); } |