From c73d99e672329c8f2df290736ffc474c360ac4ae Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 30 Jan 2011 15:06:46 +0000 Subject: Separate format conversion DSP functions from DSPContext. This will be beneficial for use with the audio conversion API without requiring it to depend on all of dsputil. Signed-off-by: Mans Rullgard --- libavcodec/nellymoserdec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavcodec/nellymoserdec.c') diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 8b13a5d894..80e04ee0a2 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -38,6 +38,7 @@ #include "avcodec.h" #include "dsputil.h" #include "fft.h" +#include "fmtconvert.h" #define ALT_BITSTREAM_READER_LE #include "get_bits.h" @@ -52,6 +53,7 @@ typedef struct NellyMoserDecodeContext { float scale_bias; DSPContext dsp; FFTContext imdct_ctx; + FmtConvertContext fmt_conv; DECLARE_ALIGNED(16, float,imdct_out)[NELLY_BUF_LEN * 2]; } NellyMoserDecodeContext; @@ -134,6 +136,7 @@ static av_cold int decode_init(AVCodecContext * avctx) { ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0); dsputil_init(&s->dsp, avctx); + ff_fmt_convert_init(&s->fmt_conv, avctx); s->scale_bias = 1.0/(1*8); @@ -175,7 +178,7 @@ static int decode_tag(AVCodecContext * avctx, for (i=0 ; ifloat_buf); - s->dsp.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES); + s->fmt_conv.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES); *data_size += NELLY_SAMPLES*sizeof(int16_t); } -- cgit v1.2.3