Merge "Fix for integer overflow in ixheaacd_cplx_synt_qmffilt" am: bf603c488f

Original change: 1425113

Change-Id: Ic80a89d40b373832016ebbcbd85e3702f2383356
This commit is contained in:
Treehugger Robot 2020-09-30 02:18:47 +00:00 committed by Automerger Merge Worker
commit d836d24c78
2 changed files with 5 additions and 5 deletions

View file

@ -156,8 +156,8 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_shl(WORD32 a, WORD32 b,
return (result);
}
static PLATFORM_INLINE WORD32 mac32x16in32_shl_sat(WORD32 a, WORD32 b,
WORD16 c) {
static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_shl_sat(WORD32 a, WORD32 b,
WORD16 c) {
return (ixheaacd_add32_sat(a, ixheaacd_mult32x16in32_shl_sat(b, c)));
}

View file

@ -666,10 +666,10 @@ void ixheaacd_sbr_pre_twiddle(WORD32 *p_xre, WORD32 *p_xim,
WORD32 re, im;
re = ixheaacd_mac32x16in32_shl(
re = ixheaacd_mac32x16in32_shl_sat(
ixheaacd_mult32x16in32_shl(x_re, ixheaacd_cosine), x_im, ixheaacd_sine);
im = ixheaacd_sub32(ixheaacd_mult32x16in32_shl(x_im, ixheaacd_cosine),
ixheaacd_mult32x16in32_shl(x_re, ixheaacd_sine));
im = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(x_im, ixheaacd_cosine),
ixheaacd_mult32x16in32_shl(x_re, ixheaacd_sine));
*p_xre++ = re;
*p_xim++ = im;