firinterp_cccf

Finite impulse response (FIR) interpolator

Variants: firinterp_cccf, firinterp_crcf, firinterp_rrrf

Public Functions

firinterp_cccf firinterp_cccf_create(unsigned int _interp, float complex * _h, unsigned int _h_len)
firinterp_cccf firinterp_cccf_create_kaiser(unsigned int _interp, unsigned int _m, float _as)
firinterp_cccf firinterp_cccf_create_prototype(int _type, unsigned int _interp, unsigned int _m, float _beta, float _dt)
firinterp_cccf firinterp_cccf_create_linear(unsigned int _interp)
firinterp_cccf firinterp_cccf_create_window(unsigned int _interp, unsigned int _m)
firinterp_cccf firinterp_cccf_copy(firinterp_cccf _q)
int firinterp_cccf_destroy(firinterp_cccf _q)
int firinterp_cccf_print(firinterp_cccf _q)
int firinterp_cccf_reset(firinterp_cccf _q)
unsigned int firinterp_cccf_get_interp_rate(firinterp_cccf _q)
unsigned int firinterp_cccf_get_sub_len(firinterp_cccf _q)
int firinterp_cccf_set_scale(firinterp_cccf _q, float complex _scale)
int firinterp_cccf_get_scale(firinterp_cccf _q, float complex * _scale)
int firinterp_cccf_execute(firinterp_cccf _q, float complex _x, float complex * _y)
int firinterp_cccf_execute_block(firinterp_cccf _q, float complex * _x, unsigned int _n, float complex * _y)

Interfaces

firinterp_cccf firinterp_cccf_create(unsigned int _interp, float complex * _h, unsigned int _h_len)

Create interpolator from external coefficients. Internally the interpolator creates a polyphase filter bank to efficiently realize resampling of the input signal. If the input filter length is not a multiple of the interpolation factor \(M\), the object internally pads the coefficients with zeros to compensate.

  • _interp : interpolation factor \(M\), 2 <= _interp
  • _h : filter coefficients, shape: (_h_len, 1)
  • _h_len : filter length, _interp <= _h_len

firinterp_cccf firinterp_cccf_create_kaiser(unsigned int _interp, unsigned int _m, float _as)

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

  • _interp : interpolation factor \(M\), 2 <= _interp
  • _m : filter delay [symbols], 1 <= _m
  • _as : stop-band attenuation [dB], 0 <= _as

firinterp_cccf firinterp_cccf_create_prototype(int _type, unsigned int _interp, unsigned int _m, float _beta, float _dt)

Create interpolator object from filter prototype

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

firinterp_cccf firinterp_cccf_create_linear(unsigned int _interp)

Create linear interpolator object

  • _interp : interpolation factor \(M\), 2 <= _interp

firinterp_cccf firinterp_cccf_create_window(unsigned int _interp, unsigned int _m)

Create window interpolator object

  • _interp : interpolation factor \(M\), 2 <= _interp
  • _m : filter semi-length, 0 < _m

firinterp_cccf firinterp_cccf_copy(firinterp_cccf _q)

Copy object including all internal objects and state

int firinterp_cccf_destroy(firinterp_cccf _q)

Destroy firinterp object, freeing all internal memory

int firinterp_cccf_print(firinterp_cccf _q)

Print firinterp object's internal properties to stdout

int firinterp_cccf_reset(firinterp_cccf _q)

Reset internal state

unsigned int firinterp_cccf_get_interp_rate(firinterp_cccf _q)

Get interpolation rate

unsigned int firinterp_cccf_get_sub_len(firinterp_cccf _q)

Get sub-filter length (length of each poly-phase filter)

int firinterp_cccf_set_scale(firinterp_cccf _q, float complex _scale)

Set output scaling for interpolator

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

int firinterp_cccf_get_scale(firinterp_cccf _q, float complex * _scale)

Get output scaling for interpolator

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

int firinterp_cccf_execute(firinterp_cccf _q, float complex _x, float complex * _y)

Execute interpolation on single input sample and write \(M\) output samples (\(M\) is the interpolation factor)

  • _q : firinterp object
  • _x : input sample
  • _y : output sample array, shape: (M, 1)

int firinterp_cccf_execute_block(firinterp_cccf _q, float complex * _x, unsigned int _n, float complex * _y)

Execute interpolation on block of input samples, increasing the sample rate of the input by the interpolation factor \(M\).

  • _q : firinterp object
  • _x : input array, shape: (_n, 1)
  • _n : size of input array
  • _y : output sample array, shape: (M*_n, 1)