diff celp_filters.h @ 10045:d35904b4fe3f libavcodec

Add ff_celp_circ_addf() function to be used for sparse vector circular convolution in the upcoming AMR-NB floating point decoder. The function scales and adds a vector, that is lagged by some offset, to another vector with the same number of elements. Patch by Colin McQuillan ( m.niloc googlemail com )
author superdump
date Wed, 12 Aug 2009 19:54:28 +0000
parents 24952f1a8979
children d124d9b688d0
line wrap: on
line diff
--- a/celp_filters.h	Wed Aug 12 13:25:37 2009 +0000
+++ b/celp_filters.h	Wed Aug 12 19:54:28 2009 +0000
@@ -42,6 +42,21 @@
                            int len);
 
 /**
+ * Add an array to a rotated array.
+ *
+ * out[k] = in[k] + fac * lagged[k-lag] with wrap-around
+ *
+ * @param out result vector
+ * @param in samples to be added unfiltered
+ * @param lagged samples to be rotated, multiplied and added
+ * @param lag lagged vector delay in the range [0, n]
+ * @param fac scalefactor for lagged samples
+ * @param n number of samples
+ */
+void ff_celp_circ_addf(float *out, const float *in,
+                       const float *lagged, int lag, float fac, int n);
+
+/**
  * LP synthesis filter.
  * @param out [out] pointer to output buffer
  * @param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000)