Commit 73b45f5c authored by emerit's avatar emerit
Browse files

Merge branch 'main' into update_crend

parents 00da7984 c8984ee7
Loading
Loading
Loading
Loading

.gitlab-ci-custom.yml

0 → 100644
+4 −0
Original line number Diff line number Diff line
include:
  - project: $CUSTOM_CI_PROJECT
    ref: $CUSTOM_CI_REF
    file: $CUSTOM_CI_FILE
 No newline at end of file
+53 −8
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ variables:
  TESTV_DIR: "/usr/local/testv"
  LTV_DIR: "/usr/local/ltv"
  EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop"
  REFERENCE_TAG: "20231128_Update_Ittiam"
  REFERENCE_BRANCH: "ivas-float-update"
  BUILD_OUTPUT: "build_output.txt"
  SCRIPTS_DIR: "/usr/local/scripts"
  EXIT_CODE_NON_BE: 123
@@ -16,6 +16,8 @@ variables:
  IVAS_PIPELINE_NAME: ''
  BASOP_CI_BRANCH_PC_REPO: "basop-ci-branch"
  PRM_FILES: "scripts/config/self_test.prm scripts/config/self_test_ltv.prm"
  TESTCASE_TIMEOUT_STV: 900
  TESTCASE_TIMEOUT_LTV: 2400
  MANUAL_PIPELINE_TYPE:
    description: "Type for the manual pipeline run. Use 'pytest-mld' to run MLD test against reference float codec." # Not implemented yet, but may be good to have a manual pipeline trigger
    value: 'default'
@@ -74,6 +76,7 @@ workflow:
stages:
  - build
  - test
  - deploy

# ---------------------------------------------------------------
# Generic script anchors
@@ -92,7 +95,8 @@ stages:
.setup-codec: &setup-codec
  - current_commit_sha=$(git rev-parse HEAD)
  ### build reference binaries
  - git checkout $REFERENCE_TAG
  - git checkout $REFERENCE_BRANCH
  - git pull
  - make clean
  - make -j
  - mv ./IVAS_cod ./IVAS_cod_ref
