aboutsummaryrefslogtreecommitdiffstats
path: root/fdk-aac/libSACdec/src/sac_bitdec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fdk-aac/libSACdec/src/sac_bitdec.cpp')
-rw-r--r--fdk-aac/libSACdec/src/sac_bitdec.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/fdk-aac/libSACdec/src/sac_bitdec.cpp b/fdk-aac/libSACdec/src/sac_bitdec.cpp
index 062eb1c..708ddf1 100644
--- a/fdk-aac/libSACdec/src/sac_bitdec.cpp
+++ b/fdk-aac/libSACdec/src/sac_bitdec.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 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -1555,22 +1555,20 @@ static SACDEC_ERROR mapIndexData(
/* Interpolate */
i1 = 0;
for (i = 0; i < numParameterSets; i++) {
- int xi, i2, x1, x2;
-
if (aInterpolate[i] != 1) {
i1 = i;
- }
- i2 = i;
- while (aInterpolate[i2] == 1) {
- i2++;
- if (i2 >= MAX_PARAMETER_SETS) return MPS_WRONG_PARAMETERSETS;
- }
- x1 = paramSlot[i1];
- xi = paramSlot[i];
- x2 = paramSlot[i2];
+ } else {
+ int xi, i2, x1, x2;
- if (aInterpolate[i] == 1) {
+ for (i2 = i; i2 < numParameterSets; i2++) {
+ if (aInterpolate[i2] != 1) break;
+ }
if (i2 >= numParameterSets) return MPS_WRONG_PARAMETERSETS;
+
+ x1 = paramSlot[i1];
+ xi = paramSlot[i];
+ x2 = paramSlot[i2];
+
for (band = startBand; band < stopBand; band++) {
int yi, y1, y2;
y1 = outputIdxData[xttIdx][i1][band];
@@ -1589,9 +1587,9 @@ static SACDEC_ERROR mapIndexData(
for (ps = 0; ps < numParameterSets; ps++) {
if (quantMode && (paramType == t_CLD)) {
if (pOttVsTotDbIn == 0) return MPS_WRONG_OTT;
- if ((pOttVsTotDb1 == 0) && (ottVsTotDbMode == ottVsTotDb1Activ))
+ if ((pOttVsTotDb1 == 0) && (ottVsTotDbMode & ottVsTotDb1Activ))
return MPS_WRONG_OTT;
- if ((pOttVsTotDb2 == 0) && (ottVsTotDbMode == ottVsTotDb2Activ))
+ if ((pOttVsTotDb2 == 0) && (ottVsTotDbMode & ottVsTotDb2Activ))
return MPS_WRONG_OTT;
for (pb = startBand; pb < stopBand; pb++) {
@@ -1613,6 +1611,10 @@ static SACDEC_ERROR mapIndexData(
} /* for( i = 0 ; i < numParameterSets; i++ ) */
if (extendFrame) {
+ if (paramType == t_IPD) {
+ llData->bsQuantCoarseXXX[numParameterSets] =
+ llData->bsQuantCoarseXXX[numParameterSets - 1];
+ }
for (band = startBand; band < stopBand; band++) {
outputDataIdx[xttIdx][numParameterSets][band] =
outputDataIdx[xttIdx][numParameterSets - 1][band];