aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src/intensity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libAACenc/src/intensity.cpp')
-rw-r--r--libAACenc/src/intensity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libAACenc/src/intensity.cpp b/libAACenc/src/intensity.cpp
index a160a4f..8cb1b45 100644
--- a/libAACenc/src/intensity.cpp
+++ b/libAACenc/src/intensity.cpp
@@ -747,9 +747,9 @@ void FDKaacEnc_IntensityStereoProcessing(
j++) {
s = ((mdctSpectrumLeft[j] << s0) >> 1) +
((mdctSpectrumRight[j] << s0) >> 1);
- es += fMultDiv2(s, s) >>
+ es = fAddSaturate(es, fMultDiv2(s, s) >>
(MDCT_SPEC_SF -
- 1); // scaled 2*(mdctScale - s0 + 1) + MDCT_SPEC_SF
+ 1)); // scaled 2*(mdctScale - s0 + 1) + MDCT_SPEC_SF
}
msMask[sfb + sfboffs] = 0;
tmp = fDivNorm(sfbEnergyLeft[sfb + sfboffs], es, &s1);