Commit fd4a43ac authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'eval_complexity_0128' into 'main'

Addition of the fixed point complexity counting on the decoder

See merge request !94
parents 763d4cf5 df7596e6
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -241,6 +241,22 @@ build-codec-linux-make:
    - *print-common-info
    - make -j

# ensure that codec builds on linux with instrumentation active
build-codec-linux-instrumented-make:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web'
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main
    - if: $CI_PIPELINE_SOURCE == 'schedule'
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
  extends:
    - .build-job-linux
  script:
    - *print-common-info
    - sed -i".bak" "s/\/\*#define WMOPS 1\*\//#define WMOPS 1/g" lib_com/count.h
    - make -j

# ---------------------------------------------------------------
# Short test jobs 
# ---------------------------------------------------------------
+1 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@
    <ClCompile Include="..\lib_com\complex_basop.c" />
    <ClCompile Include="..\lib_com\control.c" />
    <ClCompile Include="..\lib_com\core_com_config.c" />
    <ClCompile Include="..\lib_com\count.c" />
    <ClCompile Include="..\lib_com\deemph.c" />
    <ClCompile Include="..\lib_com\delay_comp.c" />
    <ClCompile Include="..\lib_com\disclaimer.c" />
+43 −15
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include "rotation_file_reader.h"
#include "vector3_pair_file_reader.h"
#include "wmc_auto.h"
#include "stl.h"


#define WMC_TOOL_SKIP
@@ -53,7 +54,7 @@
 * Local constants
 *------------------------------------------------------------------------------------------*/

#if !defined( WMOPS )
#if !defined( WMOPS_FLT )
static
#endif
    int32_t frame = 0; /* Counter of frames */
@@ -160,11 +161,15 @@ int main(
    IVAS_RENDER_FRAMESIZE asked_frame_size;
    int16_t run_unit_tests = 0;

#ifdef WMOPS
#ifdef WMOPS_FLT
    reset_wmops();
    reset_mem( USE_BYTES );
#endif

#if ( WMOPS )
#ifndef DONT_COUNT
    BASOP_init
#endif
#endif
    /*------------------------------------------------------------------------------------------*
     * Parse command-line arguments
     *------------------------------------------------------------------------------------------*/
@@ -566,7 +571,6 @@ int main(
    /*-----------------------------------------------------------------*
     * Decoding
     *-----------------------------------------------------------------*/

    if ( arg.voipMode )
    {
        error = decodeVoIP( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec );
@@ -601,7 +605,11 @@ int main(
    mainFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */

cleanup:

#ifndef DONT_COUNT
    /* end of WMOPS counting */
    BASOP_end
    BASOP_end_noprint
#endif
    free( pcmBuf );

    if ( arg.hrtfReaderEnabled )
@@ -628,7 +636,7 @@ cleanup:
        fprintf( stderr, "\nError while closing file: %s\nContinuing...\n\n", arg.inputBitstreamFilename );
    }

#ifdef WMOPS
#ifdef WMOPS_FLT
    print_wmops();
    print_mem( NULL );
#endif
@@ -1505,6 +1513,7 @@ static ivas_error decodeG192(
    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;


    for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i )
    {
        ismWriters[i] = NULL;
@@ -1526,10 +1535,11 @@ static ivas_error decodeG192(

    delayNumSamples_orig[0] = -1;

#ifdef WMOPS
#ifdef WMOPS_FLT
    reset_stack();
    reset_wmops();
#endif

    nSamplesAvailableNext = 0;

    vec_pos_update = 0;
@@ -1551,11 +1561,9 @@ static ivas_error decodeG192(
     * - Run the decoder
     * - Write the synthesized signal into output file
     *------------------------------------------------------------------------------------------*/

    while ( 1 )
    {
        /* Read next frame if not enough samples availble */

        /* reference vector */
        if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 )
        {
@@ -1671,7 +1679,6 @@ static ivas_error decodeG192(
                    goto cleanup;
                }
            }

            if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK )

                {
@@ -1682,6 +1689,7 @@ static ivas_error decodeG192(
                nSamplesToRender -= nSamplesRendered_loop;
            if ( needNewFrame )
            {

                frame++;
                if ( !arg.quietModeEnabled )
                {
@@ -1691,6 +1699,7 @@ static ivas_error decodeG192(

        } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK );


        if ( error == IVAS_ERR_END_OF_FILE )
        {
            break;
@@ -1783,7 +1792,7 @@ static ivas_error decodeG192(
            }
        }
        vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len;
#ifdef WMOPS
#ifdef WMOPS_FLT
        if ( vec_pos_update == 0 )
        {
            update_wmops();
@@ -1793,8 +1802,17 @@ static ivas_error decodeG192(
#endif
        }
#endif
#ifdef WMOPS
#ifndef DONT_COUNT
        if ( vec_pos_update == 0 )
        {
            /* update WMPOS counting (end of frame) */
            BASOP_frame_update();
        }
        
#endif
#endif
    }
    /*------------------------------------------------------------------------------------------*
     * Flush what is still left in the VoIP Buffers....
     *------------------------------------------------------------------------------------------*/
@@ -1915,7 +1933,12 @@ static ivas_error decodeG192(
                }
            }
        }

#ifdef WMOPS
#ifndef DONT_COUNT
        /* update WMPOS counting (end of frame) */
        BASOP_frame_update();
#endif
#endif
        frame++;
        if ( !arg.quietModeEnabled )
        {
@@ -2163,7 +2186,7 @@ static ivas_error decodeVoIP(
        fprintf( stdout, "\n-- Start the decoder (quiet mode) --\n\n" );
    }

#ifdef WMOPS
#ifdef WMOPS_FLT
    reset_stack();
    reset_wmops();
#endif
@@ -2445,8 +2468,13 @@ static ivas_error decodeVoIP(
        vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len;
        frame++;
        systemTime_ms += systemTimeInc_ms;

#ifdef WMOPS
#ifndef DONT_COUNT
        /* update WMPOS counting (end of frame) */
        BASOP_frame_update();
#endif
#endif
#ifdef WMOPS_FLT
        update_mem();
        update_wmops();
#endif
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
#include "jbm_file_reader.h"
#include "masa_file_reader.h"
#include "wmc_auto.h"
#include "stl.h"


#define WMC_TOOL_SKIP
+679 −15

File changed.

Preview size limit exceeded, changes collapsed.

Loading