Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-10-20 03:57:19 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-10-20 03:57:19 +0400
commited627f040d8c8e7ec76f7e6b7fd70b24696a86d1 (patch)
treec632f7999c859ec2bc37e3bd5d46a25bd5824d66 /celt/rate.c
parentb371cf8438203fd09a32cc1a6963542e344a6f8e (diff)
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.
Diffstat (limited to 'celt/rate.c')
-rw-r--r--celt/rate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/rate.c b/celt/rate.c
index 249e3f0f..4e96787f 100644
--- a/celt/rate.c
+++ b/celt/rate.c
@@ -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);