From f023d57d355ff3b917f1aad9b03db5c293ec4244 Mon Sep 17 00:00:00 2001 From: Mohamed Naufal Date: Mon, 23 Nov 2015 17:10:54 -0500 Subject: lavc: G.723.1 encoder Additional improvements by Michael Niedermayer . Signed-off-by: Vittorio Giovara --- libavcodec/celp_math.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libavcodec/celp_math.c') diff --git a/libavcodec/celp_math.c b/libavcodec/celp_math.c index a9ebef697c..8a788f58ec 100644 --- a/libavcodec/celp_math.c +++ b/libavcodec/celp_math.c @@ -26,6 +26,8 @@ #include "avcodec.h" #include "celp_math.h" +#include "mathops.h" + #include "libavutil/common.h" static const uint16_t exp2a[]= @@ -86,3 +88,14 @@ int ff_log2_q15(uint32_t value) return (power_int << 15) + value; } + +int64_t ff_dot_product(const int16_t *a, const int16_t *b, int length) +{ + int i; + int64_t sum = 0; + + for (i = 0; i < length; i++) + sum += MUL16(a[i], b[i]); + + return sum; +} -- cgit v1.2.3