Commit c7579337 authored by malenov's avatar malenov
Browse files

further harmonzation of WMOPS define, removal of DONT_COUNT and renaming of WMOPS_FLT

parent c8967fc9
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -163,11 +163,9 @@ int main(
    int16_t run_unit_tests = 0;

#ifdef WMOPS
#ifndef DONT_COUNT
    reset_wmops();
    reset_wmops_wmc();
    reset_mem( USE_BYTES );
#endif
#endif

    /*------------------------------------------------------------------------------------------*
@@ -1809,14 +1807,12 @@ static ivas_error decodeG192(
        vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len;

#ifdef WMOPS
#ifndef DONT_COUNT
        if ( vec_pos_update == 0 )
        {
            update_wmops();
            update_wmops_wmc();
            update_mem();
        }
#endif
#endif

    }
@@ -1943,14 +1939,12 @@ static ivas_error decodeG192(
        }

#ifdef WMOPS
#ifndef DONT_COUNT
        update_wmops();
        update_wmops_wmc();
        update_mem();
#ifdef MEM_COUNT_DETAILS
        export_mem( "mem_analysis.csv" );
#endif
#endif
#endif

        frame++;
@@ -2495,11 +2489,9 @@ static ivas_error decodeVoIP(
        systemTime_ms += systemTimeInc_ms;

#ifdef WMOPS
#ifndef DONT_COUNT
        update_mem();
        update_wmops();
        update_wmops_wmc();
#endif
#endif
    }

+2 −2
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ HISTORY:
#pragma warning( disable : 4310 )
#endif

#if ( WMOPS )
#ifdef WMOPS
extern BASIC_OP multiCounter[MAXCOUNTERS];
extern int currCounter;
#endif
@@ -913,7 +913,7 @@ Word16 shr( Word16 var1, Word16 var2 )
        var_out = shl( var1, var2 );
#endif /* BASOP_NOGLOB */

#if ( WMOPS )
#ifdef WMOPS
        multiCounter[currCounter].shl--;
#endif
    }
+4 −4
Original line number Diff line number Diff line
@@ -2596,7 +2596,7 @@ cmplx CL_scale_t( cmplx x, Word16 y )
    cmplx result;
    result.re = Mpy_32_16_1( x.re, y );
    result.im = Mpy_32_16_1( x.im, y );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].Mpy_32_16_1--;
    multiCounter[currCounter].Mpy_32_16_1--;
    multiCounter[currCounter].CL_scale++;
@@ -2609,11 +2609,11 @@ cmplx CL_dscale_t( cmplx x, Word16 y1, Word16 y2 )
    cmplx result;
    result.re = Mpy_32_16_1( x.re, y1 );
    result.im = Mpy_32_16_1( x.im, y2 );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].Mpy_32_16_1--;
    multiCounter[currCounter].Mpy_32_16_1--;
    multiCounter[currCounter].CL_dscale++;
#endif /* #if (WMOPS) */
#endif /* #ifdef WMOPS */
    return ( result );
}

@@ -2622,7 +2622,7 @@ cmplx CL_mult_32x16( cmplx input, cmplx_s coeff )
    cmplx result;
    result.re = L_sub( Mpy_32_16_1( input.re, coeff.re ), Mpy_32_16_1( input.im, coeff.im ) );
    result.im = L_add( Mpy_32_16_1( input.re, coeff.im ), Mpy_32_16_1( input.im, coeff.re ) );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_multr_32x16++;
    multiCounter[currCounter].Mpy_32_16_1--;
    multiCounter[currCounter].Mpy_32_16_1--;
+41 −41
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include "stl.h"


#if ( WMOPS )
#ifdef WMOPS

extern BASIC_OP multiCounter[MAXCOUNTERS];

@@ -35,7 +35,7 @@ cmplx CL_shr( cmplx inp, Word16 shift_val )
    cmplx out;
    out.re = L_shr( inp.re, shift_val );
    out.im = L_shr( inp.im, shift_val );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_shr++;
    multiCounter[currCounter].L_shr--;
    multiCounter[currCounter].L_shr--;
@@ -48,7 +48,7 @@ cmplx CL_shl( cmplx inp, Word16 shift_val )
    cmplx out;
    out.re = L_shl( inp.re, shift_val );
    out.im = L_shl( inp.im, shift_val );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_shl++;
    multiCounter[currCounter].L_shl--;
    multiCounter[currCounter].L_shl--;
