mirror of https://github.com/mstorsjo/fdk-aac.git
Merge "Avoid signed integer overflow in combineSignalCplxScale2()." into sc-dev am: ab332a940d
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/aac/+/14387474 Change-Id: I02836ed3daff3993c8bcce77665e977c8f6ff6a3
This commit is contained in:
commit
6625b74402
|
@ -252,12 +252,15 @@ inline void combineSignalCplxScale2(FIXP_DBL *hybOutputRealDry,
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
for (n = bands - 1; n >= 0; n--) {
|
for (n = bands - 1; n >= 0; n--) {
|
||||||
*hybOutputRealDry =
|
*hybOutputRealDry = SATURATE_LEFT_SHIFT(
|
||||||
*hybOutputRealDry +
|
(*hybOutputRealDry >> 1) +
|
||||||
(fMultDiv2(*hybOutputRealWet, scaleX) << (SF_SCALE + 1));
|
(fMultDiv2(*hybOutputRealWet, scaleX) << SF_SCALE),
|
||||||
*hybOutputImagDry =
|
1, DFRACT_BITS);
|
||||||
*hybOutputImagDry +
|
*hybOutputImagDry = SATURATE_LEFT_SHIFT(
|
||||||
(fMultDiv2(*hybOutputImagWet, scaleX) << (SF_SCALE + 1));
|
(*hybOutputImagDry >> 1) +
|
||||||
|
(fMultDiv2(*hybOutputImagWet, scaleX) << SF_SCALE),
|
||||||
|
1, DFRACT_BITS);
|
||||||
|
;
|
||||||
hybOutputRealDry++, hybOutputRealWet++;
|
hybOutputRealDry++, hybOutputRealWet++;
|
||||||
hybOutputImagDry++, hybOutputImagWet++;
|
hybOutputImagDry++, hybOutputImagWet++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue