From caec0b360e69aa746d27ca4166994e5e810e43ce Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Thu, 6 Mar 2025 18:40:51 +0530 Subject: [PATCH] Fix for 3GPP issue 1344: Decoder segfault for Stereo at 24.4kbps in ivas_fec_noise_filling_fx() Link #1344 --- lib_dec/FEC_HQ_phase_ecu_fx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib_dec/FEC_HQ_phase_ecu_fx.c b/lib_dec/FEC_HQ_phase_ecu_fx.c index dd63b6508..34d01d7fe 100644 --- a/lib_dec/FEC_HQ_phase_ecu_fx.c +++ b/lib_dec/FEC_HQ_phase_ecu_fx.c @@ -4595,11 +4595,11 @@ static void ivas_fec_noise_filling_fx( { L_tmp = L_mult( *sinq_tab, *sinq_tab ); /*Q30 */ 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_mac( L_tmp, shr( *pt6++, Q_old_out ), q2 ); /*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( L_tmp, L_shr( Mpy_32_16_1( L_deposit_h( *pt6++ ), q2 ), Q_old_out ) ); /*Qsynth+16 */ + ( *pt1++ ) = round_fx( L_tmp ); /*Qsynth */ move16(); } -- GitLab