ref: ed627f040d8c8e7ec76f7e6b7fd70b24696a86d1
parent: b371cf8438203fd09a32cc1a6963542e344a6f8e
author: Jean-Marc Valin <[email protected]>
date: Fri Oct 19 15:57:19 EDT 2012
Attempt to have at least two bands that are coded This fixes a SWB hybrid issue where band 18 isn't folded and cannot even be folded because it's wider than band 17. This was causing noise to be injected instead.
--- a/celt/rate.c
+++ b/celt/rate.c
@@ -353,7 +353,7 @@
#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);