diff options
author | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2003-11-12 10:09:39 +0300 |
---|---|---|
committer | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2003-11-12 10:09:39 +0300 |
commit | 63a9061c61a7eba3f76a051b50500847b7101c81 (patch) | |
tree | 366f92a966f44b58b0896897258bbb0ff5e35642 | |
parent | 6b0272506cd107d2eaca069c05f951e509d7eb9e (diff) |
Round the log of ol_gain instead of truncating. Produces slightly better
results (should have done that originally)
git-svn-id: http://svn.xiph.org/branches/rel-1-0-branch/speex@5566 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r-- | libspeex/nb_celp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c index ee709a7..dbef9a9 100644 --- a/libspeex/nb_celp.c +++ b/libspeex/nb_celp.c @@ -495,7 +495,7 @@ int nb_encode(void *state, float *in, SpeexBits *bits) /*Quantize and transmit open-loop excitation gain*/ { - int qe = (int)(floor(3.5*log(ol_gain))); + int qe = (int)(floor(.5+3.5*log(ol_gain))); if (qe<0) qe=0; if (qe>31) |