ref: d0aa9f8616bd23868e2581b110eeb8264a58b5f5
parent: a714994bf8b1c923454d0a97be2ded70a18c7904
author: Jean-Marc Valin <[email protected]>
date: Sat Jan 8 20:27:07 EST 2011
Tuning the split allocation for temporal masking
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -803,9 +803,11 @@
if (B0>1 && !stereo)
{
if (itheta > 8192)
- delta -= delta>>(4+level-LM);
+ /* Rough approximation for pre-echo masking */
+ delta -= delta>>(4-LM);
else
- delta -= delta>>(5+level-LM);
+ /* Corresponds to a forward-masking slope of 1.5 dB per 10 ms */
+ delta = IMIN(0, delta + (N<<BITRES>>(5-LM)));
}
mbits = (b-qalloc-delta)/2;
if (mbits > b-qalloc)