Merge "Prevent energy overflow in acelp calc_period_factor()" am: eb9319afb2
am: 196f1ce484

Change-Id: I4bcc2e7ff145bffb7f11a090e8a048e9c2d11d76
diff --git a/libAACdec/src/usacdec_acelp.cpp b/libAACdec/src/usacdec_acelp.cpp
index 9fecebf..c836c6a 100644
--- a/libAACdec/src/usacdec_acelp.cpp
+++ b/libAACdec/src/usacdec_acelp.cpp
@@ -309,7 +309,7 @@
   ener_exc = (FIXP_DBL)0;
   for (int i = 0; i < L_SUBFR; i++) {
     ener_exc += fPow2Div2(exc[i]) >> s;
-    if (ener_exc > FL2FXCONST_DBL(0.5f)) {
+    if (ener_exc >= FL2FXCONST_DBL(0.5f)) {
       ener_exc >>= 1;
       s++;
     }