summaryrefslogtreecommitdiff
path: root/libavcodec/acelp_vectors.c
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>2009-03-09 21:55:24 +0000
committerReynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>2009-03-09 21:55:24 +0000
commit95e83257715818d113724eb92035f4e685d1ec11 (patch)
treec0bf7092251919b30fc7610f3c513078f077240d /libavcodec/acelp_vectors.c
parent88c4339bda6f2ad0e6e431b5c45e32d44d44a344 (diff)
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
Diffstat (limited to 'libavcodec/acelp_vectors.c')
-rw-r--r--libavcodec/acelp_vectors.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/acelp_vectors.c b/libavcodec/acelp_vectors.c
index cae6318fa0..5443006718 100644
--- a/libavcodec/acelp_vectors.c
+++ b/libavcodec/acelp_vectors.c
@@ -145,3 +145,13 @@ void ff_acelp_weighted_vector_sum(
in_b[i] * weight_coeff_b +
rounder) >> shift);
}
+
+void ff_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; i<length; i++)
+ out[i] = weight_coeff_a * in_a[i]
+ + weight_coeff_b * in_b[i];
+}