aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qdm2.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-05-16 16:52:01 +0100
committerMans Rullgard <mans@mansr.com>2011-05-19 12:25:34 +0100
commitc4f5c2d6f4ffa3f4b56555059000208a6ba47b55 (patch)
treef46c4f0d94a1e073ac0dae24fab4d1d972bcb2c6 /libavcodec/qdm2.c
parentea91e77127229015d23a046f1797d3fc6a33e54d (diff)
downloadffmpeg-c4f5c2d6f4ffa3f4b56555059000208a6ba47b55.tar.gz
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 <mans@mansr.com>
Diffstat (limited to 'libavcodec/qdm2.c')
-rw-r--r--libavcodec/qdm2.c6
1 files changed, 5 insertions, 1 deletions
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);