@@ -61,7 +61,7 @@ cmplx CL_add( cmplx inp1, cmplx inp2 )
    cmplx out;
    out.re = L_add( inp1.re, inp2.re );
    out.im = L_add( inp1.im, inp2.im );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_add++;
    multiCounter[currCounter].L_add--;
    multiCounter[currCounter].L_add--;
@@ -74,7 +74,7 @@ cmplx CL_sub( cmplx inp1, cmplx inp2 )
    cmplx out;
    out.re = L_sub( inp1.re, inp2.re );
    out.im = L_sub( inp1.im, inp2.im );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_sub++;
    multiCounter[currCounter].L_sub--;
    multiCounter[currCounter].L_sub--;
@@ -87,11 +87,11 @@ cmplx CL_scale( cmplx x, Word16 y )
    cmplx result;
    result.re = Mpy_32_16_r( x.re, y );
    result.im = Mpy_32_16_r( x.im, y );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].Mpy_32_16_r--;
    multiCounter[currCounter].Mpy_32_16_r--;
    multiCounter[currCounter].CL_scale++;
#endif /* #if (WMOPS) */
#endif /* #ifdef WMOPS */
    return ( result );
}

@@ -100,11 +100,11 @@ cmplx CL_dscale( cmplx x, Word16 y1, Word16 y2 )
    cmplx result;
    result.re = Mpy_32_16_r( x.re, y1 );
    result.im = Mpy_32_16_r( x.im, y2 );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].Mpy_32_16_r--;
    multiCounter[currCounter].Mpy_32_16_r--;
    multiCounter[currCounter].CL_dscale++;
#endif /* #if (WMOPS) */
#endif /* #ifdef WMOPS */
    return ( result );
}

@@ -113,7 +113,7 @@ cmplx CL_msu_j( cmplx x, cmplx y )
    cmplx result;
    result.re = L_add( x.re, y.im );
    result.im = L_sub( x.im, y.re );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_msu_j++;
    multiCounter[currCounter].L_add--;
    multiCounter[currCounter].L_sub--;
@@ -126,7 +126,7 @@ cmplx CL_mac_j( cmplx x, cmplx y )
    cmplx result;
    result.re = L_sub( x.re, y.im );
    result.im = L_add( x.im, y.re );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_mac_j++;
    multiCounter[currCounter].L_add--;
    multiCounter[currCounter].L_sub--;
@@ -136,7 +136,7 @@ cmplx CL_mac_j( cmplx x, cmplx y )

