Commit 694960ab authored by lefort's avatar lefort
Browse files

Merge branch 'main' into orange/contribution-48-enhanced-stereo-downmix

parents 4c11b967 59b30768
Loading
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -72,3 +72,15 @@ Externals/

# coan output files that are created when cleaning out switches
coan_out_*
/COMPLEXITY
/res
/tv
/wmops
/Workspace_msvc/renderer.args.json
/Workspace_msvc/encoder.args.json
/Workspace_msvc/decoder.args.json
/scripts/mem_analysis_enc_VBR_5k9.csv
/scripts/mem_analysis_enc_STEREO_sw.png
/scripts/mem_analysis_enc_STEREO_sw.csv
/scripts/mem_analysis_enc_STEREO_16k4_DTX.csv
*.pwv
+131 −12
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ variables:
  LTV_DIR: "/usr/local/ltv"
  BUILD_OUTPUT: "build_output.txt"
  EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test"
  EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec"
  SANITIZER_TESTS: "CLANG1 CLANG2"
  OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4"
  OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3"
@@ -12,8 +13,6 @@ variables:

default:
  interruptible: true # Make all jobs by default interruptible
  artifacts:
    expire_in: 2 weeks

# This sets when pipelines are created. Jobs have more specific rules to restrict them.
workflow:
@@ -267,6 +266,7 @@ build-codec-instrumented-linux:
  extends:
    - .build-job-linux
    - .rules-basis
  timeout: "6 minutes"
  script:
    - *print-common-info
    - bash ci/build_codec_instrumented_linux.sh
@@ -314,7 +314,7 @@ codec-smoke-test:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  timeout: "5 minutes"
  timeout: "10 minutes"
  stage: test
  needs: ["build-codec-linux-cmake"]
  script:
@@ -327,6 +327,7 @@ codec-smoke-test:
    - if cat smoke_test_output_hrtf.txt | grep -c "failed"; then echo "Smoke test with external hrtf files failed"; exit 1; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    paths:
      - smoke_test_output.txt
      - smoke_test_output_plc.txt
@@ -351,6 +352,7 @@ codec-msan:
    - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang memory-sanitizer"; exit 1; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    paths:
      - scripts/ref/logs/
      - test_output.txt
@@ -373,6 +375,7 @@ codec-asan:
    - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang address-sanitizer"; exit 1; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    paths:
      - scripts/ref/logs/
      - test_output.txt
@@ -390,6 +393,7 @@ renderer-smoke-test:
    - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
@@ -413,6 +417,7 @@ renderer-asan:
    
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
@@ -436,6 +441,7 @@ renderer-msan:
  
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
@@ -489,6 +495,7 @@ renderer-pytest-on-merge-request:
      - 123
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 2 week
    when: always
    paths:
      - report-junit.xml
@@ -539,6 +546,7 @@ ivas-pytest-on-merge-request:
      - 123
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 2 week
    when: always
    paths:
      - report-junit.xml
@@ -585,6 +593,7 @@ evs-pytest-on-merge-request:
      - 123
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 2 week
    when: always
    paths:
      - report-junit-evs.xml
@@ -643,16 +652,67 @@ clang-format-check:

    - exit $format_problems
  artifacts:
    expire_in: 2 days
    paths:
      - tmp-formatting-fix/
    when: on_failure
    name: "$ARTIFACT_BASE_NAME"
    expose_as: 'formatting patch'

# check for crashes if first received frame on decoder side is an SID
check-first-frame-is-sid:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  tags:
    - ivas-linux
  stage: test
  needs: ["build-codec-linux-cmake"]
  script:
    - *print-common-info
    - *update-ltv-repo
    - cmake .
    - make -j

    # TODO: for some MASA modes, we currently do not have testvectors that actually trigger DTX
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -v MASA)
    - echo $modes
    - scripts/runIvasCodec.py -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 500
  artifacts:
    paths:
      - out/logs
    when: on_failure
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--sidstart"
    expose_as: "logs-sidstart"

# ---------------------------------------------------------------
# Test jobs for main branch
# ---------------------------------------------------------------

