diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-13 15:35:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-13 15:35:50 +0200 |
commit | e3e09f2bad12fae4d2449cebb6130e2cf2266083 (patch) | |
tree | 4e62dffcef37727e4cfa2507bacd5b9fb225341d /libavcodec/ac3dec.c | |
parent | c942e8b1d75243b97db24e0c75f7d5c7b9d585eb (diff) | |
parent | ca6b544ac9d07dcd4d151d5729f0bf52f4f8653d (diff) | |
download | ffmpeg-e3e09f2bad12fae4d2449cebb6130e2cf2266083.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
os_support: Choose between direct.h and io.h using a configure check
os_support: Include io.h instead of direct.h on mingw32ce
x86: ac3dsp: Only refer to the ac3_downmix_sse symbol if it has been declared
swscale: Remove two bogus asserts
ac3: move ac3_downmix() from dsputil to ac3dsp
lavr/audio_mix_matrix: acknowledge the existence of LFE2.
mlp_parser: avoid mapping multiple disctinct TrueHD channels to the same Libav channel.
lavu/audioconvert: add a second low frequency channel.
Conflicts:
doc/APIchanges
libavcodec/ac3dsp.c
libavcodec/ac3dsp.h
libavcodec/mlp_parser.c
libavutil/audioconvert.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r-- | libavcodec/ac3dec.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index cafa35dff0..c608de83e2 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -621,34 +621,6 @@ static inline void do_imdct(AC3DecodeContext *s, int channels) } /** - * Downmix the output to mono or stereo. - */ -void ff_ac3_downmix_c(float (*samples)[256], float (*matrix)[2], - int out_ch, int in_ch, int len) -{ - int i, j; - float v0, v1; - if (out_ch == 2) { - for (i = 0; i < len; i++) { - v0 = v1 = 0.0f; - for (j = 0; j < in_ch; j++) { - v0 += samples[j][i] * matrix[j][0]; - v1 += samples[j][i] * matrix[j][1]; - } - samples[0][i] = v0; - samples[1][i] = v1; - } - } else if (out_ch == 1) { - for (i = 0; i < len; i++) { - v0 = 0.0f; - for (j = 0; j < in_ch; j++) - v0 += samples[j][i] * matrix[j][0]; - samples[0][i] = v0; - } - } -} - -/** * Upmix delay samples from stereo to original channel layout. */ static void ac3_upmix_delay(AC3DecodeContext *s) @@ -1266,19 +1238,19 @@ static int decode_audio_block(AC3DecodeContext *s, int blk) do_imdct(s, s->channels); if (downmix_output) { - s->dsp.ac3_downmix(s->output, s->downmix_coeffs, - s->out_channels, s->fbw_channels, 256); + s->ac3dsp.downmix(s->output, s->downmix_coeffs, + s->out_channels, s->fbw_channels, 256); } } else { if (downmix_output) { - s->dsp.ac3_downmix(s->transform_coeffs + 1, s->downmix_coeffs, - s->out_channels, s->fbw_channels, 256); + s->ac3dsp.downmix(s->transform_coeffs + 1, s->downmix_coeffs, + s->out_channels, s->fbw_channels, 256); } if (downmix_output && !s->downmixed) { s->downmixed = 1; - s->dsp.ac3_downmix(s->delay, s->downmix_coeffs, s->out_channels, - s->fbw_channels, 128); + s->ac3dsp.downmix(s->delay, s->downmix_coeffs, s->out_channels, + s->fbw_channels, 128); } do_imdct(s, s->out_channels); |