firdecim_crcf

Finite impulse response (FIR) decimator

Variants: firdecim_cccf, firdecim_crcf, firdecim_rrrf

Public Functions

firdecim_crcf firdecim_crcf_create(unsigned int _M, float * _h, unsigned int _h_len)
firdecim_crcf firdecim_crcf_create_kaiser(unsigned int _M, unsigned int _m, float _as)
firdecim_crcf firdecim_crcf_create_prototype(int _type, unsigned int _M, unsigned int _m, float _beta, float _dt)
firdecim_crcf firdecim_crcf_copy(firdecim_crcf _q)
int firdecim_crcf_destroy(firdecim_crcf _q)
int firdecim_crcf_print(firdecim_crcf _q)
int firdecim_crcf_reset(firdecim_crcf _q)
unsigned int firdecim_crcf_get_decim_rate(firdecim_crcf _q)
int firdecim_crcf_set_scale(firdecim_crcf _q, float _scale)
int firdecim_crcf_get_scale(firdecim_crcf _q, float * _scale)
int firdecim_crcf_execute(firdecim_crcf _q, float complex * _x, float complex * _y)
int firdecim_crcf_execute_block(firdecim_crcf _q, float complex * _x, unsigned int _n, float complex * _y)

Interfaces

firdecim_crcf firdecim_crcf_create(unsigned int _M, float * _h, unsigned int _h_len)

Create decimator from external coefficients

  • _M : decimation factor, 2 <= _M
  • _h : filter coefficients, shape: (_h_len, 1)
  • _h_len : filter length, _M <= _h_len

firdecim_crcf firdecim_crcf_create_kaiser(unsigned int _M, unsigned int _m, float _as)

Create decimator from filter prototype prototype (Kaiser-Bessel windowed-sinc function)

  • _M : decimation factor, 2 <= _M
  • _m : filter delay [symbols], 1 <= _m
  • _as : stop-band attenuation [dB], 0 <= _as

firdecim_crcf firdecim_crcf_create_prototype(int _type, unsigned int _M, unsigned int _m, float _beta, float _dt)

Create decimator object from filter prototype

  • _type : filter type (e.g. LIQUID_FIRFILT_RCOS)
  • _M : interpolation factor, 1 < _M
  • _m : filter delay (symbols), 0 < _m
  • _beta : excess bandwidth factor, 0 <= _beta <= 1
  • _dt : fractional sample delay, -1 <= _dt <= 1

firdecim_crcf firdecim_crcf_copy(firdecim_crcf _q)

Copy object including all internal objects and state

int firdecim_crcf_destroy(firdecim_crcf _q)

Destroy decimator object, freeing all internal memory

int firdecim_crcf_print(firdecim_crcf _q)

Print decimator object propreties to stdout

int firdecim_crcf_reset(firdecim_crcf _q)

Reset decimator object internal state

unsigned int firdecim_crcf_get_decim_rate(firdecim_crcf _q)

Get decimation rate

int firdecim_crcf_set_scale(firdecim_crcf _q, float _scale)

Set output scaling for decimator

  • _q : decimator object
  • _scale : scaling factor to apply to each output sample

int firdecim_crcf_get_scale(firdecim_crcf _q, float * _scale)

Get output scaling for decimator

  • _q : decimator object
  • _scale : scaling factor to apply to each output sample

int firdecim_crcf_execute(firdecim_crcf _q, float complex * _x, float complex * _y)

Execute decimator on _M input samples

  • _q : decimator object
  • _x : input samples, shape: (_M, 1)
  • _y : output sample pointer

int firdecim_crcf_execute_block(firdecim_crcf _q, float complex * _x, unsigned int _n, float complex * _y)

Execute decimator on block of _n*_M input samples

  • _q : decimator object
  • _x : input array, shape: (_n*_M, 1)
  • _n : number of _output_ samples
  • _y : output array, [_size: _n x 1]