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>2016-09-14 18:38:15 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-09-14 18:41:10 +0300
commite5ad26169502c1f0b067916e782c2b3fdea6fba9 (patch)
treebcbbbb081db91cd6b45f8504d9da489dd83d7504
parent70e3c348228a28ea7f62def5ecbce71b975a517b (diff)
Prevents ridiculously large gains from causing inf/NaNs in float decoder
-rw-r--r--celt/bands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/bands.c b/celt/bands.c
index bbe8a4c3..05205554 100644
--- a/celt/bands.c
+++ b/celt/bands.c
@@ -226,7 +226,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X,
band_end = M*eBands[i+1];
lg = SATURATE16(ADD32(bandLogE[i], SHL32((opus_val32)eMeans[i],6)));
#ifndef FIXED_POINT
- g = celt_exp2(lg);
+ g = celt_exp2(MIN32(32.f, lg));
#else
/* Handle the integer part of the log energy */
shift = 16-(lg>>DB_SHIFT);