diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-11-29 10:56:23 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-11-29 10:56:23 -0800 |
commit | 6e4fe2e06bc33ceb9eddde6e628ea42e7ee3d130 (patch) | |
tree | 58c094a76b32f6e2e5bbad4f5a8f14ebc6cb152e /libAACdec | |
parent | 9cfaf0cd45999a12981ba4b6c86fee5120d56449 (diff) | |
parent | d2be744af28a784177d1de8d7190377c8932e03d (diff) | |
download | fdk-aac-6e4fe2e06bc33ceb9eddde6e628ea42e7ee3d130.tar.gz fdk-aac-6e4fe2e06bc33ceb9eddde6e628ea42e7ee3d130.tar.bz2 fdk-aac-6e4fe2e06bc33ceb9eddde6e628ea42e7ee3d130.zip |
Merge "Integer overflow fix in InvMdctTransformLowDelay_fdk()"
am: d2be744af2
Change-Id: I780b6c3791bd9bc70fa11a6990cb95a2e5d5ae7c
Diffstat (limited to 'libAACdec')
-rw-r--r-- | libAACdec/src/ldfiltbank.cpp | 8 |
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. */ |