]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/acelp_filters.h
tablegen: the executable depends on tablegen headers as well
[ffmpeg] / libavcodec / acelp_filters.h
index b7f6a3abcbb68cf2d247d7cd1f1bcde1571b9b1e..09b5da45be5d78eb17ebbf1fb2c0f0d790021fd5 100644 (file)
@@ -55,6 +55,14 @@ void ff_acelp_interpolate(int16_t* out, const int16_t* in,
                           const int16_t* filter_coeffs, int precision,
                           int frac_pos, int filter_length, int length);
 
+/**
+ * Floating point version of ff_acelp_interpolate()
+ */
+void ff_acelp_interpolatef(float *out, const float *in,
+                           const float *filter_coeffs, int precision,
+                           int frac_pos, int filter_length, int length);
+
+
 /**
  * high-pass filtering and upscaling (4.2.5 of G.729).
  * @param out [out] output buffer for filtered speech data
@@ -81,4 +89,32 @@ void ff_acelp_interpolate(int16_t* out, const int16_t* in,
 void ff_acelp_high_pass_filter(int16_t* out, int hpf_f[2],
                                const int16_t* in, int length);
 
+/**
+ * Apply an order 2 rational transfer function in-place.
+ *
+ * @param out output buffer for filtered speech samples
+ * @param in input buffer containing speech data (may be the same as out)
+ * @param zero_coeffs z^-1 and z^-2 coefficients of the numerator
+ * @param pole_coeffs z^-1 and z^-2 coefficients of the denominator
+ * @param gain scale factor for final output
+ * @param mem intermediate values used by filter (should be 0 initially)
+ * @param n number of samples
+ */
+void ff_acelp_apply_order_2_transfer_function(float *out, const float *in,
+                                              const float zero_coeffs[2],
+                                              const float pole_coeffs[2],
+                                              float gain,
+                                              float mem[2], int n);
+
+/**
+ * Apply tilt compensation filter, 1 - tilt * z-1.
+ *
+ * @param mem pointer to the filter's state (one single float)
+ * @param tilt tilt factor
+ * @param samples array where the filter is applied
+ * @param size the size of the samples array
+ */
+void ff_tilt_compensation(float *mem, float tilt, float *samples, int size);
+
+
 #endif /* AVCODEC_ACELP_FILTERS_H */