Commit 97c7ffd1 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into ci/enforce-code-formatting

parents 4068f8a7 175c36e2
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
+40 −32
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'
@@ -93,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
@@ -147,6 +150,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"
@@ -218,6 +224,9 @@ stages:
    - 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
@@ -227,8 +236,6 @@ 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

@@ -274,7 +281,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"
@@ -360,6 +367,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
@@ -382,15 +390,15 @@ build-codec-linux-instrumented-make:
# Short test jobs 
# ---------------------------------------------------------------

ivas-pytest-mld-enc-dec:
  extends:
    - .rules-pytest-mld
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-mld-anchor  
#ivas-pytest-mld-enc-dec:
#  extends:
#    - .rules-pytest-mld
#    - .test-job-linux
#  before_script:
#    - USE_LTV=0
#    - TEST_SUITE="$SHORT_TEST_SUITE"
#    - LEVEL_SCALING=1.0
#  <<: *ivas-pytest-mld-anchor  
  
ivas-pytest-mld-dec:
  extends:
@@ -403,15 +411,15 @@ ivas-pytest-mld-dec:
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-mld-anchor
  
ivas-pytest-mld-enc-dec-lev-10:
  extends:
    - .rules-pytest-mld
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-mld-anchor  
#ivas-pytest-mld-enc-dec-lev-10:
#  extends:
#    - .rules-pytest-mld
#    - .test-job-linux    
#  before_script:
#    - USE_LTV=0  
#    - TEST_SUITE="$SHORT_TEST_SUITE"
#    - LEVEL_SCALING=0.3162
#  <<: *ivas-pytest-mld-anchor  
  
ivas-pytest-mld-dec-lev-10:
  extends:
@@ -424,15 +432,15 @@ ivas-pytest-mld-dec-lev-10:
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-mld-anchor

ivas-pytest-mld-enc-dec-lev+10:
  extends:
    - .rules-pytest-mld
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-mld-anchor  
#ivas-pytest-mld-enc-dec-lev+10:
#  extends:
#    - .rules-pytest-mld
#    - .test-job-linux    
#  before_script:
#    - USE_LTV=0  
#    - TEST_SUITE="$SHORT_TEST_SUITE"
#    - LEVEL_SCALING=3.162
#  <<: *ivas-pytest-mld-anchor  
  
ivas-pytest-mld-dec-lev+10:
  extends:
+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
@@ -447,6 +447,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 ) );
        }
#endif // IVAS_FLOAT_FIXED

        if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
@@ -1510,7 +1518,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;


@@ -2077,7 +2089,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