cmplx CL_move( cmplx x )
{
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_move++;
#endif
    return x;
@@ -144,7 +144,7 @@ cmplx CL_move( cmplx x )

Word32 CL_Extract_real( cmplx x )
{
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_Extract_real++;
#endif
    return x.re;
@@ -152,7 +152,7 @@ Word32 CL_Extract_real( cmplx x )

Word32 CL_Extract_imag( cmplx x )
{
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_Extract_imag++;
#endif
    return x.im;
@@ -163,7 +163,7 @@ cmplx CL_form( Word32 re, Word32 im )
    cmplx result;
    result.re = re;
    result.im = im;
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_form++;
#endif
    return result;
@@ -174,7 +174,7 @@ cmplx CL_multr_32x16( cmplx input, cmplx_s coeff )
    cmplx result;
    result.re = W_round48_L( W_sub_nosat( W_mult_32_16( input.re, coeff.re ), W_mult_32_16( input.im, coeff.im ) ) );
    result.im = W_round48_L( W_add_nosat( W_mult_32_16( input.re, coeff.im ), W_mult_32_16( input.im, coeff.re ) ) );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_multr_32x16++;
    multiCounter[currCounter].W_mult_32_16--;
    multiCounter[currCounter].W_mult_32_16--;
@@ -193,7 +193,7 @@ cmplx CL_negate( cmplx x )
    cmplx result;
    result.re = L_negate( x.re );
    result.im = L_negate( x.im );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_negate++;
    multiCounter[currCounter].L_negate--;
    multiCounter[currCounter].L_negate--;
@@ -206,7 +206,7 @@ cmplx CL_conjugate( cmplx x )
    cmplx result;
    result.re = x.re;
    result.im = L_negate( x.im );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_conjugate++;
    multiCounter[currCounter].L_negate--;
#endif
@@ -220,7 +220,7 @@ cmplx CL_mul_j( cmplx input )
    temp = CL_negate( input );
    result.re = temp.im;
    result.im = input.re;
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_mul_j++;
    multiCounter[currCounter].CL_negate--;
#endif
@@ -232,7 +232,7 @@ cmplx CL_swap_real_imag( cmplx input )
    cmplx result;
    result.re = input.im;
    result.im = input.re;
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_swap_real_imag++;
#endif
    return result;
@@ -244,7 +244,7 @@ cmplx_s C_add( cmplx_s inp1, cmplx_s inp2 )
    out.re = add( inp1.re, inp2.re );
    out.im = add( inp1.im, inp2.im );

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_add++;
    multiCounter[currCounter].add--;
    multiCounter[currCounter].add--;
@@ -258,7 +258,7 @@ cmplx_s C_sub( cmplx_s inp1, cmplx_s inp2 )
    out.re = sub( inp1.re, inp2.re );
    out.im = sub( inp1.im, inp2.im );

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_sub++;
    multiCounter[currCounter].sub--;
    multiCounter[currCounter].sub--;
@@ -274,7 +274,7 @@ cmplx_s C_mul_j( cmplx_s input )
    result.re = temp;
    result.im = input.re;

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_mul_j++;
    multiCounter[currCounter].negate--;
#endif
@@ -287,7 +287,7 @@ cmplx_s C_multr( cmplx_s x, cmplx_s c )
    result.re = round_fx( W_sat_l( W_sub_nosat( W_mult_16_16( x.re, c.re ), W_mult_16_16( x.im, c.im ) ) ) );
    result.im = round_fx( W_sat_l( W_add_nosat( W_mult_16_16( x.im, c.re ), W_mult_16_16( x.re, c.im ) ) ) );

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_multr++;
    multiCounter[currCounter].W_mult_16_16--;
    multiCounter[currCounter].W_mult_16_16--;
@@ -308,7 +308,7 @@ cmplx_s C_form( Word16 re, Word16 im )
    cmplx_s result;
    result.re = re;
    result.im = im;
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_form++;
#endif
    return result;
@@ -319,11 +319,11 @@ cmplx C_scale( cmplx_s x, Word16 y )
    cmplx result;
    result.re = L_mult( x.re, y );
    result.im = L_mult( x.im, y );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].L_mult--;
    multiCounter[currCounter].L_mult--;
    multiCounter[currCounter].C_scale++;
#endif /* #if (WMOPS) */
#endif /* #ifdef WMOPS */
    return ( result );
}

@@ -333,7 +333,7 @@ cmplx_s CL_round32_16( cmplx x )
    result.re = round_fx( x.re );
    result.im = round_fx( x.im );

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_round32_16++;
    multiCounter[currCounter].round--;
    multiCounter[currCounter].round--;
@@ -346,11 +346,11 @@ cmplx CL_scale_32( cmplx x, Word32 y )
    cmplx result;
    result.re = Mpy_32_32_r( x.re, y );
    result.im = Mpy_32_32_r( x.im, y );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].Mpy_32_32_r--;
    multiCounter[currCounter].Mpy_32_32_r--;
    multiCounter[currCounter].CL_scale_32++;
#endif /* #if (WMOPS) */
#endif /* #ifdef WMOPS */
    return ( result );
}

@@ -359,11 +359,11 @@ cmplx CL_dscale_32( cmplx x, Word32 y1, Word32 y2 )
    cmplx result;
    result.re = Mpy_32_32_r( x.re, y1 );
    result.im = Mpy_32_32_r( x.im, y2 );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].Mpy_32_32_r--;
    multiCounter[currCounter].Mpy_32_32_r--;
    multiCounter[currCounter].CL_dscale_32++;
#endif /* #if (WMOPS) */
#endif /* #ifdef WMOPS */
    return ( result );
}

@@ -373,7 +373,7 @@ cmplx CL_multr_32x32( cmplx x, cmplx y )
    result.re = W_round64_L( W_sub( W_mult_32_32( x.re, y.re ), W_mult_32_32( x.im, y.im ) ) );
    result.im = W_round64_L( W_add( W_mult_32_32( x.im, y.re ), W_mult_32_32( x.re, y.im ) ) );

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].CL_multr_32x32++;
    multiCounter[currCounter].W_mult_32_32--;
    multiCounter[currCounter].W_mult_32_32--;
@@ -393,7 +393,7 @@ cmplx_s C_mac_r( cmplx x, cmplx_s y, Word16 c )
    cmplx temp = CL_add( x, C_scale( y, c ) );
    result = CL_round32_16( temp );

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_mac_r++;
    multiCounter[currCounter].CL_add--;
    multiCounter[currCounter].C_scale--;
@@ -408,7 +408,7 @@ cmplx_s C_msu_r( cmplx x, cmplx_s y, Word16 c )
    cmplx temp = CL_sub( x, C_scale( y, c ) );
    result = CL_round32_16( temp );

