shithub: opus

Download patch

ref: 4365498d48a324e8e7de0b9be90bbb843c933a74
parent: 45106b7e4d6ec3d3f13690cafd018ea0dfb601a4
author: Jean-Marc Valin <[email protected]>
date: Sat Jul 6 20:39:35 EDT 2013

Prevents zero-energy on LFE

--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1517,7 +1517,10 @@
    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)