Commit 790747d7 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into...

Merge branch 'main' into 201-add-test-for-corner-case-of-to-be-decoded-bitstream-starting-with-an-sid
parents ab5de883 9faaf9ec
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -47,10 +47,16 @@ scripts/ref/
scripts/test/
scripts/out/
scripts/self_test_summary.txt
scripts/cppp/
binary/
tests/renderer/cut
tests/renderer/ref
tests/dut
tests/ref
scripts/testv/*_cut*.pcm
# default reference binary name
IVAS_cod_ref
IVAS_dec_ref

# Python files that pop up when running scripts
__pycache__/
@@ -59,3 +65,6 @@ __pycache__/

#history
.history/

# coan output files that are created when cleaning out switches
coan_out_*
+216 −72
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Runs for merge requests
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main
    - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Scheduled in main
    - if: $CI_PIPELINE_SOURCE == "web"
    - if: $CI_PIPELINE_SOURCE == 'web' # for testing

stages:
  - maintenance
@@ -28,6 +28,7 @@ stages:
  - test
  - compare
  - validate
  - deploy

# ---------------------------------------------------------------
# Generic script anchors
@@ -146,7 +147,7 @@ stages:

.build-job-linux:
  stage: build
  timeout: "2 minutes"
  timeout: "4 minutes"
  tags:
    - ivas-linux

@@ -200,26 +201,6 @@ build-codec-linux-make:
    # 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-unittests-linux:
  extends:
    - .build-job-with-check-for-warnings
    - .rules-basis
  script:
    - *print-common-info
    - make unittests -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 $?

build-td-object-renderer-standalone-linux:
  extends:
    - .build-job-with-check-for-warnings
    - .rules-basis
  script:
    - *print-common-info
    - make -C scripts/td_object_renderer/object_renderer_standalone -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 $?

build-codec-linux-cmake:
  extends:
    - .build-job-with-check-for-warnings
@@ -269,16 +250,18 @@ codec-smoke-test:
    ### analyze for failures
    - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without PLC failed"; exit 1; fi
    - if cat smoke_test_output_plc.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; exit 1; fi
    - if cat smoke_test_output_jbm_noEXT.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; exit 1; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    paths:
      - out/logs/
      - smoke_test_output.txt
      - smoke_test_output_plc.txt
      - smoke_test_output_jbm_noEXT.txt
    expose_as: "Smoke test results"

# code selftest testvectors with memory-sanitizer binaries
msan-on-merge-request-linux:
codec-msan:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -286,6 +269,7 @@ msan-on-merge-request-linux:
  needs: ["build-codec-sanitizers-linux"]
  script:
    - *print-common-info
    - python3 ci/disable_ram_counting.py
    - make clean
    - make -j CLANG=1
    - python3 scripts/self_test.py --create | tee test_output.txt
@@ -296,10 +280,10 @@ msan-on-merge-request-linux:
    paths:
      - scripts/ref/logs/
      - test_output.txt
    expose_as: "Msan selftest results"
    expose_as: "msan selftest results"

# code selftest testvectors with address-sanitizer binaries
asan-on-merge-request-linux:
codec-asan:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -307,6 +291,7 @@ asan-on-merge-request-linux:
  needs: ["build-codec-sanitizers-linux"]
  script:
    - *print-common-info
    - python3 ci/disable_ram_counting.py
    - make clean
    - make -j CLANG=2
    - python3 scripts/self_test.py --create | tee test_output.txt
@@ -317,10 +302,10 @@ asan-on-merge-request-linux:
    paths:
      - scripts/ref/logs/
      - test_output.txt
    expose_as: "Asan selftest results"
    expose_as: "asan selftest results"

# test external renderer executable
external-renderer-make-pytest:
# test renderer executable
renderer-smoke-test:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -328,21 +313,19 @@ external-renderer-make-pytest:
  stage: test
  script:
    - make -j IVAS_rend
    - make -j unittests
    - make -j --directory scripts/td_object_renderer/object_renderer_standalone
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
    - 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"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer make pytest results"
    expose_as: "renderer make pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake + asan
external-renderer-cmake-asan-pytest:
# test renderer executable with cmake + asan
renderer-asan:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -352,19 +335,20 @@ external-renderer-cmake-asan-pytest:
    - python3 ci/disable_ram_counting.py
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=asan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
    - 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"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake asan pytest results"
    expose_as: "renderer asan pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake + msan
external-renderer-cmake-msan-pytest:
# test renderer executable with cmake + msan
renderer-msan:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -374,41 +358,20 @@ external-renderer-cmake-msan-pytest:
    - python3 ci/disable_ram_counting.py
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=msan  -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -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"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake msan pytest results"
    reports:
      junit:
        - report-junit.xml
    - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  
# test external renderer executable with cmake vs decoder renderer
# TODO @tmu @knj @sgi -> converted to script, decide whether to re-enable later
.external-renderer-cmake-vs-decoder-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true -DDEC_TO_REND_FLOAT_DUMP=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n 1 -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_vs_decoder.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake vs decoder results"
    expose_as: "renderer msan pytest results"
    reports:
      junit:
        - report-junit.xml

# compare external renderer bitexactness between target and source branch
external-renderer-pytest-on-merge-request:
# compare renderer bitexactness between target and source branch
renderer-pytest-on-merge-request:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -420,7 +383,7 @@ external-renderer-pytest-on-merge-request:
    - *print-common-info

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend(erer)*[ -]*non[ -]*be\]") || true
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]") || true
    # TODO: needs splitting the test between reference and cut generation
    #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true

@@ -442,7 +405,7 @@ external-renderer-pytest-on-merge-request:

    # run test
    - exit_code=0
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$?
    - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
@@ -455,7 +418,8 @@ external-renderer-pytest-on-merge-request:
    when: always
    paths:
      - report-junit.xml
    expose_as: "pytest external renderer results"
      - report.html
    expose_as: "pytest renderer results"
    reports:
      junit:
        - report-junit.xml
@@ -491,7 +455,7 @@ ivas-pytest-on-merge-request:

    ### run pytest
    - exit_code=0
    - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$?
    - python3 -m pytest tests -v --html=report.html --self-contained-html --junit-xml=report-junit.xml || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
@@ -504,6 +468,7 @@ ivas-pytest-on-merge-request:
    when: always
    paths:
      - report-junit.xml
      - report.html
    expose_as: "pytest ivas results"
    reports:
      junit:
@@ -536,7 +501,7 @@ evs-pytest-on-merge-request:

    ### run pytest for EVS cases
    - exit_code=0
    - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$?
    - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --html=report.html --self-contained-html --junit-xml=report-junit-evs.xml || exit_code=$?
    - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
@@ -549,11 +514,23 @@ evs-pytest-on-merge-request:
    when: always
    paths:
      - report-junit-evs.xml
      - report.html
    expose_as: "pytest evs results"
    reports:
      junit:
        - report-junit-evs.xml

voip-be-on-merge-request:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  stage: compare # Or should it be test? Comparison is done within one git revision
  needs: ["build-codec-linux-make", codec-smoke-test]
  timeout: "10 minutes"
  script:
    - *print-common-info
    - bash ci/ivas_voip_be_test.sh

clang-format-check:
  extends:
    - .test-job-linux
@@ -717,7 +694,7 @@ codec-comparison-on-main-push:

    ### run pytest
    - exit_code=0
    - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$?
    - python3 -m pytest tests -v --html=report.html --self-contained-html --junit-xml=report-junit.xml || exit_code=$?
    - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures and non-BE flag not present"; exit $EXIT_CODE_FAIL; fi
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true
    - if [ $exit_code -eq 1 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
@@ -730,6 +707,7 @@ codec-comparison-on-main-push:
    when: always
    paths:
      - report-junit.xml
      - report.html
    expose_as: "Results of comparison to previous merge commit"
    reports:
      junit: report-junit.xml
@@ -925,7 +903,7 @@ coverage-test-on-main-scheduled:
    - .test-job-linux-needs-testv-dir
    - .rules-main-scheduled
  tags:
    - coverage-test
    - ivas-linux
  stage: test
  rules:
    # only run in scheduled pipeline that passes this env vars
@@ -933,12 +911,17 @@ coverage-test-on-main-scheduled:
  script:
    - *print-common-info
    - make GCOV=1 -j
    - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script  
    - python3 tests/create_short_testvectors.py
    - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest tests/test_param_file.py -v -n 0 --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_be_comparison.py
    - bash ci/ivas_voip_be_test.sh coverage
    - lcov -c -d obj -o coverage.info
    - genhtml coverage.info -o coverage
    - commit_sha=$(git rev-parse HEAD)
    - genhtml coverage.info -o coverage -t "Coverage on main @ $commit_sha"
  artifacts:
    name: "main-coverage-sha-$CI_COMMIT_SHORT_SHA"
    when: always
@@ -946,10 +929,171 @@ coverage-test-on-main-scheduled:
      - coverage.info
      - coverage


# ---------------------------------------------------------------
# Complexity measurement jobs
# ---------------------------------------------------------------

.complexity-measurements-setup: &complexity-measurements-setup
  # create necessary environment
  - mkdir -p wmops/logs

  - job_id=$(python3 ci/get_id_of_last_job_occurence.py $CI_COMMIT_REF_NAME $CI_JOB_NAME)
  - echo $job_id
  - curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$job_id/artifacts" --output artifacts.zip
  - unzip artifacts.zip || true # this may fail on first run, when there are no artifacts there and the zip file is actually just "404"-html
  - ls
  - public_dir="$CI_JOB_NAME-public"
  # if is needed to catch case when no artifact is there (first run), similarly as above
  - if [[ -d $public_dir ]]; then mv $public_dir/* wmops/;  fi
  - ls wmops
  - rm artifacts.zip
  - rm -rf $public_dir

.complexity-measurements-prepare-artifacts: &complexity-measurements-prepare-artifacts
  # prepare artifacts -> move to public directory
  - public_dir="$CI_JOB_NAME-public"
  - mkdir $public_dir
  - mv -f wmops/log_*_all.txt wmops/*.js ${public_dir}/
  # move logfiles for links
  - mkdir $public_dir/logs
  # first move logs
  - log_files=$(cat $public_dir/graphs*.js | grep logFile | sed "s/.*\(wmops_newsletter_.*\.csv\).*/\1/g")
  - echo $log_files
  - ls wmops/logs
  - for f in $log_files; do [ -f wmops/logs/$f ] && mv wmops/logs/$f $public_dir/logs/$f; done
  # copy index page blueprint
  - cp ci/complexity_measurements/index_complexity.html ${public_dir}/index.html
  # patch the format in the title
  - sed -i "s/IVAS FORMAT/IVAS $in_format to $out_format/g" ${public_dir}/index.html
  # do separately here to avoid overwrite complaints by mv
  - mv -f ci/complexity_measurements/style.css ${public_dir}/
  - ls $public_dir

