diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-08-15 19:50:45 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-08-15 19:50:45 -0400 |
commit | 18335e8e4d6ddb289b31d8a4a362f5e15c24ff0a (patch) | |
tree | ad858be0da7779d53613f5dbe3136b481c40b8fd | |
parent | b4d0df8ddee3b555369c571a60d76360e1ecfd86 (diff) | |
download | opus-18335e8e4d6ddb289b31d8a4a362f5e15c24ff0a.tar.gz |
Removed a float operation that sneaked in in the fixed-point code
-rw-r--r-- | celt/vq.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -210,8 +210,12 @@ opus_val16 op_pvq_search_c(celt_norm *X, int *iy, int K, int N, int arch) while (++j<N); sum = QCONST16(1.f,14); } +#ifdef FIXED_POINT + rcp = EXTRACT16(MULT16_32_Q16(K, celt_rcp(sum))); +#else /* Using K+e with e < 1 guarantees we cannot get more than K pulses. */ rcp = EXTRACT16(MULT16_32_Q16(K+0.8, celt_rcp(sum))); +#endif j=0; do { #ifdef FIXED_POINT /* It's really important to round *towards zero* here */ |