summaryrefslogtreecommitdiffstats
path: root/libAACdec/src/block.cpp
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-08-27 16:28:09 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2013-08-27 16:28:09 -0700
commit5016eb7f6582fbb2d72d79be782325a12df08864 (patch)
treebc2325ebc6840a20d25f35a0c5a6a13454d2e402 /libAACdec/src/block.cpp
parentb9774f90651be61065ae40171fc321f6ced60e49 (diff)
downloadODR-AudioEnc-5016eb7f6582fbb2d72d79be782325a12df08864.tar.gz
ODR-AudioEnc-5016eb7f6582fbb2d72d79be782325a12df08864.tar.bz2
ODR-AudioEnc-5016eb7f6582fbb2d72d79be782325a12df08864.zip
Decoder stability, sanity checks improvements
* AAC-Decoder - Improved PCE handling for saver (re-)configuration and metadata processing. Modified file(s): libAACdec/src/aacdecoder.cpp libAACdec/src/aacdecoder_lib.cpp - Transport layer changes (config found) -> to be evaluated. Modified file(s): libMpegTPDec/include/tpdec_lib.h libMpegTPDec/src/tpdec_latm.h libMpegTPDec/src/version libMpegTPDec/src/tpdec_asc.cpp libMpegTPDec/src/tpdec_lib.cpp libMpegTPDec/src/tpdec_adts.cpp libMpegTPDec/src/tpdec_latm.cpp libSYS/include/FDK_audio.h libSYS/src/genericStds.cpp - Enable concealment state machine to skip states if the corresponding parameter is set to zero. Modified file(s): libAACdec/src/conceal.cpp - Add some more sanity checks to avoid segmentation faults especially when setting dynamic API params. Modified file(s): libAACdec/src/aacdecoder_lib.cpp - Fix to do a fail-safe initialization of IMDCT for all channels even with corrupt streams. Modified file(s): libAACdec/src/aacdecoder.cpp - HCR decoder fix (remove warnings). Modified file(s): libAACdec/src/block.cpp - Fix border calculation in SBR decoder's LPP transposer patch determination. Modified file(s): libSBRdec/src/env_dec.cpp libSBRdec/src/sbrdecoder.cpp libSBRdec/src/lpp_tran.cpp Bug 9428126 Change-Id: Ib415b702b88a7ec8e9a55789d79cafb39296d26b
Diffstat (limited to 'libAACdec/src/block.cpp')
-rw-r--r--libAACdec/src/block.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/libAACdec/src/block.cpp b/libAACdec/src/block.cpp
index 0424edb..9d703cc 100644
--- a/libAACdec/src/block.cpp
+++ b/libAACdec/src/block.cpp
@@ -589,7 +589,6 @@ AAC_DECODER_ERROR CBlock_ReadSpectralData(HANDLE_FDK_BITSTREAM bs,
{
H_HCR_INFO hHcr = &pAacDecoderChannelInfo->pComData->overlay.aac.erHcrInfo;
int hcrStatus = 0;
- int hcrConcealWholeFrame = 0;
/* advanced Huffman decoding starts here (HCR decoding :) */
if ( pAacDecoderChannelInfo->pDynData->specificTo.aac.lenOfReorderedSpectralData != 0 ) {
@@ -598,24 +597,19 @@ AAC_DECODER_ERROR CBlock_ReadSpectralData(HANDLE_FDK_BITSTREAM bs,
hcrStatus = HcrInit(hHcr, pAacDecoderChannelInfo, pSamplingRateInfo, bs);
if (hcrStatus != 0) {
-#if HCR_ERROR_CONCEALMENT
- hcrConcealWholeFrame = 1;
- return AAC_DEC_DECODE_FRAME_ERROR; /* concealment is muting in the first step, therefore return now */
- // hcr decoding is not skipped because of returning above
-#else
return AAC_DEC_DECODE_FRAME_ERROR;
-#endif
}
/* HCR decoding short */
hcrStatus = HcrDecoder(hHcr, pAacDecoderChannelInfo, pSamplingRateInfo, bs);
-
+ if (hcrStatus != 0) {
#if HCR_ERROR_CONCEALMENT
- HcrMuteErroneousLines(hHcr);
+ HcrMuteErroneousLines(hHcr);
#else
- return AAC_DEC_DECODE_FRAME_ERROR;
+ return AAC_DEC_DECODE_FRAME_ERROR;
#endif /* HCR_ERROR_CONCEALMENT */
+ }
FDKpushFor (bs, pAacDecoderChannelInfo->pDynData->specificTo.aac.lenOfReorderedSpectralData);
}