Commit 331130e0 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Slightly increasing the range of value by making sure the "start fs" is even

(rounding towards zero).
parent 95400774
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment