Skip to content

Struct dft_resampler_params

struct dft_resampler_params dft

struct dft_resampler_params { … }

Parameters for constructing a dft_resampler .

The resampling factor is restricted to a power of two (positive for upsampling, negative for downsampling, zero for filter-only). The lowpass filter is designed with a Kaiser window from the desired stopband attenuation and transition width.

variable shift

int shift

Resampling factor as a power of 2 (e.g. 1 for 2x, -1 for 0.5x, 0 for filter-only).

Fully qualified name: kfr::dft_resampler_params::shift

variable cutoff

fbase cutoff

Normalised cutoff frequency (0..1], where 1.0 = Nyquist of the output rate.

Fully qualified name: kfr::dft_resampler_params::cutoff

variable stopband_atten_db

fbase stopband_atten_db

Desired stopband attenuation in dB (e.g. 144). Controls Kaiser beta.

Fully qualified name: kfr::dft_resampler_params::stopband_atten_db

variable transition_width

fbase transition_width

Transition bandwidth normalised to the lower-rate Nyquist (0..1].

Fully qualified name: kfr::dft_resampler_params::transition_width

variable input_block_size

size_t
    input_block_size

Computed FFT block size (power of two) satisfying the overlap-save constraint.

Fully qualified name: kfr::dft_resampler_params::input_block_size

function factor()

size_t factor() const noexcept

Returns the absolute resampling factor (2^|shift|).

Fully qualified name: kfr::dft_resampler_params::factor()

function is_downsampling()

bool is_downsampling() const noexcept

Returns true if this is a downsampling configuration.

Fully qualified name: kfr::dft_resampler_params::is_downsampling()

function stage_factor()

double stage_factor() const noexcept

Returns the per-stage conversion ratio (>1 for upsampling, <1 for downsampling).

Fully qualified name: kfr::dft_resampler_params::stage_factor()

constructor dft_resampler_params(int, fbase, fbase, fbase)

dft_resampler_params(int shift, fbase cutoff = 1, fbase stopband_atten_db = 144,
                     fbase transition_width = 0.02) noexcept

Constructs resampler parameters.

Parameters
shift Resampling factor as a power of 2 (positive=up, negative=down, 0=filter-only).
cutoff Normalised cutoff frequency (0..1] relative to the output Nyquist.
stopband_atten_db Desired stopband attenuation in dB.
transition_width Transition bandwidth normalised to the lower-rate Nyquist (0..1).

Note

input_block_size is computed from the Kaiser filter-length formula and rounded up to the next power of two.

Fully qualified name: kfr::dft_resampler_params::dft_resampler_params(int, fbase, fbase, fbase)

Fully qualified name: kfr::dft_resampler_params

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.