From ff28a5814d5d7af413ec11e5b8d217acf8f90133 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 1 Jul 2025 11:32:01 +0530 Subject: [PATCH] Fix for 3GPP issue 1782: Assert in IVAS_rend with MASA + MC input to MASA output Link #1782 --- lib_rend/ivas_mcmasa_ana_fx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib_rend/ivas_mcmasa_ana_fx.c b/lib_rend/ivas_mcmasa_ana_fx.c index 3cb2c4fcf..99af8a0af 100644 --- a/lib_rend/ivas_mcmasa_ana_fx.c +++ b/lib_rend/ivas_mcmasa_ana_fx.c @@ -959,29 +959,27 @@ void ivas_mcmasa_param_est_ana_fx( IF( LT_16( i1, i2 ) ) { temp_e = add( lsEnergy_e[i1], lsEnergy_e[i2] ); - tempCoh_fx = BASOP_Util_Divide3232_Scale( absCOVls_fx[i1][i2], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i2] ), EPSILON_FX ), &temp_e ) ), &tempCoh_e ); + tempCoh_fx = BASOP_Util_Divide3232_Scale_newton( absCOVls_fx[i1][i2], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i2] ), EPSILON_FX ), &temp_e ) ), &tempCoh_e ); tempCoh_e = add( tempCoh_e, sub( absCOVls_e[i1][i2], temp_e ) ); } ELSE { temp_e = add( lsEnergy_e[i1], lsEnergy_e[i2] ); - tempCoh_fx = BASOP_Util_Divide3232_Scale( absCOVls_fx[i2][i1], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i2] ), EPSILON_FX ), &temp_e ) ), &tempCoh_e ); + tempCoh_fx = BASOP_Util_Divide3232_Scale_newton( absCOVls_fx[i2][i1], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i2] ), EPSILON_FX ), &temp_e ) ), &tempCoh_e ); tempCoh_e = add( tempCoh_e, sub( absCOVls_e[i2][i1], temp_e ) ); } - tempCoh_fx = L_shl( tempCoh_fx, 16 ); IF( LT_16( i1, i3 ) ) { temp_e = add( lsEnergy_e[i1], lsEnergy_e[i3] ); - tempCoh2_fx = BASOP_Util_Divide3232_Scale( absCOVls_fx[i1][i3], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i3] ), EPSILON_FX ), &temp_e ) ), &tempCoh2_e ); + tempCoh2_fx = BASOP_Util_Divide3232_Scale_newton( absCOVls_fx[i1][i3], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i3] ), EPSILON_FX ), &temp_e ) ), &tempCoh2_e ); tempCoh2_e = add( tempCoh2_e, sub( absCOVls_e[i1][i3], temp_e ) ); } ELSE { temp_e = add( lsEnergy_e[i1], lsEnergy_e[i3] ); - tempCoh2_fx = BASOP_Util_Divide3232_Scale( absCOVls_fx[i3][i1], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i3] ), EPSILON_FX ), &temp_e ) ), &tempCoh2_e ); + tempCoh2_fx = BASOP_Util_Divide3232_Scale_newton( absCOVls_fx[i3][i1], ( Sqrt32( L_add( Mult_32_32( lsEnergy_fx[i1], lsEnergy_fx[i3] ), EPSILON_FX ), &temp_e ) ), &tempCoh2_e ); tempCoh2_e = add( tempCoh2_e, sub( absCOVls_e[i3][i1], temp_e ) ); } - tempCoh2_fx = L_shl( tempCoh2_fx, 16 ); IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( tempCoh_fx, tempCoh_e, tempCoh2_fx, tempCoh2_e ), -1 ) ) { cohPanCoh_fx = tempCoh_fx; -- GitLab