Mercurial > libavcodec.hg
comparison acelp_filters.h @ 8049:611a21e4b01b libavcodec
Split off celp_filters.[ch] from acelp_filters.[ch] for the QCELP decoder.
patch by Kenan Gillet, kenan.gillet gmail com
author | diego |
---|---|
date | Fri, 24 Oct 2008 21:29:23 +0000 |
parents | c4a4495715dd |
children | 05ea4942df9b |
comparison
equal
deleted
inserted
replaced
8048:ecb1962c12f3 | 8049:611a21e4b01b |
---|---|
58 int precision, | 58 int precision, |
59 int frac_pos, | 59 int frac_pos, |
60 int filter_length, | 60 int filter_length, |
61 int length); | 61 int length); |
62 | 62 |
63 /** | |
64 * Circularly convolve fixed vector with a phase dispersion impulse | |
65 * response filter (D.6.2 of G.729 and 6.1.5 of AMR). | |
66 * @param fc_out vector with filter applied | |
67 * @param fc_in source vector | |
68 * @param filter phase filter coefficients | |
69 * | |
70 * fc_out[n] = sum(i,0,len-1){ fc_in[i] * filter[(len + n - i)%len] } | |
71 * | |
72 * \note fc_in and fc_out should not overlap! | |
73 */ | |
74 void ff_acelp_convolve_circ( | |
75 int16_t* fc_out, | |
76 const int16_t* fc_in, | |
77 const int16_t* filter, | |
78 int len); | |
79 | |
80 /** | |
81 * LP synthesis filter. | |
82 * @param out [out] pointer to output buffer | |
83 * @param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000) | |
84 * @param in input signal | |
85 * @param buffer_length amount of data to process | |
86 * @param filter_length filter length (10 for 10th order LP filter) | |
87 * @param stop_on_overflow 1 - return immediately if overflow occurs | |
88 * 0 - ignore overflows | |
89 * @param rounder the amount to add for rounding (usually 0x800 or 0xfff) | |
90 * | |
91 * @return 1 if overflow occurred, 0 - otherwise | |
92 * | |
93 * @note Output buffer must contain 10 samples of past | |
94 * speech data before pointer. | |
95 * | |
96 * Routine applies 1/A(z) filter to given speech data. | |
97 */ | |
98 int ff_acelp_lp_synthesis_filter( | |
99 int16_t *out, | |
100 const int16_t* filter_coeffs, | |
101 const int16_t* in, | |
102 int buffer_length, | |
103 int filter_length, | |
104 int stop_on_overflow, | |
105 int rounder); | |
106 | |
107 | 63 |
108 /** | 64 /** |
109 * high-pass filtering and upscaling (4.2.5 of G.729). | 65 * high-pass filtering and upscaling (4.2.5 of G.729). |
110 * @param out [out] output buffer for filtered speech data | 66 * @param out [out] output buffer for filtered speech data |
111 * @param hpf_f [in/out] past filtered data from previous (2 items long) | 67 * @param hpf_f [in/out] past filtered data from previous (2 items long) |