Commit 9cebb0de authored by ber's avatar ber
Browse files

fixed build error - currently REPLACE_DIV_BY_SQRT 012345, increased isqrt precision

parent 6aa3adfa
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -433,9 +433,12 @@ static Word16 ISqrt16_common( Word16 m,
static Word32 ISqrt32_common( Word32 m,
                              Word16 e )
{
    Word16 m16, index, frac;
    Word16 index;
#ifndef ISqrt32_common_INCREASEPRECISION
    Word16 m16, frac;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
#endif

    assert( m >= 0x40000000 );
+17 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@
#define FIX_1072_REPLACE_DIV_SQRT_BY_ISQRT_3 //--> Leave this inactive (pipeline 45347 )
#define FIX_1072_REPLACE_DIV_SQRT_BY_ISQRT_4
#define FIX_1072_REPLACE_DIV_SQRT_BY_ISQRT_5
//#define FIX_1072_REPLACE_DIV_SQRT_BY_ISQRT_5_light
#endif

//#define FIX_1072_REDUCE_DIVS // accept regressions!
@@ -5141,6 +5142,22 @@ static void formulate2x2MixingMatrix_fx(
        div_fx[1] = ISqrt32( D_fx[1], &exp1 );
        move32();
    }
#elif defined( FIX_1072_REPLACE_DIV_SQRT_BY_ISQRT ) && defined( FIX_1072_REPLACE_DIV_SQRT_BY_ISQRT_5_light )

    exp1 = 20;
    move32();
    div_fx[1] = 2047986068;
    move32();


    IF( D_fx[1] != 0 )
    {
        temp = BASOP_Util_Divide3232_Scale_cadence( ONE_IN_Q30, D_fx[1], &exp1 );
        exp1 = sub( exp1, sub( Q30, q_D ) );
        div_fx[1] = Sqrt32( temp, &exp1 ); // Q = 31 - exp1
        move32();
    }

#else
    IF( D_fx[1] == 0 )
    {