diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-01-29 17:40:45 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-01-29 17:40:45 +0000 |
commit | 1e707c832ebae8549e40d7bf5ee375a5fa01a053 (patch) | |
tree | 2ed217ec1b2d1192a6aaf936b767c9ea887623e4 | |
parent | 5093a31d2a974b6340983e17d8fb8a9cea06a559 (diff) |
Version 0.1.6 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@51 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | mec.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -23,15 +23,17 @@ #ifndef _MEC_H #define _MEC_H -#define NUM_TAPS 64 /* Must be power of two */ +/* You have to express the size of the echo canceller in taps as + a power of 2 (6 = 64 taps, 7 = 128 taps, 8 = 256 taps) */ +#define NUM_TAPS_POW2 6 /* Size of echo canceller in power of 2 (taps) */ +#define NUM_TAPS (1 << NUM_TAPS_POW2) /* Actual number of taps */ #define TAP_MASK (NUM_TAPS-1) - -#define SIGMA_LU_POW 6 -#define SIGMA_LY_POW 6 -#define SIGMA_YT_POW 5 -#define SIGMA_ST_POW 5 +#define SIGMA_LU_POW NUM_TAPS_POW2 +#define SIGMA_LY_POW NUM_TAPS_POW2 +#define SIGMA_YT_POW (NUM_TAPS_POW2 - 1) +#define SIGMA_ST_POW (NUM_TAPS_POW2 - 1) #define BETA_POW 8 @@ -142,7 +144,7 @@ static INLINE short process_cc(mark_ec *ec, short tx, short txabs, short rx, sho pos = (pos - 1) & TAP_MASK; } - r_hat >>= 18; + r_hat >>= 16; if (ec->hangt > 0) ec->hangt--; |