Skip to content

Class convolve_filter

class convolve_filter<T> dft

template <typename T>
class convolve_filter : public filter<T> { … }

Streaming convolution filter using the overlap-add (block convolution) method.

Template parameters
T Sample type: float , double , complex<float> or complex<double> .

constructor convolve_filter<T>(size_t, size_t)

explicit convolve_filter(size_t size, size_t block_size = 1024)

Constructs a filter with a kernel of the given length (initially zero).

Parameters
size Length (in samples) of the filter kernel.
block_size Processing block size in samples; rounded up to the next power of two. Larger blocks reduce per-sample overhead at the cost of more memory and latency.

Fully qualified name: kfr::convolve_filter<T>::convolve_filter<T>(size_t, size_t)

constructor convolve_filter<T>(const univector_ref<const T> &, size_t)

explicit convolve_filter(const univector_ref<const T>& data, size_t block_size = 1024)

Constructs a filter and initializes its kernel from data .

Parameters
data The filter kernel (impulse response).
block_size Processing block size in samples; rounded up to the next power of two.

Fully qualified name: kfr::convolve_filter<T>::convolve_filter<T>(const univector_ref<const T> &, size_t)

function set_data(const univector_ref<const T> &)

void set_data(const univector_ref<const T>& data)

Sets (replaces) the filter kernel.

Re-transforms the kernel into frequency-domain blocks and resets the internal state. The number of history segments is resized to match the new kernel length.

Parameters
data The new filter kernel (impulse response).

Fully qualified name: kfr::convolve_filter<T>::set_data(const univector_ref<const T> &)

function reset()

void reset() final

Resets the filter state (clears input history and overlap buffers).

Fully qualified name: kfr::convolve_filter<T>::reset()

function input_block_size()

size_t input_block_size() const

Returns the processing block size.

For optimal efficiency, drive the filter with input lengths that are multiples of this value.

Returns
The block size in samples.

Fully qualified name: kfr::convolve_filter<T>::input_block_size()

function process_expression(T *, const expression_handle<T> &, size_t)

void process_expression(T* dest, const expression_handle<T>& src, size_t size) final

Fully qualified name: kfr::convolve_filter<T>::process_expression(T *, const expression_handle<T> &, size_t)

function process_buffer(T *, const T *, size_t)

void process_buffer(T* output, const T* input, size_t size) final

Fully qualified name: kfr::convolve_filter<T>::process_buffer(T *, const T *, size_t)

typedef ST

using ST                       = subtype<T>

Fully qualified name: kfr::convolve_filter<T>::ST

variable real_fft

constexpr static bool real_fft = !std::is_same_v<T, complex<ST>>

Fully qualified name: kfr::convolve_filter<T>::real_fft

typedef plan_t

using plan_t                   = internal_generic::dft_conv_plan<T>

Fully qualified name: kfr::convolve_filter<T>::plan_t

variable data_size

size_t data_size

Fully qualified name: kfr::convolve_filter<T>::data_size

variable block_size

const size_t block_size

Fully qualified name: kfr::convolve_filter<T>::block_size

variable fft

const plan_t fft

Fully qualified name: kfr::convolve_filter<T>::fft

variable temp

univector<u8> temp

Fully qualified name: kfr::convolve_filter<T>::temp

variable segments

std::vector<univector<complex<ST>>> segments

Fully qualified name: kfr::convolve_filter<T>::segments

variable position

size_t position

Fully qualified name: kfr::convolve_filter<T>::position

variable ir_segments

std::vector<univector<complex<ST>>> ir_segments

Fully qualified name: kfr::convolve_filter<T>::ir_segments

variable saved_input

univector<T> saved_input

Fully qualified name: kfr::convolve_filter<T>::saved_input

variable input_position

size_t input_position

Fully qualified name: kfr::convolve_filter<T>::input_position

variable premul

univector<complex<ST>> premul

Fully qualified name: kfr::convolve_filter<T>::premul

variable cscratch

univector<complex<ST>> cscratch

Fully qualified name: kfr::convolve_filter<T>::cscratch

variable scratch1

univector<T> scratch1

Fully qualified name: kfr::convolve_filter<T>::scratch1

variable scratch2

univector<T> scratch1, scratch2

Fully qualified name: kfr::convolve_filter<T>::scratch2

variable overlap

univector<T> overlap

Fully qualified name: kfr::convolve_filter<T>::overlap

Fully qualified name: kfr::convolve_filter<T>

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