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/libDRCdec/src/drcDec_selectionProcess.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/libDRCdec/src/drcDec_selectionProcess.cpp')
-rw-r--r-- | fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp b/fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp index 9228197..c33bf74 100644 --- a/fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp +++ b/fdk-aac/libDRCdec/src/drcDec_selectionProcess.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 @@ -555,6 +555,11 @@ drcDec_SelectionProcess_SetParam(HANDLE_DRC_SELECTION_PROCESS hInstance, diff |= _compAssign(&pSelProcInput->loudnessMeasurementMethod, requestValueInt); break; + case SEL_PROC_ALBUM_MODE: + if ((requestValueInt < 0) || (requestValueInt > 1)) + return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE; + diff |= _compAssign(&pSelProcInput->albumMode, requestValueInt); + break; case SEL_PROC_DOWNMIX_ID: diff |= _compAssign(&pSelProcInput->targetConfigRequestType, TCRT_DOWNMIX_ID); @@ -598,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; @@ -2173,6 +2185,9 @@ static DRCDEC_SELECTION_PROCESS_RETURN _selectDownmixMatrix( if (hSelProcOutput->activeDownmixId != 0) { for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) { DOWNMIX_INSTRUCTIONS* pDown = &(hUniDrcConfig->downmixInstructions[i]); + if (pDown->targetChannelCount > 8) { + continue; + } if (hSelProcOutput->activeDownmixId == pDown->downmixId) { hSelProcOutput->targetChannelCount = pDown->targetChannelCount; @@ -2825,6 +2840,8 @@ static int _downmixCoefficientsArePresent(HANDLE_UNI_DRC_CONFIG hUniDrcConfig, for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) { if (hUniDrcConfig->downmixInstructions[i].downmixId == downmixId) { if (hUniDrcConfig->downmixInstructions[i].downmixCoefficientsPresent) { + if (hUniDrcConfig->downmixInstructions[i].targetChannelCount > 8) + return 0; *pIndex = i; return 1; } |