resamp2_crcf

Variants: resamp2_cccf, resamp2_crcf, resamp2_rrrf

Half-band resampler, implemented as a dyadic (half-band) polyphase filter bank for interpolation, decimation, synthesis, and analysis.

Public Functions

resamp2_crcf resamp2_crcf_create(unsigned int _m, float _f0, float _as)
resamp2_crcf resamp2_crcf_recreate(resamp2_crcf _q, unsigned int _m, float _f0, float _as)
resamp2_crcf resamp2_crcf_copy(resamp2_crcf _q)
int resamp2_crcf_destroy(resamp2_crcf _q)
int resamp2_crcf_print(resamp2_crcf _q)
int resamp2_crcf_reset(resamp2_crcf _q)
unsigned int resamp2_crcf_get_delay(resamp2_crcf _q)
int resamp2_crcf_set_scale(resamp2_crcf _q, float _scale)
int resamp2_crcf_get_scale(resamp2_crcf _q, float * _scale)
int resamp2_crcf_filter_execute(resamp2_crcf _q, float complex _x, float complex * _y0, float complex * _y1)
int resamp2_crcf_analyzer_execute(resamp2_crcf _q, float complex * _x, float complex * _y)
int resamp2_crcf_synthesizer_execute(resamp2_crcf _q, float complex * _x, float complex * _y)
int resamp2_crcf_decim_execute(resamp2_crcf _q, float complex * _x, float complex * _y)
int resamp2_crcf_interp_execute(resamp2_crcf _q, float complex _x, float complex * _y)

Interfaces

resamp2_crcf resamp2_crcf_create(unsigned int _m, float _f0, float _as)

Create half-band resampler from design prototype.

  • _m : filter semi-length (h_len = 4*m+1), 2 <= _m
  • _f0 : filter center frequency, -0.5 <= _f0 <= 0.5
  • _as : stop-band attenuation [dB], 0 < _as

resamp2_crcf resamp2_crcf_recreate(resamp2_crcf _q, unsigned int _m, float _f0, float _as)

Re-create half-band resampler with new properties

  • _q : original half-band resampler object
  • _m : filter semi-length (h_len = 4*m+1), 2 <= _m
  • _f0 : filter center frequency, -0.5 <= _f0 <= 0.5
  • _as : stop-band attenuation [dB], 0 < _as

resamp2_crcf resamp2_crcf_copy(resamp2_crcf _q)

Copy object including all internal objects and state

int resamp2_crcf_destroy(resamp2_crcf _q)

Destroy resampler, freeing all internally-allocated memory

int resamp2_crcf_print(resamp2_crcf _q)

print resampler object's internals to stdout

int resamp2_crcf_reset(resamp2_crcf _q)

Reset internal buffer

unsigned int resamp2_crcf_get_delay(resamp2_crcf _q)

Get resampler filter delay (semi-length m)

int resamp2_crcf_set_scale(resamp2_crcf _q, float _scale)

Get output scaling for resampler

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

int resamp2_crcf_get_scale(resamp2_crcf _q, float * _scale)

Get output scaling for resampler

  • _q : resampler object
  • _scale : scaling factor applied to each output sample

int resamp2_crcf_filter_execute(resamp2_crcf _q, float complex _x, float complex * _y0, float complex * _y1)

Execute resampler as half-band filter for a single input sample \(x\) where \(y_0\) is the output of the effective low-pass filter, and \(y_1\) is the output of the effective high-pass filter.

  • _q : resampler object
  • _x : input sample
  • _y0 : output sample pointer (low frequency)
  • _y1 : output sample pointer (high frequency)

int resamp2_crcf_analyzer_execute(resamp2_crcf _q, float complex * _x, float complex * _y)

Execute resampler as half-band analysis filterbank on a pair of sequential time-domain input samples. The decimated outputs of the low- and high-pass equivalent filters are stored in \(y_0\) and \(y_1\), respectively.

  • _q : resampler object
  • _x : input array, shape: (2, 1)
  • _y : output array, shape: (2, 1)

int resamp2_crcf_synthesizer_execute(resamp2_crcf _q, float complex * _x, float complex * _y)

Execute resampler as half-band synthesis filterbank on a pair of input samples. The low- and high-pass input samples are provided by \(x_0\) and \(x_1\), respectively. The sequential time-domain output samples are stored in \(y_0\) and \(y_1\).

  • _q : resampler object
  • _x : input array, shape: (2, 1)
  • _y : output array, shape: (2, 1)

int resamp2_crcf_decim_execute(resamp2_crcf _q, float complex * _x, float complex * _y)

Execute resampler as half-band decimator on a pair of sequential time-domain input samples.

  • _q : resampler object
  • _x : input array, shape: (2, 1)
  • _y : output sample pointer

int resamp2_crcf_interp_execute(resamp2_crcf _q, float complex _x, float complex * _y)

Execute resampler as half-band interpolator on a single input sample

  • _q : resampler object
  • _x : input sample
  • _y : output array, shape: (2, 1)