.complexity-template:
  extends:
    # still needed as long as no long MASA testvectors are there
    - .test-job-linux-needs-testv-dir
  tags:
    - test-complexity-measurement
  timeout: 3 hours 30 minutes
  stage: test
  artifacts:
    name: "$CI_JOB_NAME--$CI_COMMIT_REF_NAME--sha-$CI_COMMIT_SHA"
    paths:
      - $CI_JOB_NAME-public

complexity-stereo-in-stereo-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=stereo
    - out_format=stereo
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-ism-in-binaural-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 1 hour
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=ISM
    - out_format=BINAURAL
    - bash ci/complexity_measurements/getWmops.sh "ISM1 ISM2 ISM3 ISM4" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-sba-hoa3-in-hoa3-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 2 hours 30 minutes
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=SBA
    - out_format=HOA3
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-mc-in-7_1_4-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 4 hours
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=MC
    - out_format=7_1_4
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-masa-in-7_1_4-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 7 hours 30 minutes
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=MASA
    - out_format=7_1_4
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-StereoDmxEVS-stereo-in-mono-out:
  extends:
    - .complexity-template
  rules:
    - if: $MEASURE_COMPLEXITY_LINUX
      when: delayed
      start_in: 8 hours 30 minutes
  script:
    - *print-common-info
    - *update-ltv-repo
    - *complexity-measurements-setup
    - in_format=StereoDmxEVS
    - out_format=mono
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - *complexity-measurements-prepare-artifacts

