diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2019-03-08 16:03:49 +0100 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2019-04-25 09:35:00 -0700 |
commit | 14f7e1369382c0a399b991648c96fbcf8940efc8 (patch) | |
tree | 3823dc51f22ec509c64e73eff0d211937e0a165e /libDRCdec/src | |
parent | 37972d5a1f175173c2747c043ae6f3d1a142d28a (diff) | |
download | fdk-aac-14f7e1369382c0a399b991648c96fbcf8940efc8.tar.gz fdk-aac-14f7e1369382c0a399b991648c96fbcf8940efc8.tar.bz2 fdk-aac-14f7e1369382c0a399b991648c96fbcf8940efc8.zip |
MPEG-4/D DRC unification, loudness norm default at -24
Unify API parameter of MPEG-4/D DRC and introduce rounding to boost/compress setParam function (FDKdec v3.1.1).
Enable Loudness Normalization with target loudness -24 by default (FDKdec v3.1.2).
Bug: 131255165
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I249a36b4861d0c8d4a0ed2df4dc1f444576bac6b
Diffstat (limited to 'libDRCdec/src')
-rw-r--r-- | libDRCdec/src/drcDec_selectionProcess.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libDRCdec/src/drcDec_selectionProcess.cpp b/libDRCdec/src/drcDec_selectionProcess.cpp index 37f5722..c33bf74 100644 --- a/libDRCdec/src/drcDec_selectionProcess.cpp +++ b/libDRCdec/src/drcDec_selectionProcess.cpp @@ -603,14 +603,21 @@ drcDec_SelectionProcess_SetParam(HANDLE_DRC_SELECTION_PROCESS hInstance, if ((requestValue < (FIXP_DBL)0) || (requestValue > FL2FXCONST_DBL(1.0f / (float)(1 << 1)))) return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE; - diff |= _compAssign(&pSelProcInput->boost, FX_DBL2FX_SGL(requestValue)); + diff |= _compAssign( + &pSelProcInput->boost, + FX_DBL2FX_SGL( + requestValue + + (FIXP_DBL)(1 << 15))); /* convert to FIXP_SGL with rounding */ break; case SEL_PROC_COMPRESS: if ((requestValue < (FIXP_DBL)0) || (requestValue > FL2FXCONST_DBL(1.0f / (float)(1 << 1)))) return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE; - diff |= - _compAssign(&pSelProcInput->compress, FX_DBL2FX_SGL(requestValue)); + diff |= _compAssign( + &pSelProcInput->compress, + FX_DBL2FX_SGL( + requestValue + + (FIXP_DBL)(1 << 15))); /* convert to FIXP_SGL with rounding */ break; default: return DRCDEC_SELECTION_PROCESS_INVALID_PARAM; |