fir
finite impulse response filter
Synopsis
#include <filter.h>
void fir_fr16(x,y,n,s)
const fract16 x[];
fract16 y[];
int n;
fir_state_fr16 *s;
The function uses the following structure to maintain the state of the
filter.
typedef struct
{
fract16 *h;
fract16 *d;
fract16 *p;
int k;
int l;
} fir_state_fr16;
Description
The
fir_fr16
The function generates the filtered response of the input data
the result in the output vector
length of the output vector is specified by the argument
The function maintains the filter state in the structured variable
must be declared and initialized before calling the function. The macro
, in the
fir_init
and is defined as:
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
/* Input sample vector x
/* Output sample vector y
/* Number of input samples
/* Pointer to filter state structure */
/* Filter coefficients
/* Start of delay line
/* Read/Write pointer
/* Number of coefficients
/* Interpolation/decimation index
function implements a finite impulse response (FIR) filter.
. The number of input samples and the
y
header file, is available to initialize the structure
filter.h
DSP Run-Time Library
and stores
x
.
n
, which
s
*/
*/
*/
*/
*/
*/
*/
*/
4-57
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers