Mercurial > libavcodec.hg
comparison acelp_filters.h @ 10463:9f35b262d3f0 libavcodec
Commit some functions that are used by both SIPR and AMR.
Based on AMR SoC code by Robert Swain and Colin McQuillan.
author | vitor |
---|---|
date | Tue, 27 Oct 2009 23:53:18 +0000 |
parents | cfb009484d2d |
children | 0516f4062307 |
comparison
equal
deleted
inserted
replaced
10462:dd97c2418d4e | 10463:9f35b262d3f0 |
---|---|
54 void ff_acelp_interpolate(int16_t* out, const int16_t* in, | 54 void ff_acelp_interpolate(int16_t* out, const int16_t* in, |
55 const int16_t* filter_coeffs, int precision, | 55 const int16_t* filter_coeffs, int precision, |
56 int frac_pos, int filter_length, int length); | 56 int frac_pos, int filter_length, int length); |
57 | 57 |
58 /** | 58 /** |
59 * Floating point version of ff_acelp_interpolate() | |
60 */ | |
61 void ff_acelp_interpolatef(float *out, const float *in, | |
62 const float *filter_coeffs, int precision, | |
63 int frac_pos, int filter_length, int length); | |
64 | |
65 | |
66 /** | |
59 * high-pass filtering and upscaling (4.2.5 of G.729). | 67 * high-pass filtering and upscaling (4.2.5 of G.729). |
60 * @param out [out] output buffer for filtered speech data | 68 * @param out [out] output buffer for filtered speech data |
61 * @param hpf_f [in/out] past filtered data from previous (2 items long) | 69 * @param hpf_f [in/out] past filtered data from previous (2 items long) |
62 * frames (-0x20000000 <= (14.13) < 0x20000000) | 70 * frames (-0x20000000 <= (14.13) < 0x20000000) |
63 * @param in speech data to process | 71 * @param in speech data to process |
95 const float zero_coeffs[2], | 103 const float zero_coeffs[2], |
96 const float pole_coeffs[2], | 104 const float pole_coeffs[2], |
97 float gain, | 105 float gain, |
98 float mem[2], int n); | 106 float mem[2], int n); |
99 | 107 |
108 /** | |
109 * Apply tilt compensation filter, 1 - tilt * z-1. | |
110 * | |
111 * @param mem pointer to the filter's state (one single float) | |
112 * @param tilt tilt factor | |
113 * @param samples array where the filter is applied | |
114 * @param size the size of the samples array | |
115 */ | |
116 void ff_tilt_compensation(float *mem, float tilt, float *samples, int size); | |
117 | |
118 | |
100 #endif /* AVCODEC_ACELP_FILTERS_H */ | 119 #endif /* AVCODEC_ACELP_FILTERS_H */ |