summaryrefslogtreecommitdiffstats
path: root/libSBRdec/src/env_dec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libSBRdec/src/env_dec.cpp')
-rw-r--r--libSBRdec/src/env_dec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libSBRdec/src/env_dec.cpp b/libSBRdec/src/env_dec.cpp
index 5aa5ba7..24b2d3b 100644
--- a/libSBRdec/src/env_dec.cpp
+++ b/libSBRdec/src/env_dec.cpp
@@ -624,8 +624,8 @@ timeCompensateFirstEnvelope (HANDLE_SBR_HEADER_DATA hHeaderData, /*!< Static con
deltaExp = FDK_getNumOctavesDiv8(newLen, refLen);
- /* Shift by -3 to rescale ld-table, 1-ampRes to enable coarser steps */
- shift = (FRACT_BITS - 1 - ENV_EXP_FRACT + 1 - h_sbr_data->ampResolutionCurrentFrame - 3);
+ /* Shift by -3 to rescale ld-table, ampRes-1 to enable coarser steps */
+ shift = (FRACT_BITS - 1 - ENV_EXP_FRACT - 1 + h_sbr_data->ampResolutionCurrentFrame - 3);
deltaExp = deltaExp >> shift;
pFrameInfo->borders[0] = estimatedStartPos;
pFrameInfo->bordersNoise[0] = estimatedStartPos;