Commit 6f03ec7c authored by Jiaquan Huo's avatar Jiaquan Huo
Browse files

Merge branch 'main' into add_ltv_to_sba_pytests

parents 5aab6d55 f3dbf5db
Loading
Loading
Loading
Loading
Loading
+143 −15
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 != 1 ]; 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,7 +2350,7 @@ complexity-stereo-in-ext-out:
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

complexity-ism-in-binaural_room_reverb-out:
complexity-ism-in-binaural-out:
  extends:
    - .complexity-template
  rules:
@@ -2306,7 +2359,22 @@ complexity-ism-in-binaural_room_reverb-out:
      start_in: 1 hour
  script:
    - in_format=ISM
    - out_format=BINAURAL_ROOM_REVERB
    - 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: 2 hours
  script:
    - in_format=ISM
    - out_format=BINAURAL_ROOM_IR
    - 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
@@ -2318,7 +2386,7 @@ complexity-ism-in-ext-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 3 hour
      start_in: 3 hours
  script:
    - in_format=ISM
    - 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_room_ir-out:
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: 6 hours
  script:
    - in_format=HOA3
    - out_format=BINAURAL_ROOM_IR
@@ -2363,7 +2446,7 @@ complexity-mc-in-ext-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 6 hours
      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: 7 hours
      start_in: 9 hours
  script:
    - in_format=MC
    - out_format=BINAURAL_ROOM_IR
@@ -2393,7 +2491,7 @@ complexity-masa-in-ext-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 8 hours
      start_in: 10 hours
  script:
    - in_format=MASA
    - out_format=EXT
@@ -2408,7 +2506,7 @@ complexity-masa-in-binaural-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 9 hours
      start_in: 11 hours
  script:
    - in_format=MASA
    - out_format=BINAURAL
@@ -2423,7 +2521,7 @@ complexity-masa-in-hoa3-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 10 hours
      start_in: 12 hours
  script:
    - in_format=MASA
    - out_format=HOA3
@@ -2438,7 +2536,7 @@ complexity-omasa-in-ext-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 11 hours
      start_in: 13 hours
  script:
    - in_format=OMASA
    - out_format=EXT
@@ -2453,7 +2551,7 @@ complexity-omasa-in-binaural-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 12 hours
      start_in: 14 hours
  script:
    - in_format=OMASA
    - out_format=BINAURAL
@@ -2462,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: 13 hours
      start_in: 16 hours
  script:
    - in_format=StereoDmxEVS
    - out_format=mono
@@ -2483,7 +2596,7 @@ complexity-osba-in-ext-out:
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 14 hours
      start_in: 17 hours
  script:
    - in_format=OSBA
    - out_format=EXT
@@ -2492,13 +2605,28 @@ complexity-osba-in-ext-out:
    - *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: 15 hours
      start_in: 19 hours
  script:
    - in_format=OSBA
    - out_format=BINAURAL_ROOM_IR
+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;
}

+6 −1
Original line number Diff line number Diff line
@@ -20,18 +20,23 @@ JOBS_FLOAT_REPO = {
    # "complexity-masa-in-7_1_4-out": "[OLD] Masa in, 7_1_4 out",
    # current ones
    "complexity-stereo-in-ext-out": "Stereo in, EXT out",
    "complexity-ism-in-binaural_room_reverb-out": "ISM in, BINAURAL_ROOM_REVERB out",
    "complexity-ism-in-binaural-out": "ISM in, BINAURAL out",
    "complexity-ism-in-binaural_room_ir-out": "ISM in, BINAURAL_ROOM_IR out",
    "complexity-ism-in-ext-out": "ISM in, EXT out",
    "complexity-sba-hoa3-in-ext-out": "HOA3 in, EXT out",
    "complexity-sba-hoa3-in-binaural-out": "HOA3 in, BINAURAL out",
    "complexity-sba-hoa3-in-binaural_room_ir-out": "HOA3 in, BINAURAL_ROOM_IR out",
    "complexity-mc-in-ext-out": "MC in, EXT out",
    "complexity-mc-in-binaural-out": "MC in, BINAURAL out",
    "complexity-mc-in-binaural_room_ir-out": "MC in, BINAURAL_ROOM_IR out",
    "complexity-masa-in-ext-out": "MASA in, EXT out",
    "complexity-masa-in-binaural-out": "MASA in, BINAURAL out",
    "complexity-masa-in-hoa3-out": "MASA in, HOA3 out",
    "complexity-omasa-in-ext-out": "OMASA in, EXT out",
    "complexity-omasa-in-binaural-out": "OMASA in, BINAURAL out",
    "complexity-omasa-in-hoa3-out": "OMASA in, HOA3 out",
    "complexity-osba-in-ext-out": "OSBA in, EXT out",
    "complexity-osba-in-binaural-out": "OSBA in, BINAURAL out",
    "complexity-osba-in-binaural_room_ir-out": "OSBA in, BINAURAL_ROOM_IR out",
    "complexity-StereoDmxEVS-stereo-in-mono-out": "StereoDmxEVS, Stereo in, Mono out",
    # "timeless" jobs (not complexity)
+2 −0
Original line number Diff line number Diff line
@@ -1876,6 +1876,7 @@ const float ivas_param_mc_dmx_fac_CICP19_3tc[36] =
    0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f /*Ct*/
};
#ifndef FIX_1157_OBSOLETE_DMX_TABLE
const float ivas_param_mc_dmx_fac_CICP19_4tc[48] =
{
    1.0f, 0.0f, INV_SQRT2, INV_SQRT2, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, /*Lht*/
@@ -1883,6 +1884,7 @@ const float ivas_param_mc_dmx_fac_CICP19_4tc[48] =
    0.0f, 0.0f, 0.0f,      0.0f,      0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, /*Lut*/
    0.0f, 0.0f, 0.0f,      0.0f,      0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, /*Rut*/
};
#endif
/* Coefficient for Parametric MC ILD factorization */
const float ivas_param_mc_ild_fac_CICP6_2tc[6] =
+6 −1
Original line number Diff line number Diff line
@@ -172,6 +172,9 @@
#endif
#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define FIX_1152_UNINIT_VAL_IN_ITD_VAD_COMPUTATION      /* FhG: fix uninitialized value being used in ITD VAD mid signal computation that does not affect synthesis, but crashes BASOPs */
#define FIX_1157_OBSOLETE_DMX_TABLE                     /* FhG: remove obsolte ParamMC DMX table ivas_param_mc_dmx_fac_CICP19_4tc[] */
#define FIX_1135_EXT_RENDERER_HANDLES                   /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */
#define FIX_1159_SPLIT_RENDERING_CONFIG                 /* VA: issue 1159: Execute split rendering config only for split rendering outputs. */

/* #################### End BE switches ################################## */

@@ -180,6 +183,8 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1141_OSBA_ROOM_RENDERING                    /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */
#define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART             /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */
#define NONBE_FIX_1143_MASA_BRSW                              /* Nok: Fix for issue 1143: MSAN use of uninitialized value in masa decoding to binaural with dtx bitrate switching and 5 % FER */


#define NONE_BE_FIX_816_LFE_PLC_FLOAT                   /* DLB: issue 816: reduce required precision to float for LFE-PLC*/
Loading