XCORE SDK
XCORE Software Development Kit
|
#include <aec_state.h>
AEC state structure.
Data structures holding AEC persistant state. There are 2 instances of aec_state_t maintained within AEC; one for main filter and one for shadow filter specific state. [aec_state_t]
float_s32_t aec_state_t::delta |
delta parameter used in the normalisation spectrum calculation.
float_s32_t aec_state_t::delta_scale |
fractional regularisation scalefactor.
bfp_complex_s32_t aec_state_t::Error[AEC_LIB_MAX_Y_CHANNELS] |
BFP array pointing to adaptive filter error signal spectrum. The Error data is stored as length AEC_FD_FRAME_LENGTH, complex 32bit array per y channel.
bfp_s32_t aec_state_t::error[AEC_LIB_MAX_Y_CHANNELS] |
BFP array pointing to the time domain adaptive filter error signal. Stored as length AEC_PROC_FRAME_LENGTH, 32 bit integer array per y channel.
float_s32_t aec_state_t::error_ema_energy[AEC_LIB_MAX_Y_CHANNELS] |
Exponential moving average of the time domain adaptive filter error signal energy. Stored in an x channels array with every value stored as a 32bit integer mantissa and exponent.
bfp_complex_s32_t aec_state_t::H_hat[AEC_LIB_MAX_Y_CHANNELS][AEC_LIB_MAX_PHASES] |
BFP array pointing to the adaptive filter spectrum. The filter spectrum is stored as a num_y_channels x total_phases_across_all_x_channels array where each H_hat[i][j] entry points to the spectrum of a single phase.
Number of phases in the filter refers to its tail length. A filter with more phases would be able to model a longer echo thereby causing better echo cancellation.
For example, for a 2 y-channels, 3 x-channels, 10 phases per x channel configuration, the filter spectrum phases are stored in a 2x30 array. For a given y channel, say y channel 0, H_hat[0][0] to H_hat[0][9] points to 10 phases of H_haty0x0, H_hat[0][10] to H_hat[0][19] points to 10 phases of H_haty0x1 and H_hat[0][20] to H_hat[0][29] points to 10 phases of H_haty0x2.
Each filter phase data which is pointed to by H_hat[i][j].data is stored as AEC_FD_FRAME_LENGTH complex 32bit array.
bfp_s32_t aec_state_t::inv_X_energy[AEC_LIB_MAX_X_CHANNELS] |
BFP array pointing to the normalisation spectrum which are stored as a length AEC_FD_FRAME_LENGTH, 32bit integer array per x channel.
float_s32_t aec_state_t::max_X_energy[AEC_LIB_MAX_X_CHANNELS] |
Maximum X energy across all values of X_energy for a given x channel. Stored in an x channels array with every value stored as a 32bit integer mantissa and exponent.
float_s32_t aec_state_t::mu[AEC_LIB_MAX_Y_CHANNELS][AEC_LIB_MAX_X_CHANNELS] |
mu values for every x-y pair stored as 32 bit integer mantissa and 32 bit integer exponent
unsigned aec_state_t::num_phases |
Number of filter phases per x-y pair that AEC filter is configured for. This is the input argument num_main_filter_phases or num_shadow_filter_phases, depending on which filter the aec_state_t is instantiated for, passed in aec_init() call.
float_s32_t aec_state_t::overall_Error[AEC_LIB_MAX_Y_CHANNELS] |
Energy of the adaptive filter error spectrum. Stored in a y channels array with every value stored as a 32bit integer mantissa and exponent.
bfp_s32_t aec_state_t::overlap[AEC_LIB_MAX_Y_CHANNELS] |
BFP array pointing to time domain overlap data values which are used in the overlap add operation done while calculating the echo canceller time domain output. Stored as a length 32, 32 bit integer array per y channel.
aec_shared_state_t* aec_state_t::shared_state |
pointer to the state data shared between main and shadow filter.
bfp_complex_s32_t aec_state_t::T[AEC_LIB_MAX_X_CHANNELS] |
BFP array pointing to T values which are stored as a length AEC_FD_FRAME_LENGTH, complex array per x channel.
bfp_s32_t aec_state_t::X_energy[AEC_LIB_MAX_X_CHANNELS] |
BFP array pointing to the X_energy data which is the energy per bin of the X spectrum summed over all phases of the X data. X_energy data is stored as a length AEC_FD_FRAME_LENGTH, integer 32bit array per x channel.
bfp_complex_s32_t aec_state_t::X_fifo_1d[AEC_LIB_MAX_PHASES] |
BFP array pointing to all phases of reference input spectrum across all x channels. Here, the reference input spectrum is saved in a 1 dimensional array of phases, with x channel 0 phases followed by x channel 1 phases and so on. For example, for a 2 x-channels, 10 phases per x channel configuration, X_fifo_1d[0] to X_fifo_1d[9] points to the 10 phases for channel 0 and X_fifo[10] to X_fifo[19] points to the 10 phases for channel 1.
Each X data spectrum phase pointed to by X_fifo_1d[i][j].data is stored as length AEC_FD_FRAME_LENGTH complex 32bit array.
bfp_complex_s32_t aec_state_t::Y_hat[AEC_LIB_MAX_Y_CHANNELS] |
BFP array pointing to estimated mic signal spectrum. The Y_data data values are stored as length AEC_FD_FRAME_LENGTH, complex 32bit array per y channel.
bfp_s32_t aec_state_t::y_hat[AEC_LIB_MAX_Y_CHANNELS] |
BFP array pointing to the time domain estimated mic signal. Stored as length AEC_PROC_FRAME_LENGTH, 32 bit integer array per y channel.