diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-12-20 15:52:46 +0100 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2019-03-14 08:58:57 -0700 |
commit | 1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99 (patch) | |
tree | 4d75bfe058f7c8234b41beeac4f419b8d0f8dc4a /libDRCdec/src/drcDec_selectionProcess.cpp | |
parent | f164a97189891fb058080b831bef7431a25f3aa2 (diff) | |
download | fdk-aac-1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99.tar.gz fdk-aac-1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99.tar.bz2 fdk-aac-1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99.zip |
Add MPEG-D DRC sanity checks
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I5413e43d5cfc895b8c3171f8857ca6feab6c269e
Diffstat (limited to 'libDRCdec/src/drcDec_selectionProcess.cpp')
-rw-r--r-- | libDRCdec/src/drcDec_selectionProcess.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libDRCdec/src/drcDec_selectionProcess.cpp b/libDRCdec/src/drcDec_selectionProcess.cpp index 9228197..5653e22 100644 --- a/libDRCdec/src/drcDec_selectionProcess.cpp +++ b/libDRCdec/src/drcDec_selectionProcess.cpp @@ -2173,6 +2173,9 @@ static DRCDEC_SELECTION_PROCESS_RETURN _selectDownmixMatrix( if (hSelProcOutput->activeDownmixId != 0) { for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) { DOWNMIX_INSTRUCTIONS* pDown = &(hUniDrcConfig->downmixInstructions[i]); + if (pDown->targetChannelCount > 8) { + continue; + } if (hSelProcOutput->activeDownmixId == pDown->downmixId) { hSelProcOutput->targetChannelCount = pDown->targetChannelCount; @@ -2825,6 +2828,8 @@ static int _downmixCoefficientsArePresent(HANDLE_UNI_DRC_CONFIG hUniDrcConfig, for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) { if (hUniDrcConfig->downmixInstructions[i].downmixId == downmixId) { if (hUniDrcConfig->downmixInstructions[i].downmixCoefficientsPresent) { + if (hUniDrcConfig->downmixInstructions[i].targetChannelCount > 8) + return 0; *pIndex = i; return 1; } |