#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_msu_r++;
    multiCounter[currCounter].CL_sub--;
    multiCounter[currCounter].C_scale--;
@@ -419,7 +419,7 @@ cmplx_s C_msu_r( cmplx x, cmplx_s y, Word16 c )

Word16 C_Extract_real( cmplx_s x )
{
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_Extract_real++;
#endif
    return x.re;
@@ -427,7 +427,7 @@ Word16 C_Extract_real( cmplx_s x )

Word16 C_Extract_imag( cmplx_s x )
{
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_Extract_imag++;
#endif
    return x.im;
@@ -438,7 +438,7 @@ cmplx_s C_negate( cmplx_s x )
    cmplx_s result;
    result.re = negate( x.re );
    result.im = negate( x.im );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_negate++;
    multiCounter[currCounter].negate--;
    multiCounter[currCounter].negate--;
@@ -451,7 +451,7 @@ cmplx_s C_conjugate( cmplx_s x )
    cmplx_s result;
    result.re = x.re;
    result.im = negate( x.im );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_conjugate++;
    multiCounter[currCounter].negate--;
#endif
@@ -463,7 +463,7 @@ cmplx_s C_shr( cmplx_s inp, Word16 shift_val )
    cmplx_s out;
    out.re = shr( inp.re, shift_val );
    out.im = shr( inp.im, shift_val );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_shr++;
    multiCounter[currCounter].shr--;
    multiCounter[currCounter].shr--;
@@ -476,7 +476,7 @@ cmplx_s C_shl( cmplx_s inp, Word16 shift_val )
    cmplx_s out;
    out.re = shl( inp.re, shift_val );
    out.im = shl( inp.im, shift_val );
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].C_shl++;
    multiCounter[currCounter].shl--;
    multiCounter[currCounter].shl--;
+18 −18
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ Flag LT_16( Word16 var1, Word16 var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].LT_16++;
#endif
    return F_ret;
@@ -50,7 +50,7 @@ Flag GT_16( Word16 var1, Word16 var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].GT_16++;
#endif
    return F_ret;
@@ -64,7 +64,7 @@ Flag LE_16( Word16 var1, Word16 var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].LE_16++;
#endif
    return F_ret;
@@ -78,7 +78,7 @@ Flag GE_16( Word16 var1, Word16 var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].GE_16++;
#endif
    return F_ret;
@@ -92,7 +92,7 @@ Flag EQ_16( Word16 var1, Word16 var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].EQ_16++;
#endif
    return F_ret;
@@ -106,7 +106,7 @@ Flag NE_16( Word16 var1, Word16 var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].NE_16++;
#endif
    return F_ret;
@@ -120,7 +120,7 @@ Flag LT_32( Word32 L_var1, Word32 L_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].LT_32++;
#endif
    return F_ret;
@@ -134,7 +134,7 @@ Flag GT_32( Word32 L_var1, Word32 L_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].GT_32++;
#endif
    return F_ret;
@@ -148,7 +148,7 @@ Flag LE_32( Word32 L_var1, Word32 L_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].LE_32++;
#endif
    return F_ret;
@@ -162,7 +162,7 @@ Flag GE_32( Word32 L_var1, Word32 L_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].GE_32++;
#endif
    return F_ret;
@@ -176,7 +176,7 @@ Flag EQ_32( Word32 L_var1, Word32 L_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].EQ_32++;
#endif
    return F_ret;
@@ -190,7 +190,7 @@ Flag NE_32( Word32 L_var1, Word32 L_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].NE_32++;
#endif
    return F_ret;
@@ -204,7 +204,7 @@ Flag LT_64( Word64 L64_var1, Word64 L64_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].LT_64++;
#endif
    return F_ret;
@@ -218,7 +218,7 @@ Flag GT_64( Word64 L64_var1, Word64 L64_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].GT_64++;
#endif
    return F_ret;
@@ -232,7 +232,7 @@ Flag LE_64( Word64 L64_var1, Word64 L64_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].LE_64++;
#endif
    return F_ret;
@@ -245,7 +245,7 @@ Flag GE_64( Word64 L64_var1, Word64 L64_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].GE_64++;
#endif
    return F_ret;
@@ -259,7 +259,7 @@ Flag EQ_64( Word64 L64_var1, Word64 L64_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].EQ_64++;
#endif
    return F_ret;
@@ -272,7 +272,7 @@ Flag NE_64( Word64 L64_var1, Word64 L64_var2 )
    {
        F_ret = 1;
    }
#if ( WMOPS )
#ifdef WMOPS
    multiCounter[currCounter].NE_64++;
#endif
    return F_ret;
Loading