All FM broadcast implement pre-emphasis on the transmission in order to increase the perceived signal to noise ratio at the receiver. There are several pre-emphasis schemes but all are based on a simple RC high pass filter.
The code of a second order Biquad pre-emphasis filter for an Analogue Devices Sharc 32 bit processor. The processor is operated in the SIMD mode.
// The filtered data is in _audiolpf[2] // End of 19kHz filter // ******************************************************** // The pre-emphasis coefficients are in fintXuS i8=_fintXuS; // pre-emphasis i5=_f_im; // storage m10=2; m0=4; m3=2; m1=-2; f4=pm(i8,m10); // a0 f5=pm(i8,m10); // a1 f6=pm(i8,m10); // a2 // audiolpf*a0, x(n-1), b1. f2 = _audiolpf for the latest values f12=f2*f4, f0=dm(i5,m3), f7=pm(i8,m10); // x(n-1)*a1, x(x-2), b2 f8=f0*f5, f3=dm(i5,m5), f1=pm(i8,m13); // x(n-2)*a2, x0*a0+x(n-1)*a1, copy x(n-1) to x(n-2) f14=f3*f6, f9=f8+f12, dm(i5,m1)=f0; i4=_audio19k; r0=dm(i4,m5); // y(n-1)*b1, x0*a0+x(n-1)*a1+x(n-2)*a2, copy x(0) to x(n-1) f12=f0*f7, f9=f9+f14, dm(i5,m0)=f2; // x0*a0+x(n-1)*a1+x(n-2)*a2-y(n-1)*b1, y(n-2) f9=f9+f12, f3=dm(i5,m5); // y(n-2)*b2, im[2]=y(n-2) f12=f1*f3, dm(i5,m5)=f0; // x0*a0+x(n-1)*a1+x(n-2)a2-y(n-1)*b1-y(n-2)*b2 f9=f9+f12; dm(i4,m5)=f9; bit clr MODE1 PEYEN; nop; // PRE_EMPHASIS End***************************************** // Pre-emphasis values are in _audio19k
i8 points to the address of the filter coefficients. audiolpf has the incoming audio data stream that is returned to audio19k
The filter coefficients come in pairs because SIMD processing is used.
// 50uS filter coefficients float pm fint50uS[10]={ +3.22470000000000000,+3.22470000000000000, -0.43690339556544785,-0.43690339556544785, -1.07150879565005586,-1.07150879565005586, -0.61326450115068593,-0.61326450115068593, -0.09362404675484412,-0.09362404675484412};