aboutsummaryrefslogtreecommitdiffstats
path: root/libDRCdec/src/drcGainDec_preprocess.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-03-04 15:52:49 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-03-04 15:52:49 +0100
commitc7f9c2d1d996ac8f67927e9c86b907196ca6a72d (patch)
treea2dcc8e8cd3df5628f43242243fd475562ea4082 /libDRCdec/src/drcGainDec_preprocess.cpp
parentf665ac21b355ebc74c951c09b4774936a74fdca0 (diff)
parent95858d7bd36f19bde4a9595e2bd68f195215b164 (diff)
downloadfdk-aac-c7f9c2d1d996ac8f67927e9c86b907196ca6a72d.tar.gz
fdk-aac-c7f9c2d1d996ac8f67927e9c86b907196ca6a72d.tar.bz2
fdk-aac-c7f9c2d1d996ac8f67927e9c86b907196ca6a72d.zip
Merge remote-tracking branch 'mstorjo/master' into dabplus2
Diffstat (limited to 'libDRCdec/src/drcGainDec_preprocess.cpp')
-rw-r--r--libDRCdec/src/drcGainDec_preprocess.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libDRCdec/src/drcGainDec_preprocess.cpp b/libDRCdec/src/drcGainDec_preprocess.cpp
index 7919589..c543c53 100644
--- a/libDRCdec/src/drcGainDec_preprocess.cpp
+++ b/libDRCdec/src/drcGainDec_preprocess.cpp
@@ -300,8 +300,9 @@ static DRC_ERROR _compressorIO_sigmoid(const CUSTOM_DRC_CHAR_SIGMOID* pCChar,
FIXP_SGL exp = pCChar->exp;
DRC_ERROR err = DE_OK;
- tmp = fMultDiv2(DRC_INPUT_LOUDNESS_TARGET - inLevelDb, pCChar->ioRatio);
- tmp = SATURATE_LEFT_SHIFT(tmp, 2 + 1, DFRACT_BITS);
+ tmp = fMultDiv2((DRC_INPUT_LOUDNESS_TARGET >> 1) - (inLevelDb >> 1),
+ pCChar->ioRatio);
+ tmp = SATURATE_LEFT_SHIFT(tmp, 2 + 1 + 1, DFRACT_BITS);
if (exp < (FIXP_SGL)MAXVAL_SGL) {
/* x = tmp / gainDbLimit; */
/* *outGainDb = tmp / pow(1.0f + pow(x, exp), 1.0f/exp); */