# ---------------------------------------------------------------
# Other jobs
# ---------------------------------------------------------------

# job that sets up gitlab pages website
pages:
  stage: deploy
  tags:
    - ivas-linux
  rules:
    - if: $UPDATE_PAGES
  script:
    - python3 ci/setup_pages.py
  artifacts:
    paths:
      - public

# Pull state of a branch on 3GPP repo, push to a mirror repo.
pull-from-3gpp-forge:
  stage: maintenance
+3 −14
Original line number Diff line number Diff line
@@ -108,10 +108,6 @@ if(WMOPS)
  add_definitions("-DWMOPS=1")
endif()

if(DEC_TO_REND_FLOAT_DUMP)
  add_compile_definitions(DEC_TO_REND_FLOAT_DUMP)
endif()

project(stereo-evs)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # make Visual Studio projects look nicer
include(CTest)
@@ -156,14 +152,6 @@ file(GLOB libUtilSrcs "lib_util/*.c")
file(GLOB libUtilHeaders "lib_util/*.h")
add_library(lib_util ${libUtilSrcs} ${libUtilHeaders})

file(GLOB unitTestCRendSrcs "scripts/ivas_pytests/tests/unit_tests/crend/*.c")
file(GLOB unitTestCRendHeaders "scripts/ivas_pytests/tests/unit_tests/crend/*.h")
add_executable(IVAS_crend_unit_test ${unitTestCRendSrcs} ${unitTestCRendHeaders})
target_link_libraries(IVAS_crend_unit_test lib_rend lib_dec lib_util lib_com lib_debug)

