ref: 8d18601413963497f47022773ca8a6e1b6b67aae
parent: ea17d423044c4a7fedca3aece8797fc617eb2305
author: Jean-Marc Valin <[email protected]>
date: Wed Jul 28 18:12:36 EDT 2010
Fixing the qtheta dependency for the delta allocation Removed useless code in transient_analysis()
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -786,7 +786,7 @@
if (B>1 && !stereo)
delta >>= 1;
- mbits = (b-qalloc/2-delta)/2;
+ mbits = (b-qalloc-delta)/2;
if (mbits > b-qalloc)
mbits = b-qalloc;
if (mbits<0)
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -284,10 +284,6 @@
} else {
ratio = DIV32(begin[len],1+MAX32(*frame_max, begin[n-16]));
}
- if (ratio < 0)
- ratio = 0;
- if (ratio > 1000)
- ratio = 1000;
if (ratio > 45)
*transient_shift = 3;