Collaboration diagram for DSP_fir_sym:
void | DSP_fir_sym (const short *restrict x, const short *restrict h, short *restrict r, int nh, int nr, int s) |
void DSP_fir_sym | ( | const short *restrict | x, | |
const short *restrict | h, | |||
short *restrict | r, | |||
int | nh, | |||
int | nr, | |||
int | s | |||
) |
This function applies a symmetric filter to the input samples. The filter tap array h[] provides ‘nh+1’ total filter taps. The filter tap at h[nh] forms the center point of the filter. The taps at h[nh - 1] through h[0] form a symmetric filter about this central tap. The effective filter length is thus 2*nh+1 taps. The filter is performed on 16-bit data with 16-bit coefficients, accumulating intermediate results to 40-bit precision. The accumulator is rounded and truncated according to the value provided in ‘s’. This allows a variety of Q-points to be used.
x | = Input array [nr+2*nh elements] | |
h | = Coeff array [nh+1 elements] | |
r | = Output array [nr elements] | |
nh | = Number of coefficients | |
nr | = Number of output samples | |
s | = Number of insignificant digits to truncate e.g., 15 for Q.15 input data and coefficients |