add_executable(renderer_standalone "scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c")
target_link_libraries(renderer_standalone lib_rend lib_dec lib_util lib_com lib_debug)

add_executable(IVAS_cod apps/encoder.c)
target_link_libraries(IVAS_cod lib_enc lib_util)
if(WIN32)
@@ -184,6 +172,7 @@ if(COPY_EXECUTABLES_FROM_BUILD_DIR)
  add_custom_command(TARGET IVAS_cod POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_cod>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_dec POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_dec>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_rend>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_crend_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_crend_unit_test>" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/ivas_pytests/tests/unit_tests/crend/")
  add_custom_command(TARGET renderer_standalone POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:renderer_standalone>" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/td_object_renderer/object_renderer_standalone/")
endif()

# Allow creating packages for CMake install
install(TARGETS lib_enc lib_dec lib_rend lib_com lib_util ARCHIVE DESTINATION lib)
+1 −28
Original line number Diff line number Diff line
@@ -11,15 +11,6 @@ SRC_APP = apps
BUILD        = build
OBJDIR       = obj

# Dirs for python unittests
UTESTS_SCRIPT_DIR = scripts/ivas_pytests
UTESTS_DIR   = $(UTESTS_SCRIPT_DIR)/tests/unit_tests
UTESTS_CREND_DIR = $(UTESTS_DIR)/crend

# Source paths for python unittests 
SRC_UTESTS = $(UTESTS_CREND_DIR)


SRC_DIRS  = $(sort -u $(SRC_LIBCOM) $(SRC_LIBDEBUG) $(SRC_LIBDEC) $(SRC_LIBENC) $(SRC_LIBREND) $(SRC_LIBUTIL) $(SRC_APP) $(SRC_UTESTS)) 

# Name of CLI binaries
@@ -33,8 +24,6 @@ LIB_LIBENC ?= libivasenc.a
LIB_LIBREND  ?= libivasrend.a
LIB_LIBUTIL  ?= libivasutil.a

CLI_UTESTS_CREND ?= IVAS_crend_unit_test

