-
Notifications
You must be signed in to change notification settings - Fork 22
Feature/aec erle #429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Feature/aec erle #429
Conversation
a291a03 to
7605981
Compare
42aa624 to
149d4dc
Compare
80ff218 to
290b4d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces ERLE (Echo Return Loss Enhancement) based adaptation control and reference activity detection to the AEC algorithm, along with refactoring of AGC meta-data initialization and various fixes.
Key changes:
- Adds ERLE calculation and moving average tracking to control filter adaptation alongside coherence
- Introduces
ref_active_flagto track reference signal activity across the system - Refactors AGC meta-data initialization to use a new
agc_meta_data_init()helper function - Updates configuration parameters including coherence thresholds and timer behavior
- Fixes logic bugs in L2 unification and test parsing
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/lib_aec/api/aec_state.h | Adds ERLE fields to coherence_mu_params_t, ref_active_flag and overall_Yhat to shared state, removes x_energy_thresh |
| modules/lib_aec/src/aec_priv_impl.c | Implements aec_priv_calc_erle(), updates calc_coherence_mu logic with ERLE and ref_active_flag, changes coherence threshold values |
| modules/lib_aec/src/aec_priv.h | Adds function declarations for new ERLE calculation and updated signatures |
| modules/lib_aec/src/aec_impl.c | Integrates ERLE calculation into filter comparison workflow |
| modules/lib_aec/src/aec_l2_impl.c | Simplifies conditional logic in bfp_s32_unify_exponent |
| modules/lib_agc/api/agc_api.h | Adds agc_meta_data_init() declaration, AGC_META_DATA_NO_REF define, updates documentation |
| modules/lib_agc/src/agc_impl.c | Implements agc_meta_data_init() function |
| examples/bare-metal//src/.c | Updates to use agc_meta_data_init() and set ref_active_flag |
| test/lib_agc/test_process_frame/src/*.c | Replaces manual meta-data initialization with agc_meta_data_init() |
| test/lib_aec/aec_unit_tests/src/*.c | Updates test reference models with ERLE calculation and ref_active_flag handling |
| test/lib_aec/aec_unit_tests/conftest.py | Fixes test output parsing to handle lines prefixed with 'C:' |
| test/lib_aec/aec_unit_tests/CMakeLists.txt | Adds XMATH_BFP_DEBUG_CHECK_LENGTHS flag |
| test/pipeline/py_pipeline/config/prev_arch.json | Updates configuration with new parameters |
| Jenkinsfile | Archives output wav files from bare-metal examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/bare-metal/shared_src/aec/aec_process_frame_2threads.c
Outdated
Show resolved
Hide resolved
290b4d8 to
57b346b
Compare
| if(task == 0) { | ||
| aec_calc_freq_domain_energy(&main_state->overall_Error[ch], &main_state->Error[ch]); | ||
| // main_state->shared_state->overall_Yhat[ch] is updated | ||
| aec_calc_freq_domain_energy(&main_state->shared_state->overall_Yhat[ch], &main_state->Y_hat[ch]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this into 4 tasks or 2 tasks
|
|
||
| /** Detect if there's activity on the reference channels*/ | ||
| int32_t ref_active_flag; | ||
| ref_active_flag = aec_detect_input_activity(frame_x, f64_to_float_s32(pow(10, REF_ACTIVE_THRESHOLD_dB/20.0)), main_state.shared_state->num_x_channels); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this inside stage 1, init as -1
No description provided.