ref: 128d0c1cb7832ebb23b847192fcd839d5d5c090e
parent: e6d7c08464dcbec30be26a4196a3bc0b1288a711
author: Jean-Marc Valin <[email protected]>
date: Wed Nov 24 12:43:38 EST 2010
Tuning the allocation trim_offset for shorter frames
--- a/libcelt/rate.c
+++ b/libcelt/rate.c
@@ -285,7 +285,7 @@
thresh[j] = 2*(C*(m->eBands[j+1]-m->eBands[j])<<LM<<BITRES)>>3;
/* Tilt of the allocation curve */
for (j=start;j<end;j++)
- trim_offset[j] = C*(m->eBands[j+1]-m->eBands[j])*(2*alloc_trim-4-LM)*(m->nbEBands-j-1)
+ trim_offset[j] = C*(m->eBands[j+1]-m->eBands[j])*(2*alloc_trim-1-2*LM)*(m->nbEBands-j-1)
<<(LM+BITRES)>>6;
lo = 0;