firinterp_crcf

Variants: firinterp_cccf, firinterp_crcf, firinterp_rrrf

Finite impulse response (FIR) interpolator

Public Functions

firinterp_crcf firinterp_crcf_create(unsigned int _interp, float * _h, unsigned int _h_len)
firinterp_crcf firinterp_crcf_create_kaiser(unsigned int _interp, unsigned int _m, float _as)
firinterp_crcf firinterp_crcf_create_prototype(int _type, unsigned int _interp, unsigned int _m, float _beta, float _dt)
firinterp_crcf firinterp_crcf_create_linear(unsigned int _interp)
firinterp_crcf firinterp_crcf_create_window(unsigned int _interp, unsigned int _m)
firinterp_crcf firinterp_crcf_copy(firinterp_crcf _q)
int firinterp_crcf_destroy(firinterp_crcf _q)
int firinterp_crcf_print(firinterp_crcf _q)
int firinterp_crcf_reset(firinterp_crcf _q)
unsigned int firinterp_crcf_get_interp_rate(firinterp_crcf _q)
unsigned int firinterp_crcf_get_sub_len(firinterp_crcf _q)
int firinterp_crcf_set_scale(firinterp_crcf _q, float _scale)
int firinterp_crcf_get_scale(firinterp_crcf _q, float * _scale)
int firinterp_crcf_execute(firinterp_crcf _q, float complex _x, float complex * _y)
int firinterp_crcf_execute_block(firinterp_crcf _q, float complex * _x, unsigned int _n, float complex * _y)
int firinterp_crcf_flush(firinterp_crcf _q, float complex * _y)

Interfaces

firinterp_crcf firinterp_crcf_create(unsigned int _interp, float * _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_crcf firinterp_crcf_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_crcf firinterp_crcf_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_crcf firinterp_crcf_create_linear(unsigned int _interp)

Create linear interpolator object

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

firinterp_crcf firinterp_crcf_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_crcf firinterp_crcf_copy(firinterp_crcf _q)

Copy object including all internal objects and state

int firinterp_crcf_destroy(firinterp_crcf _q)

Destroy firinterp object, freeing all internal memory

int firinterp_crcf_print(firinterp_crcf _q)

Print firinterp object's internal properties to stdout

int firinterp_crcf_reset(firinterp_crcf _q)

Reset internal state

unsigned int firinterp_crcf_get_interp_rate(firinterp_crcf _q)

Get interpolation rate

unsigned int firinterp_crcf_get_sub_len(firinterp_crcf _q)

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

int firinterp_crcf_set_scale(firinterp_crcf _q, float _scale)

Set output scaling for interpolator

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

int firinterp_crcf_get_scale(firinterp_crcf _q, float * _scale)

Get output scaling for interpolator

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

int firinterp_crcf_execute(firinterp_crcf _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_crcf_execute_block(firinterp_crcf _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)

int firinterp_crcf_flush(firinterp_crcf _q, float complex * _y)

Execute interpolation with zero-valued input (e.g. flush internal state)

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