diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-09-06 13:22:37 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-09-06 13:22:37 -0700 |
commit | 646ead1a65b7efa806e4e3b7179bdd11088a8b73 (patch) | |
tree | 67e5fa80c2dcb18c8e92d0309f5ab1a0a389209f | |
parent | 4d1f3e3cfbdc52bdc054f30c5f600c78f803d6ed (diff) | |
parent | b3ea08e059fd9472c792bbd915c0f67aa6ceb1a6 (diff) | |
download | fdk-aac-646ead1a65b7efa806e4e3b7179bdd11088a8b73.tar.gz fdk-aac-646ead1a65b7efa806e4e3b7179bdd11088a8b73.tar.bz2 fdk-aac-646ead1a65b7efa806e4e3b7179bdd11088a8b73.zip |
Merge "Prevent overflow in concealment clipping check" into pi-dev
am: b3ea08e059
Change-Id: I70d38eed9d6d6e52bcf00752c482ce92eddf6497
-rw-r--r-- | libAACdec/src/conceal.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libAACdec/src/conceal.cpp b/libAACdec/src/conceal.cpp index a6064b6..569d672 100644 --- a/libAACdec/src/conceal.cpp +++ b/libAACdec/src/conceal.cpp @@ -2080,11 +2080,11 @@ static void CConcealment_TDNoise_Apply(CConcealmentInfo *const pConcealmentInfo, noiseVal = FX_DBL2FX_PCM(fMult(noiseValLong, TDNoiseAtt)); /* add filtered noise - check for clipping, before */ - if (pcmdata[ii] > (FIXP_PCM)MAXVAL_FIXP_PCM - noiseVal && - noiseVal > (FIXP_PCM)0) { + if (noiseVal > (FIXP_PCM)0 && + pcmdata[ii] > (FIXP_PCM)MAXVAL_FIXP_PCM - noiseVal) { noiseVal = noiseVal * (FIXP_PCM)-1; - } else if (pcmdata[ii] < (FIXP_PCM)MINVAL_FIXP_PCM - noiseVal && - noiseVal < (FIXP_PCM)0) { + } else if (noiseVal < (FIXP_PCM)0 && + pcmdata[ii] < (FIXP_PCM)MINVAL_FIXP_PCM - noiseVal) { noiseVal = noiseVal * (FIXP_PCM)-1; } |