diff options
author | Mans Rullgard <mans@mansr.com> | 2012-09-13 22:35:18 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-12-09 19:52:01 +0400 |
commit | 30b39164256999efc8d77edc85e2e0b963c24834 (patch) | |
tree | 0b927b8bbcf6cf72206db8ef84894227bb0520e0 /libavcodec/ac3dec.c | |
parent | b8f3ab8e6a7ce3627764da53b809628c828d4047 (diff) |
ac3dec: make downmix() take array of pointers to channel data
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r-- | libavcodec/ac3dec.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index c5507cc3e9..fe709defa9 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -160,6 +160,8 @@ static av_cold void ac3_tables_init(void) static av_cold int ac3_decode_init(AVCodecContext *avctx) { AC3DecodeContext *s = avctx->priv_data; + int i; + s->avctx = avctx; ff_ac3_common_init(); @@ -185,6 +187,12 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) avcodec_get_frame_defaults(&s->frame); avctx->coded_frame = &s->frame; + for (i = 0; i < AC3_MAX_CHANNELS; i++) { + s->outptr[i] = s->output[i]; + s->xcfptr[i] = s->transform_coeffs[i]; + s->dlyptr[i] = s->delay[i]; + } + return 0; } @@ -1231,18 +1239,18 @@ static int decode_audio_block(AC3DecodeContext *s, int blk) do_imdct(s, s->channels); if (downmix_output) { - s->ac3dsp.downmix(s->output, s->downmix_coeffs, + s->ac3dsp.downmix(s->outptr, s->downmix_coeffs, s->out_channels, s->fbw_channels, 256); } } else { if (downmix_output) { - s->ac3dsp.downmix(s->transform_coeffs + 1, s->downmix_coeffs, + s->ac3dsp.downmix(s->xcfptr + 1, s->downmix_coeffs, s->out_channels, s->fbw_channels, 256); } if (downmix_output && !s->downmixed) { s->downmixed = 1; - s->ac3dsp.downmix(s->delay, s->downmix_coeffs, s->out_channels, + s->ac3dsp.downmix(s->dlyptr, s->downmix_coeffs, s->out_channels, s->fbw_channels, 128); } |