aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-11-29 11:05:17 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-11-29 11:05:17 -0800
commitbf8adf21adbed51f3523227c07bde21caf698d82 (patch)
treeccc517555a77577411028e6df97f09453a74879a /libAACdec/src
parent619b24da3370e50acfc1bbbd49e86f7670a6ae1a (diff)
parent69e052a1af187b726c08f1424eef2e0620d20080 (diff)
downloadfdk-aac-bf8adf21adbed51f3523227c07bde21caf698d82.tar.gz
fdk-aac-bf8adf21adbed51f3523227c07bde21caf698d82.tar.bz2
fdk-aac-bf8adf21adbed51f3523227c07bde21caf698d82.zip
Merge "Integer overflow fix in InvMdctTransformLowDelay_fdk()" am: d2be744af2 am: 6e4fe2e06b
am: 69e052a1af Change-Id: I17eca04703b565d22659b6a3f8d08e16a818aedc
Diffstat (limited to 'libAACdec/src')
-rw-r--r--libAACdec/src/ldfiltbank.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libAACdec/src/ldfiltbank.cpp b/libAACdec/src/ldfiltbank.cpp
index 66a5914..c7d2928 100644
--- a/libAACdec/src/ldfiltbank.cpp
+++ b/libAACdec/src/ldfiltbank.cpp
@@ -216,6 +216,7 @@ int InvMdctTransformLowDelay_fdk(FIXP_DBL *mdctData, const int mdctData_e,
int scale = mdctData_e + MDCT_OUT_HEADROOM -
LDFB_HEADROOM; /* The LDFB_HEADROOM is compensated inside
multE2_DinvF_fdk() below */
+ int i;
/* Select LD window slope */
switch (N) {
@@ -261,10 +262,11 @@ int InvMdctTransformLowDelay_fdk(FIXP_DBL *mdctData, const int mdctData_e,
}
if (gain != (FIXP_DBL)0) {
- scaleValuesWithFactor(mdctData, gain, N, scale);
- } else {
- scaleValues(mdctData, N, scale);
+ for (i = 0; i < N; i++) {
+ mdctData[i] = fMult(mdctData[i], gain);
+ }
}
+ scaleValuesSaturate(mdctData, N, scale);
/* Since all exponent and factors have been applied, current exponent is zero.
*/