summaryrefslogtreecommitdiff
path: root/libavcodec/g723_1.c
diff options
context:
space:
mode:
authorMohamed Naufal <naufal22@gmail.com>2015-11-23 17:10:54 -0500
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-11-30 10:58:46 -0500
commitf023d57d355ff3b917f1aad9b03db5c293ec4244 (patch)
tree3eb9a1def012f48b9678e30428767c5c361d7508 /libavcodec/g723_1.c
parent165cc6fb9defcd79fd71c08167f3e8df26b058ff (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/g723_1.c')
-rw-r--r--libavcodec/g723_1.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index af4777cc35..3d45f9d1cf 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -53,13 +53,8 @@ int ff_g723_1_normalize_bits(int num, int width)
int ff_g723_1_dot_product(const int16_t *a, const int16_t *b, int length)
{
- int i, sum = 0;
-
- for (i = 0; i < length; i++) {
- int prod = a[i] * b[i];
- sum = av_sat_dadd32(sum, prod);
- }
- return sum;
+ int sum = ff_dot_product(a, b, length);
+ return av_sat_add32(sum, sum);
}
void ff_g723_1_get_residual(int16_t *residual, int16_t *prev_excitation,