firdecim_rrrf

Variants: firdecim_cccf, firdecim_crcf, firdecim_rrrf

Finite impulse response (FIR) decimator

Public Functions

firdecim_rrrf firdecim_rrrf_create(unsigned int _M, float * _h, unsigned int _h_len)
firdecim_rrrf firdecim_rrrf_create_kaiser(unsigned int _M, unsigned int _m, float _as)
firdecim_rrrf firdecim_rrrf_create_prototype(int _type, unsigned int _M, unsigned int _m, float _beta, float _dt)
firdecim_rrrf firdecim_rrrf_copy(firdecim_rrrf _q)
int firdecim_rrrf_destroy(firdecim_rrrf _q)
int firdecim_rrrf_print(firdecim_rrrf _q)
int firdecim_rrrf_reset(firdecim_rrrf _q)
unsigned int firdecim_rrrf_get_decim_rate(firdecim_rrrf _q)
int firdecim_rrrf_set_scale(firdecim_rrrf _q, float _scale)
int firdecim_rrrf_get_scale(firdecim_rrrf _q, float * _scale)
int firdecim_rrrf_freqresp(firdecim_rrrf _q, float _fc, float complex * _H)
int firdecim_rrrf_execute(firdecim_rrrf _q, float * _x, float * _y)
int firdecim_rrrf_execute_block(firdecim_rrrf _q, float * _x, unsigned int _n, float * _y)

Interfaces

firdecim_rrrf firdecim_rrrf_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_rrrf firdecim_rrrf_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_rrrf firdecim_rrrf_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_rrrf firdecim_rrrf_copy(firdecim_rrrf _q)

Copy object including all internal objects and state

int firdecim_rrrf_destroy(firdecim_rrrf _q)

Destroy decimator object, freeing all internal memory

int firdecim_rrrf_print(firdecim_rrrf _q)

Print decimator object properties to stdout

int firdecim_rrrf_reset(firdecim_rrrf _q)

Reset decimator object internal state

unsigned int firdecim_rrrf_get_decim_rate(firdecim_rrrf _q)

Get decimation rate

int firdecim_rrrf_set_scale(firdecim_rrrf _q, float _scale)

Set output scaling for decimator

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

int firdecim_rrrf_get_scale(firdecim_rrrf _q, float * _scale)

Get output scaling for decimator

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

int firdecim_rrrf_freqresp(firdecim_rrrf _q, float _fc, float complex * _H)

Compute complex frequency response \(H\) of decimator on prototype filter coefficients at a specific frequency \(f_c\)

  • _q : decimator object
  • _fc : normalized frequency for evaluation
  • _H : pointer to output complex frequency response

int firdecim_rrrf_execute(firdecim_rrrf _q, float * _x, float * _y)

Execute decimator on _M input samples

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

int firdecim_rrrf_execute_block(firdecim_rrrf _q, float * _x, unsigned int _n, float * _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]