aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2019-12-19 17:28:33 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2020-02-14 10:56:10 -0800
commit261fadc3a2221829196158824a512f11268756ef (patch)
tree14af7ed7a857394dccdc540f6aa01496e99a6c37
parente016635f0d3a5c7532b00711ce461f97a13f7bc2 (diff)
downloadfdk-aac-261fadc3a2221829196158824a512f11268756ef.tar.gz
fdk-aac-261fadc3a2221829196158824a512f11268756ef.tar.bz2
fdk-aac-261fadc3a2221829196158824a512f11268756ef.zip
Remove outdated apply_normalization parameter from legacy DRC module.
Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I9b894007fc9d80da6aaee09d84c2b356f2c06ff7
-rw-r--r--libAACdec/src/aacdec_drc.cpp22
-rw-r--r--libAACdec/src/aacdec_drc.h1
-rw-r--r--libAACdec/src/aacdec_drc_types.h1
-rw-r--r--libAACdec/src/aacdecoder.cpp3
4 files changed, 3 insertions, 24 deletions
diff --git a/libAACdec/src/aacdec_drc.cpp b/libAACdec/src/aacdec_drc.cpp
index 6066a64..b6f5b49 100644
--- a/libAACdec/src/aacdec_drc.cpp
+++ b/libAACdec/src/aacdec_drc.cpp
@@ -190,7 +190,6 @@ void aacDecoder_drcInit(HANDLE_AAC_DRC self) {
pParams->usrBoost = FL2FXCONST_DBL(0.0f);
pParams->targetRefLevel = 96;
pParams->expiryFrame = AACDEC_DRC_DFLT_EXPIRY_FRAMES;
- pParams->applyDigitalNorm = ON;
pParams->applyHeavyCompression = OFF;
pParams->usrApplyHeavyCompression = OFF;
@@ -274,11 +273,8 @@ AAC_DECODER_ERROR aacDecoder_drcSetParam(HANDLE_AAC_DRC self,
return AAC_DEC_INVALID_HANDLE;
}
if (value < 0) {
- self->params.applyDigitalNorm = OFF;
self->params.targetRefLevel = -1;
} else {
- /* ref_level must be between 0 and MAX_REFERENCE_LEVEL, inclusive */
- self->params.applyDigitalNorm = ON;
if (self->params.targetRefLevel != (SCHAR)value) {
self->params.targetRefLevel = (SCHAR)value;
self->progRefLevel = (SCHAR)value; /* Always set the program reference
@@ -289,16 +285,6 @@ AAC_DECODER_ERROR aacDecoder_drcSetParam(HANDLE_AAC_DRC self,
self->update = 1;
}
break;
- case APPLY_NORMALIZATION:
- if ((value != OFF) && (value != ON)) {
- return AAC_DEC_SET_PARAM_FAIL;
- }
- if (self == NULL) {
- return AAC_DEC_INVALID_HANDLE;
- }
- /* Store new parameter value */
- self->params.applyDigitalNorm = (UCHAR)value;
- break;
case APPLY_HEAVY_COMPRESSION:
if ((value != OFF) && (value != ON)) {
return AAC_DEC_SET_PARAM_FAIL;
@@ -926,11 +912,9 @@ void aacDecoder_drcApply(HANDLE_AAC_DRC self, void *pSbrDec,
FDK_ASSERT(0);
}
}
- if (self->params.applyDigitalNorm == OFF) {
- /* Reset normalization gain since this module must not apply it */
- norm_mantissa = FL2FXCONST_DBL(0.5f);
- norm_exponent = 1;
- }
+ /* Reset normalization gain since this module must not apply it */
+ norm_mantissa = FL2FXCONST_DBL(0.5f);
+ norm_exponent = 1;
/* calc scale factors */
for (band = 0; band < numBands; band++) {
diff --git a/libAACdec/src/aacdec_drc.h b/libAACdec/src/aacdec_drc.h
index 1873c5b..76a44d6 100644
--- a/libAACdec/src/aacdec_drc.h
+++ b/libAACdec/src/aacdec_drc.h
@@ -130,7 +130,6 @@ typedef enum {
TARGET_REF_LEVEL,
DRC_BS_DELAY,
DRC_DATA_EXPIRY_FRAME,
- APPLY_NORMALIZATION,
APPLY_HEAVY_COMPRESSION,
DEFAULT_PRESENTATION_MODE,
ENCODER_TARGET_LEVEL,
diff --git a/libAACdec/src/aacdec_drc_types.h b/libAACdec/src/aacdec_drc_types.h
index 873bd60..d4393f7 100644
--- a/libAACdec/src/aacdec_drc_types.h
+++ b/libAACdec/src/aacdec_drc_types.h
@@ -168,7 +168,6 @@ typedef struct {
UINT expiryFrame;
UCHAR bsDelayEnable;
- UCHAR applyDigitalNorm;
AACDEC_DRC_PARAMETER_HANDLING defaultPresentationMode;
UCHAR encoderTargetLevel;
diff --git a/libAACdec/src/aacdecoder.cpp b/libAACdec/src/aacdecoder.cpp
index 6a0254d..965631b 100644
--- a/libAACdec/src/aacdecoder.cpp
+++ b/libAACdec/src/aacdecoder.cpp
@@ -3177,9 +3177,6 @@ LINKSPEC_CPP AAC_DECODER_ERROR CAacDecoder_DecodeFrame(
FDKmemcpy(drcChMap, self->chMapping, (8) * sizeof(UCHAR));
}
- /* Turn off DRC modules level normalization in digital domain. */
- aacDecoder_drcSetParam(self->hDrcInfo, APPLY_NORMALIZATION, 0);
-
/* deactivate legacy DRC in case uniDrc is active, i.e. uniDrc payload is
* present and one of DRC or Loudness Normalization is switched on */
aacDecoder_drcSetParam(