diff --git a/decoder/ixheaacd_mps_bitdec.c b/decoder/ixheaacd_mps_bitdec.c index 83816890..b1fbf8da 100644 --- a/decoder/ixheaacd_mps_bitdec.c +++ b/decoder/ixheaacd_mps_bitdec.c @@ -1392,7 +1392,7 @@ static IA_ERRORCODE ixheaacd_factor_funct(WORD32 ott_vs_tot_db, WORD32 quant_mod WORD32 constfact; if (ott_vs_tot_db > 0) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM; - db_diff = -ott_vs_tot_db; + db_diff = ixheaac_negate32_sat(ott_vs_tot_db); switch (quant_mode) { case QUANT_MODE_0: @@ -1416,7 +1416,9 @@ static IA_ERRORCODE ixheaacd_factor_funct(WORD32 ott_vs_tot_db, WORD32 quant_mod if (db_diff > (x_linear << 5)) { WORD32 db_diff_fix = db_diff >> 5; - *factor = (db_diff_fix - (WORD32)x_linear) * constfact + ONE_IN_Q24; + *factor = ixheaac_add32_sat( + ixheaac_sat64_32(ixheaac_mult64(ixheaac_sub32_sat(db_diff_fix, x_linear), constfact)), + ONE_IN_Q24); } else { *factor = ONE_IN_Q24; } diff --git a/decoder/ixheaacd_mps_hybrid_filt.c b/decoder/ixheaacd_mps_hybrid_filt.c index 57177d32..60c1b7a4 100644 --- a/decoder/ixheaacd_mps_hybrid_filt.c +++ b/decoder/ixheaacd_mps_hybrid_filt.c @@ -760,15 +760,15 @@ VOID ixheaacd_apply_ana_hyb_filt_bank_create_x( *p_hybrid_re++ = m_temp_output_real[7]; *p_hybrid_re++ = m_temp_output_real[0]; *p_hybrid_re++ = m_temp_output_real[1]; - *p_hybrid_re++ = (m_temp_output_real[2] + m_temp_output_real[5]); - *p_hybrid_re++ = (m_temp_output_real[3] + m_temp_output_real[4]); + *p_hybrid_re++ = ixheaac_add32_sat(m_temp_output_real[2], m_temp_output_real[5]); + *p_hybrid_re++ = ixheaac_add32_sat(m_temp_output_real[3], m_temp_output_real[4]); *p_hybrid_im++ = m_temp_output_imag[6]; *p_hybrid_im++ = m_temp_output_imag[7]; *p_hybrid_im++ = m_temp_output_imag[0]; *p_hybrid_im++ = m_temp_output_imag[1]; - *p_hybrid_im++ = (m_temp_output_imag[2] + m_temp_output_imag[5]); - *p_hybrid_im++ = (m_temp_output_imag[3] + m_temp_output_imag[4]); + *p_hybrid_im++ = ixheaac_add32_sat(m_temp_output_imag[2], m_temp_output_imag[5]); + *p_hybrid_im++ = ixheaac_add32_sat(m_temp_output_imag[3], m_temp_output_imag[4]); ixheaacd_2ch_filtering( &(hyb_state->buffer_lf_real[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]), diff --git a/decoder/ixheaacd_mps_process.c b/decoder/ixheaacd_mps_process.c index 64663386..4d3e73f4 100644 --- a/decoder/ixheaacd_mps_process.c +++ b/decoder/ixheaacd_mps_process.c @@ -257,6 +257,7 @@ VOID ixheaacd_hybrid_qmf_analysis(ia_heaac_mps_state_struct *pstr_mps_state) { } } +ATTR_NO_SANITIZE_INTEGER VOID ixheaacd_merge_res_decor(ia_heaac_mps_state_struct *pstr_mps_state) { WORD32 ts, qs, row, res;