aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-11-05 07:32:27 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-11-05 07:32:27 +0000
commit589008f5125b30202885fdae34e8a843190c9dff (patch)
tree80e5f3acddf7dd5c814df92d65d6c07f1140c207
parentf7d8e3e2d746f597d4723991dbe8f6dd21514552 (diff)
parentbb75c081ed53b4f01ef202da3799a92705acfde0 (diff)
downloadfdk-aac-589008f5125b30202885fdae34e8a843190c9dff.tar.gz
fdk-aac-589008f5125b30202885fdae34e8a843190c9dff.tar.bz2
fdk-aac-589008f5125b30202885fdae34e8a843190c9dff.zip
Snap for 4434599 from bb75c081ed53b4f01ef202da3799a92705acfde0 to pi-release
Change-Id: Ie027781ff119fe215f492bacc830febaf156d523
-rw-r--r--libSBRdec/src/lpp_tran.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/libSBRdec/src/lpp_tran.cpp b/libSBRdec/src/lpp_tran.cpp
index 117e739..343aec3 100644
--- a/libSBRdec/src/lpp_tran.cpp
+++ b/libSBRdec/src/lpp_tran.cpp
@@ -293,7 +293,7 @@ void lppTransposer (HANDLE_SBR_LPP_TRANS hLppTrans, /*!< Handle of lpp transp
}
/* init bwIndex for each patch */
- FDKmemclear(bwIndex, pSettings->noOfPatches*sizeof(INT));
+ FDKmemclear(bwIndex, MAX_NUM_PATCHES*sizeof(INT));
/*
Calc common low band scale factor
@@ -621,9 +621,9 @@ void lppTransposer (HANDLE_SBR_LPP_TRANS hLppTrans, /*!< Handle of lpp transp
FDK_ASSERT( hiBand < (64) );
/* bwIndex[patch] is already initialized with value from previous band inside this patch */
- while (hiBand >= pSettings->bwBorders[bwIndex[patch]])
+ while (hiBand >= pSettings->bwBorders[bwIndex[patch]] && bwIndex[patch] < MAX_NUM_PATCHES-1) {
bwIndex[patch]++;
-
+ }
/*
Filter Step 2: add the left slope with the current filter to the buffer
@@ -962,6 +962,10 @@ resetLppTransposer (HANDLE_SBR_LPP_TRANS hLppTrans, /*!< Handle of lpp transpos
for(i = 0 ; i < noNoiseBands; i++){
pSettings->bwBorders[i] = noiseBandTable[i+1];
}
+ for (;i < MAX_NUM_NOISE_VALUES; i++) {
+ pSettings->bwBorders[i] = 255;
+ }
+
/*
* Choose whitening factors