Fix for sub-oveflow in ixheaacd_tns_ar_filter_fixed_armv8

Added check for subtraction overflow.

Bug:129251257
Test: vendor
Change-Id: I318705f48d0fd0ef2ca14c258cbf6b9113852da1
This commit is contained in:
Sushanth Patil 2019-03-26 17:50:19 +05:30 • committed by Ray Essick
parent a2def9547e
commit 1df4b16f92

View file

@ -349,7 +349,7 @@ VOID ixheaacd_tns_ar_filter_fixed_armv8(WORD32 *spectrum, WORD32 size,
}
acc1 = (WORD32)(acc >> 32);
y = ixheaacd_sub32(y, ixheaacd_shl32_sat(acc1, 1));
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc1, 1));
state[0] = ixheaacd_shl32_sat(y, shift_value);
*spectrum = y >> scale_spec;