summaryrefslogtreecommitdiff
path: root/libavcodec/celp_math.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/celp_math.c')
-rw-r--r--libavcodec/celp_math.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/celp_math.c b/libavcodec/celp_math.c
index 9fa7dfc70d..df05917d20 100644
--- a/libavcodec/celp_math.c
+++ b/libavcodec/celp_math.c
@@ -195,3 +195,14 @@ int ff_log2(uint32_t value)
return (power_int << 15) + value;
}
+
+float ff_dot_productf(const float* a, const float* b, int length)
+{
+ float sum = 0;
+ int i;
+
+ for(i=0; i<length; i++)
+ sum += a[i] * b[i];
+
+ return sum;
+}