ref: 331130e0b3af95297065ca19a0ae26e24a717b37
parent: 9540077419c8b87d69abc26d84eb4631b8bd427d
author: Jean-Marc Valin <[email protected]>
date: Sat May 23 17:53:57 EDT 2009
Slightly increasing the range of value by making sure the "start fs" is even (rounding towards zero).
--- a/libcelt/laplace.c
+++ b/libcelt/laplace.c
@@ -37,7 +37,10 @@
int ec_laplace_get_start_freq(int decay)
{
- return (((ec_uint32)32768)*(16384-decay))/(16384+decay);
+ int fs = (((ec_uint32)32768)*(16384-decay))/(16384+decay);
+ /* Making fs even so we're sure that all the range is used for +/- values */
+ fs -= (fs&1);
+ return fs;
}
void ec_laplace_encode_start(ec_enc *enc, int *value, int decay, int fs)