Attempt to have at least two bands that are coded
[opus.git] / celt / rate.c
index 249e3f0..4e96787 100644 (file)
@@ -353,7 +353,7 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int
 #ifdef FUZZING
             if ((rand()&0x1) == 0)
 #else
-            if (band_bits > ((j<prev?7:9)*band_width<<LM<<BITRES)>>4)
+            if (codedBands<=start+2 || band_bits > ((j<prev?7:9)*band_width<<LM<<BITRES)>>4)
 #endif
             {
                ec_enc_bit_logp(ec, 1, 1);