Commit 244f515f authored by Fabian Bauer's avatar Fabian Bauer
Browse files

Revert "creating FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST"

This reverts commit 687d77c1.
parent 687d77c1
Loading
Loading
Loading
Loading
+2 −37
Original line number Diff line number Diff line
@@ -759,26 +759,14 @@ void Copy_Scale_sig_16_32_DEPREC(
        move32(); /* saturation can occur here */
    }
}
#define FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST


#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
void Copy_Scale_sig_16_32_no_sat(
    Word16 x[], /* i  : signal to scale input           Qx        */
    Word32 y[], /* o  : scaled signal output            Qx        */
    Word16 lg, /* i  : size of x[]                     Q0        */
    const Word16 exp0 /* i  : exponent: x = round(x << exp)   Qx ?exp  */
    )
#else
void Copy_Scale_sig_16_32_no_sat(
    const Word16 x[], /* i  : signal to scale input           Qx        */
    Word32 y[],       /* o  : scaled signal output            Qx        */
    const Word16 lg,  /* i  : size of x[]                     Q0        */
    const Word16 exp0 /* i  : exponent: x = round(x << exp)   Qx ?exp  */
)
#endif
{

    Word16 i;
    Word32 L_tmp;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
@@ -807,50 +795,27 @@ void Copy_Scale_sig_16_32_no_sat(
        return;
    }
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
    lg = 1;
    for (int i_exp = 0; i_exp < 35; i_exp++)
      {
        for ( short i_x = 0x8000; i_x < 0x7FFF; i_x ++)
          {
            L_tmp = L_shl_o( 1, i_exp - 1, &Overflow );

#else
    L_tmp = L_shl_o( 1, exp0 - 1, &Overflow );
#endif

    IF( L_tmp >= 0x7FFF )
    {
        FOR( i = 0; i < lg; i++ )
        {
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
            x[i] = i_x;
#endif
            // y[i] = L_mult0(x[i], L_tmp);
            y[i] = W_extract_l( W_mult_32_16( L_tmp, x[i] ) );
            move32(); /* saturation can occur here */
        }
        return;
    }
    ELSE
    // ELSE
    {
        Word16 tmp = extract_l( L_tmp );
        FOR( i = 0; i < lg; i++ )
        {
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
            x[i] = i_x;
#endif
            y[i] = L_mult( x[i], tmp );
            move32();
        }
    }
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
    int test = W_extract_l( W_mult_32_16( L_tmp, x[0] ) );

    if ( test != y[0] )
        assert( 0 );
    } //i_x
    } //i_exp
#endif
#else
    L_tmp = L_shl_o( 1, exp0 - 1, &Overflow );
    FOR( i = 0; i < lg; i++ )