diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2018-12-27 22:18:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-12-27 22:18:54 +0000 |
commit | ecc96969d7db139242dbba9930857ed5ce955b29 (patch) | |
tree | e78e88638c742d3dcd5f704d6ad50758d256a945 /libSBRdec/src/env_extr.cpp | |
parent | f828d3e16adfb4cb428b4f3a2c155f89853cebbe (diff) | |
parent | 0cebd077b61cc0946ea4062bf816defdffaef72b (diff) | |
download | fdk-aac-ecc96969d7db139242dbba9930857ed5ce955b29.tar.gz fdk-aac-ecc96969d7db139242dbba9930857ed5ce955b29.tar.bz2 fdk-aac-ecc96969d7db139242dbba9930857ed5ce955b29.zip |
Merge changes I97471c4d,I8a8626a8,I1f176740,I10da23ee,I9f9064fb
* changes:
Apply sbrDecoder_Parse() function for all explict SBR elements
Call QMF transposer initialization only with successful SBR processing
Add error path to generateFixFixOnly()
Add missing break in order to avoid a fallthrough in setConcealMethod()
Add FDK_FALLTHROUGH macro to prevent implicit-fallthrough compiler warnings
Diffstat (limited to 'libSBRdec/src/env_extr.cpp')
-rw-r--r-- | libSBRdec/src/env_extr.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libSBRdec/src/env_extr.cpp b/libSBRdec/src/env_extr.cpp index e6ae6dc..c72a7b6 100644 --- a/libSBRdec/src/env_extr.cpp +++ b/libSBRdec/src/env_extr.cpp @@ -1145,10 +1145,10 @@ static int sbrGetEnvelope( \brief Generates frame info for FIXFIXonly frame class used for low delay version - \return nothing + \return zero for error, one for correct. ****************************************************************************/ -static void generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal, - int numberTimeSlots, const UINT flags) { +static int generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal, + int numberTimeSlots, const UINT flags) { int nEnv, i, tranIdx; const int *pTable; @@ -1159,12 +1159,11 @@ static void generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal, case 15: pTable = FDK_sbrDecoder_envelopeTable_15[tranPosInternal]; break; - default: - FDK_ASSERT(0); - /* fall through */ case 16: pTable = FDK_sbrDecoder_envelopeTable_16[tranPosInternal]; break; + default: + return 0; } /* look number of envelopes in table */ @@ -1187,6 +1186,8 @@ static void generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal, /* nEnv is always > 1, so nNoiseEnvelopes is always 2 (IEC 14496-3 4.6.19.3.2) */ hSbrFrameInfo->nNoiseEnvelopes = 2; + + return 1; } /*! @@ -1230,7 +1231,9 @@ static int extractLowDelayGrid( } /* calculate borders according to the transient position */ - generateFixFixOnly(pFrameInfo, temp, numberTimeSlots, flags); + if (!generateFixFixOnly(pFrameInfo, temp, numberTimeSlots, flags)) { + return 0; + } /* decode freq res: */ for (k = 0; k < pFrameInfo->nEnvelopes; k++) { |