aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qcelpdec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-01-20 15:41:52 -0800
committerRonald S. Bultje <rsbultje@gmail.com>2013-01-22 11:55:42 -0800
commitd56668bd80075615b89aff652fe8a576bf853ceb (patch)
tree9da3ed036b716dbaf33f5c9869578bedb6e393a2 /libavcodec/qcelpdec.c
parent5959bfaca396ecaf63a8123055f499688b79cae3 (diff)
downloadffmpeg-d56668bd80075615b89aff652fe8a576bf853ceb.tar.gz
floatdsp: move scalarproduct_float from dsputil to avfloatdsp.
This makes the aac decoder and all voice codecs independent of dsputil.
Diffstat (limited to 'libavcodec/qcelpdec.c')
-rw-r--r--libavcodec/qcelpdec.c17
1 files changed, 8 insertions, 9 deletions
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 <stddef.h>
#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);
}