diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2020-12-28 16:30:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-12-28 16:30:05 +0000 |
commit | 37084173037ae61d1ac10fe2f8afd31d44c23967 (patch) | |
tree | 58860fa806a0c01458e5a50dd72bcae5a42553fc | |
parent | f67a5bb99cfde3ba2c0c010982d5c99fea3f1325 (diff) | |
parent | aad908c262eaffec9728851ff410c7991893111a (diff) | |
download | fdk-aac-37084173037ae61d1ac10fe2f8afd31d44c23967.tar.gz fdk-aac-37084173037ae61d1ac10fe2f8afd31d44c23967.tar.bz2 fdk-aac-37084173037ae61d1ac10fe2f8afd31d44c23967.zip |
Merge "Prevent integer overflow in subbandTPApply() energy update."
-rw-r--r-- | libSACdec/src/sac_stp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libSACdec/src/sac_stp.cpp b/libSACdec/src/sac_stp.cpp index bb66277..b328c82 100644 --- a/libSACdec/src/sac_stp.cpp +++ b/libSACdec/src/sac_stp.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -369,15 +369,15 @@ SACDEC_ERROR subbandTPApply(spatialDec *self, const SPATIAL_BS_FRAME *frame) { hStpDec->update_old_ener = 1; for (ch = 0; ch < self->numInputChannels; ch++) { hStpDec->oldDryEnerLD64[ch] = - CalcLdData(hStpDec->runDryEner[ch] + ABS_THR__FDK); + CalcLdData(fAddSaturate(hStpDec->runDryEner[ch], ABS_THR__FDK)); } for (ch = 0; ch < self->numOutputChannels; ch++) { if (self->treeConfig == TREE_212) hStpDec->oldWetEnerLD64[ch] = - CalcLdData(hStpDec->runWetEner[ch] + ABS_THR__FDK); + CalcLdData(fAddSaturate(hStpDec->runWetEner[ch], ABS_THR__FDK)); else hStpDec->oldWetEnerLD64[ch] = - CalcLdData(hStpDec->runWetEner[ch] + ABS_THR2__FDK); + CalcLdData(fAddSaturate(hStpDec->runWetEner[ch], ABS_THR2__FDK)); } } else { hStpDec->update_old_ener++; |