Commit 7fc39792 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

computeMixingMatricesResidual_fx function updates for MC path

parent eeb2eb40
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@
#define MSAN_FIX
#define FIX_818_COMPLEXITY_IMPROV /* Fix for issue 818 */
#define FIX_805_VERIFICATION /* Fix for issue 805 */
#define FIX_827_HIGH_MLD /* Fix for issue 827 */
#endif
#define ISM_DISABLE
#define FIX_TMP_714
+21 −0
Original line number Diff line number Diff line
@@ -1722,7 +1722,11 @@ Word16 computeMixingMatrices_fx(
    matrix_product_mant_exp_fx( Q_fx, Q_e, lengthCy, lengthCx, 0, Cx_fx, Cx_fx_e, lengthCx, lengthCx, 0, Q_Cx_fx, &Q_Cx_e );

    Word16 guard_bits;
#ifdef FIX_827_HIGH_MLD
    guard_bits = find_guarded_bits_fx( lengthCx );
#else
    guard_bits = find_guarded_bits_fx( lengthCx + 1 );
#endif

    FOR( i = 0; i < lengthCy * lengthCx; ++i )
    {
@@ -1760,11 +1764,18 @@ Word16 computeMixingMatrices_fx(
            move16();
        }

#ifndef FIX_827_HIGH_MLD
        L_tmp = Mpy_32_32( limit_fx, reg_ghat_fx );
        limit_fx = L_add( L_tmp, EPSILON_FX );
        limit_e = add( limit_e, reg_ghat_e );
        move16();
#endif
    }
#ifdef FIX_827_HIGH_MLD
    L_tmp = Mpy_32_32( limit_fx, reg_ghat_fx );
    limit_fx = L_add( L_tmp, EPSILON_FX );
    limit_e = add( limit_e, reg_ghat_e );
#endif


    FOR( i = 0; i < lengthCy; ++i )
@@ -2532,8 +2543,13 @@ Word16 computeMixingMatricesResidual_fx(

        FOR( j = 0; j < num_outputs; j++ )
        {
#ifdef FIX_827_HIGH_MLD
            L_tmp = Mpy_32_32( mat_mult_buffer1_fx[add( j, imult1616( i, extract_l( num_outputs ) ) )], fac_fx );
            mixing_matrix_fx[add( j, imult1616( i, extract_l( num_outputs ) ) )] = L_tmp;
#else
            L_tmp = Mpy_32_32( mat_mult_buffer1_fx[add( j, imult1616( j, extract_l( num_outputs ) ) )], fac_fx );
            mixing_matrix_fx[add( j, imult1616( j, extract_l( num_outputs ) ) )] = L_tmp;
#endif
            move32();
            mixing_matrix_e = add( mat_mult_buffer1_e, Kx_reg_inv_fx_e );
            move16();
@@ -2548,7 +2564,12 @@ Word16 computeMixingMatricesResidual_fx(

    matrix_diag_product_fx( mixing_matrix_fx, mixing_matrix_e, lengthCy, lengthCx, 0, Cx_fx, Cx_e, lengthCx, mat_mult_buffer1_fx, &mat_mult_buffer1_e );

#ifdef FIX_827_HIGH_MLD
    Word16 guard_bits;
    guard_bits = find_guarded_bits_fx( lengthCx );
#else
    Word16 guard_bits = find_guarded_bits_fx( lengthCx + 1 );
#endif

    FOR( i = 0; i < lengthCy * lengthCx; ++i )
    {
+8 −0
Original line number Diff line number Diff line
@@ -714,7 +714,11 @@ static Word16 BidagonalDiagonalisation_fx(
            }
            ELSE
            {
#ifdef FIX_827_HIGH_MLD
                IF( GE_16( iteration, SVD_MAX_NUM_ITERATION ) )
#else
                IF( GT_16( iteration, SVD_MAX_NUM_ITERATION ) )
#endif
                {
                    IF( LT_32( singularValues_fx[iCh], 0 ) )
                    {
@@ -1416,7 +1420,11 @@ IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */
        }

        r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][idx] ), sing_exp[currChannel], -norm_x, norm_x_e, &r_e );
#ifdef FIX_827_HIGH_MLD
        singularVectors[currChannel][idx] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][idx], sing_exp[currChannel], -( *g ), 0, &sing_exp[currChannel] );
#else
        singularVectors[currChannel][idx] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][idx], sing_exp[idx], -( *g ), 0, &sing_exp[currChannel] );
#endif
        move32();

        FOR( iCh = currChannel + 1; iCh < nChannelsC; iCh++ ) /* nChannelsC */