Disable MPEG-D DRC for legacy AOTs am: 2f4c595c4a

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/aac/+/22789794

Change-Id: Icfb2b46c74449cd0ed4b1aa4721fbcf7d4a27c10
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jean-Michel Trivi 2023-04-25 17:23:04 +00:00 committed by Automerger Merge Worker
commit a6ab9ba89b
2 changed files with 3 additions and 40 deletions

View File

@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
© Copyright 1995 - 2021 Fraunhofer-Gesellschaft zur Förderung der angewandten
© Copyright 1995 - 2023 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@ -912,43 +912,6 @@ static AAC_DECODER_ERROR CAacDecoder_ExtPayloadParse(
}
*count -= readBits;
} break;
case EXT_UNI_DRC: {
DRC_DEC_ERROR drcErr = DRC_DEC_OK;
DRC_DEC_CODEC_MODE drcDecCodecMode = DRC_DEC_CODEC_MODE_UNDEFINED;
INT nBitsRemaining = FDKgetValidBits(hBs);
INT readBits;
switch (self->streamInfo.aot) {
case AOT_AAC_LC:
case AOT_SBR:
case AOT_PS:
drcDecCodecMode = DRC_DEC_MPEG_4_AAC;
break;
default:
error = AAC_DEC_PARSE_ERROR;
goto bail;
}
drcErr = FDK_drcDec_SetCodecMode(self->hUniDrcDecoder, drcDecCodecMode);
if (drcErr) {
error = AAC_DEC_PARSE_ERROR;
goto bail;
}
drcErr = FDK_drcDec_ReadUniDrc(self->hUniDrcDecoder, hBs);
if (drcErr) {
error = AAC_DEC_PARSE_ERROR;
goto bail;
}
readBits = (INT)nBitsRemaining - (INT)FDKgetValidBits(hBs);
if (readBits > *count) { /* Read too much. Something went wrong! */
error = AAC_DEC_PARSE_ERROR;
}
*count -= readBits;
/* Skip any trailing bits */
FDKpushFor(hBs, *count);
*count = 0;
} break;
case EXT_LDSAC_DATA:
case EXT_SAC_DATA:
/* Read MPEG Surround Extension payload */

View File

@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
© Copyright 1995 - 2021 Fraunhofer-Gesellschaft zur Förderung der angewandten
© Copyright 1995 - 2023 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@ -1681,7 +1681,7 @@ LINKSPEC_CPP AAC_DECODER_ERROR aacDecoder_DecodeFrame(HANDLE_AACDECODER self,
{
if ((FDK_drcDec_GetParam(self->hUniDrcDecoder, DRC_DEC_IS_ACTIVE)) &&
!(self->flags[0] & AC_RSV603DA)) {
(self->flags[0] & AC_USAC)) {
/* Apply DRC gains*/
int ch, drcDelay = 0;
int needsDeinterleaving = 0;