From 95e83257715818d113724eb92035f4e685d1ec11 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Mon, 9 Mar 2009 21:55:24 +0000 Subject: Functional part Kenan Gillet's 'extract and share weighted_vector_sumf' patchset. Idea is to share this common code between the AMR and QCELP decoders. Originally committed as revision 17916 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/qcelpdec.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'libavcodec/qcelpdec.c') diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c index c7d2938c0a..9af3467a96 100644 --- a/libavcodec/qcelpdec.c +++ b/libavcodec/qcelpdec.c @@ -37,6 +37,7 @@ #include "celp_math.h" #include "celp_filters.h" +#include "acelp_vectors.h" #undef NDEBUG #include @@ -81,17 +82,6 @@ typedef struct */ void ff_celp_lspf2lpc(const double *lspf, float *lpc); -static void weighted_vector_sumf(float *out, const float *in_a, - const float *in_b, float weight_coeff_a, - float weight_coeff_b, int length) -{ - int i; - - for(i=0; iprev_lspf, smooth, 1.0-smooth, 10); + ff_weighted_vector_sumf(lspf, lspf, q->prev_lspf, smooth, 1.0-smooth, 10); }else { q->octave_count = 0; @@ -640,7 +630,7 @@ void interpolate_lpc(QCELPContext *q, const float *curr_lspf, float *lpc, if(weight != 1.0) { - weighted_vector_sumf(interpolated_lspf, curr_lspf, q->prev_lspf, + ff_weighted_vector_sumf(interpolated_lspf, curr_lspf, q->prev_lspf, weight, 1.0 - weight, 10); lspf2lpc(interpolated_lspf, lpc); }else if(q->bitrate >= RATE_QUARTER || -- cgit v1.2.3