diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-09-17 15:05:35 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-09-17 15:05:35 +0200 |
commit | 321a2c3eead634329cda904dbd38d986c3f22c11 (patch) | |
tree | c4339c85c03dd103e0e3ee7b8fb1445c1fc4ffa8 /fdk-aac/libSBRdec/src/lpp_tran.cpp | |
parent | b65cd1fe9d453365f0dec0c80d8737eda3d1c338 (diff) | |
parent | ac10ac25317d2027e21b1390054e47201e7aec98 (diff) | |
download | ODR-AudioEnc-321a2c3eead634329cda904dbd38d986c3f22c11.tar.gz ODR-AudioEnc-321a2c3eead634329cda904dbd38d986c3f22c11.tar.bz2 ODR-AudioEnc-321a2c3eead634329cda904dbd38d986c3f22c11.zip |
Merge branch 'next' into padsocket
Diffstat (limited to 'fdk-aac/libSBRdec/src/lpp_tran.cpp')
-rw-r--r-- | fdk-aac/libSBRdec/src/lpp_tran.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/fdk-aac/libSBRdec/src/lpp_tran.cpp b/fdk-aac/libSBRdec/src/lpp_tran.cpp index 2ef07eb..6acb626 100644 --- a/fdk-aac/libSBRdec/src/lpp_tran.cpp +++ b/fdk-aac/libSBRdec/src/lpp_tran.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -446,8 +446,26 @@ void lppTransposer( pSettings->nCols) + lowBandShift); } - dynamicScale = fixMax( - 0, dynamicScale - 1); /* one additional bit headroom to prevent -1.0 */ + + if (dynamicScale == 0) { + /* In this special case the available headroom bits as well as + ovLowBandShift and lowBandShift are zero. The spectrum is limited to + prevent -1.0, so negative values for dynamicScale can be avoided. */ + for (i = 0; i < (LPC_ORDER + pSettings->overlap + pSettings->nCols); + i++) { + lowBandReal[i] = fixMax(lowBandReal[i], (FIXP_DBL)0x80000001); + } + if (!useLP) { + for (i = 0; i < (LPC_ORDER + pSettings->overlap + pSettings->nCols); + i++) { + lowBandImag[i] = fixMax(lowBandImag[i], (FIXP_DBL)0x80000001); + } + } + } else { + dynamicScale = + fixMax(0, dynamicScale - + 1); /* one additional bit headroom to prevent -1.0 */ + } /* Scale temporal QMF buffer. |