summaryrefslogtreecommitdiff
path: root/libavcodec/ra144.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-05-28 19:04:34 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-05-28 19:04:34 +0000
commit31e15894d577e6cb46ecdf737ebc722aaaf14900 (patch)
tree1c042a9f4ac2b53a9f2839aa03f591c28ba4c825 /libavcodec/ra144.c
parent594409a25cd7c29632d7f40a459103f285d835aa (diff)
Use ff_acelp_weighted_vector_sum() instead of reimplementing it
Originally committed as revision 13500 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r--libavcodec/ra144.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index 04b39d8c78..104c260417 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -21,6 +21,7 @@
#include "avcodec.h"
#include "bitstream.h"
+#include "acelp_vectors.h"
#include "ra144.h"
#define NBLOCKS 4 /* number of segments within a block */
@@ -304,8 +305,8 @@ static int dec2(RA144Context *ractx, int16_t *decsp, int block_num,
// Interpolate block coefficients from the this frame forth block and
// last frame forth block
- for (x=0; x<30; x++)
- decsp[x] = (a * ractx->lpc_coef[x] + b * ractx->lpc_coef_old[x])>> 2;
+ ff_acelp_weighted_vector_sum(decsp, ractx->lpc_coef, ractx->lpc_coef_old,
+ a, b, 0, 2, 30);
if (eq(decsp, work)) {
// The interpolated coefficients are unstable, copy either new or old