diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-12-29 06:16:43 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-12-29 06:16:43 -0800 |
commit | b29fd0db45465bbedcfdc464504309b6d39aaca0 (patch) | |
tree | 74501ada647654d29633b3acddd539fec2a59bd3 /libAACdec | |
parent | 61b5f49362a1714c04160da41d57f9b0560a8ff0 (diff) | |
parent | 196f1ce4841e220e4785b853f284a451ce22dc7c (diff) | |
download | fdk-aac-b29fd0db45465bbedcfdc464504309b6d39aaca0.tar.gz fdk-aac-b29fd0db45465bbedcfdc464504309b6d39aaca0.tar.bz2 fdk-aac-b29fd0db45465bbedcfdc464504309b6d39aaca0.zip |
Merge "Prevent energy overflow in acelp calc_period_factor()" am: eb9319afb2
am: 196f1ce484
Change-Id: I4bcc2e7ff145bffb7f11a090e8a048e9c2d11d76
Diffstat (limited to 'libAACdec')
-rw-r--r-- | libAACdec/src/usacdec_acelp.cpp | 2 |
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++; } |