# check bitexactness to EVS windows binaries
be-2-evs-windows:
  extends:
    - .rules-main-push
  tags:
    - ivas-windows
  stage: test
  needs: ["build-codec-windows-msbuild"]
  timeout: "20 minutes" # To be revisited
  script:
    - *print-common-info-windows

    - $winoutdata = $null
    - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee -variable winoutdata
    - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8

    # copy over to never change the testvector dir
    - cp -r $EVS_BE_WIN_TEST_DIR ./evs_be_win_test
    - cp IVAS_cod.exe ./evs_be_win_test/bin/IVAS_cod.exe
    - cp IVAS_dec.exe ./evs_be_win_test/bin/IVAS_dec.exe

    - cd evs_be_win_test
    - python ../ci/run_evs_be_win_test.py

# check bitexactness to EVS
be-2-evs-linux:
  extends:
@@ -751,6 +811,7 @@ codec-comparison-on-main-push:
      - 123
  artifacts:
    name: "main-push--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 2 week
    when: always
    paths:
      - report-junit.xml
@@ -772,6 +833,7 @@ codec-comparison-on-main-push:
    - sanitizer_test_main
  artifacts:
    name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA"
    expire_in: 1 week
    when: always
    paths:
      - ep_015.g192
@@ -783,13 +845,13 @@ codec-comparison-on-main-push:
.sanitizer-test-schedule-A:
  extends:
    - .sanitizer-test-template
  timeout: 2 hours 30 minutes


sanitizer-test-mono:
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $SANITIZER_SCHEDULE_A
  timeout: 2 hour
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS
@@ -799,7 +861,8 @@ sanitizer-test-stereo:
  rules:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 2 hours 30 minutes
      start_in: 2 hour
  timeout: 2 hour
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS
@@ -809,7 +872,8 @@ sanitizer-test-stereodmxevs:
  rules:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 5 hours
      start_in: 4 hours
  timeout: 2 hour
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS
@@ -819,7 +883,8 @@ sanitizer-test-ism1:
  rules:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 7 hours 30 minutes
      start_in: 6 hours
  timeout: 2 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
@@ -829,7 +894,8 @@ sanitizer-test-ism2:
  rules:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 10 hours
      start_in: 8 hours
  timeout: 3 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
@@ -839,7 +905,8 @@ sanitizer-test-ism3:
  rules:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 12 hours 30 minutes
      start_in: 11 hours
  timeout: 3 hour
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
@@ -849,7 +916,8 @@ sanitizer-test-ism4:
  rules:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 15 hours
      start_in: 14 hours
  timeout: 4 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
@@ -859,7 +927,8 @@ sanitizer-test-masa:
  rules:
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 17 hours 30 minutes
      start_in: 18 hours
  timeout: 3 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
@@ -944,6 +1013,55 @@ sanitizer-test-planarsba:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py PlanarSBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

### --- sanitizer schedule D ---

.sanitizer-test-schedule-D:
  extends:
    - .sanitizer-test-template

sanitizer-test-ism+1:
  extends: .sanitizer-test-schedule-D
  rules:
    - if: $SANITIZER_SCHEDULE_D
  timeout: 2 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM+1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism+2:
  extends: .sanitizer-test-schedule-D
  rules:
    - if: $SANITIZER_SCHEDULE_D
      when: delayed
      start_in: 2 hours
  timeout: 3 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM+2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism+3:
  extends: .sanitizer-test-schedule-D
  rules:
    - if: $SANITIZER_SCHEDULE_D
      when: delayed
      start_in: 5 hours
  timeout: 3 hour
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM+3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism+4:
  extends: .sanitizer-test-schedule-D
  rules:
    - if: $SANITIZER_SCHEDULE_D
      when: delayed
      start_in: 8 hours
  timeout: 4 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM+4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS


# GCOV/LCOV coverage analysis of self_test suite
coverage-test-on-main-scheduled:
  extends:
@@ -1028,6 +1146,7 @@ coverage-test-on-main-scheduled:
  stage: test
  artifacts:
    name: "$CI_JOB_NAME--$CI_COMMIT_REF_NAME--sha-$CI_COMMIT_SHA"
    expire_in: 1 week
    paths:
      - $CI_JOB_NAME-public

