Commit 6bede4aa authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into ci/check-for-regressions-in-mr-pipelines

parents 79f53b95 aa6da634
Loading
Loading
Loading
Loading
+25 −23
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ variables:
  TEST_SUITE: ""
  DUT_ENCODER_PATH: "./IVAS_cod"
  DUT_DECODER_PATH: "./IVAS_dec"
  REF_ENCODER_PATH: "./IVAS_cod_ref"
  REF_DECODER_PATH: "./IVAS_dec_ref"
  LEVEL_SCALING: "1.0"
  IVAS_PIPELINE_NAME: ''
  BASOP_CI_BRANCH_PC_REPO: "basop-ci-branch"
@@ -106,8 +108,8 @@ stages:
  - git pull
  - make clean
  - make -j
  - mv ./IVAS_cod ./IVAS_cod_ref
  - mv ./IVAS_dec ./IVAS_dec_ref
  - mv ./IVAS_cod ./$REF_ENCODER_PATH
  - mv ./IVAS_dec ./$REF_DECODER_PATH
  - mv ./IVAS_rend ./IVAS_rend_ref

  ### build test binaries
@@ -123,8 +125,8 @@ stages:
  - python3 tests/create_short_testvectors.py
  # create references
  - exit_code=0
  - python3 -m pytest $TEST_SUITE -v --update_ref 1 -m create_ref --create_ref -n auto || exit_code=$? 
  - python3 -m pytest $TEST_SUITE -v --update_ref 1 -m create_ref_part2 -n auto || exit_code=$? # Catch exit code to prevent halt in case this step produces zero tests
  - python3 -m pytest $TEST_SUITE -v --update_ref 1 -m create_ref --create_ref -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$?
  - python3 -m pytest $TEST_SUITE -v --update_ref 1 -m create_ref_part2 -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$? # Catch exit code to prevent halt in case this step produces zero tests


.update-scripts-repo: &update-scripts-repo
@@ -245,7 +247,7 @@ stages:

    ### run pytest
    - exit_code=0
    - python3 -m pytest --tb=no $TEST_SUITE -v --create_cut --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --ssnr --odg --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout || exit_code=$?
    - python3 -m pytest --tb=no $TEST_SUITE -v --create_cut --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --ssnr --odg -n auto --testcase_timeout $testcase_timeout --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - python3 scripts/parse_xml_report.py report-junit.xml $CSV_ARTIFACT_NAME
@@ -599,7 +601,7 @@ ivas-pytest-compare_to_ref-short-enc:
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-anchor
@@ -610,7 +612,7 @@ ivas-pytest-compare_to_ref-short-enc-lev-10:
    - .test-job-linux    
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-anchor
@@ -621,7 +623,7 @@ ivas-pytest-compare_to_ref-short-enc-lev+10:
    - .test-job-linux    
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-anchor
@@ -631,7 +633,7 @@ ivas-pytest-enc-msan:
    - .test-job-linux
  before_script:
    - CLANG_NUM=1
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
  <<: *ivas-pytest-sanitizers-anchor

ivas-pytest-enc-asan:
@@ -639,7 +641,7 @@ ivas-pytest-enc-asan:
    - .test-job-linux
  before_script:
    - CLANG_NUM=2
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
  <<: *ivas-pytest-sanitizers-anchor

ivas-pytest-enc-usan:
@@ -647,7 +649,7 @@ ivas-pytest-enc-usan:
    - .test-job-linux
  before_script:
    - CLANG_NUM=3
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
  <<: *ivas-pytest-sanitizers-anchor
  
### jobs that test flt encoder -> fx decoder
@@ -657,7 +659,7 @@ ivas-pytest-compare_to_ref-short-dec:
    - .test-job-linux    
  before_script:
    - USE_LTV=0
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-anchor
@@ -668,7 +670,7 @@ ivas-pytest-compare_to_ref-short-lev-10:
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-anchor
@@ -679,7 +681,7 @@ ivas-pytest-compare_to_ref-short-dec-lev+10:
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-anchor
@@ -689,7 +691,7 @@ ivas-pytest-dec-msan-short:
    - .test-job-linux
  before_script:
    - CLANG_NUM=1
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
  <<: *ivas-pytest-sanitizers-anchor

