diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2015-12-03 14:12:01 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2015-12-03 14:12:01 -0500 |
commit | 75254d3b6fa04748ec7d3708410ca5791b902ff2 (patch) | |
tree | 89e1f1c9f0cda0991fc3a72d325de210052e31ac | |
parent | 7c2f39a307ca9df0a574e5fbfad525290521af7b (diff) | |
download | opus-cng_fix.tar.gz |
Fixes the transient detector on silencecng_fix
-rw-r--r-- | celt/celt_encoder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index 4e688bf4..ea60524e 100644 --- a/celt/celt_encoder.c +++ b/celt/celt_encoder.c @@ -343,9 +343,9 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int { int id; #ifdef FIXED_POINT - id = IMAX(0,IMIN(127,MULT16_32_Q15(tmp[i],norm))); /* Do not round to nearest */ + id = MAX32(0,MIN32(127,MULT16_32_Q15(tmp[i]+EPSILON,norm))); /* Do not round to nearest */ #else - id = IMAX(0,IMIN(127,(int)floor(64*norm*tmp[i]))); /* Do not round to nearest */ + id = (int)MAX32(0,MIN32(127,floor(64*norm*(tmp[i]+EPSILON)))); /* Do not round to nearest */ #endif unmask += inv_table[id]; } |