From 14f7e1369382c0a399b991648c96fbcf8940efc8 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Fri, 8 Mar 2019 16:03:49 +0100 Subject: 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 --- libDRCdec/src/drcDec_selectionProcess.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'libDRCdec/src') 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; -- cgit v1.2.3