Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
10044:560708e850a4 | 10045:d35904b4fe3f |
---|---|
38 */ | 38 */ |
39 void ff_celp_convolve_circ(int16_t* fc_out, | 39 void ff_celp_convolve_circ(int16_t* fc_out, |
40 const int16_t* fc_in, | 40 const int16_t* fc_in, |
41 const int16_t* filter, | 41 const int16_t* filter, |
42 int len); | 42 int len); |
43 | |
44 /** | |
45 * Add an array to a rotated array. | |
46 * | |
47 * out[k] = in[k] + fac * lagged[k-lag] with wrap-around | |
48 * | |
49 * @param out result vector | |
50 * @param in samples to be added unfiltered | |
51 * @param lagged samples to be rotated, multiplied and added | |
52 * @param lag lagged vector delay in the range [0, n] | |
53 * @param fac scalefactor for lagged samples | |
54 * @param n number of samples | |
55 */ | |
56 void ff_celp_circ_addf(float *out, const float *in, | |
57 const float *lagged, int lag, float fac, int n); | |
43 | 58 |
44 /** | 59 /** |
45 * LP synthesis filter. | 60 * LP synthesis filter. |
46 * @param out [out] pointer to output buffer | 61 * @param out [out] pointer to output buffer |
47 * @param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000) | 62 * @param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000) |