mirror of https://github.com/mstorsjo/fdk-aac.git
Remove outdated apply_normalization parameter from legacy DRC module.
Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I9b894007fc9d80da6aaee09d84c2b356f2c06ff7
This commit is contained in:
parent
e016635f0d
commit
261fadc3a2
|
@ -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++) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -168,7 +168,6 @@ typedef struct {
|
|||
|
||||
UINT expiryFrame;
|
||||
UCHAR bsDelayEnable;
|
||||
UCHAR applyDigitalNorm;
|
||||
|
||||
AACDEC_DRC_PARAMETER_HANDLING defaultPresentationMode;
|
||||
UCHAR encoderTargetLevel;
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue