Skip to content
Snippets Groups Projects
Commit ed627f04 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

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.
parent b371cf84
Loading
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment