Commit 4c7f3887 authored by malenov's avatar malenov
Browse files

cleanup BASOP_NOGLOB

parent 829cbe21
Loading
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -243,10 +243,7 @@ void tcx_arith_scale_envelope(
    Word16 statesi, bits;
    Word32 mean, a, s, L_tmp;
    Word16 mean_e, tmp, tmp2;
#ifdef BASOP_NOGLOB
    Flag Overflow;
#endif /* BASOP_NOGLOB */


    lob_bits = 0;
    move16();
@@ -271,11 +268,7 @@ void tcx_arith_scale_envelope(

        tmp = norm_l( env[k] );
        tmp2 = sub( 15, tmp );
#ifndef BASOP_NOGLOB
        tmp = Inv16( round_fx( L_shl( env[k], tmp ) ), &tmp2 );
#else                                                           /* BASOP_NOGLOB */
        tmp = Inv16( round_fx_o( L_shl( env[k], tmp ), &Overflow ), &tmp2 );
#endif                                                          /* BASOP_NOGLOB */
        ienv[k] = L_shl( L_deposit_h( tmp ), sub( tmp2, 15 ) ); /* Q16 */
        move32();
        mean = L_add( mean, ienv[k] );
@@ -309,11 +302,7 @@ void tcx_arith_scale_envelope(
    b_e = add( b_e, mean_e );

    /* scale = (-b + sqrtf(b*b - 4.0f*a*0.035f)) / (2.0f * a); */
#ifndef BASOP_NOGLOB
    tmp = round_fx( BASOP_Util_Add_Mant32Exp( L_mult( b, b ), shl( b_e, 1 ), Mpy_32_16( a, FL2WORD16( -4.0f * 0.035f ) ), a_e, &tmp2 ) );
#else
    tmp = round_fx_o( BASOP_Util_Add_Mant32Exp( L_mult( b, b ), shl( b_e, 1 ), Mpy_32_16( a, FL2WORD16( -4.0f * 0.035f ) ), a_e, &tmp2 ), &Overflow );
#endif

    IF( tmp <= 0 )
    {
@@ -332,11 +321,7 @@ void tcx_arith_scale_envelope(

    tmp2 = BASOP_Util_Add_MantExp( negate( b ), b_e, tmp, tmp2, &scale );
    scale = BASOP_Util_Divide1616_Scale( scale, round_fx( a ), &tmp );
#ifndef BASOP_NOGLOB
    scale = shl( scale, sub( sub( add( tmp, tmp2 ), a_e ), 1 ) ); /* Q15 */
#else
    scale = shl_o( scale, sub( sub( add( tmp, tmp2 ), a_e ), 1 ), &Overflow ); /* Q15 */
#endif

    /* iscale = 1.0f / scale; */
    iscale_e = 0;
@@ -385,11 +370,7 @@ void tcx_arith_scale_envelope(
                L_tmp = L_add( L_tmp, L_shl( Mpy_32_16( env[k], mult_r( FL2WORD16( 0.035f ), iscale ) ), iscale_e ) );

                tmp = norm_l( L_tmp );
#ifndef BASOP_NOGLOB
                statesi = mult_r( statesi, round_fx( L_shl( L_tmp, tmp ) ) );
#else  /* BASOP_NOGLOB */
                statesi = mult_r( statesi, round_fx_o( L_shl( L_tmp, tmp ), &Overflow ) );
#endif /* BASOP_NOGLOB */
                bits = add( bits, sub( 15, tmp ) );

                tmp = norm_s( statesi );
@@ -489,11 +470,7 @@ void tcx_arith_scale_envelope(
    *s_env_e = sub( add( 15, iscale_e ), tmp );
    move16();
    BASOP_SATURATE_WARNING_OFF;
#ifndef BASOP_NOGLOB
    a = L_shl( 1265000, sub( 15, *s_env_e ) );
#else  /* BASOP_NOGLOB */
    a = L_shl_o( 1265000, sub( 15, *s_env_e ), &Overflow );
#endif /* BASOP_NOGLOB */
    BASOP_SATURATE_WARNING_ON;

    FOR( k = 0; k < L_frame; k++ )
+0 −239

File changed.

Preview size limit exceeded, changes collapsed.

+6 −82

File changed.

Preview size limit exceeded, changes collapsed.

+1 −5
Original line number Diff line number Diff line
@@ -243,10 +243,7 @@ static Word16 E_LPC_f_lsp_pol_get(
    Word16 Ovf = 0;
    Word16 Q_out;
    Word16 m2;
#ifdef BASOP_NOGLOB
    Flag Overflow;
#endif /* BASOP_NOGLOB */


    Q_out = 31 - 23;
    move16();
@@ -300,9 +297,8 @@ static Word16 E_LPC_f_lsp_pol_get(
    test();
    IF( Overflow > 0 && isMODE1 )
    {
#ifdef BASOP_NOGLOB
        assert( 0 );
#endif /* BASOP_NOGLOB */

        /* If an overflow is detected, redo the computation with 1 bit less */
        Ovf = add( Ovf, 1 );
        Ovf = E_LPC_f_lsp_pol_get( lsp, f, n, Ovf, isMODE1 );
+0 −6

File changed.

Preview size limit exceeded, changes collapsed.

Loading