summaryrefslogtreecommitdiffstats
path: root/libAACenc
diff options
context:
space:
mode:
Diffstat (limited to 'libAACenc')
-rw-r--r--libAACenc/src/aacenc_tns.cpp4
-rw-r--r--libAACenc/src/grp_data.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/libAACenc/src/aacenc_tns.cpp b/libAACenc/src/aacenc_tns.cpp
index 933e4e7..fbff424 100644
--- a/libAACenc/src/aacenc_tns.cpp
+++ b/libAACenc/src/aacenc_tns.cpp
@@ -1150,8 +1150,8 @@ static INT FDKaacEnc_AutoToParcor(
for(j=numOfCoeff-i-1; j>=0; j--) {
FIXP_DBL accu1 = fMult(tmp, input[j]);
FIXP_DBL accu2 = fMult(tmp, workBuffer[j]);
- workBuffer[j] += accu1;
- input[j] += accu2;
+ workBuffer[j] = fAddSaturate(workBuffer[j], accu1);
+ input[j] = fAddSaturate(input[j], accu2);
}
workBuffer++;
diff --git a/libAACenc/src/grp_data.cpp b/libAACenc/src/grp_data.cpp
index 03d4976..7adcb21 100644
--- a/libAACenc/src/grp_data.cpp
+++ b/libAACenc/src/grp_data.cpp
@@ -195,7 +195,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
FIXP_DBL energy = sfbEnergy->Short[wnd][sfb];
for (j=1; j<groupLen[grp]; j++)
{
- energy += sfbEnergy->Short[wnd+j][sfb];
+ energy = fAddSaturate(energy, sfbEnergy->Short[wnd+j][sfb]);
}
sfbEnergy->Long[i++] = energy;
}