ivas-pytest-dec-asan-short:
@@ -697,7 +699,7 @@ ivas-pytest-dec-asan-short:
    - .test-job-linux
  before_script:
    - CLANG_NUM=2
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
  <<: *ivas-pytest-sanitizers-anchor

ivas-pytest-dec-usan-short:
@@ -705,7 +707,7 @@ ivas-pytest-dec-usan-short:
    - .test-job-linux
  before_script:
    - CLANG_NUM=3
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
  <<: *ivas-pytest-sanitizers-anchor

# ---------------------------------------------------------------
@@ -718,7 +720,7 @@ ivas-pytest-compare_ref-long-enc:
    - .test-job-linux    
  before_script:
    - USE_LTV=1
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$LONG_TEST_SUITE"
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-anchor
@@ -729,7 +731,7 @@ ivas-pytest-compare_ref-long-dec:
    - .test-job-linux    
  before_script:
    - USE_LTV=1  
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$LONG_TEST_SUITE"
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-anchor
@@ -740,7 +742,7 @@ ivas-pytest-compare_ref-long-enc-lev-10:
    - .test-job-linux    
  before_script:
    - USE_LTV=1
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$LONG_TEST_SUITE"
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-anchor
@@ -751,7 +753,7 @@ ivas-pytest-compare_ref-long-dec-lev-10:
    - .test-job-linux    
  before_script:
    - USE_LTV=1
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$LONG_TEST_SUITE"
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-anchor
@@ -762,7 +764,7 @@ ivas-pytest-compare_ref-long-enc-lev+10:
    - .test-job-linux    
  before_script:
    - USE_LTV=1
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$LONG_TEST_SUITE"
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-anchor
@@ -773,7 +775,7 @@ ivas-pytest-compare_ref-long-dec-lev+10:
    - .test-job-linux    
  before_script:
    - USE_LTV=1  
    - DUT_ENCODER_PATH=./IVAS_cod_ref
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$LONG_TEST_SUITE"
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-anchor
+2 −0
Original line number Diff line number Diff line
@@ -388,8 +388,10 @@
    <ClInclude Include="..\lib_com\cnst.h" />
    <ClInclude Include="..\lib_com\common_api_types.h" />
    <ClInclude Include="..\lib_com\control.h" />
    <ClInclude Include="..\lib_com\count.h" />
    <ClInclude Include="..\lib_com\enh1632.h" />
    <ClInclude Include="..\lib_com\enh40.h" />
    <ClInclude Include="..\lib_com\enhUL32.h" />
    <ClInclude Include="..\lib_com\ivas_cnst.h" />
    <ClInclude Include="..\lib_com\ivas_error.h" />
    <ClInclude Include="..\lib_com\ivas_error_utils.h" />
+6 −0
Original line number Diff line number Diff line
@@ -597,6 +597,12 @@
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\prot_fx.h" />
    <ClInclude Include="..\lib_com\count.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\enhUL32.h">
      <Filter>common_h</Filter>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <Filter Include="common_evs_c">
+47 −40
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 "options.h"
#include "stl.h"


@@ -54,7 +55,7 @@
 * Local constants
 *------------------------------------------------------------------------------------------*/

#if !defined( DEBUGGING ) && !defined( WMOPS_FLT )
#if !defined( DEBUGGING ) && !defined( WMOPS )
static
#endif
    int32_t frame = 0; /* Counter of frames */
@@ -110,6 +111,9 @@ typedef struct
    int16_t orientation_tracking;
    int16_t Opt_non_diegetic_pan;
    float non_diegetic_pan_gain;
#ifdef IVAS_FLOAT_FIXED
    Word16 non_diegetic_pan_gain_fx; /* Q15 */
#endif
    bool renderConfigEnabled;
    char *renderConfigFilename;
    IVAS_DEC_COMPLEXITY_LEVEL complexityLevel;
