diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-10 02:06:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-10 02:06:50 +0100 |
commit | a93369845783a5a63e713c143cab2c550a6ccd82 (patch) | |
tree | 582b1a0ac80490ef54f09287c5613dfdb6154ca6 /libavcodec/ac3dec.c | |
parent | b7d8484f272b7a5a2ed9db76d5182dbd6e3e6992 (diff) | |
parent | 30b39164256999efc8d77edc85e2e0b963c24834 (diff) | |
download | ffmpeg-streaming-a93369845783a5a63e713c143cab2c550a6ccd82.zip ffmpeg-streaming-a93369845783a5a63e713c143cab2c550a6ccd82.tar.gz |
Merge commit '30b39164256999efc8d77edc85e2e0b963c24834'
* commit '30b39164256999efc8d77edc85e2e0b963c24834':
ac3dec: make downmix() take array of pointers to channel data
Conflicts:
libavcodec/ac3dsp.c
libavcodec/ac3dsp.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 064e60d..8e27cf7 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); } |