Commit 0e755f9e authored by vaillancour's avatar vaillancour
Browse files

add improvment similar to FLC to easy the usage of wmops complexity counter

parent e42283d6
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1513,7 +1513,14 @@ static ivas_error decodeG192(
    IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS];
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } };
    int16_t vec_pos_update, vec_pos_len;
#ifdef WMOPS
    int GetId, GetTCId, cheId;
    /* initiate counters and objects */
    GetId = getCounterId( "IVAS_DEC_GetSamples" );
    GetTCId = getCounterId( "IVAS_DEC_GetTCSamples" );
    cheId = getCounterId( "ivas_jbm_dec_tc" );

#endif
    for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i )
    {
        ismWriters[i] = NULL;
@@ -1824,6 +1831,7 @@ END_SUB_WMOPS;
            /* update WMPOS counting (end of frame) */
            //BASOP_frame_update();
#if ( WMOPS )
            //WMOPS_output( 0 );
            fwc();
#endif
        }
@@ -2011,9 +2019,10 @@ END_SUB_WMOPS;
cleanup:
    /* free memory etc. */
#ifdef WMOPS
    WMOPS_output( 0 );
    fwc();
    printf( "\ndecoder complexity\n" );
    WMOPS_output( 0 );
    generic_WMOPS_output(    0, "dec_complx.txt" );
    printf( "\n" );
#endif
    AudioFileWriter_close( &afWriter );
+682 −10

File changed.

Preview size limit exceeded, changes collapsed.

+59 −16
Original line number Diff line number Diff line
@@ -63,18 +63,10 @@
#define WMOPS 1                 /* enable WMOPS profiling features */
//#undef WMOPS /* disable WMOPS profiling features */
#endif
#define MAXCOUNTERS (256)


#define BASOP_sub_start(label)
#define BASOP_sub_end()
#define SUB_WMOPS_INIT(label) BASOP_sub_start(label)
#define END_SUB_WMOPS BASOP_sub_end()
#define BASOP_push_wmops(label)
#define BASOP_pop_wmops()
#define BASOP_end_noprint
#define BASOP_end
#define BASOP_init
#define MAXCOUNTERS (512)
#ifdef FROM_EVS_DEV
#define MAX_CALLERS_SAVED_FRAMES 5 /* # of Frame for which WMOPS Complexity Details will be saved, 0 = Disabled */
#endif

int getCounterId (char *objectName);
/*
@@ -101,7 +93,16 @@ char *readCounterIdName (void);
/*
 * Returns the current CounterId name.
 */

#ifdef FROM_EVS_DEV
void printStack(char *text, char * Id);
/*
 * print stack
 *    text: Any text to print initially
 *    Id:   NULL, if no prints are wanted
 *          "*", if all prints are wanted (default)
 *          "pitch_ol" or any other function name
 */
#endif

void incrementNbTimeObjectIsCalled (int counterId);
/*
@@ -126,7 +127,11 @@ void Init_WMOPS_counter (void);
 */


#ifdef FROM_EVS_DEV
Word32 Reset_WMOPS_counter( void );
#else
void Reset_WMOPS_counter( void );
#endif
    /*
 * Resets the current counter group.
 */
@@ -482,8 +487,15 @@ void generic_WMOPS_output (Word16 notPrintWorstWorstCase, char *test_file_name);
 *
 * notPrintWorstWorstCase : Same usage as in WMOPS_output().
 */
#ifdef FROM_EVS_DEV
void WMOPS_output_all(Word16 dtx_mode);
void WMOPS_output_all_std(Word16 dtx_mode);


/*
 * free all allocated counter memory 
 */
void WMOPS_destroy(void);
#endif
#if 0
/*
 * Example of how count.h could be used.
@@ -535,6 +547,37 @@ int main () {
}
#endif /* #if 0 */

/* jdr 20120117: add FLC similar functions */
/* mul 20130729: set BASOP_COUNT_SUBROUTINES to count on a per-BASOP_sub_start()/BASOP_sub_end() base; 
   otherwise, count only between BASOP_push_wmops(), BASOP_push_wmops() */
#define BASOP_COUNT_SUBROUTINES
void BASOP_push_wmops (const char *label);
Word32 BASOP_pop_wmops (void);

#define BASOP_init             { setFrameRate(32000, 640);  Init_WMOPS_counter(); /* 20ms frames */ }
#define BASOP_end              { WMOPS_output_all_std(0); }
/*#define BASOP_end              { WMOPS_output_all(0); }*/
#define BASOP_end_noprint      { WMOPS_destroy(); }

#ifdef BASOP_COUNT_SUBROUTINES
#define BASOP_sub_start(label) { BASOP_push_wmops(label); }
#define BASOP_sub_end()        { BASOP_pop_wmops(); }
#else
#define BASOP_sub_start(label) 
#define BASOP_sub_end()        
#endif

void BASOP_frame_update(void);
void Reset_all_WMOPS_counter (void);

Word32 BASOP_get_wops (void);

/*! Returns the total min/max/avg WMOPS values like printed in BASOP_end(). */
void BASOP_get_total_wmops(double *min, double *max, double *avg);


#define SUB_WMOPS_INIT( label ) BASOP_sub_start( label )
#define END_SUB_WMOPS           BASOP_sub_end()

#endif /* _COUNT_H */

lib_com/move.h.bak

deleted100644 → 0
+0 −94

File deleted.

Preview size limit exceeded, changes collapsed.

+1 −0

File changed.

Preview size limit exceeded, changes collapsed.