From 4daa1e064ea7bfb832467d3454c1f64bea014a54 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 25 Mar 2025 20:26:54 +0530 Subject: [PATCH] Fix for 3GPP issue 1437: Decoder crash for McMASA 5.1 at 32kbps JBM decoding in ivas_fec_noise_filling_fx() Link #1437 --- lib_dec/FEC_HQ_phase_ecu_fx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_dec/FEC_HQ_phase_ecu_fx.c b/lib_dec/FEC_HQ_phase_ecu_fx.c index b8c16474e..ef09c3de3 100644 --- a/lib_dec/FEC_HQ_phase_ecu_fx.c +++ b/lib_dec/FEC_HQ_phase_ecu_fx.c @@ -4565,13 +4565,13 @@ static void ivas_fec_noise_filling_fx( pt6 = &p_mdct_ola[0]; FOR( k = 0; k < tmp_fx; k++ ) { - L_tmp = L_mult( *sinq_tab, *sinq_tab ); /*Q30 */ + L_tmp = L_mult( *sinq_tab, *sinq_tab ); /*Q31 */ sinq_tab++; - q2 = round_fx( L_sub( 2147483647, L_tmp ) ); /*Q15 */ - q1 = round_fx( L_tmp ); /*Q15 */ - L_tmp = L_mult( ( *pt1 ), q1 ); /*Qsynth+16 */ - L_tmp = L_add( L_tmp, L_shr( Mpy_32_16_1( L_deposit_h( *pt6++ ), q2 ), Q_old_out ) ); /*Qsynth+16 */ - ( *pt1++ ) = round_fx( L_tmp ); /*Qsynth */ + q2 = round_fx( L_sub( 2147483647, L_tmp ) ); /*Q15 */ + q1 = round_fx( L_tmp ); /*Q15 */ + L_tmp = L_mult( ( *pt1 ), q1 ); /*Qsynth+16 */ + L_tmp = L_add_sat( L_tmp, L_shr_sat( Mpy_32_16_1( L_deposit_h( *pt6++ ), q2 ), Q_old_out ) ); /*Qsynth+16 */ + ( *pt1++ ) = round_fx_sat( L_tmp ); /*Qsynth */ move16(); } -- GitLab