Commit da3e744a authored by emerit's avatar emerit
Browse files

Merge branch 'main' into fix_hrtf_processing_scripts_for_3rd_party_sofa_support

parents 464cdd1b 4e0c3f63
Loading
Loading
Loading
Loading
+196 −23
Original line number Diff line number Diff line
@@ -23,9 +23,11 @@ variables:
      - 'test-long-self-test'
      - 'ivas-conformance'
      - 'ivas-conformance-linux'
      - 'check-float-reference'
  GIT_CLEAN_FLAGS: -ffdxq
  TESTCASE_TIMEOUT_STV_SANITIZERS: 180
  TESTCASE_TIMEOUT_LTV_SANITIZERS: 1200
  BASOP_REFERENCE_BRANCH: "ivas-float-update"


default:
@@ -63,6 +65,10 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux'
      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'
    

stages:
@@ -257,6 +263,8 @@ stages:
      when: never      
    - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux'
      when: never      
    - if: $MANUAL_PIPELINE_TYPE == 'check-float-reference'
      when: never
    - when: on_success

.rules-merge-request:
@@ -396,7 +404,6 @@ check-self-test-names-pre:
  script:
    - python3 ci/check_self_test_names.py scripts/config/self_test.prm 135


branch-is-up-to-date-with-main-post:
  extends:
    - .rules-merge-request
@@ -408,6 +415,52 @@ 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:
  extends:
    - .test-job-linux
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "basop-ci-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:
    - 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 tests/create_short_testvectors.py
    - exit_code1=0
    - exit_code2=0
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v --update_ref 1 -m create_ref --html=report1.html --self-contained-html --junit-xml=report-junit1.xml || exit_code1=$?
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v --update_ref 1 -m create_ref_part2 --html=report2.html --self-contained-html --junit-xml=report-junit2.xml || exit_code2=$?
    - zero_errors=$(cat report-junit1.xml report-junit2.xml | grep -c 'errors="0"') || true
    - if [ $zero_errors != 2 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - exit 0
  artifacts:
    name: "check-float-reference--sha-$CI_COMMIT_SHORT_SHA--results"
    when: always
    expire_in: 1 month
    paths:
      - report-junit1.xml
      - report-junit2.xml
      - report1.html
      - report2.html
    expose_as: "check-float-reference results"
    reports:
      junit:
        - report-junit1.xml
        - report-junit2.xml

# ---------------------------------------------------------------
# Build jobs
# ---------------------------------------------------------------
@@ -2297,13 +2350,28 @@ complexity-stereo-in-ext-out:
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-ism-in-binaural-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 1 hour
  script:
    - in_format=ISM
    - out_format=BINAURAL
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "ISM+1 ISM+2 ISM+3 ISM+4" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-ism-in-binaural_room_ir-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 1 hour
      when: delayed
      start_in: 2 hours
  script:
    - in_format=ISM
    - out_format=BINAURAL_ROOM_IR
@@ -2317,8 +2385,8 @@ complexity-ism-in-ext-out:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 2 hour
      when: delayed
      start_in: 3 hours
  script:
    - in_format=ISM
    - out_format=EXT
@@ -2332,8 +2400,8 @@ complexity-sba-hoa3-in-ext-out:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 3 hours
      when: delayed
      start_in: 4 hours
  script:
    - in_format=HOA3
    - out_format=EXT
@@ -2342,13 +2410,28 @@ complexity-sba-hoa3-in-ext-out:
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-sba-hoa3-in-binaural-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 5 hours
  script:
    - in_format=HOA3
    - out_format=BINAURAL
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-sba-hoa3-in-binaural_room_ir-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 4 hours
      when: delayed
      start_in: 6 hours
  script:
    - in_format=HOA3
    - out_format=BINAURAL_ROOM_IR
@@ -2362,8 +2445,8 @@ complexity-mc-in-ext-out:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 5 hours
      when: delayed
      start_in: 7 hours
  script:
    - in_format=MC
    - out_format=EXT
@@ -2372,13 +2455,28 @@ complexity-mc-in-ext-out:
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-mc-in-binaural-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 8 hours
  script:
    - in_format=MC
    - out_format=BINAURAL
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-mc-in-binaural_room_ir-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 6 hours
      when: delayed
      start_in: 9 hours
  script:
    - in_format=MC
    - out_format=BINAURAL_ROOM_IR
@@ -2392,8 +2490,8 @@ complexity-masa-in-ext-out:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 7 hours
      when: delayed
      start_in: 10 hours
  script:
    - in_format=MASA
    - out_format=EXT
@@ -2407,8 +2505,8 @@ complexity-masa-in-binaural-out:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 8 hours
      when: delayed
      start_in: 11 hours
  script:
    - in_format=MASA
    - out_format=BINAURAL
@@ -2417,13 +2515,28 @@ complexity-masa-in-binaural-out:
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-masa-in-hoa3-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 12 hours
  script:
    - in_format=MASA
    - out_format=HOA3
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-omasa-in-ext-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 9 hours
      when: delayed
      start_in: 13 hours
  script:
    - in_format=OMASA
    - out_format=EXT
@@ -2437,8 +2550,8 @@ complexity-omasa-in-binaural-out:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 10 hours
      when: delayed
      start_in: 14 hours
  script:
    - in_format=OMASA
    - out_format=BINAURAL
@@ -2447,13 +2560,28 @@ complexity-omasa-in-binaural-out:
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-omasa-in-hoa3-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 15 hours
  script:
    - in_format=OMASA
    - out_format=HOA3
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-StereoDmxEVS-stereo-in-mono-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      # when: delayed
      # start_in: 11 hours
      when: delayed
      start_in: 16 hours
  script:
    - in_format=StereoDmxEVS
    - out_format=mono
@@ -2462,6 +2590,51 @@ complexity-StereoDmxEVS-stereo-in-mono-out:
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-osba-in-ext-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 17 hours
  script:
    - in_format=OSBA
    - out_format=EXT
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-osba-in-binaural-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 18 hours
  script:
    - in_format=OSBA
    - out_format=BINAURAL
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-osba-in-binaural_room_ir-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 19 hours
  script:
    - in_format=OSBA
    - out_format=BINAURAL_ROOM_IR
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

# ---------------------------------------------------------------
# Other jobs
# ---------------------------------------------------------------
+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ target_include_directories(lib_util PUBLIC lib_util PRIVATE lib_com lib_enc lib_
target_include_directories(lib_util PRIVATE lib_lc3plus lib_isar)

if(NOT WMOPS)
  add_executable(ivas_lc3plus_unit_test ${CMAKE_SOURCE_DIR}/scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test.c)
  add_executable(ivas_lc3plus_unit_test scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test.c)
  target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug lib_isar)
endif()

+26 −0
Original line number Diff line number Diff line
@@ -169,6 +169,10 @@ typedef struct
    char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    int8_t orientation_tracking;
#ifdef FIX_1135_EXT_RENDERER_HANDLES
    int16_t Opt_Headrotation;
    int16_t Opt_ExternalOrientation;
#endif
    int16_t nonDiegeticPan;
    float nonDiegeticPanGain;
    IVAS_REND_COMPLEXITY_LEVEL complexityLevel;
@@ -882,7 +886,11 @@ int main(

    const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) );

