diff options
Diffstat (limited to 'libAACdec/src/aacdecoder_lib.cpp')
-rw-r--r-- | libAACdec/src/aacdecoder_lib.cpp | 45 |
1 files changed, 6 insertions, 39 deletions
diff --git a/libAACdec/src/aacdecoder_lib.cpp b/libAACdec/src/aacdecoder_lib.cpp index 50c9563..5650dd1 100644 --- a/libAACdec/src/aacdecoder_lib.cpp +++ b/libAACdec/src/aacdecoder_lib.cpp @@ -306,13 +306,6 @@ static INT aacDecoder_FreeMemCallback(void *handle, errTp = TRANSPORTDEC_UNKOWN_ERROR; } - /* free Ram_SbrDecoder and Ram_SbrDecChannel */ - if (self->hSbrDecoder != NULL) { - if (sbrDecoder_FreeMem(&self->hSbrDecoder) != SBRDEC_OK) { - errTp = TRANSPORTDEC_UNKOWN_ERROR; - } - } - /* free pSpatialDec and mpsData */ if (self->pMpegSurroundDecoder != NULL) { if (mpegSurroundDecoder_FreeMem( @@ -344,23 +337,6 @@ static INT aacDecoder_CtrlCFGChangeCallback( return errTp; } -static INT aacDecoder_SbrCallback( - void *handle, HANDLE_FDK_BITSTREAM hBs, const INT sampleRateIn, - const INT sampleRateOut, const INT samplesPerFrame, - const AUDIO_OBJECT_TYPE coreCodec, const MP4_ELEMENT_ID elementID, - const INT elementIndex, const UCHAR harmonicSBR, - const UCHAR stereoConfigIndex, const UCHAR configMode, UCHAR *configChanged, - const INT downscaleFactor) { - HANDLE_SBRDECODER self = (HANDLE_SBRDECODER)handle; - - INT errTp = sbrDecoder_Header(self, hBs, sampleRateIn, sampleRateOut, - samplesPerFrame, coreCodec, elementID, - elementIndex, harmonicSBR, stereoConfigIndex, - configMode, configChanged, downscaleFactor); - - return errTp; -} - static INT aacDecoder_SscCallback(void *handle, HANDLE_FDK_BITSTREAM hBs, const AUDIO_OBJECT_TYPE coreCodec, const INT samplingRate, const INT frameSize, @@ -806,9 +782,6 @@ LINKSPEC_CPP AAC_DECODER_ERROR aacDecoder_SetParam( packed into a helper function which keeps all modules and libs in a consistent state even in the case an error occures. */ errorStatus = setConcealMethod(self, value); - if (errorStatus == AAC_DEC_OK) { - self->concealMethodUser = (CConcealmentMethod)value; - } break; default: @@ -1302,9 +1275,7 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, if (!self->qmfDomain.globalConf.qmfDomainExplicitConfig && self->mpsEnableCurr) { - SAC_INPUT_CONFIG sac_interface = (self->sbrEnabled && self->hSbrDecoder) - ? SAC_INTERFACE_QMF - : SAC_INTERFACE_TIME; + SAC_INPUT_CONFIG sac_interface = SAC_INTERFACE_TIME; /* needs to be done before first SBR apply. */ mpegSurroundDecoder_ConfigureQmfDomain( (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, sac_interface, @@ -1344,8 +1315,6 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, frameSize = self->streamInfo.frameSize; sac_interface = SAC_INTERFACE_TIME; - if (self->sbrEnabled && self->hSbrDecoder) - sac_interface = SAC_INTERFACE_QMF; if (self->streamInfo.aot == AOT_USAC) { if (self->flags[0] & AC_USAC_SCFGI3) { sac_interface = SAC_INTERFACE_TIME; @@ -1429,11 +1398,9 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, /* 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. */ - if (self->sbrEnabled) drcDelay = 257; if (self->mpsEnableCurr) drcDelay = 257; /* Take into account concealment delay */ - drcDelay += CConcealment_GetDelay(&self->concealCommonData) * - self->streamInfo.frameSize; + drcDelay += 0 * self->streamInfo.frameSize; for (ch = 0; ch < self->streamInfo.numChannels; ch++) { UCHAR mapValue = FDK_chMapDescr_getMapValue( @@ -1450,7 +1417,7 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, * necessary for FDK_drcDec_ProcessTime, which accepts deinterleaved * audio only. */ if ((self->streamInfo.numChannels > 1) && - (0 || (self->sbrEnabled) || (self->mpsEnableCurr))) { + (0 || (self->mpsEnableCurr))) { /* interleaving/deinterleaving is performed on upper part of * pTimeDataPcmPost. Check if this buffer is large enough. */ if (timeDataPcmPostSize < @@ -1523,7 +1490,7 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, } INT interleaved = 0; - interleaved |= (self->sbrEnabled) ? 1 : 0; + interleaved |= 0; interleaved |= (self->mpsEnableCurr) ? 1 : 0; /* do PCM post processing */ @@ -1561,7 +1528,7 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, pcmLimiter_SetSampleRate(self->hLimiter, self->streamInfo.sampleRate); pcmLimiterScale += PCM_OUT_HEADROOM; - if ((self->streamInfo.numChannels == 1) || (self->sbrEnabled) || + if ((self->streamInfo.numChannels == 1) || (self->mpsEnableCurr)) { pInterleaveBuffer = (PCM_LIM *)pTimeDataPcmPost; } else { @@ -1584,7 +1551,7 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern, /* If numChannels = 1 we do not need interleaving. The same applies if SBR or MPS are used, since their output is interleaved already (resampled or not) */ - if ((self->streamInfo.numChannels == 1) || (self->sbrEnabled) || + if ((self->streamInfo.numChannels == 1) || (self->mpsEnableCurr)) { scaleValuesSaturate( pTimeData, pTimeDataPcmPost, |