DSP_fir_sym
[Filtering and convolution]

Collaboration diagram for DSP_fir_sym:


Detailed Description

void DSP_fir_sym (const short *restrict x, const short *restrict h, short *restrict r, int nh, int nr, int s)


Function Documentation

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.

Parameters:
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
Algorithm:
DSP_fir_sym_cn.c is the natural C equivalent of the optimized intrinsic C code without restrictions. Note that the intrinsic C code is optimized and restrictions may apply.
Assumptions:
Arrays x, h, and r do not overlap.
x, h and r must be double word aligned.
nr >= 4; nr % 4 == 0.
nh >= 4; nh % 4 == 0.
Implementation Notes:
Endian Support: The code supports both big and little endian modes. Interruptibility: The code is interruptible


Copyright 2014, Texas Instruments Incorporated