#ifdef FIX_1135_EXT_RENDERER_HANDLES
    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) );
        exit( -1 );
@@ -2510,7 +2518,12 @@ static CmdlnArgs defaultArgs(
    clearString( args.renderConfigFilePath );
    clearString( args.externalOrientationFilePath );

#ifdef FIX_1135_EXT_RENDERER_HANDLES
    args.Opt_Headrotation = 0;
    args.Opt_ExternalOrientation = 0;
#endif
    args.orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE;

    args.nonDiegeticPan = 0;
    args.nonDiegeticPanGain = 0.f;

@@ -2598,6 +2611,9 @@ static void parseOption(
            break;
        case CmdLnOptionId_trajFile:
            assert( numOptionValues == 1 );
#ifdef FIX_1135_EXT_RENDERER_HANDLES
            args->Opt_Headrotation = 1;
#endif
            strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
        case CmdLnOptionId_outputMetadata:
@@ -2618,6 +2634,9 @@ static void parseOption(
            break;
        case CmdLnOptionId_exteriorOrientationFile:
            assert( numOptionValues == 1 );
#ifdef FIX_1135_EXT_RENDERER_HANDLES
            args->Opt_ExternalOrientation = 1;
#endif
            strncpy( args->externalOrientationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
        case CmdLnOptionId_customHrtfFile:
@@ -2742,6 +2761,13 @@ static CmdlnArgs parseCmdlnArgs(
        exit( -1 ); /* Error printout handled by failing function */
    }

#ifdef FIX_1135_EXT_RENDERER_HANDLES
    if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        args.Opt_Headrotation = 1;
    }
#endif

    return args;
}

+3 −3
Original line number Diff line number Diff line
@@ -8,9 +8,9 @@
  <h2>Daily long testvector tests</h2>

  <ul>
    <li><a href="ivas-pytest-mld-long-dec-index.html">ivas-pytest-mld-long-dec</a></li>
    <li><a href="ivas-pytest-mld-long-dec-lev+10-index.html">ivas-pytest-mld-long-dec-lev+10</a></li>
    <li><a href="ivas-pytest-mld-long-dec-lev-10-index.html">ivas-pytest-mld-long-dec-lev-10</a></li>
    <li><a href="ivas-pytest-compare_ref-long-dec-index.html">ivas-pytest-compare_ref-long-dec</a></li>
    <li><a href="ivas-pytest-compare_ref-long-dec-lev+10-index.html">ivas-pytest-compare_ref-long-dec-lev+10</a></li>
    <li><a href="ivas-pytest-compare_ref-long-dec-lev-10-index.html">ivas-pytest-compare_ref-long-dec-lev-10</a></li>
  </ul>

</body>
+10 −3
Original line number Diff line number Diff line
@@ -198,10 +198,12 @@ def tr_from_row(row, id_current, id_previous):
            try:
                if float(curr) > float(prev):
                    curr += f" {ARROW_UP}"
                    td_tmpl_curr = TD_TMPL_INCREASE
                    # increase is bad -> mark in red, execpt for SNR for which it is good -> mark in green
                    td_tmpl_curr = TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE
                elif float(curr) < float(prev):
                    curr += f" {ARROW_DOWN}"
                    td_tmpl_curr = TD_TMPL_REDUCE
                    # reduce is good -> mark in green, execpt for SNR for which it is bad -> mark in red
                    td_tmpl_curr = TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE
            except ValueError:
                # if we land here, one of the cells is not a number, this indicates a crash
                # or some error in the scripts, so mark with red as well
@@ -258,7 +260,12 @@ def merge_and_cleanup_mld_reports(
            for col_pair in other_col_pairs:
                col_prev = col_pair[0]
                col_curr = col_pair[1]

                try:
                    diff_other += abs(float(x[col_curr]) - float(x[col_prev]))
                except ValueError:
                    # can't make float from the column contents, probably NONE -> put to top
                    diff_other += float("inf")

            if diff_other > 0:
                diff = -1000000
Loading