From c4f5c2d6f4ffa3f4b56555059000208a6ba47b55 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Mon, 16 May 2011 16:52:01 +0100 Subject: Move some mpegaudio functions to new mpegaudiodsp subsystem This separation allows these functions to be used in a cleaner fashion from other codecs (e.g. qdm2) and simplifies creating optimised versions of them. Signed-off-by: Mans Rullgard --- libavcodec/qdm2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libavcodec/qdm2.c') diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 0f4dd18966..f74cfd9258 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -39,6 +39,7 @@ #include "get_bits.h" #include "dsputil.h" #include "rdft.h" +#include "mpegaudiodsp.h" #include "mpegaudio.h" #include "qdm2data.h" @@ -170,6 +171,7 @@ typedef struct { float output_buffer[1024]; /// Synthesis filter + MPADSPContext mpadsp; DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2]; int synth_buf_offset[MPA_MAX_CHANNELS]; DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT]; @@ -1616,7 +1618,8 @@ static void qdm2_synthesis_filter (QDM2Context *q, int index) OUT_INT *samples_ptr = samples + ch; for (i = 0; i < 8; i++) { - ff_mpa_synth_filter_fixed(q->synth_buf[ch], &(q->synth_buf_offset[ch]), + ff_mpa_synth_filter_fixed(&q->mpadsp, + q->synth_buf[ch], &(q->synth_buf_offset[ch]), ff_mpa_synth_window_fixed, &dither_state, samples_ptr, q->nb_channels, q->sb_samples[ch][(8 * index) + i]); @@ -1863,6 +1866,7 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx) } ff_rdft_init(&s->rdft_ctx, s->fft_order, IDFT_C2R); + ff_mpadsp_init(&s->mpadsp); qdm2_init(s); -- cgit v1.2.3