From d56668bd80075615b89aff652fe8a576bf853ceb Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 20 Jan 2013 15:41:52 -0800 Subject: floatdsp: move scalarproduct_float from dsputil to avfloatdsp. This makes the aac decoder and all voice codecs independent of dsputil. --- libavcodec/qcelpdec.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'libavcodec/qcelpdec.c') diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c index b702175c19..59220d53e3 100644 --- a/libavcodec/qcelpdec.c +++ b/libavcodec/qcelpdec.c @@ -30,10 +30,10 @@ #include #include "libavutil/channel_layout.h" +#include "libavutil/float_dsp.h" #include "avcodec.h" #include "internal.h" #include "get_bits.h" -#include "dsputil.h" #include "qcelpdata.h" #include "celp_filters.h" #include "acelp_filters.h" @@ -400,12 +400,10 @@ static void apply_gain_ctrl(float *v_out, const float *v_ref, const float *v_in) { int i; - for (i = 0; i < 160; i += 40) - ff_scale_vector_to_given_sum_of_squares(v_out + i, v_in + i, - ff_scalarproduct_float_c(v_ref + i, - v_ref + i, - 40), - 40); + for (i = 0; i < 160; i += 40) { + float res = avpriv_scalarproduct_float_c(v_ref + i, v_ref + i, 40); + ff_scale_vector_to_given_sum_of_squares(v_out + i, v_in + i, res, 40); + } } /** @@ -680,8 +678,9 @@ static void postfilter(QCELPContext *q, float *samples, float *lpc) ff_tilt_compensation(&q->postfilter_tilt_mem, 0.3, pole_out + 10, 160); ff_adaptive_gain_control(samples, pole_out + 10, - ff_scalarproduct_float_c(q->formant_mem + 10, - q->formant_mem + 10, 160), + avpriv_scalarproduct_float_c(q->formant_mem + 10, + q->formant_mem + 10, + 160), 160, 0.9375, &q->postfilter_agc_mem); } -- cgit v1.2.3