AnsweredAssumed Answered

Filter and FFT functions

Question asked by Doriya on Aug 16, 2009
Latest reply on Aug 27, 2009 by Doriya

Hi,

 

I'm trying to use the filter and fft functions (listed in the filter.h file).

 

fir_fr16 and rfft_fr16 are the ones giving me problems at the moment.

 

I'm very confused about the syntax, and how to use the functions themselves.

 

Could somebody please help me out with this?

 

Specifically: How do you define the inputs: if I have data coming in, I can't define it at type "const", because it needs to be a variable.

 

Also, the help file lists:

fir

typedef  struct

{

   fract16 *h,          /* filter  coefficients              */

   fract16 *d,          /* start of delay  line              */

   fract16 *p,          /* read/write  pointer               */

   int  k;               /* number of coefficients           */

   int  l;               /* interpolation/decimation index   */

}  fir_state_fr16;

 

whilst the header file lists:

typedef struct
{
    fract16 *h;    /*  filter coefficients            */
    fract16 *d;    /*  start of delay line            */
    fract16 *p;    /*  read/write pointer             */
    int k;         /*  number of coefficients         */
    int l;         /*  interpolation/decimation index */
} _fir_fr16_state;

 

As you can see, these two are differently named.

 

This is just for fir_fr16.  I also need to be able to use fft's and ifft's, so if anybody can help me out with those too, I'd much appreciate it.

 

I'm completely lost as to what need to be input/output to make these functions work.

Outcomes