The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
FFT based FIR filterbank implementation. More...
Public Member Functions | |
fftfilterbank_t (unsigned int fragsize, unsigned int inputchannels, unsigned int firchannels, unsigned int fftlen) | |
Constructor. More... | |
~fftfilterbank_t () | |
void | update_coeffs (const mha_wave_t *h) |
Update the set of coefficients. More... | |
void | filter (const mha_wave_t *s_in, mha_wave_t **s_out, const mha_wave_t *h) |
Apply filter with changing coefficients to a waveform fragment. More... | |
void | filter (const mha_wave_t *s_in, mha_wave_t **s_out) |
Apply filter to waveform fragment, without changing the coefficients. More... | |
const mha_wave_t * | get_irs () const |
Return the current IRS. More... | |
Private Attributes | |
unsigned int | fragsize |
unsigned int | inputchannels |
unsigned int | firchannels |
unsigned int | outputchannels |
unsigned int | fftlen |
MHASignal::waveform_t | hw |
MHASignal::spectrum_t | Hs |
MHASignal::waveform_t | xw |
MHASignal::spectrum_t | Xs |
MHASignal::waveform_t | yw |
MHASignal::spectrum_t | Ys |
MHASignal::waveform_t | yw_temp |
MHASignal::waveform_t | tail |
mha_fft_t | fft |
FFT based FIR filterbank implementation.
This class convolves n input channels with m filter coefficient sets and returns n*m output channels.
The maximal number of coefficients can be FFT length - fragsize + 1.
MHAFilter::fftfilterbank_t::fftfilterbank_t | ( | unsigned int | fragsize, |
unsigned int | inputchannels, | ||
unsigned int | firchannels, | ||
unsigned int | fftlen | ||
) |
Constructor.
fragsize | Number of frames expected in input signal (each cycle). |
inputchannels | Number of channels expected in input signal. |
firchannels | Number of channels expected in FIR filter coefficients (= number of bands). |
fftlen | FFT length of filter. |
The number of output channels is inputchannels*firchannels.
MHAFilter::fftfilterbank_t::~fftfilterbank_t | ( | ) |
void MHAFilter::fftfilterbank_t::update_coeffs | ( | const mha_wave_t * | h | ) |
Update the set of coefficients.
h | Coefficients structure |
void MHAFilter::fftfilterbank_t::filter | ( | const mha_wave_t * | s_in, |
mha_wave_t ** | s_out, | ||
const mha_wave_t * | h | ||
) |
Apply filter with changing coefficients to a waveform fragment.
s_in | Input signal pointer. |
s_out | Pointer to output signal pointer, will be set to a valid signal |
h | FIR coefficients |
void MHAFilter::fftfilterbank_t::filter | ( | const mha_wave_t * | s_in, |
mha_wave_t ** | s_out | ||
) |
Apply filter to waveform fragment, without changing the coefficients.
s_in | Input signal pointer. |
s_out | Pointer to output signal pointer, will be set to a valid signal |
|
inline |
Return the current IRS.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |