Mercurial > libavcodec.hg
comparison celp_filters.c @ 11328:51d5b29fc4fc libavcodec
Add commented-out unoptimized code to improve readability
author | vitor |
---|---|
date | Mon, 01 Mar 2010 19:56:51 +0000 |
parents | 63451af5f8f9 |
children | fb56293a501a |
comparison
equal
deleted
inserted
replaced
11327:6a29fa092197 | 11328:51d5b29fc4fc |
---|---|
84 const float* in, int buffer_length, | 84 const float* in, int buffer_length, |
85 int filter_length) | 85 int filter_length) |
86 { | 86 { |
87 int i,n; | 87 int i,n; |
88 | 88 |
89 #if 0 // Unoptimized code patch for improved readability | |
90 for (n = 0; n < buffer_length; n++) { | |
91 out[n] = in[n]; | |
92 for (i = 1; i <= filter_length; i++) | |
93 out[n] -= filter_coeffs[i-1] * out[n-i]; | |
94 } | |
95 #else | |
89 float out0, out1, out2, out3; | 96 float out0, out1, out2, out3; |
90 float old_out0, old_out1, old_out2, old_out3; | 97 float old_out0, old_out1, old_out2, old_out3; |
91 float a,b,c; | 98 float a,b,c; |
92 | 99 |
93 a = filter_coeffs[0]; | 100 a = filter_coeffs[0]; |
184 for (; n < buffer_length; n++) { | 191 for (; n < buffer_length; n++) { |
185 out[n] = in[n]; | 192 out[n] = in[n]; |
186 for (i = 1; i <= filter_length; i++) | 193 for (i = 1; i <= filter_length; i++) |
187 out[n] -= filter_coeffs[i-1] * out[n-i]; | 194 out[n] -= filter_coeffs[i-1] * out[n-i]; |
188 } | 195 } |
196 #endif | |
189 } | 197 } |
190 | 198 |
191 void ff_celp_lp_zero_synthesis_filterf(float *out, const float *filter_coeffs, | 199 void ff_celp_lp_zero_synthesis_filterf(float *out, const float *filter_coeffs, |
192 const float *in, int buffer_length, | 200 const float *in, int buffer_length, |
193 int filter_length) | 201 int filter_length) |