# Default tool settings
CC        ?= gcc
RM        ?= rm -f
@@ -131,8 +120,6 @@ SRCS_LIBENC = $(foreach DIR,$(SRC_LIBENC),$(patsubst $(DIR)/%,%,$(wildcard $(D
SRCS_LIBREND  = $(foreach DIR,$(SRC_LIBREND),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c)))
SRCS_LIBUTIL  = $(foreach DIR,$(SRC_LIBUTIL),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c)))

SRCS_UTESTS_CREND  = $(foreach DIR,$(UTESTS_CREND_DIR),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c)))

OBJS_LIBCOM      = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.o))
OBJS_LIBDEBUG    = $(addprefix $(OBJDIR)/,$(SRCS_LIBDEBUG:.c=.o))
OBJS_LIBDEC      = $(addprefix $(OBJDIR)/,$(SRCS_LIBDEC:.c=.o))
@@ -143,11 +130,6 @@ OBJS_CLI_APIDEC = $(OBJDIR)/decoder.o
OBJS_CLI_APIENC  = $(OBJDIR)/encoder.o
OBJS_CLI_APPREND = $(OBJDIR)/renderer.o

OBJS_CLI_UTESTS_CREND = $(addprefix $(OBJDIR)/,$(SRCS_UTESTS_CREND:.c=.o))

OBJS_UTESTS = $(OBJS_CLI_UTESTS_CREND)


DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS_LIBDEC:.c=.P) \
  $(SRCS_LIBENC:.c=.P) $(SRCS_LIBUTIL:.c=.P))

@@ -187,23 +169,14 @@ $(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(L
$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LIBDEC)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -livasdec -livasutil -livasdebug -livascom $(LDLIBS) -o $(CLI_APIREND)

$(CLI_UTESTS_CREND): $(OBJS_CLI_UTESTS_CREND) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_UTESTS_CREND) -L. -livasdec -livascom -livasutil -livasdebug $(LDLIBS) -o $(UTESTS_CREND_DIR)/$(CLI_UTESTS_CREND)

unittests: $(CLI_UTESTS_CREND)

libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBREND) $(LIB_LIBUTIL)

clean: clean_unittests
clean: 
	$(QUIET)$(RM) $(OBJS_LIBENC) $(OBJS_LIBDEC) $(DEPS)
	$(QUIET)$(RM) $(DEPS:.P=.d)
	$(QUIET)test ! -d $(OBJDIR) || rm -rf $(OBJDIR)
	$(QUIET)$(RM) $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) $(LIB_LIBREND)

clean_unittests:
	$(QUIET)$(RM) $(OBJS_UTESTS)
	$(QUIET)$(RM) $(UTESTS_CREND_DIR)/$(CLI_UTESTS_CREND)

$(OBJDIR)/%.o : %.c | $(OBJDIR)
	$(QUIET_CC)$(CC) $(CFLAGS) -c -MD -o $@ $<
	@cp $(OBJDIR)/$*.d $(OBJDIR)/$*.P; \
+3 −7
Original line number Diff line number Diff line
@@ -143,20 +143,16 @@
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\lib_debug\debug.c" />
    <ClCompile Include="..\lib_debug\memory.c" />
    <ClCompile Include="..\lib_debug\mem_count.c" />
    <ClCompile Include="..\lib_debug\segsnr.c" />
    <ClCompile Include="..\lib_debug\snr.c" />
    <ClCompile Include="..\lib_debug\sba_debug.c" />
    <ClCompile Include="..\lib_debug\wmops.c" />
    <ClCompile Include="..\lib_debug\wmc_auto.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_debug\debug.h" />
    <ClInclude Include="..\lib_debug\deb_out.h" />
    <ClInclude Include="..\lib_debug\errorhnd.h" />
    <ClInclude Include="..\lib_debug\mem_count.h" />
    <ClInclude Include="..\lib_debug\sba_debug.h" />
    <ClInclude Include="..\lib_debug\wmops.h" />
    <ClInclude Include="..\lib_debug\wmc_auto.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
Loading