summaryrefslogtreecommitdiff
path: root/libavcodec/nellymoserdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-16 12:38:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-16 12:38:41 +0100
commit5c7e9e16c961f1f7258734426afac3cee4349580 (patch)
tree20ea7bec723ef262bffb8f2447adcc1dc3d98069 /libavcodec/nellymoserdec.c
parent0e79fe37e5c5500db2e65ce6b7ea0bbdb3f24665 (diff)
parente034cc6c60c77dce390b1ac31141b1862bdf8999 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavc: Move vector_fmul_window to AVFloatDSPContext rtpdec_mpeg4: Check the remaining amount of data before reading Conflicts: libavcodec/dsputil.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 8fa52de9d5..ad3158ce3b 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;