From d5a7229ba4aabc2b6407c731d9175879ae54c5ea Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 21 May 2012 12:58:41 -0400 Subject: Add a float DSP framework to libavutil Move vector_fmul() from DSPContext to AVFloatDSPContext. --- libavcodec/ra288.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libavcodec/ra288.c') diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index d7cda3ccf8..aa7ad33312 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/float_dsp.h" #include "avcodec.h" #define BITSTREAM_READER_LE #include "get_bits.h" @@ -26,7 +27,6 @@ #include "lpc.h" #include "celp_math.h" #include "celp_filters.h" -#include "dsputil.h" #define MAX_BACKWARD_FILTER_ORDER 36 #define MAX_BACKWARD_FILTER_LEN 40 @@ -38,6 +38,7 @@ typedef struct { AVFrame frame; DSPContext dsp; + AVFloatDSPContext fdsp; DECLARE_ALIGNED(32, float, sp_lpc)[FFALIGN(36, 16)]; ///< LPC coefficients for speech data (spec: A) DECLARE_ALIGNED(32, float, gain_lpc)[FFALIGN(10, 16)]; ///< LPC coefficients for gain (spec: GB) @@ -62,7 +63,7 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx) { RA288Context *ractx = avctx->priv_data; avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - ff_dsputil_init(&ractx->dsp, avctx); + avpriv_float_dsp_init(&ractx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT); avcodec_get_frame_defaults(&ractx->frame); avctx->coded_frame = &ractx->frame; @@ -137,7 +138,7 @@ static void do_hybrid_window(RA288Context *ractx, MAX_BACKWARD_FILTER_LEN + MAX_BACKWARD_FILTER_NONREC, 16)]); - ractx->dsp.vector_fmul(work, window, hist, FFALIGN(order + n + non_rec, 16)); + ractx->fdsp.vector_fmul(work, window, hist, FFALIGN(order + n + non_rec, 16)); convolve(buffer1, work + order , n , order); convolve(buffer2, work + order + n, non_rec, order); @@ -164,7 +165,7 @@ static void backward_filter(RA288Context *ractx, do_hybrid_window(ractx, order, n, non_rec, temp, hist, rec, window); if (!compute_lpc_coefs(temp, order, lpc, 0, 1, 1)) - ractx->dsp.vector_fmul(lpc, lpc, tab, FFALIGN(order, 16)); + ractx->fdsp.vector_fmul(lpc, lpc, tab, FFALIGN(order, 16)); memmove(hist, hist + n, move_size*sizeof(*hist)); } -- cgit v1.2.3