diff ra288.c @ 9026:19bbd1457372 libavcodec

Do not reimplement ff_celp_lp_synthesis_filterf().
author vitor
date Tue, 24 Feb 2009 18:11:42 +0000
parents 36671e6689c7
children 54bc8a2727b0
line wrap: on
line diff
--- a/ra288.c	Tue Feb 24 17:09:57 2009 +0000
+++ b/ra288.c	Tue Feb 24 18:11:42 2009 +0000
@@ -25,6 +25,7 @@
 #include "ra288.h"
 #include "lpc.h"
 #include "celp_math.h"
+#include "celp_filters.h"
 
 typedef struct {
     float sp_lpc[36];      ///< LPC coefficients for speech data (spec: A)
@@ -68,7 +69,7 @@
 
 static void decode(RA288Context *ractx, float gain, int cb_coef)
 {
-    int i, j;
+    int i;
     double sumsum;
     float sum, buffer[5];
     float *block = ractx->sp_hist + 70 + 36; // current block
@@ -100,11 +101,7 @@
 
     gain_block[9] = 10 * log10(sum) - 32;
 
-    for (i=0; i < 5; i++) {
-        block[i] = buffer[i];
-        for (j=0; j < 36; j++)
-            block[i] -= block[i-1-j]*ractx->sp_lpc[j];
-    }
+    ff_celp_lp_synthesis_filterf(block, ractx->sp_lpc, buffer, 5, 36);
 
     /* output */
     for (i=0; i < 5; i++)