From eb926680f6475dada3742ca57c6e58c9a6858ac2 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Fri, 14 May 2010 07:47:30 -0400 Subject: [PATCH] Trying to prevent PVQ-level splits We prevent as many as possible, but they can still occur if we manage to reach the LN limit --- libcelt/bands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcelt/bands.c b/libcelt/bands.c index 54d79f55..452ad89e 100644 --- a/libcelt/bands.c +++ b/libcelt/bands.c @@ -457,7 +457,7 @@ void quant_band(const CELTMode *m, int i, celt_norm *X, celt_norm *Y, int N, int split = stereo = Y != NULL; - if (b>(32<0) + if (!stereo && LM>0 && !fits_in32(N, get_pulses(bits2pulses(m, m->bits[LM][i], N, b)))) { N /= 2; Y = X+N; @@ -667,7 +667,7 @@ void unquant_band(const CELTMode *m, int i, celt_norm *X, celt_norm *Y, int N, i split = stereo = Y != NULL; - if (b>(32<0) + if (!stereo && LM>0 && !fits_in32(N, get_pulses(bits2pulses(m, m->bits[LM][i], N, b)))) { N /= 2; Y = X+N;