[FFmpeg-cvslog] r13500 - in trunk/libavcodec: Makefile ra144.c

vitor subversion
Wed May 28 21:04:35 CEST 2008


Author: vitor
Date: Wed May 28 21:04:34 2008
New Revision: 13500

Log:
Use ff_acelp_weighted_vector_sum() instead of reimplementing it

Modified:
   trunk/libavcodec/Makefile
   trunk/libavcodec/ra144.c

Modified: trunk/libavcodec/Makefile
==============================================================================
--- trunk/libavcodec/Makefile	(original)
+++ trunk/libavcodec/Makefile	Wed May 28 21:04:34 2008
@@ -152,7 +152,7 @@ OBJS-$(CONFIG_QDRAW_DECODER)           +
 OBJS-$(CONFIG_QPEG_DECODER)            += qpeg.o
 OBJS-$(CONFIG_QTRLE_DECODER)           += qtrle.o
 OBJS-$(CONFIG_QTRLE_ENCODER)           += qtrleenc.o
-OBJS-$(CONFIG_RA_144_DECODER)          += ra144.o
+OBJS-$(CONFIG_RA_144_DECODER)          += ra144.o acelp_vectors.o
 OBJS-$(CONFIG_RA_288_DECODER)          += ra288.o
 OBJS-$(CONFIG_RAWVIDEO_DECODER)        += rawdec.o
 OBJS-$(CONFIG_RAWVIDEO_ENCODER)        += rawenc.o

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	(original)
+++ trunk/libavcodec/ra144.c	Wed May 28 21:04:34 2008
@@ -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, int
 
     // 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




More information about the ffmpeg-cvslog mailing list