diff options
Diffstat (limited to 'fdk-aac/libAACdec/src')
-rw-r--r-- | fdk-aac/libAACdec/src/aacdec_drc.cpp | 6 | ||||
-rw-r--r-- | fdk-aac/libAACdec/src/aacdec_hcr.cpp | 3 | ||||
-rw-r--r-- | fdk-aac/libAACdec/src/aacdecoder.cpp | 5 | ||||
-rw-r--r-- | fdk-aac/libAACdec/src/aacdecoder_lib.cpp | 22 | ||||
-rw-r--r-- | fdk-aac/libAACdec/src/usacdec_lpd.cpp | 2 |
5 files changed, 30 insertions, 8 deletions
diff --git a/fdk-aac/libAACdec/src/aacdec_drc.cpp b/fdk-aac/libAACdec/src/aacdec_drc.cpp index 922a09e..4129d0f 100644 --- a/fdk-aac/libAACdec/src/aacdec_drc.cpp +++ b/fdk-aac/libAACdec/src/aacdec_drc.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 @@ -174,9 +174,9 @@ void aacDecoder_drcInit(HANDLE_AAC_DRC self) { pParams->usrCut = FL2FXCONST_DBL(0.0f); pParams->boost = FL2FXCONST_DBL(0.0f); pParams->usrBoost = FL2FXCONST_DBL(0.0f); - pParams->targetRefLevel = -1; + pParams->targetRefLevel = 96; pParams->expiryFrame = AACDEC_DRC_DFLT_EXPIRY_FRAMES; - pParams->applyDigitalNorm = OFF; + pParams->applyDigitalNorm = ON; pParams->applyHeavyCompression = OFF; pParams->usrApplyHeavyCompression = OFF; diff --git a/fdk-aac/libAACdec/src/aacdec_hcr.cpp b/fdk-aac/libAACdec/src/aacdec_hcr.cpp index 6114756..26fdd97 100644 --- a/fdk-aac/libAACdec/src/aacdec_hcr.cpp +++ b/fdk-aac/libAACdec/src/aacdec_hcr.cpp @@ -1423,6 +1423,9 @@ static INT DecodeEscapeSequence(HANDLE_FDK_BITSTREAM bs, const INT bsAnchor, sign = (quantSpecCoef >= 0) ? 1 : -1; + if (escapeOnesCounter > 30) + escapeOnesCounter = 30; + quantSpecCoef = sign * (((INT)1 << escapeOnesCounter) + escape_word); return quantSpecCoef; diff --git a/fdk-aac/libAACdec/src/aacdecoder.cpp b/fdk-aac/libAACdec/src/aacdecoder.cpp index 8f03328..7617937 100644 --- a/fdk-aac/libAACdec/src/aacdecoder.cpp +++ b/fdk-aac/libAACdec/src/aacdecoder.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 @@ -1815,6 +1815,9 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc, self->useLdQmfTimeAlign = asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign; } + if (self->sbrEnabled != asc->m_sbrPresentFlag) { + ascChanged = 1; + } } self->streamInfo.extAot = asc->m_extensionAudioObjectType; diff --git a/fdk-aac/libAACdec/src/aacdecoder_lib.cpp b/fdk-aac/libAACdec/src/aacdecoder_lib.cpp index 7df17b9..8685a30 100644 --- a/fdk-aac/libAACdec/src/aacdecoder_lib.cpp +++ b/fdk-aac/libAACdec/src/aacdecoder_lib.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 @@ -119,8 +119,8 @@ amm-info@iis.fraunhofer.de /* Decoder library info */ #define AACDECODER_LIB_VL0 3 -#define AACDECODER_LIB_VL1 0 -#define AACDECODER_LIB_VL2 0 +#define AACDECODER_LIB_VL1 1 +#define AACDECODER_LIB_VL2 2 #define AACDECODER_LIB_TITLE "AAC Decoder Lib" #ifdef __ANDROID__ #define AACDECODER_LIB_BUILD_DATE "" @@ -823,11 +823,15 @@ LINKSPEC_CPP AAC_DECODER_ERROR aacDecoder_SetParam( case AAC_DRC_ATTENUATION_FACTOR: /* DRC compression factor (where 0 is no and 127 is max compression) */ errorStatus = aacDecoder_drcSetParam(hDrcInfo, DRC_CUT_SCALE, value); + uniDrcErr = FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_COMPRESS, + value * (FL2FXCONST_DBL(0.5f / 127.0f))); break; case AAC_DRC_BOOST_FACTOR: /* DRC boost factor (where 0 is no and 127 is max boost) */ errorStatus = aacDecoder_drcSetParam(hDrcInfo, DRC_BOOST_SCALE, value); + uniDrcErr = FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_BOOST, + value * (FL2FXCONST_DBL(0.5f / 127.0f))); break; case AAC_DRC_REFERENCE_LEVEL: @@ -871,6 +875,11 @@ LINKSPEC_CPP AAC_DECODER_ERROR aacDecoder_SetParam( uniDrcErr = FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_EFFECT_TYPE, (FIXP_DBL)value); break; + case AAC_UNIDRC_ALBUM_MODE: + uniDrcErr = FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_ALBUM_MODE, + (FIXP_DBL)value); + break; + case AAC_TPDEC_CLEAR_BUFFER: errTp = transportDec_SetParam(hTpDec, TPDEC_PARAM_RESET, 1); self->streamInfo.numLostAccessUnits = 0; @@ -1669,6 +1678,13 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, reverseOutChannelMap[ch] = ch; } + /* Update sampleRate and frameSize. This may be necessary in case of + * implicit SBR signaling */ + FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_SAMPLE_RATE, + self->streamInfo.sampleRate); + FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_FRAME_SIZE, + self->streamInfo.frameSize); + /* If SBR and/or MPS is active, the DRC gains are aligned to the QMF domain signal before the QMF synthesis. Therefore the DRC gains need to be delayed by the QMF synthesis delay. */ diff --git a/fdk-aac/libAACdec/src/usacdec_lpd.cpp b/fdk-aac/libAACdec/src/usacdec_lpd.cpp index 2110172..e0a2631 100644 --- a/fdk-aac/libAACdec/src/usacdec_lpd.cpp +++ b/fdk-aac/libAACdec/src/usacdec_lpd.cpp @@ -1222,7 +1222,7 @@ AAC_DECODER_ERROR CLpdChannelStream_Read( (INT)(samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM - (INT)PIT_MIN_12k8; - if ((samplingRate < FAC_FSCALE_MIN) || (samplingRate > FAC_FSCALE_MAX)) { + if ((samplingRate < 6000) || (samplingRate > 24000)) { error = AAC_DEC_PARSE_ERROR; goto bail; } |