mirror of https://github.com/mstorsjo/fdk-aac.git
Make sure that alphaValue is correctly initialized in sbrDecoder_drcApplySlot().
Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I5bded2e3d29278bb5df561eaa2a46d963ee21df8
This commit is contained in:
parent
3ebe6ffe95
commit
150febcc65
|
@ -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,15 +233,20 @@ void sbrDecoder_drcApplySlot(HANDLE_SBR_DRC_CHANNEL hDrcData,
|
|||
if (hDrcData->winSequenceCurr != 2) { /* long window */
|
||||
int j = col + (numQmfSubSamples >> 1);
|
||||
|
||||
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]) {
|
||||
if (j >=
|
||||
(int)winBorderToColMap[hDrcData->drcInterpolationSchemeCurr]) {
|
||||
alphaValue = (FIXP_DBL)MAXVAL_DBL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alphaValue = (FIXP_DBL)MAXVAL_DBL;
|
||||
}
|
||||
} else { /* short windows */
|
||||
shortDrc = 1;
|
||||
}
|
||||
|
@ -254,15 +259,20 @@ void sbrDecoder_drcApplySlot(HANDLE_SBR_DRC_CHANNEL hDrcData,
|
|||
if (hDrcData->winSequenceNext != 2) { /* next: long window */
|
||||
int j = col - (numQmfSubSamples >> 1);
|
||||
|
||||
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]) {
|
||||
if (j >=
|
||||
(int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) {
|
||||
alphaValue = (FIXP_DBL)MAXVAL_DBL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alphaValue = (FIXP_DBL)MAXVAL_DBL;
|
||||
}
|
||||
|
||||
fact_mag = hDrcData->nextFact_mag;
|
||||
fact_exp = hDrcData->nextFact_exp;
|
||||
|
@ -289,15 +299,20 @@ void sbrDecoder_drcApplySlot(HANDLE_SBR_DRC_CHANNEL hDrcData,
|
|||
if (hDrcData->winSequenceNext != 2) { /* long window */
|
||||
int j = col - (numQmfSubSamples >> 1);
|
||||
|
||||
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]) {
|
||||
if (j >=
|
||||
(int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) {
|
||||
alphaValue = (FIXP_DBL)MAXVAL_DBL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alphaValue = (FIXP_DBL)MAXVAL_DBL;
|
||||
}
|
||||
} else { /* short windows */
|
||||
shortDrc = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue