firfarrow_crcf

Finite impulse response (FIR) Farrow filter for timing delay

Variants: firfarrow_crcf, firfarrow_rrrf

Public Functions

firfarrow_crcf firfarrow_crcf_create(unsigned int _h_len, unsigned int _p, float _fc, float _as)
int firfarrow_crcf_destroy(firfarrow_crcf _q)
int firfarrow_crcf_print(firfarrow_crcf _q)
int firfarrow_crcf_reset(firfarrow_crcf _q)
int firfarrow_crcf_push(firfarrow_crcf _q, float complex _x)
int firfarrow_crcf_set_delay(firfarrow_crcf _q, float _mu)
int firfarrow_crcf_execute(firfarrow_crcf _q, float complex * _y)
int firfarrow_crcf_execute_block(firfarrow_crcf _q, float complex * _x, unsigned int _n, float complex * _y)
unsigned int firfarrow_crcf_get_length(firfarrow_crcf _q)
int firfarrow_crcf_get_coefficients(firfarrow_crcf _q, float * _h)
int firfarrow_crcf_freqresponse(firfarrow_crcf _q, float _fc, float complex * _H)
float firfarrow_crcf_groupdelay(firfarrow_crcf _q, float _fc)

Interfaces

firfarrow_crcf firfarrow_crcf_create(unsigned int _h_len, unsigned int _p, float _fc, float _as)

Create firfarrow object

  • _h_len : filter length, 2 <= _h_len
  • _p : polynomial order, 1 <= _p
  • _fc : filter cutoff frequency, 0 <= _fc <= 0.5
  • _as : stopband attenuation [dB], 0 < _as

int firfarrow_crcf_destroy(firfarrow_crcf _q)

Destroy firfarrow object, freeing all internal memory

int firfarrow_crcf_print(firfarrow_crcf _q)

Print firfarrow object's internal properties

int firfarrow_crcf_reset(firfarrow_crcf _q)

Reset firfarrow object's internal state

int firfarrow_crcf_push(firfarrow_crcf _q, float complex _x)

Push sample into firfarrow object

  • _q : firfarrow object
  • _x : input sample

int firfarrow_crcf_set_delay(firfarrow_crcf _q, float _mu)

Set fractional delay of firfarrow object

  • _q : firfarrow object
  • _mu : fractional sample delay, -1 <= _mu <= 1

int firfarrow_crcf_execute(firfarrow_crcf _q, float complex * _y)

Execute firfarrow internal dot product

  • _q : firfarrow object
  • _y : output sample pointer

int firfarrow_crcf_execute_block(firfarrow_crcf _q, float complex * _x, unsigned int _n, float complex * _y)

Execute firfarrow filter on block of samples. In-place operation is permitted (the input and output arrays may share the same pointer)

  • _q : firfarrow object
  • _x : input array, shape: (_n, 1)
  • _n : input, output array size
  • _y : output array, shape: (_n, 1)

unsigned int firfarrow_crcf_get_length(firfarrow_crcf _q)

Get length of firfarrow object (number of filter taps)

int firfarrow_crcf_get_coefficients(firfarrow_crcf _q, float * _h)

Get coefficients of firfarrow object

  • _q : firfarrow object
  • _h : output coefficients pointer, shape: (_h_len, 1)

int firfarrow_crcf_freqresponse(firfarrow_crcf _q, float _fc, float complex * _H)

Compute complex frequency response

  • _q : filter object
  • _fc : frequency
  • _H : output frequency response

float firfarrow_crcf_groupdelay(firfarrow_crcf _q, float _fc)

Compute group delay [samples]

  • _q : filter object
  • _fc : frequency