mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-01-23 12:21:07 +01:00
Use saturating adds in all other similar loops in groupShortData as well
This commit is contained in:
parent
24021f1909
commit
010c75901e
@ -177,7 +177,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
|
|||||||
FIXP_DBL thresh = sfbThreshold->Short[wnd][sfb];
|
FIXP_DBL thresh = sfbThreshold->Short[wnd][sfb];
|
||||||
for (j=1; j<groupLen[grp]; j++)
|
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;
|
sfbThreshold->Long[i++] = thresh;
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
|
|||||||
FIXP_DBL energy = sfbEnergyMS->Short[wnd][sfb];
|
FIXP_DBL energy = sfbEnergyMS->Short[wnd][sfb];
|
||||||
for (j=1; j<groupLen[grp]; j++)
|
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;
|
sfbEnergyMS->Long[i++] = energy;
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
|
|||||||
FIXP_DBL energy = sfbSpreadEnergy->Short[wnd][sfb];
|
FIXP_DBL energy = sfbSpreadEnergy->Short[wnd][sfb];
|
||||||
for (j=1; j<groupLen[grp]; j++)
|
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;
|
sfbSpreadEnergy->Long[i++] = energy;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user