resamp2_cccf

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_cccf resamp2_cccf_create(unsigned int _m, float _f0, float _as)
resamp2_cccf resamp2_cccf_recreate(resamp2_cccf _q, unsigned int _m, float _f0, float _as)
resamp2_cccf resamp2_cccf_copy(resamp2_cccf _q)
void resamp2_cccf_destroy(resamp2_cccf _q)
void resamp2_cccf_print(resamp2_cccf _q)
void resamp2_cccf_reset(resamp2_cccf _q)
unsigned int resamp2_cccf_get_delay(resamp2_cccf _q)
int resamp2_cccf_set_scale(resamp2_cccf _q, float complex _scale)
void resamp2_cccf_get_scale(resamp2_cccf _q, float complex * _scale)
void resamp2_cccf_filter_execute(resamp2_cccf _q, float complex _x, float complex * _y0, float complex * _y1)
void resamp2_cccf_analyzer_execute(resamp2_cccf _q, float complex * _x, float complex * _y)
void resamp2_cccf_synthesizer_execute(resamp2_cccf _q, float complex * _x, float complex * _y)
void resamp2_cccf_decim_execute(resamp2_cccf _q, float complex * _x, float complex * _y)
void resamp2_cccf_interp_execute(resamp2_cccf _q, float complex _x, float complex * _y)

Interfaces

resamp2_cccf resamp2_cccf_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_cccf resamp2_cccf_recreate(resamp2_cccf _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_cccf resamp2_cccf_copy(resamp2_cccf _q)

Copy object including all internal objects and state

void resamp2_cccf_destroy(resamp2_cccf _q)

Destroy resampler, freeing all internally-allocated memory

void resamp2_cccf_print(resamp2_cccf _q)

print resampler object's internals to stdout

void resamp2_cccf_reset(resamp2_cccf _q)

Reset internal buffer

unsigned int resamp2_cccf_get_delay(resamp2_cccf _q)

Get resampler filter delay (semi-length m)

int resamp2_cccf_set_scale(resamp2_cccf _q, float complex _scale)

Get output scaling for resampler

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

void resamp2_cccf_get_scale(resamp2_cccf _q, float complex * _scale)

Get output scaling for resampler

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

void resamp2_cccf_filter_execute(resamp2_cccf _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)

void resamp2_cccf_analyzer_execute(resamp2_cccf _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)

void resamp2_cccf_synthesizer_execute(resamp2_cccf _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)

void resamp2_cccf_decim_execute(resamp2_cccf _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

void resamp2_cccf_interp_execute(resamp2_cccf _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)