Developer World
Spresense SDK Library v3.2.0-ebc0364
Collaboration diagram for Functions:

Functions

decimator_instancef_t * create_decimatorf (int fs, int dec_factor, int tr_width, int blocksz)
 
decimator_instancef_t * create_decimatorf_tap (int fs, int dec_factor, int taps, int blocksz)
 
int decimator_executef (decimator_instancef_t *dec, float *input, int input_len, float *output, int output_len)
 
int decimator_tapnumf (decimator_instancef_t *dec)
 
void decimator_deletef (decimator_instancef_t *dec)
 

Detailed Description

Function Documentation

◆ create_decimatorf()

decimator_instancef_t * create_decimatorf ( int  fs,
int  dec_factor,
int  tr_width,
int  blocksz 
)

Create FIR Decimator intance

Parameters
[in]fsSampling rate of input signals.
[in]dec_factorCut off frequency. (Hz)
[in]tr_widthTransition frequency band width of Low Pass Filter(Hz)
[in]blockszBlock size to execute filter calcuation in one time. (samples)
Returns
decimator_instancef_t instance is returned on success, otherwise returns NULL.
Note
This function allocate memory for instance of fir_instancef_t, so you free when you finished to use the filter by decimator_delete().

◆ create_decimatorf_tap()

decimator_instancef_t * create_decimatorf_tap ( int  fs,
int  dec_factor,
int  taps,
int  blocksz 
)

Create FIR Decimator intance with Tap size

Parameters
[in]fsSampling rate of input signals.
[in]dec_factorCut off frequency. (Hz)
[in]tapsTap size of FIR filter.
[in]blockszBlock size to execute filter calcuation in one time. (samples)
Returns
decimator_instancef_t instance is returned on success, otherwise returns NULL.
Note
This function allocate memory for instance of fir_instancef_t, so you free when you finished to use the filter by decimator_delete().

◆ decimator_executef()

int decimator_executef ( decimator_instancef_t *  dec,
float *  input,
int  input_len,
float *  output,
int  output_len 
)

Execute Decimation

Parameters
[in]decInstance of decimation_instancef_t.
[in]inputfloat array of input data.
[in]input_lenLength of input array. This size must be multiple of blocksz set by create_decimatorf().
[out]outputfloat array of output data.
[in]output_lenLength of output array.
Returns
Decimated data length, means size of output data.

◆ decimator_tapnumf()

int decimator_tapnumf ( decimator_instancef_t *  dec)

Delete Decimator instance

Parameters
[in]decInstance of decimator_instancef_t.
Returns
Tap number of the FIR filter.

◆ decimator_deletef()

void decimator_deletef ( decimator_instancef_t *  dec)

Delete Decimator instance

Parameters
[in]decInstance of decimator_instancef_t.