summaryrefslogtreecommitdiff
path: root/libavcodec/nellymoserdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2013-01-06 23:47:30 -0500
committerLuca Barbato <lu_zero@gentoo.org>2013-01-16 10:45:45 +0100
commite034cc6c60c77dce390b1ac31141b1862bdf8999 (patch)
treee61443e9c6413b1b92107e932c1d79a9717e16be /libavcodec/nellymoserdec.c
parenta7ba3244131d96d9ab7a99ef30dc7276efd05cc7 (diff)
lavc: Move vector_fmul_window to AVFloatDSPContext
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/nellymoserdec.c')
-rw-r--r--libavcodec/nellymoserdec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index b6aa6f5f82..08cc4ab15b 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -32,6 +32,7 @@
*/
#include "libavutil/channel_layout.h"
+#include "libavutil/float_dsp.h"
#include "libavutil/lfg.h"
#include "libavutil/random_seed.h"
#include "avcodec.h"
@@ -52,7 +53,7 @@ typedef struct NellyMoserDecodeContext {
AVLFG random_state;
GetBitContext gb;
float scale_bias;
- DSPContext dsp;
+ AVFloatDSPContext fdsp;
FFTContext imdct_ctx;
DECLARE_ALIGNED(32, float, imdct_buf)[2][NELLY_BUF_LEN];
float *imdct_out;
@@ -107,7 +108,9 @@ static void nelly_decode_block(NellyMoserDecodeContext *s,
(NELLY_BUF_LEN - NELLY_FILL_LEN) * sizeof(float));
s->imdct_ctx.imdct_half(&s->imdct_ctx, s->imdct_out, aptr);
- s->dsp.vector_fmul_window(aptr, s->imdct_prev + NELLY_BUF_LEN/2, s->imdct_out, ff_sine_128, NELLY_BUF_LEN/2);
+ s->fdsp.vector_fmul_window(aptr, s->imdct_prev + NELLY_BUF_LEN / 2,
+ s->imdct_out, ff_sine_128,
+ NELLY_BUF_LEN / 2);
FFSWAP(float *, s->imdct_out, s->imdct_prev);
}
}
@@ -121,7 +124,7 @@ static av_cold int decode_init(AVCodecContext * avctx) {
av_lfg_init(&s->random_state, 0);
ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0);
- ff_dsputil_init(&s->dsp, avctx);
+ avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
s->scale_bias = 1.0/(32768*8);
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;