comparison celp_filters.c @ 8091:4c95f44c4c23 libavcodec

Add a LPC filter Part of the QCELP patch by Kenan Gillet, kenan.gillet gmail com
author vitor
date Thu, 30 Oct 2008 21:05:37 +0000
parents 611a21e4b01b
children 1e2c96617886
comparison
equal deleted inserted replaced
8090:1c07635d7334 8091:4c95f44c4c23
82 out[n] = sum; 82 out[n] = sum;
83 } 83 }
84 84
85 return 0; 85 return 0;
86 } 86 }
87
88 void ff_celp_lp_synthesis_filterf(
89 float *out,
90 const float* filter_coeffs,
91 const float* in,
92 int buffer_length,
93 int filter_length)
94 {
95 int i,n;
96
97 // These two lines are to avoid a -1 subtraction in the main loop
98 filter_length++;
99 filter_coeffs--;
100
101 for(n=0; n<buffer_length; n++)
102 {
103 out[n] = in[n];
104 for(i=1; i<filter_length; i++)
105 out[n] += filter_coeffs[i] * out[n-i];
106 }
107 }