aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRenc/src/env_est.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libSBRenc/src/env_est.cpp')
-rw-r--r--libSBRenc/src/env_est.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libSBRenc/src/env_est.cpp b/libSBRenc/src/env_est.cpp
index cc8780a..e7eea37 100644
--- a/libSBRenc/src/env_est.cpp
+++ b/libSBRenc/src/env_est.cpp
@@ -637,8 +637,8 @@ static FIXP_DBL getEnvSfbEnergy(
for (; l < stop_pos; l++) {
nrg2 += YBuffer[l >> YBufferSzShift][k] >> sc1;
}
- accu1 += (nrg1 >> dynScale1);
- accu2 += (nrg2 >> dynScale2);
+ accu1 = fAddSaturate(accu1, (nrg1 >> dynScale1));
+ accu2 = fAddSaturate(accu2, (nrg2 >> dynScale2));
}
/* This shift factor is always positive. See comment above. */
nrgSum +=