Commit 1adcbbb2 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'main' of forge.3gpp.org:ivas-codec-pc/ivas-codec into...

Merge branch 'main' of forge.3gpp.org:ivas-codec-pc/ivas-codec into hrtf_float_tables_fx_file_format
parents 2cd31c49 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)
+4 −0
Original line number Diff line number Diff line
@@ -563,6 +563,10 @@ enum

#define INT_FS_12k8                         12800                                                                                                            /* internal sampling frequency                */
#define M                                   16                                                                                                               /* order of the LP filter @ 12.8kHz           */
#ifdef NONE_BE_FIX_816_LFE_PLC_FLOAT
#define MAX_LP_FILTER_ORDER                 20                                              /* Max order of an LP filter */
#endif

#define L_FRAME                             256                                                                                                              /* frame size at 12.8kHz                      */
#define NB_SUBFR                            4                                                                                                                /* number of subframes per frame              */
#define L_SUBFR                             ( L_FRAME / NB_SUBFR )                                                                                           /* subframe size                              */
+4 −0
Original line number Diff line number Diff line
@@ -1444,7 +1444,11 @@ typedef enum
/* LFE PLC */
#define LFE_PLC_BUFLEN                          240
#define LFE_PLC_FS                              1600
#ifdef NONE_BE_FIX_816_LFE_PLC_FLOAT
#define L_FRAME_1k6                             ( LFE_PLC_FS / FRAMES_PER_SEC )
#else
#define L_FRAME_1k6                             ( 20 * LFE_PLC_FS / 1000 )
#endif
#define LFE_PLC_LENANA                          LFE_PLC_BUFLEN
#define LFE_PLC_FDEL                            300

Loading