diff options
author | qwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-05-17 17:17:42 +0000 |
---|---|---|
committer | qwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-05-17 17:17:42 +0000 |
commit | 94317b45c73ae3b754c79d2fded509ee68ca23f5 (patch) | |
tree | e400d762b829005d5d8373ac65fbee433bc02422 /mg2ec.h | |
parent | 674b54763cf42fc3f04d821be3e063313564f8f2 (diff) |
Add support for "Timed Agressive Echo Cancellation" for mg2 and kb1.
Issue 9703, patch by SoloFlyer.
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2526 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'mg2ec.h')
-rw-r--r-- | mg2ec.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -556,6 +556,9 @@ static inline short echo_can_update(struct echo_can_state *ec, short iref, short #ifndef NO_ECHO_SUPPRESSOR #ifdef AGGRESSIVE_SUPPRESSOR +#ifdef AGGRESSIVE_TIMELIMIT + if (ec->i_d < AGGRESSIVE_TIMELIMIT ) { +#endif if ((ec->HCNTR_d < AGGRESSIVE_HCNTR) && (ec->Ly_i > (ec->Lu_i << 1))) { for (k=0; k < RESIDUAL_SUPRESSION_PASSES; k++) { u = u * (ec->Lu_i >> DEFAULT_SIGMA_LU_I) / ((ec->Ly_i >> (DEFAULT_SIGMA_LY_I)) + 1); @@ -567,7 +570,12 @@ static inline short echo_can_update(struct echo_can_state *ec, short iref, short ++ec->cntr_residualcorrected_frames; #endif } -#else +#ifdef AGGRESSIVE_TIMELIMIT + } + else { +#endif +#endif +#if (defined AGGRESSIVE_SUPPRESSOR && defined AGGRESSIVE_TIMELIMIT) || !defined AGGRESSIVE_SUPPRESSOR if (ec->HCNTR_d == 0) { if ((ec->Ly_i/(ec->Lu_i + 1)) > DEFAULT_SUPPR_I) { for (k=0; k < RESIDUAL_SUPRESSION_PASSES; k++) { @@ -586,6 +594,9 @@ static inline short echo_can_update(struct echo_can_state *ec, short iref, short } #endif } +#ifdef AGGRESSIVE_TIMELIMIT + } +#endif #endif #endif |