Commit c51d0cad authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1782_fix' into 'main'

Fix for 3GPP issue 1782: Assert in IVAS_rend with MASA + MC input to MASA output

See merge request !1844
parents 6c320724 ff28a581
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -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;