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

Prevents zero-energy on LFE

parent 45106b7e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
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