From 6ed7ba270608ea31f61e5ed9ebc51d7eb24ada98 Mon Sep 17 00:00:00 2001 From: Anjaneyulu Sana Date: Tue, 15 Apr 2025 17:03:53 +0530 Subject: [PATCH 1/2] Fix for 3GPP issue 1479: Renderer crashes for MASA long test vector input --- lib_rend/ivas_dirac_rend_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_rend/ivas_dirac_rend_fx.c b/lib_rend/ivas_dirac_rend_fx.c index 03831e407..030287b7f 100644 --- a/lib_rend/ivas_dirac_rend_fx.c +++ b/lib_rend/ivas_dirac_rend_fx.c @@ -4166,7 +4166,7 @@ static void ivas_masa_ext_dirac_render_sf_fx( hDirACRend->h_output_synthesis_psd_state.direct_power_factor_fx[i] = L_add( hDirACRend->h_output_synthesis_psd_state.direct_power_factor_fx[i], surCohEner_fx ); // q29 move32(); - surCohRatio_fx[i] = L_deposit_h( BASOP_Util_Divide3232_Scale( surCohEner_fx, L_add( L_add( 1, dirEne_fx ), surCohEner_fx ), &surCohRatio_exp[i] ) ); // 31-surCohRatio_exp + surCohRatio_fx[i] = BASOP_Util_Divide3232_Scale_cadence( surCohEner_fx, L_add( L_add( 1, dirEne_fx ), surCohEner_fx ), &surCohRatio_exp[i] ); // 31-surCohRatio_exp move32(); temp_exp = s_max( temp_exp, surCohRatio_exp[i] ); } @@ -4961,7 +4961,7 @@ static void ivas_masa_ext_dirac_render_sf_fx( hSpatParamRendCom->num_freq_bands ) ); } } - scale_factor = sub( scale_factor, 3 ); // guard bits + scale_factor = sub( scale_factor, find_guarded_bits_fx( hSpatParamRendCom->num_freq_bands ) ); // guard bits FOR( ch = 0; ch < hDirACRend->num_outputs_dir; ch++ ) { -- GitLab From f1e41eb33e60dbf624ddf474d5e25af517b88aa8 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Wed, 23 Apr 2025 17:06:22 +0530 Subject: [PATCH 2/2] Replace BASOP_Util_Divide3232_Scale_cadence() with BASOP_Util_Divide3232_Scale_newton() --- lib_rend/ivas_dirac_rend_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_dirac_rend_fx.c b/lib_rend/ivas_dirac_rend_fx.c index 030287b7f..2f748289a 100644 --- a/lib_rend/ivas_dirac_rend_fx.c +++ b/lib_rend/ivas_dirac_rend_fx.c @@ -4166,7 +4166,7 @@ static void ivas_masa_ext_dirac_render_sf_fx( hDirACRend->h_output_synthesis_psd_state.direct_power_factor_fx[i] = L_add( hDirACRend->h_output_synthesis_psd_state.direct_power_factor_fx[i], surCohEner_fx ); // q29 move32(); - surCohRatio_fx[i] = BASOP_Util_Divide3232_Scale_cadence( surCohEner_fx, L_add( L_add( 1, dirEne_fx ), surCohEner_fx ), &surCohRatio_exp[i] ); // 31-surCohRatio_exp + surCohRatio_fx[i] = BASOP_Util_Divide3232_Scale_newton( surCohEner_fx, L_add( L_add( 1, dirEne_fx ), surCohEner_fx ), &surCohRatio_exp[i] ); // 31-surCohRatio_exp move32(); temp_exp = s_max( temp_exp, surCohRatio_exp[i] ); } -- GitLab