@@ -145,6 +149,9 @@ stages:
    - cp "$LTV_DIR"/*.met scripts/testv/
    - cp "$LTV_DIR"/*.csv scripts/testv/

.activate-Werror-linux: &activate-Werror-linux
  - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile

.rules-pytest-mld:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-mld"
@@ -210,12 +217,17 @@ stages:
  stage: test
  needs: ["build-codec-linux-make"]
  timeout: "240 minutes"
  variables:
    MLD_ARTIFACT_NAME: "mld--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.csv"
  script:
    - *print-common-info
    - *update-scripts-repo
    - if [ $USE_LTV -eq 1 ]; then
    -    *update-ltv-repo
    -    *copy-ltv-files-to-testv-dir
    -    testcase_timeout=$TESTCASE_TIMEOUT_LTV
    - else
    -    testcase_timeout=$TESTCASE_TIMEOUT_STV
    - fi
    - python3 ci/remove_unsupported_testcases.py $PRM_FILES
    - if [ $LEVEL_SCALING != "1.0" ];then
@@ -225,12 +237,24 @@ stages:

    ### run pytest
    - exit_code=0
    # timeout of 15 min per individual testcase - hopefully too much, but better be safe for now
    - testcase_timeout=900
    - python3 -m pytest $TEST_SUITE -v --create_cut --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - python3 scripts/parse_mld_xml.py report-junit.xml mld.csv
    - python3 scripts/parse_mld_xml.py report-junit.xml $MLD_ARTIFACT_NAME

    - if [ $USE_LTV -eq 1 ] && [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
    -    id_previous=$(python3 get_id_of_last_job_occurence.py $CI_DEFAULT_BRANCH $CI_JOB_NAME $CI_PROJECT_ID)
    -    echo "Job ID from variables - $CI_JOB_ID, Job ID from script - $id_previous"
    -    curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$id_previous/artifacts" --output artifacts.zip
    -    unzip artifacts.zip -d previous_artifacts
    # This wildcard thingy relies on only one csv file being present per job
    -    file_previous="previous_artifacts/mld--ivas-pytest-mld-long-dec-$id_previous--sha-*.csv"
    -    python3 ci/basop-pages/create_report_pages.py $CI_JOB_NAME-index.html $CI_JOB_NAME--merged_csv--$CI_JOB_ID--$id_previous.csv $MLD_ARTIFACT_NAME $file_previous $CI_JOB_ID $id_previous $CI_JOB_NAME
    - else
    # create empty file for artifacts to avoid errors
    -    touch $CI_JOB_NAME-index.html
    -    touch $CI_JOB_NAME--merged_csv--$CI_JOB_ID--$id_previous.csv
    - fi

    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi
@@ -246,7 +270,9 @@ stages:
    paths:
      - report-junit.xml
      - report.html
      - mld.csv
      - $CI_JOB_NAME-index.html
      - $MLD_ARTIFACT_NAME
      - $CI_JOB_NAME-merged_csv--$CI_JOB_ID--$id_previous.csv
    expose_as: "pytest mld results"
    reports:
      junit:
@@ -272,7 +298,7 @@ stages:
    - make clean
    - make -j CLANG=$CLANG_NUM
    - if [[ $CLANG_NUM == 3 ]]; then export UBSAN_OPTIONS="suppressions=scripts/ubsan.supp,report_error_type=1"; fi
    - testcase_timeout=300
    - testcase_timeout=$TESTCASE_TIMEOUT_STV
    - python3 -m pytest $SHORT_TEST_SUITE -v --tb=no --update_ref 1 -m create_ref --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout $testcase_timeout --ref_encoder_path ./IVAS_cod_ref --ref_decoder_path ./IVAS_dec
  artifacts:
    name: "$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA--results"
@@ -302,6 +328,7 @@ build-codec-linux-make:
    - .build-job-linux
  script:
    - *print-common-info
    - *activate-Werror-linux
    - make -j

# ensure that codec builds on linux with instrumentation active
@@ -591,3 +618,21 @@ be-2-evs-26444:
    reports:
      junit:
        - report-junit.xml    

# job that sets up gitlab pages website
pages:
  stage: deploy
  tags:
    - ivas-basop-linux
  rules:
    - if: $UPDATE_PAGES
  script:
    - *print-common-info
    - *update-scripts-repo
    - python3 ci/setup_pages.py
    - ls
    - ls public
  artifacts:
    paths:
      - public
    expire_in: 1 day
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \
            -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes  \
            -Werror-implicit-function-declaration \
            -Wno-implicit-fallthrough -ffp-contract=off
# to be uncommented in CI
# CFLAGS += -Werror

# libs to link
LDLIBS   += -lm
+1 −0
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@
    <ClCompile Include="..\lib_dec\ivas_lfe_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_lfe_dec_fx.c" />
    <ClCompile Include="..\lib_dec\ivas_lfe_plc.c" />
    <ClCompile Include="..\lib_dec\ivas_lfe_plc_fx.c" />
    <ClCompile Include="..\lib_dec\ivas_ls_custom_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_masa_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_mcmasa_dec.c" />
+19 −3
Original line number Diff line number Diff line
@@ -454,6 +454,14 @@ int main(
            fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
            goto cleanup;
        }
#ifdef IVAS_FLOAT_FIXED
        FOR( Word16 i = 0; i < 4; i++ )
        {
            renderConfig.directivity_fx[i * 3] = (Word16) ( renderConfig.directivity[i * 3] * ( 1u << 6 ) );
            renderConfig.directivity_fx[i * 3 + 1] = (Word16) ( renderConfig.directivity[i * 3 + 1] * ( 1u << 6 ) );
            renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( (1u << 15)-1 ) );
        }
#endif // IVAS_FLOAT_FIXED

        if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
@@ -1615,7 +1623,11 @@ static ivas_error decodeG192(
    bool needNewFrame;
    int16_t nSamplesRendered, nSamplesRendered_loop, nSamplesToRender;
    IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS];
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } };
#ifdef IVAS_FLOAT_FIXED
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0,0 }, { 0, 0, 0, 0, 0, 0, 0 } };
#else
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0,  }, { 0, 0,0 }, { 0, 0, 0 } };
#endif
    int16_t vec_pos_update, vec_pos_len;


@@ -2182,7 +2194,11 @@ static ivas_error decodeVoIP(

    IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN;
    IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS];
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } };
#ifdef IVAS_FLOAT_FIXED
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0,0 }, { 0, 0, 0, 0, 0, 0, 0 } };
#else
    IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0,  }, { 0, 0,0 }, { 0, 0, 0 } };
#endif
    int16_t vec_pos_update, vec_pos_len;
    int16_t nOutSamples = 0;

Loading