Looking at a Second order Biquad filter element

This is for an Analog Devices Sharc processor

The Biquad element is one way of implementing the IIS type digital filter. The Biquad is essentially a transform of a 2nd order passive filter. It is simple to implement in DSP code and behave the same way as a pasive filter, in advantages and dis-advantages

Coefficients for an IIR Biquad Filter

The code is a reduction of the code used for the pre-emphasis filter

//	Pass through 300Hz LPF
f2=dm(i4,m5);		// L,R samples from _audio19k	
i8=_f_comp300_L;	// coefficients
i5=_f_cm300_L;		// storage
m1=-2;
f4=pm(i8,m10);	// a0
f5=pm(i8,m10);	// a1
//	x(n)*a0, x(n-1), b1
f12=f2*f4, f0=dm(i5,m3), f7=pm(i8,m13);
//  x(n-1)*a1, y(n-1), restore pointer to initial position
f8=f0*f5, f3=dm(i5,m1);
// 	y(n-1)*b1, x(n)*a0+x(n-1)*a1, save x(n) as x(n-1)
f14=f3*f7, f9=f8+f12, dm(i5,m3)=f2;
f12=f9+f14;		// the answer
dm(i5,m5)=f12;	// save y(n) as y(n-1) in f_cm300_L

Example coefficients are:

                
//	300Hz HPF with reverse sign of b1
float	pm	f_comp300_H[6]={    +0.9807407257966425,+0.9807407257966425,
                                -0.9807407257966425,-0.9807407257966425,
                                +0.96148145159532850,+0.96148145159532850};