{
int i,n;
- // Avoids a +1 in the inner loop.
- filter_length++;
-
for (n = 0; n < buffer_length; n++) {
int sum = rounder;
- for (i = 1; i < filter_length; i++)
+ for (i = 1; i <= filter_length; i++)
sum -= filter_coeffs[i-1] * out[n-i];
sum = (sum >> 12) + in[n];
{
int i,n;
- // Avoids a +1 in the inner loop.
- filter_length++;
-
for (n = 0; n < buffer_length; n++) {
out[n] = in[n];
- for (i = 1; i < filter_length; i++)
+ for (i = 1; i <= filter_length; i++)
out[n] -= filter_coeffs[i-1] * out[n-i];
}
}
{
int i,n;
- // Avoids a +1 in the inner loop.
- filter_length++;
-
for (n = 0; n < buffer_length; n++) {
out[n] = in[n];
- for (i = 1; i < filter_length; i++)
+ for (i = 1; i <= filter_length; i++)
out[n] += filter_coeffs[i-1] * in[n-i];
}
}