mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-01-30 23:45:09 +01:00
Merge "Avoid signed integer overflow in combineSignalCplxScale2()." into sc-dev
This commit is contained in:
commit
ab332a940d
@ -252,12 +252,15 @@ inline void combineSignalCplxScale2(FIXP_DBL *hybOutputRealDry,
|
||||
int n;
|
||||
|
||||
for (n = bands - 1; n >= 0; n--) {
|
||||
*hybOutputRealDry =
|
||||
*hybOutputRealDry +
|
||||
(fMultDiv2(*hybOutputRealWet, scaleX) << (SF_SCALE + 1));
|
||||
*hybOutputImagDry =
|
||||
*hybOutputImagDry +
|
||||
(fMultDiv2(*hybOutputImagWet, scaleX) << (SF_SCALE + 1));
|
||||
*hybOutputRealDry = SATURATE_LEFT_SHIFT(
|
||||
(*hybOutputRealDry >> 1) +
|
||||
(fMultDiv2(*hybOutputRealWet, scaleX) << SF_SCALE),
|
||||
1, DFRACT_BITS);
|
||||
*hybOutputImagDry = SATURATE_LEFT_SHIFT(
|
||||
(*hybOutputImagDry >> 1) +
|
||||
(fMultDiv2(*hybOutputImagWet, scaleX) << SF_SCALE),
|
||||
1, DFRACT_BITS);
|
||||
;
|
||||
hybOutputRealDry++, hybOutputRealWet++;
|
||||
hybOutputImagDry++, hybOutputImagWet++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user