aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-10-08 15:10:34 +0300
committerMartin Storsjo <martin@martin.st>2019-10-08 15:10:34 +0300
commit10fcf89a3ee22443ac47374c3fcbf0cf2eee7f07 (patch)
tree9c18f5ddf37223d6e55633477940b632281341b0
parent3e6e1b2097e8960b0f6ca9b3cec6638d5b6edf49 (diff)
downloadfdk-aac-10fcf89a3ee22443ac47374c3fcbf0cf2eee7f07.tar.gz
fdk-aac-10fcf89a3ee22443ac47374c3fcbf0cf2eee7f07.tar.bz2
fdk-aac-10fcf89a3ee22443ac47374c3fcbf0cf2eee7f07.zip
Revert "Reapply: Avoid reading out of bounds due to negative aaIccIndexMapped"
This reverts commit e6bb25613016ecd64ccbcb354768b4794ffd6351. It seems like this isn't needed any longer on the latest upstream version.
-rw-r--r--libSBRdec/src/psdec.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/libSBRdec/src/psdec.cpp b/libSBRdec/src/psdec.cpp
index 1f8bd25..13a21bf 100644
--- a/libSBRdec/src/psdec.cpp
+++ b/libSBRdec/src/psdec.cpp
@@ -329,7 +329,7 @@ void initSlotBasedRotation(
FIXP_SGL invL;
FIXP_DBL ScaleL, ScaleR;
- FIXP_DBL Alpha, Beta, AlphasValue;
+ FIXP_DBL Alpha, Beta;
FIXP_DBL h11r, h12r, h21r, h22r;
const FIXP_DBL *PScaleFactors;
@@ -363,15 +363,12 @@ void initSlotBasedRotation(
ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.pCoef
->aaIidIndexMapped[env][bin]];
- AlphasValue = 0;
- if (h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin] >= 0)
- AlphasValue = Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]];
Beta = fMult(
- fMult(AlphasValue,
+ fMult(Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]],
(ScaleR - ScaleL)),
FIXP_SQRT05);
Alpha =
- AlphasValue >> 1;
+ Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]] >> 1;
/* Alpha and Beta are now both scaled by 2 shifts right */