aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2012-08-10 11:16:23 +0300
committerMartin Storsjo <martin@martin.st>2012-08-10 11:21:10 +0300
commit010c75901e4e01aab6ac8a26c71f2192f454d659 (patch)
tree70704a23576e1371c0736e8135a01a81d304a551 /libAACenc/src
parent24021f1909ffdc5025952500bc706bf39baf89b0 (diff)
downloadfdk-aac-010c75901e4e01aab6ac8a26c71f2192f454d659.tar.gz
fdk-aac-010c75901e4e01aab6ac8a26c71f2192f454d659.tar.bz2
fdk-aac-010c75901e4e01aab6ac8a26c71f2192f454d659.zip
Use saturating adds in all other similar loops in groupShortData as well
Diffstat (limited to 'libAACenc/src')
-rw-r--r--libAACenc/src/grp_data.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libAACenc/src/grp_data.cpp b/libAACenc/src/grp_data.cpp
index 7adcb21..88a01ba 100644
--- a/libAACenc/src/grp_data.cpp
+++ b/libAACenc/src/grp_data.cpp
@@ -177,7 +177,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
FIXP_DBL thresh = sfbThreshold->Short[wnd][sfb];
for (j=1; j<groupLen[grp]; j++)
{
- thresh += sfbThreshold->Short[wnd+j][sfb];
+ thresh = fAddSaturate(thresh, sfbThreshold->Short[wnd+j][sfb]);
}
sfbThreshold->Long[i++] = thresh;
}
@@ -213,7 +213,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
FIXP_DBL energy = sfbEnergyMS->Short[wnd][sfb];
for (j=1; j<groupLen[grp]; j++)
{
- energy += sfbEnergyMS->Short[wnd+j][sfb];
+ energy = fAddSaturate(energy, sfbEnergyMS->Short[wnd+j][sfb]);
}
sfbEnergyMS->Long[i++] = energy;
}
@@ -231,7 +231,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
FIXP_DBL energy = sfbSpreadEnergy->Short[wnd][sfb];
for (j=1; j<groupLen[grp]; j++)
{
- energy += sfbSpreadEnergy->Short[wnd+j][sfb];
+ energy = fAddSaturate(energy, sfbSpreadEnergy->Short[wnd+j][sfb]);
}
sfbSpreadEnergy->Long[i++] = energy;
}