diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-05 17:50:19 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-05 17:50:19 +0100 |
commit | 571316f329948dc464cc2be37b210f0b3e7816f7 (patch) | |
tree | 8396262af9d84f5a0490af9805cde11cf5fc9eed /libSBRdec/src/sbrdec_drc.cpp | |
parent | e778887e4e5589528b06b04404ce4c71aaae267a (diff) | |
parent | 716f4394641d53f0d79c9ddac3fa93b03a49f278 (diff) | |
download | fdk-aac-571316f329948dc464cc2be37b210f0b3e7816f7.tar.gz fdk-aac-571316f329948dc464cc2be37b210f0b3e7816f7.tar.bz2 fdk-aac-571316f329948dc464cc2be37b210f0b3e7816f7.zip |
Merge fdk-aac 'v2.0.3' into dabplus2dabplus2
Diffstat (limited to 'libSBRdec/src/sbrdec_drc.cpp')
-rw-r--r-- | libSBRdec/src/sbrdec_drc.cpp | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/libSBRdec/src/sbrdec_drc.cpp b/libSBRdec/src/sbrdec_drc.cpp index 2d73f32..089d046 100644 --- a/libSBRdec/src/sbrdec_drc.cpp +++ b/libSBRdec/src/sbrdec_drc.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -233,14 +233,19 @@ void sbrDecoder_drcApplySlot(HANDLE_SBR_DRC_CHANNEL hDrcData, if (hDrcData->winSequenceCurr != 2) { /* long window */ int j = col + (numQmfSubSamples >> 1); - if (hDrcData->drcInterpolationSchemeCurr == 0) { - INT k = (frameLenFlag) ? 0x4444445 : 0x4000000; + if (j < winBorderToColMap[15]) { + if (hDrcData->drcInterpolationSchemeCurr == 0) { + INT k = (frameLenFlag) ? 0x4444445 : 0x4000000; - alphaValue = (FIXP_DBL)(j * k); - } else { - if (j >= (int)winBorderToColMap[hDrcData->drcInterpolationSchemeCurr]) { - alphaValue = (FIXP_DBL)MAXVAL_DBL; + alphaValue = (FIXP_DBL)(j * k); + } else { + if (j >= + (int)winBorderToColMap[hDrcData->drcInterpolationSchemeCurr]) { + alphaValue = (FIXP_DBL)MAXVAL_DBL; + } } + } else { + alphaValue = (FIXP_DBL)MAXVAL_DBL; } } else { /* short windows */ shortDrc = 1; @@ -254,14 +259,19 @@ void sbrDecoder_drcApplySlot(HANDLE_SBR_DRC_CHANNEL hDrcData, if (hDrcData->winSequenceNext != 2) { /* next: long window */ int j = col - (numQmfSubSamples >> 1); - if (hDrcData->drcInterpolationSchemeNext == 0) { - INT k = (frameLenFlag) ? 0x4444445 : 0x4000000; + if (j < winBorderToColMap[15]) { + if (hDrcData->drcInterpolationSchemeNext == 0) { + INT k = (frameLenFlag) ? 0x4444445 : 0x4000000; - alphaValue = (FIXP_DBL)(j * k); - } else { - if (j >= (int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) { - alphaValue = (FIXP_DBL)MAXVAL_DBL; + alphaValue = (FIXP_DBL)(j * k); + } else { + if (j >= + (int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) { + alphaValue = (FIXP_DBL)MAXVAL_DBL; + } } + } else { + alphaValue = (FIXP_DBL)MAXVAL_DBL; } fact_mag = hDrcData->nextFact_mag; @@ -289,14 +299,19 @@ void sbrDecoder_drcApplySlot(HANDLE_SBR_DRC_CHANNEL hDrcData, if (hDrcData->winSequenceNext != 2) { /* long window */ int j = col - (numQmfSubSamples >> 1); - if (hDrcData->drcInterpolationSchemeNext == 0) { - INT k = (frameLenFlag) ? 0x4444445 : 0x4000000; + if (j < winBorderToColMap[15]) { + if (hDrcData->drcInterpolationSchemeNext == 0) { + INT k = (frameLenFlag) ? 0x4444445 : 0x4000000; - alphaValue = (FIXP_DBL)(j * k); - } else { - if (j >= (int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) { - alphaValue = (FIXP_DBL)MAXVAL_DBL; + alphaValue = (FIXP_DBL)(j * k); + } else { + if (j >= + (int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) { + alphaValue = (FIXP_DBL)MAXVAL_DBL; + } } + } else { + alphaValue = (FIXP_DBL)MAXVAL_DBL; } } else { /* short windows */ shortDrc = 1; |