aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRdec/src/lpp_tran.cpp
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-09-08 16:53:57 -0700
committerXin Li <delphij@google.com>2020-09-08 16:53:57 -0700
commit7f7e67fe023aa5e479aba0388a7e3fb591bda4e5 (patch)
tree0e353968c34e8c9699663a9b252836b70847c30b /libSBRdec/src/lpp_tran.cpp
parent946a672b0f5b8481eb3a429f854fcb34d847d692 (diff)
parent7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45 (diff)
downloadfdk-aac-7f7e67fe023aa5e479aba0388a7e3fb591bda4e5.tar.gz
fdk-aac-7f7e67fe023aa5e479aba0388a7e3fb591bda4e5.tar.bz2
fdk-aac-7f7e67fe023aa5e479aba0388a7e3fb591bda4e5.zip
Merge Android R
Bug: 168057903 Merged-In: Idcdb13a8c37b0b4b5446169c3e80dfe55586bc77 Change-Id: I29b7ae1003fb72aeb5fbf1fdfdceea849c1c12b8
Diffstat (limited to 'libSBRdec/src/lpp_tran.cpp')
-rw-r--r--libSBRdec/src/lpp_tran.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/libSBRdec/src/lpp_tran.cpp b/libSBRdec/src/lpp_tran.cpp
index 6acb626..93e1158 100644
--- a/libSBRdec/src/lpp_tran.cpp
+++ b/libSBRdec/src/lpp_tran.cpp
@@ -1014,8 +1014,8 @@ void lppTransposerHBE(
pSettings->nCols) +
lowBandShift);
- dynamicScale = fixMax(
- 0, dynamicScale - 1); /* one additional bit headroom to prevent -1.0 */
+ dynamicScale =
+ dynamicScale - 1; /* one additional bit headroom to prevent -1.0 */
/*
Scale temporal QMF buffer.
@@ -1194,6 +1194,9 @@ void lppTransposerHBE(
} else { /* bw <= 0 */
int descale = fixMin(DFRACT_BITS - 1, (LPC_SCALE_FACTOR + dynamicScale));
+ dynamicScale +=
+ 1; /* prevent negativ scale factor due to 'one additional bit
+ headroom' */
for (i = startSample; i < stopSample; i++) {
FIXP_DBL accu1, accu2;
@@ -1210,9 +1213,9 @@ void lppTransposerHBE(
dynamicScale;
qmfBufferReal[i][loBand] =
- (lowBandReal[LPC_ORDER + i] >> descale) + (accu1 << 1);
+ (lowBandReal[LPC_ORDER + i] >> descale) + (accu1 << (1 + 1));
qmfBufferImag[i][loBand] =
- (lowBandImag[LPC_ORDER + i] >> descale) + (accu2 << 1);
+ (lowBandImag[LPC_ORDER + i] >> descale) + (accu2 << (1 + 1));
}
} /* bw <= 0 */