fir_decima
FIR decimation filter
Synopsis
#include <filter.h>
void fir_decima_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_decima_fr16
It generates the filtered decimated response of the input data
the result in the output vector
by the argument
is the decimation index.
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 performs an FIR-based decimation filter.
. The number of input samples is specified
y
, and the size of the output vector should be
n
header file, is available to initialize the structure
filter.h
DSP Run-Time Library
and stores
x
where l
n/l
, which
s
*/
*/
*/
*/
*/
*/
*/
*/
4-59
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers