Commit ff6b90ee authored by vasilache's avatar vasilache
Browse files

Merge branch 'main' into 1230-align-with-basop-in-ivas_decode_masaism_metadata

parents 13cc30c8 d8ff2d01
Loading
Loading
Loading
Loading
Loading
+51 −24
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ variables:
      - 'test-long-self-test'
      - 'ivas-conformance'
      - 'ivas-conformance-linux'
      - 'check-float-reference'
      - 'check-clipping'
      - 'test-branch-vs-input-passthrough'

@@ -70,9 +69,6 @@ workflow:
      variables:
        IVAS_PIPELINE_NAME: 'Draft IVAS Conformance test -- Linux: $CI_COMMIT_BRANCH'        
    - if: $CI_PIPELINE_SOURCE == 'trigger'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'check-float-reference'
      variables:
        IVAS_PIPELINE_NAME: 'check-float-reference: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'check-clipping'
      variables:
        IVAS_PIPELINE_NAME: 'Check core input clipping: $CI_COMMIT_BRANCH'
@@ -277,8 +273,6 @@ stages:
      when: never      
    - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux'
      when: never      
    - if: $MANUAL_PIPELINE_TYPE == 'check-float-reference'
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'check-clipping'
    - if: $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough'
      when: never
@@ -421,6 +415,16 @@ check-self-test-names-pre:
  script:
    - python3 ci/check_self_test_names.py scripts/config/self_test.prm 135

check-no-duplicates-in-self-tests:
  extends:
    - .rules-merge-request
  stage: prevalidate
  needs: []
  tags:
    - ivas-linux
  script:
    - python3 ci/find_duplicates_in_prm_files.py

branch-is-up-to-date-with-main-post:
  extends:
    - .rules-merge-request
@@ -432,8 +436,7 @@ branch-is-up-to-date-with-main-post:
    - echo $commits_behind_count
    - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1; fi;

# for merges to basop-ci-branch, run the long test suite in reference generation mode to catch problems already here and not only in the BASOP repo
check-compatibility-with-basop-reference-branch:
.basop-ci-branch-compat-template:
  extends:
    - .test-job-linux
  rules:
@@ -441,29 +444,22 @@ check-compatibility-with-basop-reference-branch:
      changes:
        - tests/**/*
        - scripts/**/*
        - ci/**/*
    - if: ($CI_PIPELINE_SOURCE == 'web' || $CI_PIPELINE_SOURCE == 'trigger') && $MANUAL_PIPELINE_TYPE == 'check-float-reference'
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
  tags:
    - ivas-linux-fast
  script:
  before_script:
    - git clone -b $BASOP_REFERENCE_BRANCH https://forge.3gpp.org/rep/sa4/audio/ivas-basop.git --single-branch
    - make -j -C ivas-basop
    - cp ivas-basop/IVAS_cod ./IVAS_cod_ref
    - cp ivas-basop/IVAS_dec ./IVAS_dec_ref
    - cp ivas-basop/IVAS_cod ./IVAS_cod # Not used but needed to launch the pytest
    - cp ivas-basop/IVAS_dec ./IVAS_dec # Not used but needed to launch the pytest
    - python3 ci/remove_unsupported_testcases.py scripts/config/self_test.prm
    - python3 ci/remove_unsupported_testcases.py $PARAM_FILE
    - python3 tests/create_short_testvectors.py
    - exit_code1=0
    - exit_code2=0
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml || exit_code1=$?

    - python3 -m pytest tests/codec_be_on_mr_nonselection --param_file $PARAM_FILE --update_ref 1 --ref_encoder_path ivas-basop/IVAS_cod --ref_decoder_path ivas-basop/IVAS_dec --html=report.html --self-contained-html --junit-xml=report-junit.xml || true
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true
    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - exit 0
    - if [ $zero_errors != 1 ]; then echo "Run errors encountered with $PARAM_FILE !"; exit $EXIT_CODE_FAIL; fi

  artifacts:
    name: "check-float-reference--sha-$CI_COMMIT_SHORT_SHA--results"
    name: "$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA--results"
    when: always
    expire_in: 1 month
    paths:
@@ -475,6 +471,38 @@ check-compatibility-with-basop-reference-branch:
      junit:
        - report-junit.xml

check-compatibility-with-basop-reference-branch-stv:
  extends:
    - .basop-ci-branch-compat-template
  variables:
    PARAM_FILE: scripts/config/self_test.prm
  script:
    - exit 0

check-compatibility-with-basop-reference-branch-ltv:
  extends:
    - .basop-ci-branch-compat-template
  variables:
    PARAM_FILE: scripts/config/self_test_ltv.prm
  script:
    - exit 0

check-compatibility-with-basop-reference-branch-encoder-stv:
  extends:
    - .basop-ci-branch-compat-template
  variables:
    PARAM_FILE: scripts/config/self_test_basop_encoder.prm
  script:
    - exit 0

check-compatibility-with-basop-reference-branch-encoder-ltv:
  extends:
    - .basop-ci-branch-compat-template
  variables:
    PARAM_FILE: scripts/config/self_test_ltv_basop_encoder.prm
  script:
    - exit 0

# ---------------------------------------------------------------
# Build jobs
# ---------------------------------------------------------------
@@ -508,7 +536,6 @@ build-codec-instrumented-linux:
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *activate-Werror-linux
    - ./scripts/prepare_instrumentation.sh
    - make -j -C scripts/c-code_instrument

@@ -2386,7 +2413,7 @@ coverage-test-on-main-scheduled:
  &complexity-measurements-prepare-artifacts # prepare artifacts -> move to public directory
  - public_dir="$CI_JOB_NAME-public"
  - mkdir $public_dir
  - mv -f wmops/log_*_all.txt wmops/*.js ${public_dir}/
  - mv -f wmops/log_*_all.txt ./*.js ${public_dir}/
  # move logfiles for links
  - mkdir $public_dir/logs
  # first move logs
+83 −6
Original line number Diff line number Diff line
@@ -160,7 +160,10 @@ typedef struct
    char *hrtfFileName;

    IVAS_DEC_HRTF_HANDLE *hHrtfTD;
#ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM
    IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF;
#endif

    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics;

    IVAS_BIN_RENDERER_TYPE binaural_renderer;
@@ -168,8 +171,12 @@ typedef struct
    IVAS_BIN_RENDERER_TYPE binaural_renderer_sec;
    IVAS_BIN_RENDERER_TYPE binaural_renderer_sec_old;

#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
    IVAS_AUDIO_CONFIG hrtf_set_audio_cfg;
#else
    IVAS_AUDIO_CONFIG intern_audio_config;
    int16_t room_reverb_flag;
#endif

} IVAS_DEC_HRTF_BINARY_WRAPPER;

@@ -182,7 +189,11 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg );
static void usage_dec( void );
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec );
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs );
#else
static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs );
#endif
#ifdef DEBUGGING
static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec );
static int16_t app_own_random( int16_t *seed );
@@ -237,7 +248,9 @@ int main(
#endif

    hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */
#ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM
    hHrtfBinary.hSetOfHRTF = NULL; /* just to avoid compilation warning */
#endif
    hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */

    splitRendBits.bits_buf = splitRendBitsBuf;
@@ -712,7 +725,7 @@ int main(
    }

    /*------------------------------------------------------------------------------------------*
     * Load HRTF binary file data
     * Initialize HRTF binary file data
     *------------------------------------------------------------------------------------------*/

    if ( arg.hrtfReaderEnabled )
@@ -721,8 +734,12 @@ int main(
        hHrtfBinary.hrtfFileName = arg.hrtfFileName;
        hHrtfBinary.binaural_renderer = IVAS_BIN_RENDERER_TYPE_NONE;
        hHrtfBinary.binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_NONE;
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
        hHrtfBinary.hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_INVALID;
#else
        hHrtfBinary.room_reverb_flag = 0;
        hHrtfBinary.intern_audio_config = IVAS_AUDIO_CONFIG_INVALID;
#endif
    }

    /*------------------------------------------------------------------------------------------*
@@ -801,7 +818,9 @@ cleanup:
    if ( arg.hrtfReaderEnabled )
    {
        destroy_td_hrtf( hHrtfBinary.hHrtfTD );
#ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM
        destroy_SetOfHRTF( hHrtfBinary.hSetOfHRTF );
#endif
        destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics );
    }

@@ -2353,7 +2372,11 @@ static ivas_error decodeG192(
                /* Read main parameters from the bitstream to set-up the decoder */
                hHrtfBinary->binaural_renderer_old = hHrtfBinary->binaural_renderer;
                hHrtfBinary->binaural_renderer_sec_old = hHrtfBinary->binaural_renderer_sec;
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
                if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtfBinary->binaural_renderer, &hHrtfBinary->binaural_renderer_sec, &hHrtfBinary->hrtf_set_audio_cfg ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtfBinary->binaural_renderer, &hHrtfBinary->binaural_renderer_sec, &hHrtfBinary->room_reverb_flag, &hHrtfBinary->intern_audio_config ) ) != IVAS_ERR_OK )
#endif
                {
                    return error;
                }
@@ -2364,7 +2387,11 @@ static ivas_error decodeG192(
                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
                    if ( ( error = load_hrtf_from_file( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtfBinary, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK )
#endif
                    {
                        fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                        goto cleanup;
@@ -3260,7 +3287,11 @@ static ivas_error decodeVoIP(
                /* Read main parameters from the bitstream to set-up the decoder */
                hHrtf->binaural_renderer_old = hHrtf->binaural_renderer;
                hHrtf->binaural_renderer_sec_old = hHrtf->binaural_renderer_sec;
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
                if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtf->binaural_renderer, &hHrtf->binaural_renderer_sec, &hHrtf->hrtf_set_audio_cfg ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtf->binaural_renderer, &hHrtf->binaural_renderer_sec, &hHrtf->room_reverb_flag, &hHrtf->intern_audio_config ) ) != IVAS_ERR_OK )
#endif
                {
                    return error;
                }
@@ -3271,7 +3302,11 @@ static ivas_error decodeVoIP(
                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
                    if ( ( error = load_hrtf_from_file( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtf, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK )
#endif
                    {
                        fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                        goto cleanup;
@@ -3662,6 +3697,20 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec(
#endif


#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
/*---------------------------------------------------------------------*
 * load_hrtf_from_file()
 *
 * Load HRTF coefficients from external binary file
 *---------------------------------------------------------------------*/

static ivas_error load_hrtf_from_file(
    IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, /* i/o: HRTF binary wrapper handle   */
    IVAS_DEC_HANDLE hIvasDec,                  /* i/o: IVAS decoder handle          */
    const IVAS_AUDIO_CONFIG OutputConfig,      /* i  : output audio configuration   */
    const int32_t output_Fs                    /* i  : output sampling rate         */
)
#else
/*---------------------------------------------------------------------*
 * IVAS_DEC_LoadHrtfFromFile()
 *
@@ -3672,6 +3721,7 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
    IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary,
    IVAS_DEC_HANDLE hIvasDec,
    const int32_t output_Fs )
#endif
{
    ivas_error error;
    IVAS_BIN_RENDERER_TYPE binaural_renderer, binaural_renderer_sec;
@@ -3697,11 +3747,13 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
            destroy_td_hrtf( hHrtfBinary->hHrtfTD );
        }

#ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM
        if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && hHrtfBinary->hSetOfHRTF != NULL )
        {
            destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF );
        }

#endif
        if ( ( error = IVAS_DEC_HRTF_binary_close( hIvasDec, hHrtfBinary->binaural_renderer_old ) ) != IVAS_ERR_OK )
        {
            return error;
@@ -3723,13 +3775,17 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(

        if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer_sec == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT )
        {
            if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfBinary->hHrtfTD ) ) != IVAS_ERR_OK )
            if ( ( error = IVAS_DEC_GetHrtfTDrendHandle( hIvasDec, &hHrtfBinary->hHrtfTD ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                fprintf( stderr, "\nIVAS_DEC_GetHrtfTDrendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                return error;
            }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_TDrend_HRTF_binary( *hHrtfBinary->hHrtfTD, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_HRTF_binary( *hHrtfBinary->hHrtfTD, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
@@ -3745,13 +3801,22 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(

        if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT )
        {
#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
            IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL;
            if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfCrend ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfBinary->hSetOfHRTF ) ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                return error;
            }

#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
            if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hHrtfBinary->hrtfReader, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, output_Fs ) ) != IVAS_ERR_OK )
#else
            if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, output_Fs ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
@@ -3760,7 +3825,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
                }
                else
                {
#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
                    destroy_crend_hrtf( hHrtfCrend );
#else
                    destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF );
#endif
                }
            }
        }
@@ -3774,7 +3843,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
                return error;
            }

#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hHrtfBinary->room_reverb_flag, hHrtfBinary->intern_audio_config, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
@@ -3812,11 +3885,15 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
        }
    }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
    if ( hHrtfBinary->hHrtfStatistics == NULL && ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#else
    if ( hHrtfBinary->hHrtfStatistics == NULL )
#endif
    {
        if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary->hHrtfStatistics ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            fprintf( stderr, "\nIVAS_DEC_GetHrtfStatisticsHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            return error;
        }

+35 −0
Original line number Diff line number Diff line
@@ -665,7 +665,11 @@ int main(
    SplitRendBFIFileReader *splitRendBFIReader = NULL;
    Vector3PairFileReader *referenceVectorReader = NULL;
    hrtfFileReader *hrtfFileReader = NULL;
#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
    IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL;
#else
    IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL;
#endif
    IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL;
    IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL;
    IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL;
@@ -906,7 +910,11 @@ int main(
                goto cleanup;
            }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_TDrend_HRTF_binary( *hHrtfTD, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
@@ -920,13 +928,27 @@ int main(
            }


#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
            if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hHrtfCrend ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "\nIVAS_Rend_GetHrtfCRendHandle failed: %s\n\n", ivas_error_to_string( error ) );
                goto cleanup;
            }

#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
            IVAS_AUDIO_CONFIG hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_7_1_4;
            if ( args.inConfig.ambisonicsBuses->audioConfig != IVAS_AUDIO_CONFIG_INVALID && args.outConfig.audioConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
            {
                hrtf_set_audio_cfg = args.inConfig.ambisonicsBuses->audioConfig;
            }

            if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hrtfFileReader, args.outConfig.audioConfig, hrtf_set_audio_cfg, args.sampleRate ) ) != IVAS_ERR_OK )
#else
            if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
@@ -935,7 +957,11 @@ int main(
                }
                else
                {
#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
                    destroy_crend_hrtf( hHrtfCrend );
#else
                    destroy_SetOfHRTF( hSetOfHRTF );
#endif
                }
            }

@@ -945,7 +971,11 @@ int main(
                goto cleanup;
            }

#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, hrtfFileReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
@@ -1952,7 +1982,9 @@ cleanup:

    Vector3PairFileReader_close( &referenceVectorReader );
    destroy_td_hrtf( hHrtfTD );
#ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM
    destroy_SetOfHRTF( hSetOfHRTF );
#endif
    destroy_hrtf_statistics( hHrtfStatistics );
    IVAS_REND_Close( &hIvasRend );
    IsmPositionProvider_close( positionProvider );
@@ -2495,6 +2527,9 @@ static CmdlnArgs defaultArgs(
    args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID;
    args.outConfig.outSetupCustom.num_spk = 0;
    args.outConfig.outSetupCustom.num_lfe = 0;
#ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM
    args.inConfig.ambisonicsBuses->audioConfig = IVAS_AUDIO_CONFIG_INVALID;
#endif

    for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i )
    {
+12 −0
Original line number Diff line number Diff line
@@ -425,6 +425,18 @@ def create_display_strings(

        displays.append(display)

    if which == "wmops_per_op" and has_comparison:
        # flot.js' "stack: true" depends on the order of data arrays
        # reorder here instead of reworking above loop
        displays_encs = displays[0].split(", \n")
        displays_decs = displays[1].split(", \n")
        displays = [
            displays_encs[0],
            displays_decs[0],
            displays_encs[1],
            displays_decs[1],
        ]

    return displays


+21 −7
Original line number Diff line number Diff line
@@ -29,11 +29,11 @@
# the United Nations Convention on Contracts on the International Sales of Goods.

function usage {
  echo "Usage: $0 \"ivas-format(s)\" \"output-format(s)\" \"mode{full(default)|mem_only}\" \"repo{float(default)|basop}\" "
  echo "Usage: $0 \"ivas-format(s)\" \"output-format(s)\" \"mode{full(default)|mem_only}\" \"repo{float(default)|basop}\" [wmops_ref_logfile]"
  exit 1
}

if [ $# -ne 2 ] && [ $# -ne 3 ] && [ $# -ne 4 ]; then
if [ $# -ne 2 ] && [ $# -ne 3 ] && [ $# -ne 4 ] && [ $# -ne 5 ]; then
  usage
fi

@@ -50,7 +50,7 @@ if [ $# -ge 3 ]; then
fi

repo_arg_script=""
if [ $# -eq 4 ]; then
if [ $# -ge 4 ]; then
  if [ "$4" = "basop" ]; then
    repo_arg_script="--basop"
  elif [ "$4" != "float" ]; then
@@ -58,6 +58,11 @@ if [ $# -eq 4 ]; then
  fi
fi

wmops_ref_logfile=""
if [ $# -eq 5 ]; then
  wmops_ref_logfile=$5
fi

date=$(date +%Y%m%d)                           # used for log-file file ending
shortDate=$(date "+%b %d" | sed -e "s/\ /_/g") # stored in the log-file
fullDate=$(date "+%c" | sed -e "s/\ /_/g")     # stored in the log-file
@@ -73,14 +78,15 @@ config_file="scripts/config/ci_linux_ltv.json"
# get wmops newsletter
ivas_format_for_filename=${ivas_format// /-}
wmopsFilenameFlcLast=wmops_newsletter_${ivas_format_for_filename}_to_${output_format}__${commit_sha}_${date}
wmopsFilenameFlc=${destDir}/wmops/logs/${wmopsFilenameFlcLast}
wmopsFilenameFlcDir=${destDir}/wmops/logs
wmopsFilenameFlc=${wmopsFilenameFlcDir}/${wmopsFilenameFlcLast}

ret_val=0

mode_arg=""
# for OSBA, there are just too many modes... -> only select HOA3 ones
if [ "$ivas_format" == "OSBA" ]; then
  osba_hoa3_modes=$(./scripts/runIvasCodec.py -C OSBA -l | grep "HOA3" | grep -v "planar")
  osba_hoa3_modes=$(./scripts/runIvasCodec.py -C OSBA -l | grep "HOA3" | grep -v "Planar")
  mode_arg="-m $osba_hoa3_modes"
fi

@@ -92,6 +98,9 @@ ret_val=$?
### WMOPS
${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcLast}_WMOPS.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_wmops_all.txt

# create copy of WMOPS csv file with special name to easily get it from artifacts when comparing BASOP to float numbers
cp ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcDir}/latest_WMOPS.csv

# get memory info for webpage
### RAM
${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv >${wmopsFilenameFlc}_RAM.csv
@@ -102,7 +111,12 @@ ${scriptDir}/mergeNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameF
${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv ${wmopsFilenameFlcLast}_ROM.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_rom_all.txt

# generate javascript code from log files
# pass the ref log for comparison only if arg is given
if [ "$wmops_ref_logfile" != "" ]; then
  python3 ci/complexity_measurements/genWebpageData.py ${destDir}/wmops/log_wmops_all.txt ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/log_ram_all.txt --wmops_per_op_log_for_comparison $wmops_ref_logfile
else
  python3 ci/complexity_measurements/genWebpageData.py ${destDir}/wmops/log_wmops_all.txt ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/log_ram_all.txt
fi

python3 ${scriptDir}/check_for_changes.py ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/log_rom_all.txt
if [ "$?" != "0" ]; then
Loading