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>
This commit is contained in:
Michael Niedermayer
2012-12-10 02:06:50 +01:00
5 changed files with 59 additions and 33 deletions
+11 -3
View File
@@ -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);
}