From fe40ddd99992902760ce765e33364a8f695e4d37 Mon Sep 17 00:00:00 2001 From: "Timothy B. Terriberry" Date: Thu, 30 Dec 2010 08:43:42 -0800 Subject: [PATCH] Update the maximum fine bits everywhere. cf874373 raised the limit from 7 to 8 for N>1 bands in interp_bits2pulses(), but did not raise the corresponding limits for N=1 bands, or for [un]quant_energy_finalise(). This commit raises all of the limits to the same value, 8. --- libcelt/quant_bands.c | 2 +- libcelt/rate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcelt/quant_bands.c b/libcelt/quant_bands.c index 091d6f12..94a0437a 100644 --- a/libcelt/quant_bands.c +++ b/libcelt/quant_bands.c @@ -453,7 +453,7 @@ void unquant_energy_finalise(const CELTMode *m, int start, int end, celt_ener *e { for (i=start;i=C ;i++) { - if (fine_quant[i] >= 7 || fine_priority[i]!=prio) + if (fine_quant[i] >= 8 || fine_priority[i]!=prio) continue; c=0; do { diff --git a/libcelt/rate.c b/libcelt/rate.c index 58cc92bb..bce36c62 100644 --- a/libcelt/rate.c +++ b/libcelt/rate.c @@ -334,7 +334,7 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int } else { /* For N=1, all bits go to fine energy except for a single sign bit */ - ebits[j] = IMIN(IMAX(0,(bits[j] >> stereo >> BITRES)-1),7); + ebits[j] = IMIN(IMAX(0,(bits[j] >> stereo >> BITRES)-1),8); fine_priority[j] = (ebits[j]+1)*C<= (bits[j]-balance); /* N=1 bands can't take advantage of the re-balancing in quant_all_bands() because they don't have shape, only fine energy.