diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-24 07:24:38 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-24 07:24:38 +0000 |
commit | c85b838a65360747539d85099d92268dd3994d11 (patch) | |
tree | 4f088dbfd47d22d3f90ebcbcf054a26d6e69bdce /libFDK/src/FDK_qmf_domain.cpp | |
parent | e30420c551a348fdf0a20888ca2b95b527060061 (diff) | |
parent | a4d1f0ad52e2cf6f168d2193216602f52033fc27 (diff) | |
download | fdk-aac-c85b838a65360747539d85099d92268dd3994d11.tar.gz fdk-aac-c85b838a65360747539d85099d92268dd3994d11.tar.bz2 fdk-aac-c85b838a65360747539d85099d92268dd3994d11.zip |
Snap for 4801384 from a4d1f0ad52e2cf6f168d2193216602f52033fc27 to pi-release
Change-Id: Iab0959417db83cdeb3af7ce59ef4d8584a96b8be
Diffstat (limited to 'libFDK/src/FDK_qmf_domain.cpp')
-rw-r--r-- | libFDK/src/FDK_qmf_domain.cpp | 97 |
1 files changed, 66 insertions, 31 deletions
diff --git a/libFDK/src/FDK_qmf_domain.cpp b/libFDK/src/FDK_qmf_domain.cpp index 4b78931..043a372 100644 --- a/libFDK/src/FDK_qmf_domain.cpp +++ b/libFDK/src/FDK_qmf_domain.cpp @@ -274,17 +274,28 @@ static int FDK_QmfDomain_AllocatePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) { size = gc->nBandsAnalysis * 10; if (size > 0) { if (gc->nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_16) { - if (NULL == (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates16(ch))) - goto bail; + if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates16(ch))) + goto bail; + } } else if (gc->nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_24) { - if (NULL == (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates24(ch))) - goto bail; + if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates24(ch))) + goto bail; + } } else if (gc->nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_32) { - if (NULL == (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates32(ch))) - goto bail; + if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates32(ch))) + goto bail; + } } else { - if (NULL == (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates(ch))) - goto bail; + if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) { + if (NULL == (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates(ch))) + goto bail; + } } } else { qd->QmfDomainIn[ch].pAnaQmfStates = NULL; @@ -293,20 +304,36 @@ static int FDK_QmfDomain_AllocatePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) { size = gc->nQmfOvTimeSlots + gc->nQmfTimeSlots; if (size > 0) { if (gc->nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) { - if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal16(ch))) - goto bail; - if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag16(ch))) - goto bail; + if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal16(ch))) + goto bail; + } + if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag16(ch))) + goto bail; + } } else if (gc->nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) { - if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal32(ch))) - goto bail; - if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag32(ch))) - goto bail; + if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal32(ch))) + goto bail; + } + if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag32(ch))) + goto bail; + } } else { - if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal(ch))) - goto bail; - if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag(ch))) - goto bail; + if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) { + if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal(ch))) + goto bail; + } + if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) { + if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag(ch))) + goto bail; + } } } else { qd->QmfDomainIn[ch].hQmfSlotsReal = NULL; @@ -316,17 +343,23 @@ static int FDK_QmfDomain_AllocatePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) { size = gc->nQmfOvTimeSlots * gc->nQmfProcBands * CMPLX_MOD; if (size > 0) { if (gc->nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_16) { - if (NULL == - (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer16(ch))) - goto bail; + if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer16(ch))) + goto bail; + } } else if (gc->nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_32) { - if (NULL == - (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer32(ch))) - goto bail; + if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer32(ch))) + goto bail; + } } else { - if (NULL == - (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer(ch))) - goto bail; + if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) { + if (NULL == + (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer(ch))) + goto bail; + } } } else { qd->QmfDomainIn[ch].pOverlapBuffer = NULL; @@ -336,8 +369,10 @@ static int FDK_QmfDomain_AllocatePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) { for (ch = 0; ch < gc->nOutputChannels; ch++) { int size = gc->nBandsSynthesis * 9; if (size > 0) { - if (NULL == (qd->QmfDomainOut[ch].pSynQmfStates = GetSynQmfStates(ch))) - goto bail; + if (qd->QmfDomainOut[ch].pSynQmfStates == NULL) { + if (NULL == (qd->QmfDomainOut[ch].pSynQmfStates = GetSynQmfStates(ch))) + goto bail; + } } else { qd->QmfDomainOut[ch].pSynQmfStates = NULL; } |