Commit 771d0b85 authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into...

- Merge remote-tracking branch 'remotes/origin/main' into 880-functions-renaming-after-nonbe_unified_decoding_paths
parents 3b5c6880 3c8399c7
Loading
Loading
Loading
Loading
+46 −50
Original line number Diff line number Diff line
@@ -93,16 +93,19 @@ stages:
  # needed when depth is lower than the number of commits in the branch
  - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME

.mr-get-target-commit:
  &mr-get-target-commit # compare to last target branch commit before pipeline was created
.mr-get-target-commit: &mr-get-target-commit # compare to last target branch commit before pipeline was created
  - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H)

.check-for-testvectors:
  &check-for-testvectors # check if the testvector files specified in scripts/config/ci_linux*.json are present
.check-for-testvectors: &check-for-testvectors # check if the testvector files specified in scripts/config/ci_linux*.json are present
  - python3 -m pytest ci/test_vectors_available.py

.merge-request-comparison-setup-codec:
  &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons
.disable-debugging-macro: &disable-debugging-macro
# automatically disable #DEBUGGING macro in options.h using /**/-comment
  - sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h

.merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec 
  ### build test binaries, initial clean for paranoia reasons
  - *disable-debugging-macro
  - make clean
  - mkdir build
  - cd build
@@ -113,17 +116,18 @@ stages:
  - mv IVAS_rend ../IVAS_rend_test
  - cd ..
  - rm -rf build/*
  - git restore .

  ### store the current commit hash
  - source_branch_commit_sha=$(git rev-parse HEAD)

  ### checkout version to compare against
  - *mr-fetch-target-branch

  - *mr-get-target-commit
  - git checkout $target_commit

  ### build reference binaries
  - *disable-debugging-macro
  - cd build
  - cmake ..
  - make -j
@@ -131,6 +135,7 @@ stages:
  - mv IVAS_dec ../IVAS_dec_ref
  - mv IVAS_rend ../IVAS_rend_ref
  - cd ..
  - git restore .

  # rename test binaries back
  - mv IVAS_cod_test IVAS_cod
@@ -308,9 +313,7 @@ build-codec-linux-make:
    - .rules-basis
  script:
    - *print-common-info
    - make -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?
    - make -j

build-codec-linux-cmake:
  extends:
@@ -322,9 +325,7 @@ build-codec-linux-cmake:
    - cd build
    - cmake ..
    - cd ..
    - make -C build -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?
    - make -C build -j

build-codec-instrumented-linux:
  extends:
@@ -343,8 +344,6 @@ build-codec-sanitizers-linux:
  script:
    - *print-common-info
    - bash ci/build_codec_sanitizers_linux.sh
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-codec-include-split-linux-make:
  extends:
@@ -352,9 +351,8 @@ build-codec-include-split-linux-make:
    - .rules-basis
  script:
    - *print-common-info
    - make -j INCLUDE_SPLIT=1 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?
    - *enable-split-rendering
    - make -j INCLUDE_SPLIT=1

build-codec-include-split-linux-cmake:
  extends:
@@ -362,13 +360,12 @@ build-codec-include-split-linux-cmake:
    - .rules-basis
  script:
    - *print-common-info
    - *enable-split-rendering
    - mkdir build
    - cd build
    - cmake .. -DINCLUDE_SPLIT=1
    - cd ..
    - make -C build -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?
    - make -C build -j

build-codec-windows-cmake:
  extends:
@@ -378,10 +375,7 @@ build-codec-windows-cmake:
    - *print-common-info-windows
    - $winoutdata = $null
    - cmake -G "Visual Studio 15 2017" . -Bbuild
    - cmake --build build -j | tee -variable winoutdata
    - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8
    - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression
    - ("exit $LASTEXITCODE") | Invoke-Expression
    - cmake --build build -j

build-codec-windows-include-split-cmake:
  extends:
@@ -390,11 +384,11 @@ build-codec-windows-include-split-cmake:
  script:
    - *print-common-info-windows
    - $winoutdata = $null
    - get-content .\lib_com\options.h | %{$_ -replace "/\*#define[\s]*SPLIT_REND_WITH_HEAD_ROT[\s]*\*/", "#define SPLIT_REND_WITH_HEAD_ROT"} | set-content -Path ./options_patched.h
    - rm ./lib_com/options.h
    - mv ./options_patched.h ./lib_com/options.h
    - cmake -DINCLUDE_SPLIT=1 -G "Visual Studio 15 2017" . -Bbuild
    - cmake --build build -j | tee -variable winoutdata
    - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8
    - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression
    - ("exit $LASTEXITCODE") | Invoke-Expression
    - cmake --build build -j

build-codec-windows-msbuild:
  extends:
@@ -405,9 +399,6 @@ build-codec-windows-msbuild:
    - $winoutdata = $null
    - py .\scripts\strip_split_rendering.py
    - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata
    - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8
    - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression
    - ("exit $LASTEXITCODE") | Invoke-Expression

# ---------------------------------------------------------------
# Test jobs for merge requests
@@ -419,6 +410,8 @@ codec-smoke-test:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  timeout: "17 minutes"
  tags:
    - ivas-linux-fast
  stage: test
  needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"]
  script:
