3 #include <libraries/math_neon/math_neon.h>
4 #include <libraries/Biquad/QuadBiquad.h>
6 const float sq2 = sqrtf_neon(2.0f);
12 Biquad::Settings hp8k_mic_settings{
14 .type = Biquad::highpass,
19 Biquad::Settings lp_mic_settings{
21 .type = Biquad::lowpass,
27 Biquad::Settings hp_acc_settings {
29 .type = Biquad::highpass,
34 Biquad::Settings lp_acc_settings{
36 .type = Biquad::lowpass,
41 Biquad::Settings hp2k_mic_settings{
43 .type = Biquad::highpass,
49 Biquad::Settings imu_accelerometer_hp_settings{
51 .type = Biquad::highpass,
57 BiquadCoeffT<float> hp8k_mic_coefs(hp8k_mic_settings);
58 BiquadCoeffT<float> hp2k_mic_coefs(hp2k_mic_settings);
59 BiquadCoeffT<float> lp_mic_coefs(lp_mic_settings);
60 BiquadCoeffT<float> hp_acc_coefs(hp_acc_settings);
61 BiquadCoeffT<float> lp_acc_coefs(lp_acc_settings);
62 BiquadCoeffT<float> imu_accelerometer_hp_coefs(
63 imu_accelerometer_hp_settings);
65 _filters1=
new QuadBiquad();
66 _filters2=
new QuadBiquad();
67 _filters3=
new QuadBiquad();
69 _filters1->filters.at(0) = hp8k_mic_coefs;
70 _filters1->filters.at(1) = hp8k_mic_coefs;
73 _filters1->filters.at(2) = lp_mic_coefs;
74 _filters1->filters.at(3) = lp_mic_coefs;
77 _filters2->filters.at(0) = hp_acc_coefs;
78 _filters2->filters.at(1) = lp_acc_coefs;
81 _filters2->filters.at(2) = hp2k_mic_coefs;
82 _filters2->filters.at(3) = hp2k_mic_coefs;
85 _filters3->filters.at(0) = imu_accelerometer_hp_coefs;
97 float filters1_inout[] = {
105 float filters2_inout[] = {
115 float filters3_inout[] = {
124 _filters1->process(filters1_inout);
125 _filters2->process(filters2_inout);
126 _filters3->process(filters3_inout);