From cb5042d02c66aed68643633446f6bf623b72416e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Fri, 8 Jun 2012 13:49:56 -0400 Subject: float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil --- libavcodec/dca.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libavcodec/dca.c') diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 103f0588e3..b37dc49d3f 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -27,6 +27,7 @@ #include #include "libavutil/common.h" +#include "libavutil/float_dsp.h" #include "libavutil/intmath.h" #include "libavutil/intreadwrite.h" #include "libavutil/mathematics.h" @@ -383,7 +384,7 @@ typedef struct { int profile; int debug_flag; ///< used for suppressing repeated error messages output - DSPContext dsp; + AVFloatDSPContext fdsp; FFTContext imdct; SynthFilterContext synth; DCADSPContext dcadsp; @@ -1865,8 +1866,8 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, float *back_chan = s->samples + s->channel_order_tab[s->xch_base_channel] * 256; float *lt_chan = s->samples + s->channel_order_tab[s->xch_base_channel - 2] * 256; float *rt_chan = s->samples + s->channel_order_tab[s->xch_base_channel - 1] * 256; - s->dsp.vector_fmac_scalar(lt_chan, back_chan, -M_SQRT1_2, 256); - s->dsp.vector_fmac_scalar(rt_chan, back_chan, -M_SQRT1_2, 256); + s->fdsp.vector_fmac_scalar(lt_chan, back_chan, -M_SQRT1_2, 256); + s->fdsp.vector_fmac_scalar(rt_chan, back_chan, -M_SQRT1_2, 256); } if (avctx->sample_fmt == AV_SAMPLE_FMT_FLT) { @@ -1908,7 +1909,7 @@ static av_cold int dca_decode_init(AVCodecContext *avctx) s->avctx = avctx; dca_init_vlcs(); - ff_dsputil_init(&s->dsp, avctx); + avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT); ff_mdct_init(&s->imdct, 6, 1, 1.0); ff_synth_filter_init(&s->synth); ff_dcadsp_init(&s->dcadsp); -- cgit v1.2.3