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>2013-07-07 08:39:35 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2013-07-07 08:39:35 +0400
commit4365498d48a324e8e7de0b9be90bbb843c933a74 (patch)
tree4408d887fbc14f80acaffaa1afc708790afecb6a
parent45106b7e4d6ec3d3f13690cafd018ea0dfb601a4 (diff)
Prevents zero-energy on LFE
-rw-r--r--celt/celt_encoder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index f5ff6aee..cad73887 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1517,7 +1517,10 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
if (st->lfe)
{
for (i=2;i<st->end;i++)
+ {
bandE[i] = IMIN(bandE[i], MULT16_32_Q15(QCONST16(1e-4f,15),bandE[0]));
+ bandE[i] = MAX32(bandE[i], EPSILON);
+ }
}
amp2Log2(mode, effEnd, st->end, bandE, bandLogE, C);
if (st->energy_save)