aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-12-29 06:25:51 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-29 06:25:51 -0800
commitb6c47c51b284df66cf086f4d64bc778c5872d0dd (patch)
tree7ab9c0cdfe9f6d40b107f0006057ecda6f226ee4 /libAACdec/src
parent29c2ad6e2aeaad2a84f352ac1dfc60ebbc256f1e (diff)
parentb29fd0db45465bbedcfdc464504309b6d39aaca0 (diff)
downloadfdk-aac-b6c47c51b284df66cf086f4d64bc778c5872d0dd.tar.gz
fdk-aac-b6c47c51b284df66cf086f4d64bc778c5872d0dd.tar.bz2
fdk-aac-b6c47c51b284df66cf086f4d64bc778c5872d0dd.zip
Merge "Prevent energy overflow in acelp calc_period_factor()" am: eb9319afb2 am: 196f1ce484
am: b29fd0db45 Change-Id: Ic3acadc0a8a48485b96075882eebfd867cfc709e
Diffstat (limited to 'libAACdec/src')
-rw-r--r--libAACdec/src/usacdec_acelp.cpp2
1 files changed, 1 insertions, 1 deletions
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 @@ static FIXP_DBL calc_period_factor(FIXP_DBL exc[], FIXP_SGL gain_pit,
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++;
}