@@ -995,8 +988,9 @@ check-first-frame-is-sid:
    - exit_code_foa=0

    # run all modes and cut bitstream to start with an SID. Use stereo output to limit runtime, test is only about decoding
    - ism_md_cmd="--ism_metadata_files /usr/local/ltv/ltvISM1.csv /usr/local/ltv/ltvISM2.csv /usr/local/ltv/ltvISM3.csv /usr/local/ltv/ltvISM4.csv"
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -vE "FOA|HOA" )
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 200 -U 0:20 --oc stereo || exit_code_no_sba=$?
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 200 -U 0:20 --oc stereo $ism_md_cmd || exit_code_no_sba=$?
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -E "HOA")
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 100 -U 70:80 --oc stereo || exit_code_hoa=$?
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep "FOA")
@@ -1180,9 +1174,6 @@ test-be-to-release:

    - echo "$CI_COMMIT_BRANCH"
    - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug /p:Platform=win32 /m | tee -variable winoutdata
    - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8
    - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression
    - ("exit $LASTEXITCODE") | Invoke-Expression

    # path to release candidate refs defined in config.toml

@@ -1567,6 +1558,17 @@ sanitizer-test-osba-hoa3-ism2:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-omasa-ism4:
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 97.5 hours
  timeout: 10 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS


### --- sanitizer schedule C ---

@@ -1603,22 +1605,12 @@ sanitizer-test-omasa-ism3:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-omasa-ism4:
  extends: .sanitizer-test-schedule-C
  rules:
    - if: $SANITIZER_SCHEDULE_C
      when: delayed
      start_in: 30 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-osba-hoa3-ism3:
  extends: .sanitizer-test-schedule-C
  rules:
    - if: $SANITIZER_SCHEDULE_C
      when: delayed
      start_in: 40 hours
      start_in: 30 hours
  timeout: 7.5 hours
  script:
    - *update-ltv-repo
@@ -1629,7 +1621,7 @@ sanitizer-test-osba-hoa3-ism4:
  rules:
    - if: $SANITIZER_SCHEDULE_C
      when: delayed
      start_in: 47.5 hours
      start_in: 37.5 hours
  timeout: 7.5 hours
  script:
    - *update-ltv-repo
@@ -1812,22 +1804,26 @@ coverage-test-on-main-scheduled:
    - python3 tests/create_short_testvectors.py
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/smoke_test.sh coverage
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_ref
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_cut    
    - lcov -c -d obj -o coverage_stv.info # extract coverage of short test vectors here
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/smoke_test.sh coverage
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 -m create_ref --param_file scripts/config/self_test_ltv.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/ivas_voip_be_test.sh coverage
    - lcov -c -d obj -o coverage.info
    - commit_sha=$(git rev-parse HEAD)
    - genhtml coverage.info -o coverage -t "Coverage on main @ $commit_sha"
    - genhtml coverage_stv.info -o coverage_stv -t "Coverage on main -- short test vectors @ $commit_sha"
  artifacts:
    name: "main-coverage-sha-$CI_COMMIT_SHORT_SHA"
    when: always
    expire_in: 1 week
    paths:
      - coverage.info
      - coverage_stv.info
      - coverage
      - coverage_stv

# ---------------------------------------------------------------
# Complexity measurement jobs
+5 −5
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ if(UNIX)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off")  # disable floating point operation contraction
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wno-unused-parameter")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wno-unused-parameter")
  # CLANG
  if(CLANG)
    find_program(clangBin NAMES /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED)
@@ -112,8 +112,9 @@ elseif(WIN32)
    -D_CRT_SECURE_NO_WARNINGS
    /MP
  )
  # CMake sets /W3 by default, until CMake version 3.15. Instead of setting /W4 separately, replace in existing settings
  string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  if(NOT INCLUDE_SPLIT)
    add_compile_options("/W4" "/WX")
  endif()
endif()

# configuration options for all platforms
@@ -208,8 +209,7 @@ endif()

if(INCLUDE_SPLIT)
  if(NOT WMOPS)
  file(GLOB unitTestIvasLc3plusSrcs "scripts/split_rendering/lc3plus/*.c")
  add_executable(ivas_lc3plus_unit_test ${unitTestIvasLc3plusSrcs})
  add_executable(ivas_lc3plus_unit_test ${CMAKE_SOURCE_DIR}/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)
  endif()
endif()
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ endif
# C compiler flags
CFLAGS   += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long     \
            -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes  \
            -Werror-implicit-function-declaration \
            -Werror \
            -Wno-implicit-fallthrough -ffp-contract=off

# libs to link
@@ -120,7 +120,7 @@ VPATH = $(SRC_DIRS)
# Split rendering files
SRCS_SPLIT_REND = ivas_CQMFDecoder.c ivas_CQMFEncoder.c ivas_PerceptualModel.c ivas_PredDecoder.c \
                  ivas_PredEncoder.c ivas_RMSEnvGrouping.c ivas_MSPred.c ivas_NoiseGen.c \
                  ivas_cldfb_codec_bitstream.c ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \
                  ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \
                  ivas_splitRendererPLC.c ivas_splitRendererPost.c ivas_splitRendererPre.c \
                  ivas_splitRenderer_utils.c split_rend_bfi_file_reader.c split_render_file_read_write.c \
                  ivas_lcld_tables.c
+2 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <CompileAs>Default</CompileAs>
      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
      <TreatWarningAsError>true</TreatWarningAsError>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -129,6 +130,7 @@
      <DebugInformationFormat />
      <CompileAs>Default</CompileAs>
      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
      <TreatWarningAsError>true</TreatWarningAsError>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+2 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <CompileAs>Default</CompileAs>
      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
      <TreatWarningAsError>true</TreatWarningAsError>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -137,6 +138,7 @@
      <DebugInformationFormat />
      <CompileAs>Default</CompileAs>
      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
      <TreatWarningAsError>true</TreatWarningAsError>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Loading