@@ -1058,7 +1177,7 @@ complexity-ism-in-binaural-out:
    - *complexity-measurements-setup
    - in_format=ISM
    - out_format=BINAURAL
    - bash ci/complexity_measurements/getWmops.sh "ISM1 ISM2 ISM3 ISM4" "$out_format"
    - bash ci/complexity_measurements/getWmops.sh "ISM+1 ISM+2 ISM+3 ISM+4" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-sba-hoa3-in-hoa3-out:

lib_com/ivas_cnst.h

100644 → 100755
+0 −0

File mode changed from 100644 to 100755.

+0 −103
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.0)

project(generate_crend_ivas_tables)

set(EXTERNALS_PATH ${PROJECT_SOURCE_DIR}/Externals)
set(IVAS_TRUNK_PATH "${PROJECT_SOURCE_DIR}/../..")
set(IVAS_TRUNK_UTIL_PATH ${IVAS_TRUNK_PATH}/lib_util)
set(IVAS_TRUNK_DEC_PATH ${IVAS_TRUNK_PATH}/lib_dec)
set(IVAS_TRUNK_REND_PATH ${IVAS_TRUNK_PATH}/lib_rend)
set(IVAS_TRUNK_ENC_PATH ${IVAS_TRUNK_PATH}/lib_enc)
set(IVAS_TRUNK_COM_PATH ${IVAS_TRUNK_PATH}/lib_com)
set(IVAS_TRUNK_DEBUG_PATH ${IVAS_TRUNK_PATH}/lib_debug)

if(WIN32)
    find_path(ZLIB_DIR "zlib.h" ${EXTERNALS_PATH}/zlib/zlib-1.2.12)

    if(ZLIB_DIR)
    else()
        set(ZLIB_DIR ${EXTERNALS_PATH}/zlib)
        find_package(Python3 REQUIRED)

        if(Python3_Interpreter_FOUND)
            execute_process(COMMAND ${Python3_EXECUTABLE} resolve_build_dep.py
                WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
                RESULT_VARIABLE py_result OUTPUT_VARIABLE ZLIB_DIR)
            set(ZLIB_DIR ${PROJECT_SOURCE_DIR} ${ZLIB_DIR})
        endif()

        message(STATUS " ZLIB_DIR: ${ZLIB_DIR}")
    endif()
endif()

if(WIN32)
    add_subdirectory(${ZLIB_DIR})
    set(ZLIB_INCLUDE_DIRS ${ZLIB_DIR} ${PROJECT_BINARY_DIR}/Externals/zlib/zlib-1.2.12)
    set(zlib zlibstatic)
    target_include_directories(example PUBLIC ${ZLIB_INCLUDE_DIRS})
    target_include_directories(minigzip PUBLIC ${ZLIB_INCLUDE_DIRS})
endif()

if(UNIX)
    find_package(ZLIB)

    if(ZLIB_FOUND)
        message(${ZLIB_INCLUDE_DIRS})
        message(${ZLIB_LIBRARIES})
        set(zlib ${ZLIB_LIBRARIES})
    else()
        message(FATAL_ERROR "Zlib not found")
    endif()
endif()

find_path(SOFA_READER_DIR "libmysofa.pc.cmake" ${EXTERNALS_PATH}/libmysofa)

