Collaboration diagram for DSP_iir:
void | DSP_iir (short *r1, const short *x, short *r2, const short *h2, const short *h1, int nr) |
void DSP_iir | ( | short * | r1, | |
const short * | x, | |||
short * | r2, | |||
const short * | h2, | |||
const short * | h1, | |||
int | nr | |||
) |
This real IIR computes nr real output samples using 4 Autoregressive filter coefficients and 5 Moving-average filter coefficients. It operates on 16-bit data with a 32-bit accumulate. The implementation is done in Direct Form I, for the below difference equation.
r1(n) = h2(0) * x(n)
+ h2(1) * x(n-1) - h1(1) * r1(n-1)
+ h2(2) * x(n-2) - h1(2) * r1(n-2)
+ h2(3) * x(n-3) - h1(3) * r1(n-3)
+ h2(4) * x(n-4) - h1(4) * r1(n-4)
r1 | Pointer to real output data used. | |
x | Pointer to real input data. | |
r2 | Pointer to real output data stored. | |
h2 | Pointer to 5 Moving-average real filter coefficients. | |
h1 | Pointer to 4 Autoregressive real filter coefficients. | |
nr | Holds the value of number of real output samples. |