From cf874373c0df91a429d9e6ead701fecd15214f20 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Wed, 22 Dec 2010 01:03:43 -0500 Subject: [PATCH] Minor tweaks to the max allocation --- libcelt/bands.c | 3 --- libcelt/rate.c | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/libcelt/bands.c b/libcelt/bands.c index 025cde1e..830a6745 100644 --- a/libcelt/bands.c +++ b/libcelt/bands.c @@ -1028,9 +1028,6 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end, } else { b = 0; } - /* Prevents ridiculous bit depths */ - if (b > C*16*N<= M*eBands[start] && (update_lowband || lowband_offset==-1)) lowband_offset = M*eBands[i]; diff --git a/libcelt/rate.c b/libcelt/rate.c index 202fdb10..28f3a8d1 100644 --- a/libcelt/rate.c +++ b/libcelt/rate.c @@ -328,9 +328,9 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int if (C*ebits[j] > (bits[j]>>BITRES)) ebits[j] = bits[j] >> stereo >> BITRES; - /* More than 7 is useless because that's about as far as PVQ can go */ - if (ebits[j]>7) - ebits[j]=7; + /* More than 8 is useless because that's about as far as PVQ can go */ + if (ebits[j]>8) + ebits[j]=8; } else { /* For N=1, all bits go to fine energy except for a single sign bit */