if(SOFA_READER_DIR)
else()
    set(SOFA_READER_DIR ${EXTERNALS_PATH}/libmysofa)
    set(GIT_URL https://github.com/hoene/libmysofa.git)
    execute_process(COMMAND git clone ${GIT_URL} ${EXTERNALS_PATH}/libmysofa)
endif()

include_directories(${SOFA_READER_DIR}/src ${ZLIB_INCLUDE_DIRS} ${IVAS_TRUNK_UTIL_PATH} ${IVAS_TRUNK_ENC_PATH} ${IVAS_TRUNK_DEC_PATH} ${IVAS_TRUNK_REND_PATH} ${IVAS_TRUNK_COM_PATH} ${IVAS_TRUNK_DEBUG_PATH})

option(BUILD_TESTS "Build test programs" OFF)
option(BUILD_SHARED_LIBS "Build shared library" OFF)
add_subdirectory(${SOFA_READER_DIR})
set(SOURCE_FILES_C
    ${PROJECT_SOURCE_DIR}/ivas_crend_binaural_filter_design.c
    ${IVAS_TRUNK_COM_PATH}/basop32.c
    ${IVAS_TRUNK_COM_PATH}/basop_mpy.c
    ${IVAS_TRUNK_COM_PATH}/enh40.c
    ${IVAS_TRUNK_COM_PATH}/fft.c
    ${IVAS_TRUNK_COM_PATH}/fft_rel.c
    ${IVAS_TRUNK_COM_PATH}/ifft_rel.c
    ${IVAS_TRUNK_COM_PATH}/ivas_mdft_imdft.c
    ${IVAS_TRUNK_COM_PATH}/rom_com.c
    ${IVAS_TRUNK_COM_PATH}/ivas_rom_com.c
    ${IVAS_TRUNK_COM_PATH}/tools.c
    ${IVAS_TRUNK_COM_PATH}/tns_base.c
)

set(SOURCE_FILES_H
    ${PROJECT_SOURCE_DIR}/ivas_crend_binaural_filter_design.c
    ${SOFA_READER_DIR}/src/hrtf/mysofa.h
    ${IVAS_TRUNK_REND_PATH}/ivas_stat_rend.h
    ${IVAS_TRUNK_DEC_PATH}/ivas_stat_dec.h
    ${IVAS_TRUNK_DEC_PATH}/stat_dec.h
    ${IVAS_TRUNK_COM_PATH}/options.h
    ${IVAS_TRUNK_COM_PATH}/ivas_cnst.h
    ${IVAS_TRUNK_COM_PATH}/cnst.h
    ${IVAS_TRUNK_COM_PATH}/prot.h
    ${IVAS_TRUNK_COM_PATH}/ivas_prot.h
    ${IVAS_TRUNK_COM_PATH}/common_api_types.h
)

add_library(${PROJECT_NAME}_lib STATIC ${SOURCE_FILES_C} ${SOURCE_FILES_H})

add_executable(${PROJECT_NAME} generate_crend_ivas_tables_from_sofa.c)
target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_lib mysofa-static ${zlib})

if(WIN32)
    add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()
+0 −36
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.6)

project(tables_format_converter)

if(WIN32)
  # MSVC compiler flags
  add_definitions(
    -D_CRT_SECURE_NO_WARNINGS
  )

  # 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}")
endif()

set(IVAS_PATH "${PROJECT_SOURCE_DIR}/../../..")
set(IVAS_UTIL_PATH ${IVAS_PATH}/lib_util)
set(IVAS_DEC_PATH ${IVAS_PATH}/lib_dec)
set(IVAS_ENC_PATH ${IVAS_PATH}/lib_enc)
set(IVAS_COM_PATH ${IVAS_PATH}/lib_com)
set(IVAS_REND_PATH ${IVAS_PATH}/lib_rend)
set(IVAS_DEBUG_PATH ${IVAS_PATH}/lib_debug)

include_directories(${IVAS_UTIL_PATH} ${IVAS_ENC_PATH} ${IVAS_DEC_PATH} ${IVAS_COM_PATH} ${IVAS_REND_PATH} ${IVAS_DEBUG_PATH})

set(SOURCE_FILES_C
  ${IVAS_REND_PATH}/ivas_rom_binauralRenderer.c
  ${IVAS_REND_PATH}/ivas_rom_binaural_crend_head.c)

set(SOURCE_FILES_H
  ${IVAS_REND_PATH}/ivas_rom_binauralRenderer.h
  ${IVAS_REND_PATH}/ivas_rom_binaural_crend_head.h)

add_library(${PROJECT_NAME}_lib STATIC ${SOURCE_FILES_C} ${SOURCE_FILES_H})

add_executable(${PROJECT_NAME} generate_tables_from_rom_to_bin.c)
target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_lib)
Loading