aboutsummaryrefslogtreecommitdiffstats
path: root/fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-16 10:15:54 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-16 10:15:54 +0200
commitac10ac25317d2027e21b1390054e47201e7aec98 (patch)
tree4b1114b5806709d99634c1b1571e3fe1ed0a7417 /fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp
parentc9b14925962bf6ca3978dc07bf8db32ada7003c5 (diff)
downloadODR-AudioEnc-ac10ac25317d2027e21b1390054e47201e7aec98.tar.gz
ODR-AudioEnc-ac10ac25317d2027e21b1390054e47201e7aec98.tar.bz2
ODR-AudioEnc-ac10ac25317d2027e21b1390054e47201e7aec98.zip
Update fdk-aac
This corresponds to 9718203 in https://github.com/Opendigitalradio/fdk-aac
Diffstat (limited to 'fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp')
-rw-r--r--fdk-aac/libDRCdec/src/drcDec_selectionProcess.cpp25
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;
}