@@ -161,15 +165,11 @@ int main(
    IVAS_RENDER_FRAMESIZE asked_frame_size;
    int16_t run_unit_tests = 0;

#ifdef WMOPS_FLT
#ifdef WMOPS
    reset_wmops();
    reset_mem( USE_BYTES );
#endif
#if ( WMOPS )
#ifndef DONT_COUNT
    BASOP_init
#endif
#endif

    /*------------------------------------------------------------------------------------------*
     * Parse command-line arguments
     *------------------------------------------------------------------------------------------*/
@@ -374,8 +374,13 @@ int main(
     *------------------------------------------------------------------------------------------*/

    asked_frame_size = arg.renderFramesize;
#ifndef IVAS_FLOAT_FIXED
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain,
                                       arg.Opt_dpid_on, arg.acousticEnvironmentId, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain_fx,
                                       arg.Opt_dpid_on, arg.acousticEnvironmentId, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#endif

    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -493,7 +498,13 @@ int main(
            fprintf( stderr, "\nError in reading Custom loudspeaker file %s: %s\n\n", arg.customLsSetupFilename, CustomLoudspeakerLayout_getError( lsCustomError ) );
            goto cleanup;
        }

#ifdef IVAS_FLOAT_FIXED
        for ( int i = 0; i < IVAS_MAX_OUTPUT_CHANNELS; i++ )
        {
            hLsCustomData.azimuth_fx[i] = (Word32) ( hLsCustomData.azimuth[i] * ( 1u << 22 ) );
            hLsCustomData.elevation_fx[i] = (Word32) ( hLsCustomData.elevation[i] * ( 1u << 22 ) );
        }
#endif
        if ( ( error = IVAS_DEC_FeedCustomLsData( hIvasDec, hLsCustomData ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_FeedCustomLsData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -611,11 +622,7 @@ 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 )
@@ -642,10 +649,11 @@ cleanup:
        fprintf( stderr, "\nError while closing file: %s\nContinuing...\n\n", arg.inputBitstreamFilename );
    }

#ifdef WMOPS_FLT
#ifdef WMOPS
    print_wmops();
    print_mem( NULL );
#endif

    if ( !arg.quietModeEnabled )
    {
        printf( "\n" );
@@ -1064,6 +1072,17 @@ static bool parseCmdlIVAS_dec(
                    return false;
                }
            }
#ifdef IVAS_FLOAT_FIXED
            if ( arg->non_diegetic_pan_gain == 1.0f )
            {
                arg->non_diegetic_pan_gain_fx = 32767;
            }
            else
            {
                arg->non_diegetic_pan_gain_fx = (Word16) ( arg->non_diegetic_pan_gain * ( 1u << 15 ) );
            }

#endif
            i++;
        }
        else if ( strcmp( argv_to_upper, "-LEVEL" ) == 0 )
@@ -1550,7 +1569,7 @@ static ivas_error decodeG192(

    delayNumSamples_orig[0] = -1;

#ifdef WMOPS_FLT
#ifdef WMOPS
    reset_stack();
    reset_wmops();
#endif
@@ -1806,28 +1825,18 @@ static ivas_error decodeG192(
                }
            }
        }

        vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len;
#ifdef WMOPS_FLT

#ifdef WMOPS
        if ( vec_pos_update == 0 )
        {
            update_wmops();
            update_mem();
#ifdef MEM_COUNT_DETAILS
            export_mem( "mem_analysis.csv" );
#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....
     *------------------------------------------------------------------------------------------*/
@@ -1948,12 +1957,15 @@ static ivas_error decodeG192(
                }
            }
        }

#ifdef WMOPS
#ifndef DONT_COUNT
        /* update WMPOS counting (end of frame) */
        BASOP_frame_update();
        update_wmops();
        update_mem();
#ifdef MEM_COUNT_DETAILS
        export_mem( "mem_analysis.csv" );
#endif
#endif

        frame++;
        if ( !arg.quietModeEnabled )
        {
@@ -2211,7 +2223,7 @@ static ivas_error decodeVoIP(
        fprintf( stdout, "\n-- Start the decoder (quiet mode) --\n\n" );
    }

#ifdef WMOPS_FLT
#ifdef WMOPS
    reset_stack();
    reset_wmops();
#endif
@@ -2493,13 +2505,8 @@ 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 "options.h"
#include "stl.h"


Loading