mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-06-05 22:39:13 +02:00
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
This commit is contained in:
@ -110,7 +110,7 @@ amm-info@iis.fraunhofer.de
|
||||
/* Decoder library info */
|
||||
#define AACDECODER_LIB_VL0 2
|
||||
#define AACDECODER_LIB_VL1 5
|
||||
#define AACDECODER_LIB_VL2 3
|
||||
#define AACDECODER_LIB_VL2 4
|
||||
#define AACDECODER_LIB_TITLE "AAC Decoder Lib"
|
||||
#define AACDECODER_LIB_BUILD_DATE __DATE__
|
||||
#define AACDECODER_LIB_BUILD_TIME __TIME__
|
||||
@ -261,7 +261,7 @@ setConcealMethod ( const HANDLE_AACDECODER self, /*!< Handle of the decoder i
|
||||
HANDLE_SBRDECODER hSbrDec = NULL;
|
||||
HANDLE_AAC_DRC hDrcInfo = NULL;
|
||||
HANDLE_PCM_DOWNMIX hPcmDmx = NULL;
|
||||
CConcealmentMethod backupMethod;
|
||||
CConcealmentMethod backupMethod = ConcealMethodNone;
|
||||
int backupDelay = 0;
|
||||
int bsDelay = 0;
|
||||
|
||||
@ -396,11 +396,15 @@ aacDecoder_SetParam ( const HANDLE_AACDECODER self, /*!< Handle of the decode
|
||||
AAC_DECODER_ERROR errorStatus = AAC_DEC_OK;
|
||||
CConcealParams *pConcealData = NULL;
|
||||
HANDLE_AAC_DRC hDrcInfo = NULL;
|
||||
HANDLE_PCM_DOWNMIX hPcmDmx = NULL;
|
||||
|
||||
/* check decoder handle */
|
||||
if (self != NULL) {
|
||||
pConcealData = &self->concealCommonData;
|
||||
hDrcInfo = self->hDrcInfo;
|
||||
hPcmDmx = self->hPcmUtils;
|
||||
} else {
|
||||
errorStatus = AAC_DEC_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
/* configure the subsystems */
|
||||
@ -417,11 +421,14 @@ aacDecoder_SetParam ( const HANDLE_AACDECODER self, /*!< Handle of the decode
|
||||
break;
|
||||
|
||||
case AAC_PCM_OUTPUT_CHANNELS:
|
||||
if (value < -1 || value > (6)) {
|
||||
return AAC_DEC_SET_PARAM_FAIL;
|
||||
}
|
||||
{
|
||||
PCMDMX_ERROR err;
|
||||
|
||||
err = pcmDmx_SetParam (
|
||||
self->hPcmUtils,
|
||||
hPcmDmx,
|
||||
NUMBER_OF_OUTPUT_CHANNELS,
|
||||
value );
|
||||
|
||||
@ -441,7 +448,7 @@ aacDecoder_SetParam ( const HANDLE_AACDECODER self, /*!< Handle of the decode
|
||||
PCMDMX_ERROR err;
|
||||
|
||||
err = pcmDmx_SetParam (
|
||||
self->hPcmUtils,
|
||||
hPcmDmx,
|
||||
DUAL_CHANNEL_DOWNMIX_MODE,
|
||||
value );
|
||||
|
||||
@ -459,10 +466,14 @@ aacDecoder_SetParam ( const HANDLE_AACDECODER self, /*!< Handle of the decode
|
||||
case AAC_PCM_OUTPUT_CHANNEL_MAPPING:
|
||||
switch (value) {
|
||||
case 0:
|
||||
self->channelOutputMapping = channelMappingTablePassthrough;
|
||||
if (self != NULL) {
|
||||
self->channelOutputMapping = channelMappingTablePassthrough;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
self->channelOutputMapping = channelMappingTableWAV;
|
||||
if (self != NULL) {
|
||||
self->channelOutputMapping = channelMappingTableWAV;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errorStatus = AAC_DEC_SET_PARAM_FAIL;
|
||||
@ -472,6 +483,9 @@ aacDecoder_SetParam ( const HANDLE_AACDECODER self, /*!< Handle of the decode
|
||||
|
||||
|
||||
case AAC_QMF_LOWPOWER:
|
||||
if (value < -1 || value > 1) {
|
||||
return AAC_DEC_SET_PARAM_FAIL;
|
||||
}
|
||||
if (self == NULL) {
|
||||
return AAC_DEC_INVALID_HANDLE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user