Change sign in ff_celp_lp_synthesis_filterf(). This makes this function
authorKenan Gillet <kenan.gillet@gmail.com>
Mon, 23 Feb 2009 22:19:16 +0000 (22:19 +0000)
committerVitor Sessak <vitor1001@gmail.com>
Mon, 23 Feb 2009 22:19:16 +0000 (22:19 +0000)
useful for AMR and RA144.

Patch by Kenan Gillet

Originally committed as revision 17546 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/celp_filters.c
libavcodec/qcelp_lsp.c

index 3d983c4..a48368f 100644 (file)
@@ -102,6 +102,6 @@ void ff_celp_lp_synthesis_filterf(
     {
         out[n] = in[n];
         for(i=1; i<filter_length; i++)
-            out[n] += filter_coeffs[i] * out[n-i];
+            out[n] -= filter_coeffs[i] * out[n-i];
     }
 }
index fdc9ada..a29f262 100644 (file)
@@ -81,7 +81,7 @@ void ff_qcelp_lspf2lpc(const float *lspf, float *lpc)
 {
     double pa[6], qa[6];
     int   i;
-    double bandwith_expansion_coeff = -QCELP_BANDWITH_EXPANSION_COEFF * 0.5;
+    double bandwith_expansion_coeff = QCELP_BANDWITH_EXPANSION_COEFF * 0.5;
 
     lsp2polyf(lspf,     pa, 5);
     lsp2polyf(lspf + 1, qa, 5);