summaryrefslogtreecommitdiff
path: root/libavcodec/celp_filters.c
diff options
context:
space:
mode:
authorKenan Gillet <kenan.gillet@gmail.com>2009-04-18 22:53:37 +0000
committerReynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>2009-04-18 22:53:37 +0000
commitd1bf60771c411668c5b8c80a73538a312151fd24 (patch)
tree486a54bf68c6e6b3684d1bcf92a70e6925045497 /libavcodec/celp_filters.c
parentb36da2c215257e439d824399c104af5805269424 (diff)
Add LP zero synthesis filter. Patch by Kenan Gillet.
Originally committed as revision 18616 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/celp_filters.c')
-rw-r--r--libavcodec/celp_filters.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/celp_filters.c b/libavcodec/celp_filters.c
index 2a6b0670b4..b2094a164a 100644
--- a/libavcodec/celp_filters.c
+++ b/libavcodec/celp_filters.c
@@ -103,3 +103,23 @@ void ff_celp_lp_synthesis_filterf(
out[n] -= filter_coeffs[i-1] * out[n-i];
}
}
+
+void ff_celp_lp_zero_synthesis_filterf(
+ float *out,
+ const float* filter_coeffs,
+ const float* in,
+ int buffer_length,
+ int filter_length)
+{
+ int i,n;
+
+ // Avoids a +1 in the inner loop.
+ filter_length++;
+
+ for(n=0; n<buffer_length; n++)
+ {
+ out[n] = in[n];
+ for(i=1; i<filter_length; i++)
+ out[n] -= filter_coeffs[i-1] * in[n-i];
+ }
+}