annotate branches/carfac_cpp/include/AGC.h @ 695:2e3672df5698

Simple integration test between CARFAC and SAI. The interface between the two classes is pretty clunky because of the way CARFACOutput stores things. We should work on this, probably by rotating the outer two dimensions of CARFACOutput (i.e. store outputs in containers with sizes n_ears x n_samples x n_channels instead of n_samples x n_ears x n_channels).
author ronw@google.com
date Wed, 26 Jun 2013 23:35:47 +0000
parents 057946a60b91
children
rev   line source
Ulf@564 1 #ifndef AGC_H_
Ulf@564 2 #define AGC_H_
Ulf@564 3
Ulf@564 4 #include "CARFAC_common.h"
Ulf@564 5
Ulf@564 6 class AGC_parameters {
Ulf@564 7 public:
Ulf@586 8 AGC_parameters();
Ulf@564 9
Ulf@564 10 int n_stages_;
Ulf@564 11 FloatArray time_constants_;
Ulf@564 12 float agc_stage_gain_;
Ulf@564 13 FloatArray decimation_;
Ulf@564 14 FloatArray agc1_scales_;
Ulf@564 15 FloatArray agc2_scales_;
Ulf@564 16 float detect_scale_;
Ulf@564 17 float agc_mix_coeff_;
Ulf@564 18 };
Ulf@564 19
Ulf@564 20 class AGC_coefficients {
Ulf@564 21 public:
Ulf@590 22 AGC_coefficients(AGC_parameters* AGC_params_p,
Ulf@590 23 float fs, int n_ch);
Ulf@564 24
Ulf@564 25 int n_ch_;
Ulf@564 26 int n_agc_stages_;
Ulf@564 27 float agc_stage_gain_;
Ulf@564 28 FloatArray agc_epsilon_;
Ulf@564 29 FloatArray decimation_;
Ulf@564 30 FloatArray agc_polez1_;
Ulf@564 31 FloatArray agc_polez2_;
Ulf@564 32 FloatArray agc_spatial_iterations_;
Ulf@564 33 FloatMatrix agc_spatial_fir_;
Ulf@564 34 FloatArray agc_spatial_n_taps_;
Ulf@564 35 FloatArray agc_mix_coeffs_;
Ulf@564 36 float agc_gain_;
Ulf@564 37 float detect_scale_;
Ulf@564 38
Ulf@564 39 private:
Ulf@590 40 FloatArray Build_FIR_coeffs(float var, float mn, int* ptr_iters, int* ptr_taps);
Ulf@564 41 };
Ulf@564 42
Ulf@564 43 #endif /* AGC_H_ */