diff options
author | Mohamed Naufal <naufal22@gmail.com> | 2015-11-23 17:10:54 -0500 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-11-30 10:58:46 -0500 |
commit | f023d57d355ff3b917f1aad9b03db5c293ec4244 (patch) | |
tree | 3eb9a1def012f48b9678e30428767c5c361d7508 /libavcodec/celp_math.c | |
parent | 165cc6fb9defcd79fd71c08167f3e8df26b058ff (diff) |
lavc: G.723.1 encoder
Additional improvements by Michael Niedermayer <michaelni@gmx.at>.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/celp_math.c')
-rw-r--r-- | libavcodec/celp_math.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; +} |