[an error occurred while processing this directive]
|
float iir(float inp, float * restrict buf, float * restrict coeff, int np)
{
int i; float acc, dly;
acc = inp;
for (i=0; i < np; i++) {
acc *= (*coeff++);
acc -= buf[0]*(*coeff++);
acc -= buf[1]*(*coeff++);
dly = acc;
acc += buf[0]*(*coeff++);
acc += buf[1]*(*coeff++);
buf[1] = buf[0];
buf[0] = dly;
buf += 2;
}return acc;
}