diff --git a/.gitattributes b/.gitattributes index e0e62f9e1b21c1e0f9f9b9396f0e2b2ad52eb0ea..6b238a44aebdadd1c224f0e4e2c2d42d5f2c0601 100644 --- a/.gitattributes +++ b/.gitattributes @@ -29,5 +29,6 @@ *.mat filter=lfs diff=lfs merge=lfs -text *.met filter=lfs diff=lfs merge=lfs -text *.pcm filter=lfs diff=lfs merge=lfs -text +*.sofa filter=lfs diff=lfs merge=lfs -text *.wav filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index 13dd28ed34726aa0787b9c4e7d5db91231d3bc9d..c87c691a4af7f6c50a681db4a373b100e84c7558 100644 --- a/.gitignore +++ b/.gitignore @@ -41,12 +41,15 @@ scripts/td_object_renderer/object_renderer_standalone/renderer_standalone.exe .cache *.log *.bak +.\#* scripts/c-code_instrument/ scripts/ifdef_instrument.list scripts/ref/ scripts/test/ scripts/out/ scripts/self_test_summary.txt +scripts/cppp/ +binary/ tests/renderer/cut tests/renderer/ref tests/dut @@ -61,5 +64,11 @@ __pycache__/ *.py[cod] *$py.class -#history +# history .history/ + +#externals +Externals/ + +# coan output files that are created when cleaning out switches +coan_out_* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a0f5d3385a5b3c3e436b43f429ef4acea596d70..b56bf35e8a23e0467d57bf5cb2914580464a4dcb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,8 @@ variables: EXIT_CODE_NON_BE: 123 EXIT_CODE_FAIL: 1 +default: + interruptible: true # Make all jobs by default interruptible # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: @@ -23,6 +25,7 @@ workflow: - if: $CI_PIPELINE_SOURCE == 'web' # for testing stages: + - .pre - maintenance - build - test @@ -147,7 +150,7 @@ stages: .build-job-linux: stage: build - timeout: "2 minutes" + timeout: "4 minutes" tags: - ivas-linux @@ -168,6 +171,31 @@ stages: - 123 + +# --------------------------------------------------------------- +# .pre jobs for setting up things +# --------------------------------------------------------------- + +# See: https://gitlab.com/gitlab-org/gitlab/-/issues/194023 +# Solution to make main branch pipelines uninterruptible while all other +# pipelines can be interrupted by default. This works because all jobs +# after uninterruptible jobs will be uninterruptible. Resource group +# setting avoids rare case where two fast merges could still interrupt +# pipeline. This should be revisited if there are updates to Gitlab. +uninterruptible: + stage: .pre + interruptible: false + resource_group: uninterruptible + script: + - echo "$CI_COMMIT_BRANCH is uninterruptible" + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: always + tags: + - ivas-linux + + + # --------------------------------------------------------------- # Validation jobs # --------------------------------------------------------------- @@ -201,26 +229,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 @@ -270,16 +278,20 @@ 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 JBM part failed"; exit 1; fi + - 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" paths: - out/logs/ - smoke_test_output.txt - smoke_test_output_plc.txt + - smoke_test_output_jbm_noEXT.txt + - smoke_test_output_hrtf.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 @@ -298,10 +310,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 @@ -320,10 +332,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 @@ -331,21 +343,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 -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 @@ -362,13 +372,13 @@ external-renderer-cmake-asan-pytest: 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 @@ -385,35 +395,13 @@ external-renderer-cmake-msan-pytest: when: always paths: - report-junit.xml - expose_as: "external renderer cmake msan pytest results" + expose_as: "renderer msan pytest results" reports: junit: - report-junit.xml -# 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 -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" - 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 @@ -461,7 +449,7 @@ external-renderer-pytest-on-merge-request: paths: - report-junit.xml - report.html - expose_as: "pytest external renderer results" + expose_as: "pytest renderer results" reports: junit: - report-junit.xml @@ -562,6 +550,17 @@ evs-pytest-on-merge-request: 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 @@ -826,7 +825,7 @@ sanitizer-test-masa: .sanitizer-test-schedule-B: extends: - .sanitizer-test-template - timeout: 3 hours + timeout: 4 hours sanitizer-test-mc-5_1: extends: .sanitizer-test-schedule-B @@ -841,7 +840,7 @@ sanitizer-test-mc-5_1_2: rules: - if: $SANITIZER_SCHEDULE_B when: delayed - start_in: 3 hours + start_in: 4 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS @@ -851,7 +850,7 @@ sanitizer-test-mc-5_1_4: rules: - if: $SANITIZER_SCHEDULE_B when: delayed - start_in: 6 hours + start_in: 8 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS @@ -861,7 +860,7 @@ sanitizer-test-mc-7_1: rules: - if: $SANITIZER_SCHEDULE_B when: delayed - start_in: 9 hours + start_in: 12 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS @@ -871,7 +870,7 @@ sanitizer-test-mc-7_1_4: rules: - if: $SANITIZER_SCHEDULE_B when: delayed - start_in: 12 hours + start_in: 16 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS @@ -915,12 +914,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 @@ -956,8 +960,8 @@ coverage-test-on-main-scheduled: - mv -f wmops/log_*_all.txt wmops/*.js ${public_dir}/ # move logfiles for links - mkdir $public_dir/logs - # first move logs for "native" sampling rate - - log_files=$(cat $public_dir/graphs_wmops_flc.js | grep logFile | sed "s/.*\(wmops_newsletter_.*\.csv\).*/\1/g") + # 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 @@ -1081,57 +1085,14 @@ complexity-StereoDmxEVS-stereo-in-mono-out: # --------------------------------------------------------------- # job that sets up gitlab pages website -# is run on a separate schedule and collects artifacts from other jobs (currently -# only the complexity measurements) multiple times a day pages: stage: deploy tags: - ivas-linux rules: - if: $UPDATE_PAGES - # TODO: add coverage job script: - - - API_URL_BASE=https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs - - branch=$CI_COMMIT_REF_NAME - - - mkdir public - - ### fetch artifacts from latest run of complexity jobs - - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-stereo-in-stereo-out) - - echo $job_id - - echo "$API_URL_BASE/$job_id/artifacts" - - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_stereo.zip - - cat artifacts_comp_stereo.zip - - unzip -o artifacts_comp_stereo.zip - - mv complexity-stereo-in-stereo-out-public ./public/ - - - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-ism-in-binaural-out) - - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_ism.zip - - unzip -o artifacts_comp_ism.zip - - mv complexity-ism-in-binaural-out-public ./public/ - - - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-sba-hoa3-in-hoa3-out) - - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_sba.zip - - unzip -o artifacts_comp_sba.zip - - mv complexity-sba-hoa3-in-hoa3-out-public ./public/ - - - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-mc-in-7_1_4-out) - - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_mc.zip - - unzip -o artifacts_comp_mc.zip - - mv complexity-mc-in-7_1_4-out-public ./public/ - - - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-masa-in-7_1_4-out) - - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_masa.zip - - unzip -o artifacts_comp_masa.zip - - mv complexity-masa-in-7_1_4-out-public ./public/ - - - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-StereoDmxEVS-stereo-in-mono-out) - - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_StereoDmxEVS.zip - - unzip -o artifacts_comp_StereoDmxEVS.zip - - mv complexity-StereoDmxEVS-stereo-in-mono-out-public ./public/ - - - cp ci/index-pages.html public/index.html + - python3 ci/setup_pages.py artifacts: paths: - public diff --git a/CMakeLists.txt b/CMakeLists.txt index 317274ddce0b47fa97ce1455dc0715671aa6dd95..5299db65aee7bf9177e3ec13fa6d41edc9e8c60f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "$" "${CMAKE_CURRENT_SOURCE_DIR}/") add_custom_command(TARGET IVAS_dec POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/") add_custom_command(TARGET IVAS_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/") - add_custom_command(TARGET IVAS_crend_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${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 "$" "${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) diff --git a/LICENSE.md b/LICENSE.md index 86e7d39ae78af379ad50fe4f18c1da3284947cd4..aa9c35e4f9786f3321942cacb1f56d7d91840e20 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/Makefile b/Makefile index 141a607b075279da49e4530e701a7f5453303bb0..7f8874d3439cc1fb73096cd5af609880ba9b874a 100644 --- a/Makefile +++ b/Makefile @@ -11,16 +11,7 @@ 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)) +SRC_DIRS = $(sort -u $(SRC_LIBCOM) $(SRC_LIBDEBUG) $(SRC_LIBDEC) $(SRC_LIBENC) $(SRC_LIBREND) $(SRC_LIBUTIL) $(SRC_APP)) # Name of CLI binaries CLI_APIDEC ?= IVAS_dec @@ -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,17 +130,12 @@ 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)) ############################################################################### -.PHONY: all clean clean_unittests clean_all +.PHONY: all clean all: $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) @@ -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; \ diff --git a/Workspace_msvc/Workspace_msvc.sln b/Workspace_msvc/Workspace_msvc.sln index 32f41bb6dd91999f52bcb317ce711aecb7619d07..fbdb561ee2403a9fbcb65671157eafc4b8a21f88 100644 --- a/Workspace_msvc/Workspace_msvc.sln +++ b/Workspace_msvc/Workspace_msvc.sln @@ -25,16 +25,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ..\.clang-format = ..\.clang-format EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ivas_crend_unit_test", "..\scripts\ivas_pytests\tests\unit_tests\crend\ivas_crend_unit_test.vcxproj", "{32354377-ACA7-40F9-9A0E-87FC956F0B78}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 - Unittests|Win32 = Unittests|Win32 - Unittests|x64 = Unittests|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -43,89 +39,54 @@ Global {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Release|Win32.ActiveCfg = Release|Win32 {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Release|Win32.Build.0 = Release|Win32 {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Release|x64.ActiveCfg = Release|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Unittests|Win32.Build.0 = Unittests|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Unittests|x64.ActiveCfg = Unittests|Win32 {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Debug|Win32.ActiveCfg = Debug|Win32 {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Debug|Win32.Build.0 = Debug|Win32 {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Debug|x64.ActiveCfg = Debug|Win32 {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Release|Win32.ActiveCfg = Release|Win32 {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Release|Win32.Build.0 = Release|Win32 {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Release|x64.ActiveCfg = Release|Win32 - {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Unittests|Win32.Build.0 = Unittests|Win32 - {824DA4CF-06F0-45C9-929A-8792F0E19C3E}.Unittests|x64.ActiveCfg = Unittests|Win32 {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Debug|Win32.ActiveCfg = Debug|Win32 {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Debug|Win32.Build.0 = Debug|Win32 {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Debug|x64.ActiveCfg = Debug|Win32 {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Release|Win32.ActiveCfg = Release|Win32 {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Release|Win32.Build.0 = Release|Win32 {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Release|x64.ActiveCfg = Release|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Unittests|Win32.Build.0 = Unittests|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Unittests|x64.ActiveCfg = Unittests|Win32 {718DE063-A18B-BB72-9150-62B892E6FFA6}.Debug|Win32.ActiveCfg = Debug|Win32 {718DE063-A18B-BB72-9150-62B892E6FFA6}.Debug|Win32.Build.0 = Debug|Win32 {718DE063-A18B-BB72-9150-62B892E6FFA6}.Debug|x64.ActiveCfg = Debug|Win32 {718DE063-A18B-BB72-9150-62B892E6FFA6}.Release|Win32.ActiveCfg = Release|Win32 {718DE063-A18B-BB72-9150-62B892E6FFA6}.Release|Win32.Build.0 = Release|Win32 {718DE063-A18B-BB72-9150-62B892E6FFA6}.Release|x64.ActiveCfg = Release|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Unittests|Win32.Build.0 = Unittests|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Unittests|x64.ActiveCfg = Release|Win32 {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Debug|Win32.ActiveCfg = Debug|Win32 {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Debug|Win32.Build.0 = Debug|Win32 {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Debug|x64.ActiveCfg = Debug|Win32 {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Release|Win32.ActiveCfg = Release|Win32 {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Release|Win32.Build.0 = Release|Win32 {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Release|x64.ActiveCfg = Release|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Unittests|Win32.Build.0 = Unittests|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Unittests|x64.ActiveCfg = Unittests|Win32 {54509728-928B-44D9-A118-A6F92F08B34F}.Debug|Win32.ActiveCfg = Debug|Win32 {54509728-928B-44D9-A118-A6F92F08B34F}.Debug|Win32.Build.0 = Debug|Win32 {54509728-928B-44D9-A118-A6F92F08B34F}.Debug|x64.ActiveCfg = Debug|Win32 {54509728-928B-44D9-A118-A6F92F08B34F}.Release|Win32.ActiveCfg = Release|Win32 {54509728-928B-44D9-A118-A6F92F08B34F}.Release|Win32.Build.0 = Release|Win32 {54509728-928B-44D9-A118-A6F92F08B34F}.Release|x64.ActiveCfg = Release|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Unittests|Win32.Build.0 = Unittests|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Unittests|x64.ActiveCfg = Unittests|Win32 {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Debug|Win32.ActiveCfg = Debug|Win32 {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Debug|Win32.Build.0 = Debug|Win32 {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Debug|x64.ActiveCfg = Debug|Win32 {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Release|Win32.ActiveCfg = Release|Win32 {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Release|Win32.Build.0 = Release|Win32 {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Release|x64.ActiveCfg = Release|Win32 - {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Unittests|Win32.Build.0 = Unittests|Win32 - {E3DCBC31-7FC9-D127-E000-529F8460D5FD}.Unittests|x64.ActiveCfg = Unittests|Win32 {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Debug|Win32.ActiveCfg = Debug|Win32 {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Debug|Win32.Build.0 = Debug|Win32 {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Debug|x64.ActiveCfg = Debug|Win32 {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Release|Win32.ActiveCfg = Release|Win32 {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Release|Win32.Build.0 = Release|Win32 {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Release|x64.ActiveCfg = Release|Win32 - {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Unittests|Win32.Build.0 = Unittests|Win32 - {B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Unittests|x64.ActiveCfg = Unittests|Win32 {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Debug|Win32.ActiveCfg = Debug|Win32 {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Debug|Win32.Build.0 = Debug|Win32 {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Debug|x64.ActiveCfg = Debug|Win32 {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Release|Win32.ActiveCfg = Release|Win32 {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Release|Win32.Build.0 = Release|Win32 {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Release|x64.ActiveCfg = Release|Win32 - {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Unittests|Win32.Build.0 = Unittests|Win32 - {12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Unittests|x64.ActiveCfg = Release|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Debug|Win32.ActiveCfg = Debug|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Debug|x64.ActiveCfg = Debug|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Release|Win32.ActiveCfg = Release|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Release|x64.ActiveCfg = Release|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Unittests|Win32.ActiveCfg = Release|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Unittests|Win32.Build.0 = Release|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Unittests|x64.ActiveCfg = Release|Win32 - {32354377-ACA7-40F9-9A0E-87FC956F0B78}.Unittests|x64.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Workspace_msvc/decoder.vcxproj b/Workspace_msvc/decoder.vcxproj index 8a71725962dd0cceb6df2ff03d37d99408437832..e59992847c71b085235a5232aad1afa7d710d17f 100644 --- a/Workspace_msvc/decoder.vcxproj +++ b/Workspace_msvc/decoder.vcxproj @@ -9,10 +9,6 @@ Release Win32 - - Unittests - Win32 - decoder @@ -27,12 +23,6 @@ false MultiByte - - Application - v141 - false - MultiByte - Application v141 @@ -46,10 +36,6 @@ - - - - @@ -65,13 +51,6 @@ false IVAS_dec - - ..\ - .\Debug_$(ProjectName)\ - false - false - IVAS_dec - ..\ .\Release_$(ProjectName)\ @@ -89,7 +68,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;%(AdditionalIncludeDirectories) + ..\lib_dec;..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;$(Macros);%(PreprocessorDefinitions) EnableFastChecks @@ -121,56 +100,6 @@ MachineX86 - - - - - - - $(IntDir)$(ProjectName).tlb - - - - - Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;$(Macros);%(PreprocessorDefinitions) - - - EnableFastChecks - MultiThreadedDebug - false - - - - - $(IntDir)$(ProjectName).pdb - Level4 - true - OldStyle - Default - %(DisableSpecificWarnings) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c0c - - - - - $(OutDir)$(TargetName).exe - true - - - true - $(IntDir)$(ProjectName).pdb - Console - false - - - MachineX86 - - $(IntDir)$(ProjectName).tlb @@ -183,7 +112,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;%(AdditionalIncludeDirectories) + ..\lib_dec;..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) true diff --git a/Workspace_msvc/encoder.vcxproj b/Workspace_msvc/encoder.vcxproj index 755e404b67a52507e54da9b60b2690d42ab4b6d5..bcfe92a4db2218e2e04ae78a7cf7ea35cdc24349 100644 --- a/Workspace_msvc/encoder.vcxproj +++ b/Workspace_msvc/encoder.vcxproj @@ -89,7 +89,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;%(AdditionalIncludeDirectories) + ..\lib_enc;..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;$(Macros);%(PreprocessorDefinitions) EnableFastChecks @@ -198,7 +198,7 @@ Neither false false - ..\lib_enc;..\lib_dec;..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories) + ..\lib_enc;..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) true diff --git a/Workspace_msvc/lib_com.vcxproj b/Workspace_msvc/lib_com.vcxproj index 994b1ec4291fcd5b010f022167796fcb4921f7f9..2bcf77f098e0ad1b668c58fc212c6274b41af6fe 100644 --- a/Workspace_msvc/lib_com.vcxproj +++ b/Workspace_msvc/lib_com.vcxproj @@ -358,4 +358,4 @@ - + \ No newline at end of file diff --git a/Workspace_msvc/lib_debug.vcxproj b/Workspace_msvc/lib_debug.vcxproj index 5dc36d4633eb0aece3fd91393381e3d75c90a07e..3b648fae048920ae06aa709785d4b49d2e58d710 100644 --- a/Workspace_msvc/lib_debug.vcxproj +++ b/Workspace_msvc/lib_debug.vcxproj @@ -73,7 +73,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) false @@ -124,7 +124,7 @@ AnySuitable false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) true @@ -143,20 +143,14 @@ - - - - + - - - - + @@ -166,4 +160,4 @@ - + \ No newline at end of file diff --git a/Workspace_msvc/lib_dec.vcxproj b/Workspace_msvc/lib_dec.vcxproj index ad725ce034c3df38a7444c547b2ac7dc1637c505..773dafc2c5babae03ebb5fb16a1def680dc72712 100644 --- a/Workspace_msvc/lib_dec.vcxproj +++ b/Workspace_msvc/lib_dec.vcxproj @@ -89,7 +89,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -169,7 +169,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) true @@ -283,6 +283,7 @@ + diff --git a/Workspace_msvc/lib_dec.vcxproj.filters b/Workspace_msvc/lib_dec.vcxproj.filters index 5b52aabb77ad23750f34b254d5d9c37e5180106d..4dcff8d503d594bb101ae9d579828038b11b58e7 100644 --- a/Workspace_msvc/lib_dec.vcxproj.filters +++ b/Workspace_msvc/lib_dec.vcxproj.filters @@ -500,6 +500,9 @@ dec_ivas_c + + dec_ivas_c + diff --git a/Workspace_msvc/lib_util.vcxproj b/Workspace_msvc/lib_util.vcxproj index 3e269dab4bf714878ae0e69689dab54d7d2f5eb9..32bebc753654bfa97481586598e171fdb5e9451b 100644 --- a/Workspace_msvc/lib_util.vcxproj +++ b/Workspace_msvc/lib_util.vcxproj @@ -73,7 +73,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);ZLIB_WINAPI;%(PreprocessorDefinitions) false @@ -117,7 +117,7 @@ AnySuitable false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);ZLIB_WINAPI;%(PreprocessorDefinitions) true diff --git a/Workspace_msvc/renderer.vcxproj b/Workspace_msvc/renderer.vcxproj index 6ca03f67dd3d36153fa63d572f02a805b572b23a..94ad9f774e7bd050c4e940eb9a47911f18d783ef 100644 --- a/Workspace_msvc/renderer.vcxproj +++ b/Workspace_msvc/renderer.vcxproj @@ -86,7 +86,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_dec;..\lib_enc;..\lib_debug;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;$(Macros);%(PreprocessorDefinitions) EnableFastChecks @@ -180,7 +180,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_dec;..\lib_enc;..\lib_debug;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) true diff --git a/apps/decoder.c b/apps/decoder.c index 6396e3ab9428cda787f84be83b18245ae52b1732..76a053c0f65a99822660a5419ba80166dec89f35 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -30,6 +30,10 @@ *******************************************************************************************************/ +#include +#include +#include +#include "options.h" #include "lib_dec.h" #include "cmdl_tools.h" #include "audio_file_writer.h" @@ -41,25 +45,14 @@ #include "head_rotation_file_reader.h" #include "jbm_file_writer.h" #include "evs_rtp_payload.h" -#include -#include -#ifdef WMOPS -#include "PROM_Size_lib_com.h" -#include "PROM_Size_lib_dec.h" -#include "wmops.h" -#endif -#ifdef RAM_COUNTING_TOOL -#include "mem_count.h" -#else -#include -#endif #ifdef DEBUGGING #include "debug.h" #endif +#include "wmc_auto.h" #include "render_config_reader.h" -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /*------------------------------------------------------------------------------------------* * Local constants, enums, structures @@ -100,6 +93,10 @@ typedef struct float FER; bool hrtfReaderEnabled; char *hrtfFileName; +#ifdef HRTF_BINARY_FILE + bool hrtfCRendReaderEnabled; + char *hrtfCRendFileName; +#endif IVAS_DEC_INPUT_FORMAT inputFormat; bool customLsOutputEnabled; char *customLsSetupFilename; @@ -129,46 +126,12 @@ static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); #ifdef DEBUGGING +static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar ); #endif -#ifdef WMOPS -/*------------------------------------------------------------------------------------------* - * Function to print complexity & memory estimates at the decoder - *------------------------------------------------------------------------------------------*/ - -extern int16_t *ptr_base_stack; -extern int16_t *ptr_base_stack; -extern int16_t *ptr_max_stack; -extern int32_t wc_frame; -extern char location_max_stack[256]; -void print_stack_call_tree( void ); - -static void print_mem_dec( size_t SRAM_size ) -{ - fprintf( stdout, "\n\n --- Decoder memory usage --- \n\n" ); - - fprintf( stdout, "PROM size (decoder): %d words (or instructions)\n", PROM_Size_lib_dec ); - fprintf( stdout, "PROM size (common): %d words (or instructions)\n", PROM_Size_lib_com ); - fprintf( stdout, "Stack size (decoder): %ld words in %s() in frame #%d\n", ( ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) ) / sizeof( float ), location_max_stack, wc_frame ); - fprintf( stdout, "Table ROM size (decoder): %ld words\n", ( Const_Data_Size_rom_dec() + Const_Data_Size_ivas_rom_dec() ) / sizeof( float ) ); - fprintf( stdout, "Table ROM size (binaural renderer): %ld words\n", ( Const_Data_Size_ivas_rom_binauralRen() + Const_Data_Size_ivas_rom_TdBinauralR() + Const_Data_Size_ivas_rom_binaural_cr() ) / sizeof( float ) ); - fprintf( stdout, "Table ROM size (common): %ld words\n", ( Const_Data_Size_rom_com() + Const_Data_Size_ivas_rom_com() ) / sizeof( float ) ); -#ifdef RAM_COUNTING_TOOL - fprintf( stdout, "Static RAM size (decoder): %ld words\n\n", SRAM_size ); -#endif - print_stack_call_tree(); - - fprintf( stdout, "Note: this is an optimistic estimate of the memory consumption assuming\n" ); - fprintf( stdout, " that each variable (short, long or float) in the codec requires\n" ); - fprintf( stdout, " 32 bits of memory and may therefore be represented by 1 word.\n" ); - fprintf( stdout, " The following formula is used: sizeof('memory array')/sizeof(float)\n\n" ); -} -#endif - - /*------------------------------------------------------------------------------------------* * main() * @@ -197,18 +160,12 @@ int main( #endif #endif -#ifdef WMOPS - size_t SRAM_size = 0; - reset_stack(); - reset_wmops(); -#endif - #ifdef DEBUGGING dbgargs( &argc, argv ); #endif - -#ifdef RAM_COUNTING_TOOL - mem_count_init( 0, USE_32BITS ); +#ifdef WMOPS + reset_wmops(); + reset_mem( USE_32BITS ); #endif /*------------------------------------------------------------------------------------------* @@ -265,7 +222,7 @@ int main( if ( arg.hrtfReaderEnabled ) { - if ( ( ( error = hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) ) != IVAS_ERR_OK ) ) + if ( ( error = hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; @@ -332,7 +289,11 @@ int main( if ( arg.voipMode ) { - IVAS_DEC_PrintConfig( hIvasDec, arg.quietModeEnabled, arg.voipMode ); + if ( ( error = printBitstreamInfoVoip( arg, hBsReader, hIvasDec ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error while previewing VoIP bitstream: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } } else { @@ -408,9 +369,9 @@ int main( fprintf( stdout, "FEC: %.2f %%\n", arg.FER ); } } -#else +#else /* DEBUGGING */ IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); -#endif +#endif /* DEBUGGING */ /*-------------------------------------------------------------------* * Load renderer configuration from file @@ -483,6 +444,34 @@ int main( fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } + +#ifdef HRTF_BINARY_FILE + + IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; + IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); + + if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfCRendFileName ); +#ifndef FIX_FOR_TEST + goto cleanup; +#endif + } + IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv; + IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ); + + if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfCRendFileName ); + } + IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin; + IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ); + + if ( ( error = load_parambin_HRTF_from_binary( hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in loading HRTF binary file %s for parametric binauralizer \n\n", arg.hrtfCRendFileName ); + } +#endif } /*-----------------------------------------------------------------* @@ -491,11 +480,6 @@ int main( if ( arg.voipMode ) { - if ( arg.decMode != IVAS_DEC_MODE_EVS ) - { - fprintf( stderr, "\nError: VoIP not yet supported for decMode: %d\n\n", arg.decMode ); - goto cleanup; - } if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) { @@ -549,7 +533,12 @@ cleanup: #ifdef DEBUG_SBA_AUDIO_DUMP IVAS_DEC_GetSbaDebugParams( hIvasDec, &numOutChannels, &numTransportChannels, &pca_ingest_channels ); #endif - + if ( arg.hrtfReaderEnabled ) + { + IVAS_DEC_HRTF_HANDLE hHrtfTD; + IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); + dealloc_HRTF_binary( hHrtfTD ); + } IVAS_DEC_Close( &hIvasDec ); CustomLsReader_close( &hLsCustomReader ); hrtfFileReader_close( &hrtfReader ); @@ -562,15 +551,9 @@ cleanup: fprintf( stderr, "\nError while closing file: %s\nContinuing...\n\n", arg.inputBitstreamFilename ); } -#ifdef RAM_COUNTING_TOOL -#ifdef WMOPS - SRAM_size = -#endif - mem_count_summary( USE_DEFAULT ); -#endif #ifdef WMOPS print_wmops(); - print_mem_dec( SRAM_size ); + print_mem( NULL ); #endif if ( !arg.quietModeEnabled ) @@ -711,6 +694,11 @@ static bool parseCmdlIVAS_dec( arg->hrtfReaderEnabled = false; arg->hrtfFileName = NULL; +#ifdef HRTF_BINARY_FILE + arg->hrtfCRendReaderEnabled = false; + arg->hrtfCRendFileName = NULL; +#endif + arg->customLsOutputEnabled = false; arg->customLsSetupFilename = NULL; @@ -1079,7 +1067,11 @@ static void usage_dec( void ) fprintf( stdout, " which of the two supported formats is in use.\n" ); fprintf( stdout, " default bitstream file format is G.192\n" ); fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); +#ifdef HRTF_BINARY_FILE + fprintf( stdout, "-hrtf File : HRTF filter File used in BINAURAL output configuration\n" ); +#else fprintf( stdout, "-hrtf File : HRTF filter File used in ISm format and BINAURAL output configuration\n" ); +#endif #ifdef DEBUGGING fprintf( stdout, "-force_subframe_bin : Forces parametric binauralizer code to use 5 ms time resolution even when\n" ); fprintf( stdout, " output time resolution is larger.\n" ); @@ -1096,6 +1088,11 @@ static void usage_dec( void ) fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); +#ifdef DEBUG_MODE_INFO +#ifdef DEBUG_MODE_INFO_TWEAK + fprintf( stdout, "-info : specify subfolder name for debug output\n" ); +#endif +#endif fprintf( stdout, "\n" ); return; @@ -1116,6 +1113,161 @@ static int16_t app_own_random( int16_t *seed ) } #endif +static ivas_error initOnFirstGoodFrame( + IVAS_DEC_HANDLE hIvasDec, /* i/o: */ + const DecArguments arg, /* i : */ + const int16_t numInitialBadFrames, /* i : */ + const uint16_t numOutSamples, /* i : */ + int16_t *pFullDelayNumSamples, /* o : */ + int16_t *pRemainingDelayNumSamples, /* o : */ + int32_t *delayTimeScale, /* o : */ + IVAS_DEC_BS_FORMAT *pBsFormat, /* i/o: */ + AudioFileWriter **ppAfWriter, /* o : */ + MasaFileWriter **ppMasaWriter, /* o : */ + IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS], /* o : */ + int16_t *pNumOutChannels, /* o : */ + uint16_t *pNumObj /* o : */ +) +{ + ivas_error error = IVAS_ERR_UNKNOWN; + + /* Now delay, number of output channels and frame size are known */ + if ( arg.delayCompensationEnabled ) + { + if ( ( error = IVAS_DEC_GetDelay( hIvasDec, pFullDelayNumSamples, delayTimeScale ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); + return error; + } + } + else + { + *pFullDelayNumSamples = 0; + } + *pRemainingDelayNumSamples = *pFullDelayNumSamples; + + if ( ( error = IVAS_DEC_GetNumOutputChannels( hIvasDec, pNumOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumOutputChannels, code: %d\n", error ); + return error; + } + + int32_t pcmFrameSize; + + if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error ); + return error; + } + + /* Open audio writer and write all previously skipped bad frames now that frame size is known */ + if ( ( error = AudioFileWriter_open( ppAfWriter, arg.outputWavFilename, arg.output_Fs, *pNumOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nUnable to open output file %s\n", arg.outputWavFilename ); + return error; + } + + int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) ); + memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) ); + + for ( int16_t i = 0; i < numInitialBadFrames; ++i ) + { + if ( *pRemainingDelayNumSamples < numOutSamples ) + { + if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + return error; + } + *pRemainingDelayNumSamples = 0; + } + else + { + *pRemainingDelayNumSamples -= numOutSamples; + } + } + + free( zeroBuf ); + + /* Open other output files if EXT output config - now details about ISM or MASA are known */ + if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( ( error = IVAS_DEC_GetFormat( hIvasDec, pBsFormat ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetFormat, code: %d\n", error ); + return error; + } + + /* If outputting ISM, get number of objects, open output files and write zero metadata for initial bad frames */ + if ( *pBsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, pNumObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + return error; + } + + for ( int16_t i = 0; i < *pNumObj; ++i ) + { + if ( ( error = IsmFileWriter_open( arg.outputWavFilename, i, &ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: Error opening ISM decoded metadata file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + return error; + } + } + + for ( int16_t j = 0; j < numInitialBadFrames; ++j ) + { + /* write zero metadata */ + for ( int16_t i = 0; i < *pNumObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 1, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + return error; + } + + if ( ( error = IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + return error; + } + } + } + } + /* If outputting MASA, open output file and write metadata for initial bad frames */ + else if ( *pBsFormat == IVAS_DEC_BS_MASA ) + { + if ( ( error = MasaFileWriter_open( arg.outputWavFilename, ppMasaWriter ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: Error opening MASA decoded metadata file %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); + return error; + } + + /* Duplicate good first frame metadata to fill the beginning of stream. */ + IVAS_MASA_QMETADATA_HANDLE qMetadata = NULL; + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + return error; + } + + for ( int16_t j = 0; j < numInitialBadFrames; ++j ) + { + if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, qMetadata ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); + return error; + } + } + } + } + + return IVAS_ERR_OK; +} + /*---------------------------------------------------------------------* * decodeG192() * @@ -1132,7 +1284,7 @@ static ivas_error decodeG192( { bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ uint16_t bit_stream[IVAS_MAX_BITS_PER_FRAME + 4 * 8]; - int16_t i, j, num_bits; + int16_t i, num_bits; int16_t bfi = 0; #ifdef DEBUGGING int16_t fec_seed = 12558; /* FEC_SEED */ @@ -1144,7 +1296,6 @@ static ivas_error decodeG192( int16_t nOutChannels = 0; int16_t delayNumSamples = -1; int16_t delayNumSamples_orig = 0; - int16_t zeroPad = 0; int16_t nOutSamples = 0; int32_t delayTimeScale = 0; ivas_error error = IVAS_ERR_UNKNOWN; @@ -1252,125 +1403,24 @@ static ivas_error decodeG192( /* Once good frame decoded, catch up */ if ( decodedGoodFrame ) { - /* Now number of output channels and frame size are known */ - if ( ( error = IVAS_DEC_GetNumOutputChannels( hIvasDec, &nOutChannels ) ) != IVAS_ERR_OK ) + error = initOnFirstGoodFrame( + hIvasDec, + arg, + numInitialBadFrames, + nOutSamples, + &delayNumSamples_orig, + &delayNumSamples, + &delayTimeScale, + &bsFormat, + &afWriter, + &masaWriter, + ismWriters, + &nOutChannels, + &numObj ); + if ( error != IVAS_ERR_OK ) { - fprintf( stderr, "\nError in IVAS_DEC_GetNumOutputChannels, code: %d\n", error ); goto cleanup; } - - int32_t pcmFrameSize; - - if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error ); - goto cleanup; - } - - /* Open audio writer and write all previously skipped bad frames now that frame size is known */ - if ( ( error = AudioFileWriter_open( &afWriter, arg.outputWavFilename, arg.output_Fs, nOutChannels ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nUnable to open output file %s\n", arg.outputWavFilename ); - goto cleanup; - } - - int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) ); - memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) ); - - for ( i = 0; i < numInitialBadFrames; ++i ) - { - if ( delayNumSamples < nOutSamples ) - { - if ( ( error = AudioFileWriter_write( afWriter, zeroBuf, nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nOutput audio file writer error\n" ); - goto cleanup; - } - delayNumSamples = 0; - } - else - { - delayNumSamples -= nOutSamples; - } - } - - free( zeroBuf ); - - /* Open other output files if EXT output config - now details about ISM or MASA are known */ - if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) - { - if ( ( error = IVAS_DEC_GetFormat( hIvasDec, &bsFormat ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetFormat, code: %d\n", error ); - goto cleanup; - } - - /* If outputting ISM, get number of objects, open output files and write zero metadata for initial bad frames */ - if ( bsFormat == IVAS_DEC_BS_OBJ ) - { - if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - for ( i = 0; i < numObj; ++i ) - { - if ( ( error = IsmFileWriter_open( arg.outputWavFilename, i, &ismWriters[i] ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError: Error opening ISM decoded metadata file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); - goto cleanup; - } - } - - for ( j = 0; j < numInitialBadFrames; ++j ) - { - /* write zero metadata */ - for ( i = 0; i < numObj; ++i ) - { - IVAS_ISM_METADATA IsmMetadata; - - if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 1, i ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); - goto cleanup; - } - } - } - } - /* If outputting MASA, open output file and write metadata for initial bad frames */ - else if ( bsFormat == IVAS_DEC_BS_MASA ) - { - if ( ( error = MasaFileWriter_open( arg.outputWavFilename, &masaWriter ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError: Error opening MASA decoded metadata file %s\n", MasaFileWriter_getFilePath( masaWriter ) ); - goto cleanup; - } - - /* Duplicate good first frame metadata to fill the beginning of stream. */ - IVAS_MASA_QMETADATA_HANDLE qMetadata = NULL; - if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - for ( j = 0; j < numInitialBadFrames; ++j ) - { - if ( ( MasaFileWriter_writeFrame( masaWriter, qMetadata ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); - goto cleanup; - } - } - } - } } else { @@ -1378,23 +1428,6 @@ static ivas_error decodeG192( } } - if ( delayNumSamples == -1 ) - { - if ( arg.delayCompensationEnabled ) - { - if ( ( error = IVAS_DEC_GetDelay( hIvasDec, &delayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nUnable to get delay of decoder: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - delayNumSamples_orig = delayNumSamples; - } - else - { - delayNumSamples = 0; - } - zeroPad = delayNumSamples; - } /* Write current frame */ if ( decodedGoodFrame ) @@ -1472,11 +1505,7 @@ static ivas_error decodeG192( } #ifdef WMOPS update_wmops(); -#endif -#ifdef DEBUGGING -#ifdef RAM_ANALYSIS - mem_analyze(); -#endif + update_mem(); #endif } @@ -1507,10 +1536,10 @@ static ivas_error decodeG192( } /* add zeros at the end to have equal length of synthesized signals */ - memset( pcmBuf, 0, zeroPad * nOutChannels * sizeof( int16_t ) ); - if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, zeroPad * nOutChannels ) ) != IVAS_ERR_OK ) + memset( pcmBuf, 0, delayNumSamples_orig * nOutChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig * nOutChannels ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nOutput audio file writer error\n" ); + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); goto cleanup; } @@ -1537,11 +1566,120 @@ cleanup: return error; } +#ifdef DEBUGGING +/*---------------------------------------------------------------------* + * printBitstreamInfoVoip() + * + * Print bitstream info of a VoIP G.192 or RTPDUMP bitstream. + *---------------------------------------------------------------------*/ +static ivas_error printBitstreamInfoVoip( + DecArguments arg, + BS_READER_HANDLE hBsReader, + IVAS_DEC_HANDLE hIvasDec ) +{ + bool previewFailed = true; + ivas_error error = IVAS_ERR_OK; + FILE *f_rtpstream = NULL; + EVS_RTPDUMP_DEPACKER rtpdumpDepacker; + EVS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_NO_ERROR; + uint8_t au[( IVAS_MAX_BITS_PER_FRAME + 7 ) >> 3]; + int16_t auSizeBits; + uint8_t *auPtr = NULL; + bool isAMRWB_IOmode; + uint16_t frameTypeIndex; + bool qBit; + uint32_t nextPacketRcvTime_ms = 0; + uint16_t rtpSequenceNumber; + uint32_t rtpTimeStamp; + + rtpdumpDepacker.rtpdump = NULL; + switch ( arg.inputFormat ) + { + case IVAS_DEC_INPUT_FORMAT_RTPDUMP: + case IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF: + f_rtpstream = fopen( arg.inputBitstreamFilename, "r" ); + + if ( f_rtpstream == NULL ) + { + fprintf( stderr, "could not open: %s\n", arg.inputBitstreamFilename ); + goto cleanup; + } + + rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_open( &rtpdumpDepacker, f_rtpstream, arg.inputFormat == IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF ); + if ( rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) + { + fprintf( stderr, "error in EVS_RTPDUMP_DEPACKER_open(): %d\n", rtpdumpDepackerError ); + goto cleanup; + } + break; + case IVAS_DEC_INPUT_FORMAT_G192: + auPtr = au; + break; + default: + fprintf( stderr, "Unsupported format of input bitstream" ); + goto cleanup; + } + + /* Keep reading until full frame is found */ + do + { + if ( arg.inputFormat == IVAS_DEC_INPUT_FORMAT_G192 ) + { + error = BS_Reader_ReadVoipFrame_compact( hBsReader, au, &auSizeBits, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms ); + qBit = 1; /* good q_bit for INPUT_FORMAT_G192 */ + } + else + { + auPtr = au; /* might have been set to RTP packet in prev call */ + rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, + &nextPacketRcvTime_ms, + &isAMRWB_IOmode, &frameTypeIndex, &qBit, + &auPtr, (uint16_t *) &auSizeBits ); + /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ + rtpTimeStamp = rtpTimeStamp / 16; + } + if ( error != IVAS_ERR_OK || rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) + { + fprintf( stderr, "failed to read first RTP packet\n" ); + goto cleanup; + } + } while ( !qBit || auSizeBits < MIN_NUM_BITS_ACTIVE_FRAME || auSizeBits == NUM_BITS_SID_IVAS_5K2 ); + + BS_Reader_Rewind( hBsReader ); + + IVAS_DEC_PrintConfigWithVoipBitstream( hIvasDec, arg.quietModeEnabled, au, auSizeBits ); + + /*------------------------------------------------------------------------------------------* + * Close fhandles and deallocate resources + *------------------------------------------------------------------------------------------*/ + + previewFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ + +cleanup: + + EVS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker ); + + if ( previewFailed && error == IVAS_ERR_OK ) + { + return IVAS_ERR_UNKNOWN; + } + + return IVAS_ERR_OK; +} +#endif + +#ifdef SUPPORT_JBM_TRACEFILE +static ivas_error writeJbmTraceFileFrameWrapper( const void *data, void *writer ) +{ + return JbmTraceFileWriter_writeFrame( data, writer ); +} +#endif + /*---------------------------------------------------------------------* * decodeVoIP() * - * Read G.192 bitstream and decode in VOIP + * Read G.192 or RTPDUMP bitstream and decode in VOIP *---------------------------------------------------------------------*/ static ivas_error decodeVoIP( @@ -1561,23 +1699,22 @@ static ivas_error decodeVoIP( uint16_t rtpSequenceNumber; uint32_t rtpTimeStamp; - /* For now always assume output with one channel. When adding VoIP to IVAS, - * initialization of the memory for jitter buffer etc. needs to happen after - * first good frame has been decoded because for some configs (such as EXT - * renderer) only then the number of output channels is known.*/ - const int16_t nOutChannels = 1; + bool decodedGoodFrame = false; + int16_t numInitialBadFrames = 0; /* Number of bad frames received until first good frame is decoded */ + int16_t nOutChannels = 0; + MasaFileWriter *masaWriter = NULL; + uint16_t numObj = 0; + + int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE]; AudioFileWriter *afWriter = NULL; #ifdef SUPPORT_JBM_TRACEFILE JbmTraceFileWriter *jbmTraceWriter = NULL; #endif JbmOffsetFileWriter *jbmOffsetWriter = NULL; - const uint32_t pcmBufSizeWithSampleBasedTimeScaling = 3 * MAX_FRAME_SIZE; - int16_t pcmBuf[3 * MAX_FRAME_SIZE]; int16_t delayNumSamples_orig = -1; int16_t delayNumSamples = -1; int32_t delayTimeScale = -1; - int16_t zeroPad = 0; FILE *f_rtpstream = NULL; EVS_RTPDUMP_DEPACKER rtpdumpDepacker; @@ -1587,7 +1724,13 @@ static ivas_error decodeVoIP( uint16_t frameTypeIndex; bool qBit; - memset( pcmBuf, 0, pcmBufSizeWithSampleBasedTimeScaling ); + IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; + IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; + for ( int16_t i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) + { + ismWriters[i] = NULL; + } + rtpdumpDepacker.rtpdump = NULL; switch ( arg.inputFormat ) @@ -1617,11 +1760,6 @@ static ivas_error decodeVoIP( goto cleanup; } - if ( ( error = AudioFileWriter_open( &afWriter, arg.outputWavFilename, arg.output_Fs, nOutChannels ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nUnable to open output file %s\n", arg.outputWavFilename ); - goto cleanup; - } #ifdef SUPPORT_JBM_TRACEFILE if ( arg.jbmTraceFilename != NULL ) @@ -1649,10 +1787,6 @@ static ivas_error decodeVoIP( if ( arg.inputFormat == IVAS_DEC_INPUT_FORMAT_G192 ) { error = BS_Reader_ReadVoipFrame_compact( hBsReader, au, &auSize, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms ); - if ( !evsPayload_getFrameTypeFromSize( auSize, &isAMRWB_IOmode, &frameTypeIndex ) ) - { - error = IVAS_ERR_BITSTREAM_READER_INVALID_DATA; - } qBit = 1; /* good q_bit for INPUT_FORMAT_G192 */ } else @@ -1698,7 +1832,7 @@ static ivas_error decodeVoIP( while ( nextPacketRcvTime_ms <= systemTime_ms ) { /* feed the previous read packet into the receiver now */ - error = IVAS_DEC_VoIP_FeedFrame( hIvasDec, auPtr, auSize, rtpSequenceNumber, rtpTimeStamp, nextPacketRcvTime_ms, isAMRWB_IOmode, frameTypeIndex, qBit ); + error = IVAS_DEC_VoIP_FeedFrame( hIvasDec, auPtr, auSize, rtpSequenceNumber, rtpTimeStamp, nextPacketRcvTime_ms, qBit ); if ( error != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_FeedFrame: %s\n", IVAS_DEC_GetErrorMessage( error ) ); @@ -1711,10 +1845,6 @@ static ivas_error decodeVoIP( { error = BS_Reader_ReadVoipFrame_compact( hBsReader, au, &auSize, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms ); - if ( !evsPayload_getFrameTypeFromSize( auSize, &isAMRWB_IOmode, &frameTypeIndex ) ) - { - error = IVAS_ERR_BITSTREAM_READER_INVALID_DATA; - } qBit = 1; /* good q_bit for VOIP_G192_RTP */ } else @@ -1746,32 +1876,21 @@ static ivas_error decodeVoIP( break; } + nOutSamples = (int16_t) ( arg.output_Fs / 50 ); + /* decode and get samples */ - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, &nOutSamples, pcmBuf, pcmBufSizeWithSampleBasedTimeScaling, systemTime_ms ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms +#ifdef SUPPORT_JBM_TRACEFILE + , + writeJbmTraceFileFrameWrapper, + jbmTraceWriter +#endif + ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#ifdef SUPPORT_JBM_TRACEFILE - /* write JBM trace file entry - only done for EVS testing */ - if ( jbmTraceWriter != NULL ) - { - IVAS_JBM_TRACE_DATA JbmTraceData; - - if ( ( error = IVAS_DEC_GetJbmData( hIvasDec, &JbmTraceData ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetJbmData: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - if ( ( JbmTraceFileWriter_writeFrame( &JbmTraceData, jbmTraceWriter ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError writing JBM Trace data to file %s\n", arg.jbmTraceFilename ); - goto cleanup; - } - } -#endif /* write JBM Offset file entry */ if ( jbmOffsetWriter != NULL ) @@ -1791,36 +1910,60 @@ static ivas_error decodeVoIP( } } - if ( delayNumSamples == -1 ) + /* Continue checking for first good frame until it is found */ + if ( !decodedGoodFrame ) { - if ( arg.delayCompensationEnabled ) + if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); + goto cleanup; + } + + /* Once good frame decoded, catch up */ + if ( decodedGoodFrame ) { - if ( ( error = IVAS_DEC_GetDelay( hIvasDec, &delayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) + error = initOnFirstGoodFrame( + hIvasDec, + arg, + numInitialBadFrames, + nOutSamples, + &delayNumSamples_orig, + &delayNumSamples, + &delayTimeScale, + &bsFormat, + &afWriter, + &masaWriter, + ismWriters, + &nOutChannels, + &numObj ); + if ( error != IVAS_ERR_OK ) { - fprintf( stderr, "\nUnable to get delay of decoder: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } - delayNumSamples_orig = delayNumSamples; } else { - delayNumSamples = 0; + ++numInitialBadFrames; } - zeroPad = delayNumSamples; } - if ( delayNumSamples < nOutSamples ) + + /* Write current frame */ + if ( decodedGoodFrame ) { - if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) + if ( delayNumSamples < nOutSamples ) { - fprintf( stderr, "\nOutput audio file writer error\n" ); - goto cleanup; + if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + delayNumSamples = 0; + } + else + { + delayNumSamples -= nOutSamples; } - delayNumSamples = 0; - } - else - { - delayNumSamples -= nOutSamples; } if ( !arg.quietModeEnabled ) @@ -1833,18 +1976,17 @@ static ivas_error decodeVoIP( #ifdef WMOPS update_wmops(); -#endif -#ifdef DEBUGGING -#ifdef RAM_ANALYSIS - mem_analyze(); -#endif + update_mem(); #endif } - /* add zeros at the end to have equal length of synthesized signals */ - memset( pcmBuf, 0, zeroPad * nOutChannels * sizeof( int16_t ) ); - AudioFileWriter_write( afWriter, pcmBuf, zeroPad * nOutChannels ); + memset( pcmBuf, 0, delayNumSamples_orig * nOutChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } /*------------------------------------------------------------------------------------------* * Printouts after decoding has finished @@ -1863,6 +2005,7 @@ static ivas_error decodeVoIP( cleanup: + EVS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker ); AudioFileWriter_close( &afWriter ); JbmOffsetFileWriter_close( &jbmOffsetWriter ); #ifdef SUPPORT_JBM_TRACEFILE diff --git a/apps/encoder.c b/apps/encoder.c index 005794d939b2fd41279963342142bdaa2c366d31..b73e3d27f9f23619f78fd8029e8db9401f5ef909 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -30,6 +30,10 @@ *******************************************************************************************************/ +#include +#include +#include +#include "options.h" #include "lib_enc.h" #include "cmdl_tools.h" #include "audio_file_reader.h" @@ -37,24 +41,12 @@ #include "jbm_file_reader.h" #include "masa_file_reader.h" #include "ism_file_reader.h" -#include -#include -#ifdef WMOPS -#include "PROM_Size_lib_com.h" -#include "PROM_Size_lib_enc.h" -#include "wmops.h" -#endif -#ifdef RAM_COUNTING_TOOL -#include "mem_count.h" -#else -#include -#endif #ifdef DEBUGGING #include "debug.h" #endif +#include "wmc_auto.h" -#define WMC_TOOL_MAN - +#define WMC_TOOL_SKIP /*------------------------------------------------------------------------------------------* * Local constants, enums, structures @@ -154,40 +146,6 @@ static IVAS_ENC_FORCED_MODE parseForcedMode( char *forcedModeChar ); #endif -#ifdef WMOPS -/*------------------------------------------------------------------------------------------* - * Function to print complexity & memory estimates at the encoder - *------------------------------------------------------------------------------------------*/ - -extern int16_t *ptr_base_stack; -extern int16_t *ptr_base_stack; -extern int16_t *ptr_max_stack; -extern int32_t wc_frame; -extern char location_max_stack[256]; -void print_stack_call_tree( void ); - -static void print_mem_enc( size_t SRAM_size ) -{ - fprintf( stdout, "\n\n --- Encoder memory usage --- \n\n" ); - - fprintf( stdout, "PROM size (encoder): %d words (or instructions)\n", PROM_Size_lib_enc ); - fprintf( stdout, "PROM size (common): %d words (or instructions)\n", PROM_Size_lib_com ); - fprintf( stdout, "Stack size (encoder): %ld words in %s() in frame #%d\n", ( ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) ) / sizeof( float ), location_max_stack, wc_frame ); - fprintf( stdout, "Table ROM size (encoder): %ld words\n", ( Const_Data_Size_rom_enc() + Const_Data_Size_ivas_rom_enc() ) / sizeof( float ) ); - fprintf( stdout, "Table ROM size (common): %ld words\n", ( Const_Data_Size_rom_com() + Const_Data_Size_ivas_rom_com() ) / sizeof( float ) ); -#ifdef RAM_COUNTING_TOOL - fprintf( stdout, "Static RAM size (encoder): %ld words\n\n", SRAM_size ); -#endif - print_stack_call_tree(); - - fprintf( stdout, "Note: this is an optimistic estimate of the memory consumption assuming\n" ); - fprintf( stdout, " that each variable (short, long or float) in the codec requires\n" ); - fprintf( stdout, " 32 bits of memory and may therefore be represented by 1 word.\n" ); - fprintf( stdout, " The following formula is used: sizeof('memory array')/sizeof(float)\n\n" ); -} -#endif - - /*------------------------------------------------------------------------------------------* * main() * @@ -224,18 +182,12 @@ int main( #endif #endif -#ifdef WMOPS - size_t SRAM_size = 0; - reset_wmops(); - reset_stack(); -#endif - #ifdef DEBUGGING dbgargs( &argc, argv ); #endif - -#ifdef RAM_COUNTING_TOOL - mem_count_init( 0, USE_32BITS ); +#ifdef WMOPS + reset_wmops(); + reset_mem( USE_32BITS ); #endif initArgStruct( &arg ); @@ -765,11 +717,7 @@ int main( #ifdef WMOPS update_wmops(); -#endif -#ifdef DEBUGGING -#ifdef RAM_ANALYSIS - mem_analyze(); -#endif + update_mem(); #endif } @@ -834,15 +782,9 @@ cleanup: IVAS_ENC_Close( &hIvasEnc ); -#ifdef RAM_COUNTING_TOOL -#ifdef WMOPS - SRAM_size = -#endif - mem_count_summary( USE_DEFAULT ); -#endif #ifdef WMOPS print_wmops(); - print_mem_enc( SRAM_size ); + print_mem( NULL ); #endif #ifdef DEBUGGING @@ -1273,20 +1215,14 @@ static bool parseCmdlIVAS_enc( arg->inputFormat = IVAS_ENC_INPUT_ISM; i++; -#ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( i < argc - 4 ) -#else - if ( i < argc - 5 ) -#endif { -#ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of ISM channels must be an integer number!\n\n" ); usage_enc(); return false; } -#endif if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { @@ -1299,14 +1235,12 @@ static bool parseCmdlIVAS_enc( usage_enc(); return false; } -#ifdef IMPROVE_CMDLINE_ROBUSTNESS else if ( tmp > IVAS_MAX_NUM_OBJECTS ) { fprintf( stderr, "Error: Too high number of ISM channels specified!\n\n" ); usage_enc(); return false; } -#endif else { arg->inputFormatConfig.ism.numObjects = (int16_t) tmp; @@ -1338,11 +1272,7 @@ static bool parseCmdlIVAS_enc( } else { -#ifdef IMPROVE_CMDLINE_ROBUSTNESS fprintf( stderr, "Error: not enough metadata arguments specified!\n\n" ); -#else - fprintf( stderr, "Error: not enough arguments\n\n" ); -#endif usage_enc(); return false; } @@ -1354,20 +1284,9 @@ static bool parseCmdlIVAS_enc( arg->inputFormat = IVAS_ENC_INPUT_SBA; /* SBA configuration */ - if ( i < argc - 4 -#ifdef IMPROVE_CMDLINE_ROBUSTNESS - && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0 -#endif - ) + if ( i < argc - 4 && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0 ) { -#ifndef IMPROVE_CMDLINE_ROBUSTNESS - if ( sscanf( argv[i], "%d", &tmp ) > 0 ) - { -#endif - i++; -#ifndef IMPROVE_CMDLINE_ROBUSTNESS - } -#endif + i++; } else { @@ -1404,14 +1323,12 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { -#ifdef IMPROVE_CMDLINE_ROBUSTNESS if ( !is_digits_only( argv[i] ) ) { fprintf( stderr, "Error: Number of MASA channels must be an integer number!\n\n" ); usage_enc(); return false; } -#endif if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { @@ -1427,11 +1344,7 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.masaVariant = IVAS_ENC_MASA_2CH; break; default: -#ifdef IMPROVE_CMDLINE_ROBUSTNESS fprintf( stderr, "Error: MASA channels must be 1 or 2.\n\n" ); -#else - fprintf( stderr, "Error: MASA channels must for the moment be 1 or 2.\n\n" ); -#endif usage_enc(); return false; } diff --git a/apps/renderer.c b/apps/renderer.c index 47159892db354a6bf4dce349ffde54d251d86dd5..19b88a92ddcd32469ed591f1a89900705c5bb8c5 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -30,6 +30,13 @@ *******************************************************************************************************/ +#include +#include +#include +#include +#include +#include +#include #include "options.h" #include "audio_file_reader.h" #include "audio_file_writer.h" @@ -44,43 +51,8 @@ #include "masa_file_reader.h" #include "prot.h" #include "render_config_reader.h" -#ifdef WMOPS -#include "PROM_Size_lib_rend.h" -#include "wmops.h" -#endif -#ifdef DEBUGGING -#include "debug.h" -#endif -#ifdef RAM_COUNTING_TOOL -#include "mem_count.h" -#endif -#include -#include -#include -#include -#include -#include -#include - -#ifndef count_malloc -#ifdef RAM_COUNTING_TOOL -#define count_malloc( n1 ) MALLOC_FCT_CALL( n1 ) -#define count_calloc( n1, n2 ) CALLOC_FCT_CALL( n1, n2 ) -#define count_free( ptr ) FREE_FCT_CALL( ptr ) -#else -#define count_malloc( n1 ) malloc( n1 ) -#define count_calloc( n1, n2 ) calloc( n1, n2 ) -#define count_free( ptr ) free( ptr ) -#endif -#endif - -#ifndef min -#define min( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) ) -#endif +#include "wmc_auto.h" -#ifndef max -#define max( x, y ) ( ( x ) > ( y ) ? ( x ) : ( y ) ) -#endif #define RENDERER_MAX_CLI_ARG_LENGTH ( FILENAME_MAX ) #define RENDERER_MAX_METADATA_LENGTH 8192 @@ -97,37 +69,6 @@ static #define SEP_FOLDER '/' #endif -#ifdef WMOPS -void print_stack_call_tree( void ); -int Const_Data_Size_ivas_rom_rend( void ); -extern int16_t *ptr_base_stack; -extern int16_t *ptr_max_stack; -extern int32_t wc_frame; -extern char location_max_stack[256]; - -/*------------------------------------------------------------------------------------------* - * Function to print complexity & memory estimates - *------------------------------------------------------------------------------------------*/ -static void print_mem_renderer( size_t SRAM_size ) -{ - fprintf( stdout, "\n\n --- Renderer memory usage --- \n\n" ); - - fprintf( stdout, "PROM size (renderer): %d words (or instructions)\n", PROM_Size_lib_rend ); - fprintf( stdout, "Stack size: %d words in %s() in frame #%d\n", ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) / sizeof( float ), location_max_stack, wc_frame ); - fprintf( stdout, "Table ROM size(renderer): %d words\n", ( Const_Data_Size_ivas_rom_rend() ) / sizeof( float ) ); - fprintf( stdout, "Table ROM size (binaural renderer): %ld words\n", ( Const_Data_Size_ivas_rom_binauralRen() + Const_Data_Size_ivas_rom_TdBinauralR() + Const_Data_Size_ivas_rom_binaural_cr() ) / sizeof( float ) ); -#ifdef RAM_COUNTING_TOOL - fprintf( stdout, "Static RAM size: %d words\n\n", SRAM_size ); -#endif - print_stack_call_tree(); - - fprintf( stdout, "Note: this is an optimistic estimate of the memory consumption assuming\n" ); - fprintf( stdout, " that each variable (short, long or float) in the codec requires\n" ); - fprintf( stdout, " 32 bits of memory and may therefore be represented by 1 word.\n" ); - fprintf( stdout, " The following formula is used: sizeof('memory array')/sizeof(float)\n\n" ); -} -#endif - typedef struct { uint32_t frameCounter; @@ -191,6 +132,12 @@ typedef struct bool quietModeEnabled; bool sceneDescriptionInput; float inputGainGlobal; /* Linear gain (not in dB) */ + bool lfePanningEnabled; + float lfeConfigGain; /* Linear gain (not in dB) */ + float lfeConfigAzimuth; + float lfeConfigElevation; + bool lfeCustomRoutingEnabled; + char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; } CmdlnArgs; typedef enum @@ -205,7 +152,8 @@ typedef enum CmdLnOptionId_renderConfigFile, CmdLnOptionId_noDiegeticPan, CmdLnOptionId_orientationTracking, - CmdLnOptionId_customLfeRouting, + CmdlnOptionId_lfePosition, + CmdlnOptionId_lfeMatrix, CmdLnOptionId_noDelayCmp, CmdLnOptionId_quietModeEnabled, CmdLnOptionId_inputMetadata, @@ -281,13 +229,15 @@ static const CmdLnParser_Option cliOptions[] = { .description = "Head orientation tracking type: 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM) (todo: check implementation)", }, { - /* TODO(sgi): Replace with more configurable input, e.g. ask for a list of triplets: (gain, azimuth, elevation) to place LFE signal */ - /* rename to "lfeHandling" */ - .id = CmdLnOptionId_customLfeRouting, - .match = "neverDropLfe", - .matchShort = "ndl", - .description = "[flag] If set, renderer tries to render LFE into other channels in an optimal way when rendering to configs w/o LFE", + .id = CmdlnOptionId_lfePosition, + .match = "lfe_position", + .matchShort = "lp", + .description = "Output LFE position. Comma-delimited triplet of [gain, azimuth, elevation] where gain is linear (like --gain, -g) and azimuth, elevation are in degrees.\nIf specified, overrides the default behavior which attempts to map input to output LFE channel(s)", }, + { .id = CmdlnOptionId_lfeMatrix, + .match = "lfe_matrix", + .matchShort = "lm", + .description = "LFE panning matrix. File (CSV table) containing a matrix of dimensions [ num_input_lfe x num_output_channels ] with elements specifying linear routing gain (like --gain, -g). \nIf specified, overrides the output LFE position option and the default behavior which attempts to map input to output LFE channel(s)" }, { .id = CmdLnOptionId_noDelayCmp, .match = "no_delay_cmp", @@ -393,6 +343,10 @@ static void parseMetadata( IsmPositionProvider *positionProvider, MasaFileReader **masaReaders ); +static ivas_error parseLfePanMtxFile( + const char *lfeRoutingMatrixFilePath, + IVAS_REND_LfePanMtx *lfePanMtx ); + static void convert_backslash( char *str ); static void remove_cr( char *str ); @@ -590,17 +544,10 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; -#ifdef WMOPS - size_t SRAM_size; -#endif #ifdef WMOPS reset_wmops(); - reset_stack(); -#endif - -#ifdef RAM_COUNTING_TOOL - mem_count_init( 0, USE_32BITS ); + reset_mem( USE_32BITS ); #endif for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) @@ -616,6 +563,7 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); convert_backslash( args.headRotationFilePath ); + convert_backslash( args.inLfePanningMatrixFile ); if ( !isEmptyString( args.headRotationFilePath ) ) { @@ -722,6 +670,19 @@ int main( } } + IVAS_REND_LfePanMtx lfePanMatrix; + + /* parse input LFE panning matrix */ + if ( args.lfeCustomRoutingEnabled && !isEmptyString( args.inLfePanningMatrixFile ) ) + { + /* TODO tmu: how should we handle this on CLI for multiple MC inputs? */ + if ( ( error = parseLfePanMtxFile( args.inLfePanningMatrixFile, &lfePanMatrix ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) { if ( ( error = IVAS_REND_AddInput( hIvasRend, args.inConfig.multiChannelBuses[i].audioConfig, &mcIds[i] ) ) != IVAS_ERR_OK ) @@ -745,7 +706,30 @@ int main( } } - /* TODO(sgi): Test custom LFE routing here */ + /* set panning matrix for input LFE */ + if ( args.lfeCustomRoutingEnabled ) + { + if ( args.lfePanningEnabled ) + { + fprintf( stdout, "Warning LFE position specified as well as panning matrix! Ignoring position and using gains from panning matrix\n" ); + args.lfePanningEnabled = false; + } + + if ( ( error = IVAS_REND_SetInputLfeMtx( hIvasRend, mcIds[i], (const IVAS_REND_LfePanMtx *) &lfePanMatrix ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + /* set panning gains for input LFE */ + else if ( args.lfePanningEnabled ) + { + if ( ( error = IVAS_REND_SetInputLfePos( hIvasRend, mcIds[i], args.lfeConfigGain, args.lfeConfigAzimuth, args.lfeConfigElevation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } } for ( i = 0; i < args.inConfig.numAudioObjects; ++i ) @@ -821,17 +805,13 @@ int main( fprintf( stderr, "Failed to open file: %s\n", args.outputFilePath ); exit( -1 ); } -#ifdef DEC_TO_REND_FLOAT_DUMP - printf( "Warning: Renderer executable built with DEC_TO_REND_FLOAT_DUMP enabled!\n" ); - printf( " Float dump file (./float_out.wav) will be forced as input.\n" ); -#endif inBufferSize = frameSize_smpls * totalNumInChannels; outBufferSize = frameSize_smpls * numOutChannels; - inpInt16Buffer = count_malloc( inBufferSize * sizeof( int16_t ) ); - inFloatBuffer = count_malloc( inBufferSize * sizeof( float ) ); - outInt16Buffer = count_malloc( outBufferSize * sizeof( int16_t ) ); - outFloatBuffer = count_malloc( outBufferSize * sizeof( float ) ); + inpInt16Buffer = malloc( inBufferSize * sizeof( int16_t ) ); + inFloatBuffer = malloc( inBufferSize * sizeof( float ) ); + outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) ); + outFloatBuffer = malloc( outBufferSize * sizeof( float ) ); inBuffer.config.numSamplesPerChannel = (int16_t) frameSize_smpls; inBuffer.config.numChannels = (int16_t) totalNumInChannels; @@ -842,6 +822,7 @@ int main( outBuffer.data = outFloatBuffer; #ifdef WMOPS + reset_stack(); reset_wmops(); #endif @@ -875,20 +856,6 @@ int main( /* Convert from int to float and from interleaved to packed */ convertInputBuffer( inpInt16Buffer, numSamplesRead, frameSize_smpls, num_in_channels, inFloatBuffer ); -#ifdef DEC_TO_REND_FLOAT_DUMP - /* Overwrite from dump file */ - float tmp[960 * 16]; - dbgread( tmp, sizeof( float ), numSamplesRead, "./float_out.raw" ); - - /* Conversion from interleaved to packed still necessary */ - for ( int32_t i = 0; i < numSamplesRead / num_in_channels; ++i ) - { - for ( int32_t c = 0; c < num_in_channels; ++c ) - { - inFloatBuffer[c * frameSize_smpls + i] = tmp[i * num_in_channels + c]; - } - } -#endif ObjectPositionBuffer mtdBuffer; @@ -1032,6 +999,7 @@ int main( #ifdef WMOPS update_wmops(); + update_mem(); #endif } @@ -1063,10 +1031,10 @@ int main( #endif /* === Close === */ - count_free( inpInt16Buffer ); - count_free( inFloatBuffer ); - count_free( outInt16Buffer ); - count_free( outFloatBuffer ); + free( inpInt16Buffer ); + free( inFloatBuffer ); + free( outInt16Buffer ); + free( outFloatBuffer ); for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) { MasaFileReader_close( &masaReaders[i] ); @@ -1079,15 +1047,9 @@ int main( IsmPositionProvider_close( positionProvider ); RenderConfigReader_close( &renderConfigReader ); -#ifdef RAM_COUNTING_TOOL -#ifdef WMOPS - SRAM_size = -#endif - mem_count_summary( USE_DEFAULT ); -#endif #ifdef WMOPS print_wmops(); - print_mem_renderer( SRAM_size ); + print_mem( NULL ); #endif return 0; @@ -1109,6 +1071,20 @@ static IVAS_REND_AudioConfig ambisonicsOrderToEnum( return IVAS_REND_AUDIO_CONFIG_UNKNOWN; } +static const CmdLnParser_Option *findOptionById( + const int32_t id ) +{ + for ( int32_t i = 0; i < numCliOptions; ++i ) + { + if ( cliOptions[i].id == id ) + { + return &cliOptions[i]; + } + } + + return NULL; +} + static bool parseInConfig( const char *inFormatStr, InputConfig *inConfig, @@ -1197,7 +1173,8 @@ static bool parseInConfig( if ( error == IVAS_ERR_FAILED_FILE_OPEN ) { /* Failed to open with given string - most likely wasn't a file path */ - fprintf( stderr, "Unsupported input format: %s\n", inFormatStr ); + const CmdLnParser_Option *listOption = findOptionById( CmdLnOptionId_listFormats ); + fprintf( stderr, "Unsupported input format: %s. To list valid formats, use option --%s.\n", inFormatStr, listOption->match ); return false; } if ( error != IVAS_ERR_OK ) @@ -1212,10 +1189,13 @@ static bool parseInConfig( } break; default: + { /* Default case covers formats that are defined in the IVAS_REND_AudioConfig enum, * but cannot be used at input, e.g. BINAURAL */ - fprintf( stderr, "Unsupported input format: %s\n", inFormatStr ); + const CmdLnParser_Option *listOption = findOptionById( CmdLnOptionId_listFormats ); + fprintf( stderr, "Unsupported input format: %s. To list valid formats, use option --%s.\n", inFormatStr, listOption->match ); return false; + } } return true; @@ -1243,12 +1223,10 @@ static bool parseOutConfig( return true; } -static int8_t parseDiegeticPan( +static bool parseDiegeticPan( char *value, float *noDiegeticPan ) { - int8_t success; - success = 1; to_upper( value ); if ( ( strcmp( value, "CENTER" ) == 0 ) || ( strchr( value, 'C' ) != NULL ) ) @@ -1270,18 +1248,16 @@ static int8_t parseDiegeticPan( if ( *noDiegeticPan > 1.0f || *noDiegeticPan < -1.0f ) { fprintf( stderr, "Error: Incorrect value for panning option argument specified!\n\n" ); - success = 0; + return false; } } - return success ? 0 : -1; + return false; } -static int8_t parseOrientationTracking( +static bool parseOrientationTracking( char *value, int8_t *tracking_type ) { - int8_t success; - success = 1; to_upper( value ); @@ -1296,10 +1272,10 @@ static int8_t parseOrientationTracking( else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", value ); - success = 0; + return false; } - return success ? 0 : -1; + return true; } static IVAS_REND_AudioConfig parseAudioConfig( @@ -1353,7 +1329,16 @@ static IVAS_REND_AudioConfig parseAudioConfig( } if ( strncmp( charBuf, "ISM", 3 ) == 0 ) { - return IVAS_REND_AUDIO_CONFIG_OBJECT; + /* Accept input config as ISM only if the 4th character is a number from 1 to 4. + * Otherwise, do nothing. Unknown audio config will be returned. */ + switch ( charBuf[3] ) + { + case '1': + case '2': + case '3': + case '4': + return IVAS_REND_AUDIO_CONFIG_OBJECT; + } } if ( strncmp( charBuf, "MASA", 4 ) == 0 ) { @@ -1381,20 +1366,53 @@ static IVAS_REND_AudioConfig parseAudioConfig( return IVAS_REND_AUDIO_CONFIG_UNKNOWN; } -static const CmdLnParser_Option *findOptionById( - const int32_t id ) +static bool parseLfePositionConfig( + const char *value, + float *lfeGain, + float *lfeAzimuth, + float *lfeElevation ) { - for ( int32_t i = 0; i < numCliOptions; ++i ) + uint8_t nvalues; + const char *tok; + float values[3]; + char config_string[RENDERER_MAX_METADATA_LINE_LENGTH]; + + strncpy( config_string, value, RENDERER_MAX_METADATA_LINE_LENGTH ); + nvalues = 0; + + for ( tok = strtok( config_string, "," ); tok && *tok; tok = strtok( NULL, ",\n" ) ) { - if ( cliOptions[i].id == id ) + while ( *tok == ' ' ) { - return &cliOptions[i]; + tok++; + } + + if ( *tok == '\0' ) + { + continue; + } + values[nvalues] = (float) atof( tok ); + nvalues++; + + /* ignore any additionally specified values */ + if ( nvalues == 3 ) + { + break; } } - return NULL; + if ( nvalues != 3 ) + { + return false; + } + + *lfeGain = values[0]; + *lfeAzimuth = values[1]; + *lfeElevation = values[2]; + return true; } + static bool checkRequiredArgs( CmdlnArgs args ) { @@ -1478,6 +1496,13 @@ static CmdlnArgs defaultArgs( args.sceneDescriptionInput = false; args.inputGainGlobal = 1.0f; + args.lfePanningEnabled = false; + args.lfeConfigGain = 1.0f; + args.lfeConfigAzimuth = 0; + args.lfeConfigElevation = 0; + + args.lfeCustomRoutingEnabled = false; + clearString( args.inLfePanningMatrixFile ); return args; } @@ -1548,7 +1573,7 @@ static void parseOption( break; case CmdLnOptionId_noDiegeticPan: assert( numOptionValues == 1 ); - if ( parseDiegeticPan( optionValues[0], &args->noDiegeticPan ) != 0 ) + if ( !parseDiegeticPan( optionValues[0], &args->noDiegeticPan ) ) { fprintf( stderr, "Unknown option for diegetic panning: %s\n", optionValues[0] ); exit( -1 ); @@ -1556,14 +1581,26 @@ static void parseOption( break; case CmdLnOptionId_orientationTracking: assert( numOptionValues == 1 ); - if ( parseOrientationTracking( optionValues[0], &args->orientationTracking ) != 0 ) + if ( !parseOrientationTracking( optionValues[0], &args->orientationTracking ) ) { fprintf( stderr, "Unknown option for orientation tracking: %s\n", optionValues[0] ); exit( -1 ); } break; - case CmdLnOptionId_customLfeRouting: - assert( 0 && "Not yet implemented in CLI" ); + case CmdlnOptionId_lfePosition: + assert( numOptionValues == 1 ); + if ( !parseLfePositionConfig( optionValues[0], &args->lfeConfigGain, &args->lfeConfigAzimuth, &args->lfeConfigElevation ) ) + { + fprintf( stderr, "Unknown or invalid option for LFE position: %s\n", optionValues[0] ); + exit( -1 ); + } + args->lfePanningEnabled = true; + break; + break; + case CmdlnOptionId_lfeMatrix: + assert( numOptionValues == 1 ); + strncpy( args->inLfePanningMatrixFile, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); + args->lfeCustomRoutingEnabled = true; break; case CmdLnOptionId_noDelayCmp: assert( numOptionValues == 0 ); @@ -1616,7 +1653,7 @@ IsmPositionProvider *IsmPositionProvider_open( IsmPositionProvider *ipp; uint16_t i; - ipp = (IsmPositionProvider *) count_malloc( sizeof( IsmPositionProvider ) ); + ipp = (IsmPositionProvider *) malloc_( sizeof( IsmPositionProvider ) ); ipp->frameCounter = 0; ipp->numObjects = 0; @@ -1687,14 +1724,22 @@ void IsmPositionProvider_getNextFrame( for ( objIdx = 0; objIdx < positionProvider->numObjects; ++objIdx ) { + /* If ISM metadata reader is open, read from metadata file */ if ( positionProvider->ismReaders[objIdx] != NULL ) { getMetadataFromFileReader( positionProvider->ismReaders[objIdx], objectMetadataBuffer, objIdx ); } - else + /* Otherwise, if positions were provided in a scene description file, use them */ + else if ( positionProvider->positions[objIdx] != NULL ) { readFromShorthandMetadata( positionProvider, objectMetadataBuffer, objIdx ); } + /* Otherwise fall back to default position */ + else + { + objectMetadataBuffer->positions[objIdx].azimuth = 0.0f; + objectMetadataBuffer->positions[objIdx].elevation = 0.0f; + } /* Wrap azimuth to lie within (-180, 180] range */ while ( objectMetadataBuffer->positions[objIdx].azimuth < 0.0f ) @@ -1733,16 +1778,16 @@ void IsmPositionProvider_close( IsmPositionProvider *positionProvider ) if ( positionProvider->positions[i] != NULL ) { - count_free( positionProvider->positions[i] ); + free( positionProvider->positions[i] ); } if ( positionProvider->positionDurations[i] != NULL ) { - count_free( positionProvider->positionDurations[i] ); + free( positionProvider->positionDurations[i] ); } } - count_free( positionProvider ); + free( positionProvider ); return; } @@ -1991,8 +2036,8 @@ static void parseIsm( if ( parseUint32( line, &numberOfObjectPositionsToRead ) == 0 ) { positionProvider->numPositions[idx] = numberOfObjectPositionsToRead; - positionProvider->positions[idx] = count_malloc( numberOfObjectPositionsToRead * sizeof( IVAS_REND_AudioObjectPosition ) ); - positionProvider->positionDurations[idx] = count_malloc( numberOfObjectPositionsToRead * sizeof( uint16_t ) ); + positionProvider->positions[idx] = malloc_( numberOfObjectPositionsToRead * sizeof( IVAS_REND_AudioObjectPosition ) ); + positionProvider->positionDurations[idx] = malloc_( numberOfObjectPositionsToRead * sizeof( uint16_t ) ); for ( i = 0; i < numberOfObjectPositionsToRead; ++i ) { @@ -2082,7 +2127,7 @@ static void parseMasa( if ( strncmp( line, "MASA", 4 ) != 0 ) { char numTcs = *line; - sprintf( line, "MASA%c", numTcs ); + snprintf( line, 6 /* write at most 6 characters: MASAx + null termination */, "MASA%c", numTcs ); } inConfig->masaBuses[idx].audioConfig = parseAudioConfig( line ); @@ -2324,6 +2369,70 @@ static void printSupportedAudioConfigs() return; } +static ivas_error parseLfePanMtxFile( + const char *lfeRoutingMatrixFilePath, + IVAS_REND_LfePanMtx *lfePanMtx ) +{ + int16_t lfe_in, ch_out; + const char *tok; + char line[200]; /* > (10 chars * IVAS_MAX_OUTPUT_CHANNELS) i.e. "-999, " */ + FILE *mtxFile; + + if ( strlen( lfeRoutingMatrixFilePath ) < 1 ) + { + return IVAS_ERR_FAILED_FILE_OPEN; + } + + mtxFile = fopen( lfeRoutingMatrixFilePath, "r" ); + + if ( !mtxFile ) + { + return IVAS_ERR_FAILED_FILE_OPEN; + } + + /* set default panning matrix to all zeros + any subsequent issue in file reading will gracefully exit the function */ + for ( lfe_in = 0; lfe_in < IVAS_MAX_INPUT_LFE_CHANNELS; lfe_in++ ) + { + set_zero( ( *lfePanMtx )[lfe_in], IVAS_MAX_OUTPUT_CHANNELS ); + } + + for ( lfe_in = 0, ch_out = 0; lfe_in < IVAS_MAX_INPUT_LFE_CHANNELS; lfe_in++ ) + { + /* if EOF or a blank line is encountered, simply return */ + if ( ( fgets( line, 200, mtxFile ) == NULL ) && ( strcmp( line, "\n" ) == 0 ) && ( strcmp( line, "\r\n" ) == 0 ) ) + { + fclose( mtxFile ); + return IVAS_ERR_OK; + } + + for ( tok = strtok( line, "," ); tok && *tok; tok = strtok( NULL, ",\n" ) ) + { + while ( *tok == ' ' ) + { + tok++; + } + + if ( *tok == '\0' ) + { + continue; + } + if ( ch_out > IVAS_MAX_OUTPUT_CHANNELS ) + { + break; + } + else + { + ( *lfePanMtx )[lfe_in][ch_out] = (float) atof( tok ); + ch_out++; + } + } + } + + fclose( mtxFile ); + return IVAS_ERR_OK; +} + // VE2AT: possibly move these functions to cmdln_parser.c ? static void convert_backslash( char *str ) @@ -2432,9 +2541,7 @@ static void convertOutputBuffer( int16_t *intBuffer ) { int16_t chnl, smpl, i; -#ifdef FIX_REND_ROUNDING float temp; -#endif i = 0; @@ -2442,7 +2549,6 @@ static void convertOutputBuffer( { for ( chnl = 0; chnl < numChannels; ++chnl ) { -#ifdef FIX_REND_ROUNDING temp = floatBuffer[chnl * numSamplesPerChannel + smpl]; temp = (float) floor( temp + 0.5f ); if ( temp > MAX16B_FLT ) @@ -2454,9 +2560,6 @@ static void convertOutputBuffer( temp = MIN16B_FLT; } intBuffer[i] = (int16_t) temp; -#else - intBuffer[i] = (int16_t) roundf( floatBuffer[chnl * numSamplesPerChannel + smpl] ); -#endif ++i; } diff --git a/ci/__init__.py b/ci/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ci/build_all_linux.sh b/ci/build_all_linux.sh index f1c701a0d966b417203d83f67f8ce5f678462674..47ad54dc42e9bd43c46744a673915726b924b0db 100755 --- a/ci/build_all_linux.sh +++ b/ci/build_all_linux.sh @@ -1,6 +1,6 @@ #! /usr/bin/bash -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/build_codec_instrumented_linux.sh b/ci/build_codec_instrumented_linux.sh index 9f875f28fbe04ecab16d44422bfebf3eeedcb168..7c4da0a7f5176ac155c746b1b30d2f472c4e07b7 100755 --- a/ci/build_codec_instrumented_linux.sh +++ b/ci/build_codec_instrumented_linux.sh @@ -1,6 +1,6 @@ #! /usr/bin/bash -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/build_codec_sanitizers_linux.sh b/ci/build_codec_sanitizers_linux.sh index d5891e43ad7d549d660c91ec0b768aef7c15490d..d352fa32ec1cd6d8d3283c4984ba428c117b5769 100755 --- a/ci/build_codec_sanitizers_linux.sh +++ b/ci/build_codec_sanitizers_linux.sh @@ -1,6 +1,6 @@ #! /usr/bin/bash -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/check_for_warnings.py b/ci/check_for_warnings.py index 76a0bc917a689dc68c67a24ebc943fa3c0007c07..f6b205e689af9ff65bc22cf309c709f6b5ff6d28 100755 --- a/ci/check_for_warnings.py +++ b/ci/check_for_warnings.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/complexity_measurements/genWebpageData_Prom.csh b/ci/complexity_measurements/genWebpageData_Prom.csh deleted file mode 100755 index d6e716f0c5455228478c620a759148b00a6aacc5..0000000000000000000000000000000000000000 --- a/ci/complexity_measurements/genWebpageData_Prom.csh +++ /dev/null @@ -1,220 +0,0 @@ -#!/bin/tcsh - -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, -# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., -# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, -# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other -# contributors to this repository. All Rights Reserved. - -# This software is protected by copyright law and by international treaties. -# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, -# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., -# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, -# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other -# contributors to this repository retain full ownership rights in their respective contributions in -# the software. This notice grants no license of any kind, including but not limited to patent -# license, nor is any license granted by implication, estoppel or otherwise. - -# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making -# contributions. - -# This software is provided "AS IS", without any express or implied warranties. The software is in the -# development stage. It is intended exclusively for experts who have experience with such software and -# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability -# and fitness for a particular purpose are hereby disclaimed and excluded. - -# Any dispute, controversy or claim arising under or in relation to providing this software shall be -# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in -# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and -# the United Nations Convention on Contracts on the International Sales of Goods. - -set maxValues = 40 - -if (${#argv} != 3) then - echo usage: $0 \ \ \ - exit -endif - -set srcFile1 = $1 - -set file_final = $2 -set file = ${file_final}_new_$$ - -set graphName = $3 - -set tmpBase = `basename $0` -set tmpFile1 = /tmp/${tmpBase}1_$$ -rm -f ${tmpFile1} -cat ${srcFile1} | tail -n ${maxValues} > ${tmpFile1} -set nLines1 = `cat ${tmpFile1} | wc -l` -set maxNumWordsLine = 7 - -rm -f $file -touch $file - -echo "var $graphName = {" >> $file -echo ' prom_worstcase: {' >> $file -echo ' description: "Worst Case PROM",' >> $file -echo ' direction: -1,' >> $file -echo ' runs: [' >> $file - - -@ i = 0 -foreach line ( "`cat ${tmpFile1}`" ) - @ i++ - set separator = "," - if ( $i == $nLines1 ) then - set separator = "" - endif - - set tmp = ( $line ) - - set numWords = `echo $tmp | wc -w` - if ( $numWords < $maxNumWordsLine ) then - continue - endif - - set revision = $tmp[1] - set shortDate = `echo $tmp[2] | sed -e "s/_/\ /g"` - set fullDate = `echo $tmp[3] | sed -e "s/_/\ /g"` - set logFileFlc = $tmp[5] - set logFileBasop = $tmp[7] - - echo ' {' >> $file - echo ' fullDate: "'${fullDate}'",' >> $file - echo ' shortDate: "'${shortDate}'",' >> $file - echo ' revision: "'${revision}'",' >> $file - echo ' logFileFlc: "'${logFileFlc}'",' >> $file - echo ' logFileBasop: "'${logFileBasop}'",' >> $file - echo ' }'${separator} >> $file - -end -echo ' ],' >> $file - -# begin displays -echo ' displays: [' >> $file - -# requirement PROM -echo ' {' >> $file -echo ' lines: { show: false },' >> $file -echo ' points: { show: false, fillColor: "#ffffff" },' >> $file -echo ' borderWidth: 1.5,' >> $file -echo ' borderColor: "#BEBEBE",' >> $file -echo ' markingsLineWidth: .75,' >> $file -echo ' hoverable: true,' >> $file -echo ' clickable: true,' >> $file -echo ' shadowSize: 0,' >> $file -echo ' color: "#000000",' >> $file -echo ' id: "requirementProm",' >> $file -echo ' data: [' >> $file - -@ i = 0 -foreach line ( "`cat ${tmpFile1}`" ) - set separator = "," - if ( $i == $nLines1 - 1 ) then - set separator = "" - endif - - set tmp = ( $line ) - - set numWords = `echo $tmp | wc -w` - if ( $numWords < $maxNumWordsLine ) then - continue - endif - - # TODO: add real requirement once decided on - set score = 0 - - echo ' ['"${i}, ${score}"']'${separator} >> $file - @ i++ - -end - -echo ' ]' >> $file -echo ' },' >> $file -# requirement ROM - -# measured ops FLC -echo ' {' >> $file -echo ' lines: { show: true },' >> $file -echo ' points: { show: true, fillColor: "#ffffff" },' >> $file -echo ' borderWidth: 1.5,' >> $file -echo ' borderColor: "#BEBEBE",' >> $file -echo ' markingsLineWidth: .75,' >> $file -echo ' hoverable: true,' >> $file -echo ' clickable: true,' >> $file -echo ' shadowSize: 0,' >> $file -echo ' color: "#FF8000",' >> $file -echo ' id: "promOpsFlc",' >> $file -echo ' data: [' >> $file - -@ i = 0 -foreach line ( "`cat ${tmpFile1}`" ) - set separator = "," - if ( $i == $nLines1 - 1 ) then - set separator = "" - endif - - set tmp = ( $line ) - - set numWords = `echo $tmp | wc -w` - if ( $numWords < $maxNumWordsLine ) then - continue - endif - - set score = $tmp[4] - - echo ' ['"${i}, ${score}"']'${separator} >> $file - @ i++ - -end - -echo ' ]' >> $file -echo ' },' >> $file -# measured ops FLC - -# measured ops BASOP -echo ' {' >> $file -echo ' lines: { show: false },' >> $file -echo ' points: { show: false, fillColor: "#ffffff" },' >> $file -echo ' borderWidth: 1.5,' >> $file -echo ' borderColor: "#BEBEBE",' >> $file -echo ' markingsLineWidth: .75,' >> $file -echo ' hoverable: true,' >> $file -echo ' clickable: true,' >> $file -echo ' shadowSize: 0,' >> $file -echo ' color: "#0080FF",' >> $file -echo ' id: "promOpsBasop",' >> $file -echo ' data: [' >> $file - -@ i = 0 -foreach line ( "`cat ${tmpFile1}`" ) - set separator = "," - if ( $i == $nLines1 - 1 ) then - set separator = "" - endif - - set tmp = ( $line ) - - set numWords = `echo $tmp | wc -w` - if ( $numWords < $maxNumWordsLine ) then - continue - endif - - set score = $tmp[6] - - echo ' ['"${i}, ${score}"']'${separator} >> $file - @ i++ - -end - -echo ' ]' >> $file -echo ' }' >> $file - -echo ' ]' >> $file - -echo ' }' >> $file -echo '};' >> $file - -mv -f $file $file_final -rm -f ${tmpFile1} diff --git a/ci/complexity_measurements/genWebpageData_Ram.csh b/ci/complexity_measurements/genWebpageData_Ram.csh index a8dbc0e2f9dedf8c6758b1e2dd93d1660ad61bc7..d6e5a842e3b04a5bde4735f6e2b6c197befe053c 100755 --- a/ci/complexity_measurements/genWebpageData_Ram.csh +++ b/ci/complexity_measurements/genWebpageData_Ram.csh @@ -1,6 +1,6 @@ #!/bin/tcsh -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -77,10 +77,10 @@ foreach line ( "`cat ${tmpFile}`" ) set fullDate = `echo $tmp[3] | sed -e "s/_/\ /g"` set maxTotalRamEnc = $tmp[5] set maxTotalRamDec = $tmp[7] - set maxDynamicRamEnc = $tmp[10] - set maxDynamicRamDec = $tmp[12] - set maxStaticRamEnc = $tmp[15] - set maxStaticRamDec = $tmp[17] + set maxStackEnc = $tmp[10] + set maxStackDec = $tmp[12] + set maxHeapEnc = $tmp[15] + set maxHeapDec = $tmp[17] set logFile = $tmp[19] echo ' {' >> $file @@ -89,10 +89,10 @@ foreach line ( "`cat ${tmpFile}`" ) echo ' revision: "'${revision}'",' >> $file echo ' maxTotalRamEnc: "'${maxTotalRamEnc}'",' >> $file echo ' maxTotalRamDec: "'${maxTotalRamDec}'",' >> $file - echo ' maxDynamicRamEnc: "'${maxDynamicRamEnc}'",' >> $file - echo ' maxDynamicRamDec: "'${maxDynamicRamDec}'",' >> $file - echo ' maxStaticRamEnc: "'${maxStaticRamEnc}'",' >> $file - echo ' maxStaticRamDec: "'${maxStaticRamDec}'",' >> $file + echo ' maxStackEnc: "'${maxStackEnc}'",' >> $file + echo ' maxStackDec: "'${maxStackDec}'",' >> $file + echo ' maxHeapEnc: "'${maxHeapEnc}'",' >> $file + echo ' maxHeapDec: "'${maxHeapDec}'",' >> $file echo ' logFile: "'${logFile}'"' >> $file echo ' }'${separator} >> $file @@ -259,7 +259,7 @@ echo ' ]' >> $file echo ' },' >> $file # maxTotalRamDecScore -# maxDynamicRamCodecScore +# maxStackCodecScore echo ' {' >> $file echo ' lines: { show: true },' >> $file echo ' points: { show: true, fillColor: "#ffffff" },' >> $file @@ -270,7 +270,7 @@ echo ' hoverable: true,' >> $file echo ' clickable: true,' >> $file echo ' shadowSize: 0,' >> $file echo ' color: "#004000",' >> $file -echo ' id: "maxDynamicRamCodecScore",' >> $file +echo ' id: "maxStackCodecScore",' >> $file echo ' data: [' >> $file @ i = 0 @@ -296,10 +296,10 @@ end echo ' ]' >> $file echo ' },' >> $file -# maxDynamicRamCodecScore +# maxStackCodecScore -# maxDynamicRamEncScore +# maxStackEncScore echo ' {' >> $file echo ' lines: { show: true },' >> $file echo ' points: { show: true, fillColor: "#ffffff" },' >> $file @@ -310,7 +310,7 @@ echo ' hoverable: true,' >> $file echo ' clickable: true,' >> $file echo ' shadowSize: 0,' >> $file echo ' color: "#008000",' >> $file -echo ' id: "maxDynamicRamEncScore",' >> $file +echo ' id: "maxStackEncScore",' >> $file echo ' data: [' >> $file @ i = 0 @@ -336,9 +336,9 @@ end echo ' ]' >> $file echo ' },' >> $file -# maxDynamicRamEncScore +# maxStackEncScore -# maxDynamicRamDecScore +# maxStackDecScore echo ' {' >> $file echo ' lines: { show: true },' >> $file echo ' points: { show: true, fillColor: "#ffffff" },' >> $file @@ -349,7 +349,7 @@ echo ' hoverable: true,' >> $file echo ' clickable: true,' >> $file echo ' shadowSize: 0,' >> $file echo ' color: "#00FF00",' >> $file -echo ' id: "maxDynamicRamDecScore",' >> $file +echo ' id: "maxStackDecScore",' >> $file echo ' data: [' >> $file @ i = 0 @@ -375,9 +375,9 @@ end echo ' ]' >> $file echo ' },' >> $file -# maxDynamicRamDecScore +# maxStackDecScore -# maxStaticRamCodecScore +# maxHeapCodecScore echo ' {' >> $file echo ' lines: { show: true },' >> $file echo ' points: { show: true, fillColor: "#ffffff" },' >> $file @@ -388,7 +388,7 @@ echo ' hoverable: true,' >> $file echo ' clickable: true,' >> $file echo ' shadowSize: 0,' >> $file echo ' color: "#800080",' >> $file -echo ' id: "maxStaticRamCodecScore",' >> $file +echo ' id: "maxHeapCodecScore",' >> $file echo ' data: [' >> $file @ i = 0 @@ -414,9 +414,9 @@ end echo ' ]' >> $file echo ' },' >> $file -# maxStaticRamCodecScore +# maxHeapCodecScore -# maxStaticRamEncScore +# maxHeapEncScore echo ' {' >> $file echo ' lines: { show: true },' >> $file echo ' points: { show: true, fillColor: "#ffffff" },' >> $file @@ -427,7 +427,7 @@ echo ' hoverable: true,' >> $file echo ' clickable: true,' >> $file echo ' shadowSize: 0,' >> $file echo ' color: "#0000FF",' >> $file -echo ' id: "maxStaticRamEncScore",' >> $file +echo ' id: "maxHeapEncScore",' >> $file echo ' data: [' >> $file @ i = 0 @@ -453,9 +453,9 @@ end echo ' ]' >> $file echo ' },' >> $file -# maxStaticRamEncScore +# maxHeapEncScore -# maxStaticRamDecScore +# maxHeapDecScore echo ' {' >> $file echo ' lines: { show: true },' >> $file echo ' points: { show: true, fillColor: "#ffffff" },' >> $file @@ -466,7 +466,7 @@ echo ' hoverable: true,' >> $file echo ' clickable: true,' >> $file echo ' shadowSize: 0,' >> $file echo ' color: "#0080C0",' >> $file -echo ' id: "maxStaticRamDecScore",' >> $file +echo ' id: "maxHeapDecScore",' >> $file echo ' data: [' >> $file @ i = 0 @@ -492,7 +492,7 @@ end echo ' ]' >> $file echo ' }' >> $file -# maxStaticRamDecScore +# maxHeapDecScore echo ' ]' >> $file # end displays diff --git a/ci/complexity_measurements/genWebpageData_Rom.csh b/ci/complexity_measurements/genWebpageData_Rom.csh index d2ef2daf15fb02538a1e7f553b68ec95468b3805..801dfda724738bfbbfdcb4ddcef8b5107c66f66c 100755 --- a/ci/complexity_measurements/genWebpageData_Rom.csh +++ b/ci/complexity_measurements/genWebpageData_Rom.csh @@ -1,6 +1,6 @@ #!/bin/tcsh -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -31,61 +31,100 @@ set maxValues = 40 if (${#argv} != 3) then - echo usage: $0 \ \ \ \ + echo usage: $0 \ \ \ exit endif -set srcFile1 = $1 - +set srcFile = $1 set file_final = $2 set file = ${file_final}_new_$$ set graphName = $3 set tmpBase = `basename $0` -set tmpFile1 = /tmp/${tmpBase}1_$$ -set tmpFile2 = /tmp/${tmpBase}2_$$ -rm -f ${tmpFile1} ${tmpFile2} -cat ${srcFile1} | tail -n ${maxValues} > ${tmpFile1} -set nLines1 = `cat ${tmpFile1} | wc -l` -set maxNumWordsLine1 = 5 -set maxNumWordsLine2 = 5 +set tmpFile = /tmp/${tmpBase}_$$ +rm -f ${tmpFile} +cat ${srcFile} | tail -n ${maxValues} > ${tmpFile} +set nLines = `cat ${tmpFile} | wc -l` +set maxNumWordsLine = 21 rm -f $file touch $file echo "var $graphName = {" >> $file echo ' rom_worstcase: {' >> $file -echo ' description: "Worst Case ROM",' >> $file +echo ' description: "ROM",' >> $file echo ' direction: -1,' >> $file echo ' runs: [' >> $file - @ i = 0 -foreach line ( "`cat ${tmpFile1}`" ) +foreach line ( "`cat ${tmpFile}`" ) @ i++ set separator = "," - if ( $i == $nLines1 ) then + if ( $i == $nLines ) then set separator = "" endif set tmp = ( $line ) set numWords = `echo $tmp | wc -w` - if ( $numWords < $maxNumWordsLine1 ) then + if ( $numWords < $maxNumWordsLine ) then continue endif + + # 1 revision, + # 2 shortDate, + # 3 fullDate, + + # 4 max_total_encdec[1], + + # 5 max_prom_enc[0], + # 6 max_prom_enc[1], + # 7 max_prom_dec[0], + # 8 max_prom_dec[1], + # 9 max_prom_com[0], + # 10 max_prom_com[1], + # 11 max_prom_rend[0], + # 12 max_prom_rend[1], + + # 13 max_trom_enc[0], + # 14 max_trom_enc[1], + # 15 max_trom_dec[0], + # 16 max_trom_dec[1], + # 17 max_trom_com[0], + # 18 max_trom_com[1], + # 19 max_trom_rend[0], + # 20 max_trom_rend[1], + + # 21 newsletterFilenameLast, + + set revision = $tmp[1] set shortDate = `echo $tmp[2] | sed -e "s/_/\ /g"` set fullDate = `echo $tmp[3] | sed -e "s/_/\ /g"` - set logFileFlc = $tmp[5] + set PromEnc = $tmp[5] + set PromDec = $tmp[7] + set PromCom = $tmp[9] + set PromRend = $tmp[11] + set TromEnc = $tmp[13] + set TromDec = $tmp[15] + set TromCom = $tmp[17] + set TromRend = $tmp[19] + set logFile = $tmp[21] echo ' {' >> $file echo ' fullDate: "'${fullDate}'",' >> $file echo ' shortDate: "'${shortDate}'",' >> $file echo ' revision: "'${revision}'",' >> $file - echo ' logFileFlc: "'${logFileFlc}'",' >> $file -# echo ' logFileBasop: "'${logFileBasop[$i]}'"' >> $file + echo ' PromEnc: "'${PromEnc}'",' >> $file + echo ' PromDec: "'${PromDec}'",' >> $file + echo ' PromCom: "'${PromCom}'",' >> $file + echo ' PromRend: "'${PromRend}'",' >> $file + echo ' TromEnc: "'${TromEnc}'",' >> $file + echo ' TromDec: "'${TromDec}'",' >> $file + echo ' TromCom: "'${TromCom}'",' >> $file + echo ' TromRend: "'${TromRend}'",' >> $file + echo ' logFile: "'${logFile}'"' >> $file echo ' }'${separator} >> $file end @@ -94,7 +133,7 @@ echo ' ],' >> $file # begin displays echo ' displays: [' >> $file -# requirement ROM +# requirement ROM echo ' {' >> $file echo ' lines: { show: false },' >> $file echo ' points: { show: false, fillColor: "#ffffff" },' >> $file @@ -109,16 +148,16 @@ echo ' id: "requirementRom",' >> $file echo ' data: [' >> $file @ i = 0 -foreach line ( "`cat ${tmpFile1}`" ) +foreach line ( "`cat ${tmpFile}`" ) set separator = "," - if ( $i == $nLines1 - 1 ) then + if ( $i == $nLines - 1 ) then set separator = "" endif set tmp = ( $line ) set numWords = `echo $tmp | wc -w` - if ( $numWords < $maxNumWordsLine1 ) then + if ( $numWords < $maxNumWordsLine ) then continue endif @@ -134,7 +173,7 @@ echo ' ]' >> $file echo ' },' >> $file # requirement ROM -# maxTablesizeCodecScore FLC +# TotalRomCodecScore echo ' {' >> $file echo ' lines: { show: true },' >> $file echo ' points: { show: true, fillColor: "#ffffff" },' >> $file @@ -144,21 +183,21 @@ echo ' markingsLineWidth: .75,' >> $file echo ' hoverable: true,' >> $file echo ' clickable: true,' >> $file echo ' shadowSize: 0,' >> $file -echo ' color: "#FF8000",' >> $file -echo ' id: "maxRomFlc",' >> $file +echo ' color: "#FF0000",' >> $file +echo ' id: "TotalRomCodecScore",' >> $file echo ' data: [' >> $file @ i = 0 -foreach line ( "`cat ${tmpFile1}`" ) +foreach line ( "`cat ${tmpFile}`" ) set separator = "," - if ( $i == $nLines1 - 1 ) then + if ( $i == $nLines - 1 ) then set separator = "" endif set tmp = ( $line ) set numWords = `echo $tmp | wc -w` - if ( $numWords < $maxNumWordsLine1 ) then + if ( $numWords < $maxNumWordsLine ) then continue endif @@ -169,9 +208,323 @@ foreach line ( "`cat ${tmpFile1}`" ) end +echo ' ]' >> $file +echo ' },' >> $file +# TotalRomCodecScore + +# maxPROMEncScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#FF8000",' >> $file +echo ' id: "maxPROMEncScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[6] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + +echo ' ]' >> $file +echo ' },' >> $file +# maxPROMEncScore + +# maxPROMDecScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#FFFF00",' >> $file +echo ' id: "maxPROMDecScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[8] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + +echo ' ]' >> $file +echo ' },' >> $file +# maxPROMEncScore + +# maxPROMComScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#800080",' >> $file +echo ' id: "maxPROMComScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[10] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + +echo ' ]' >> $file +echo ' },' >> $file +# maxPROMComScore + + +# maxPROMRendScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#0000FF",' >> $file +echo ' id: "maxPROMRendScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[12] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + +echo ' ]' >> $file +echo ' },' >> $file +# maxPROMRendScore + +# maxTROMEncScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#0080C0",' >> $file +echo ' id: "maxTROMEncScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[14] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + +echo ' ]' >> $file +echo ' },' >> $file +# maxTROMEncScore + +# maxTROMDecScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#004000",' >> $file +echo ' id: "maxTROMDecScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[16] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + +echo ' ]' >> $file +echo ' },' >> $file +# maxTROMDecScore + +# maxTROMComScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#008000",' >> $file +echo ' id: "maxTROMComScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[18] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + +echo ' ]' >> $file +echo ' },' >> $file +# maxTROMComScore + +# maxTROMRendScore +echo ' {' >> $file +echo ' lines: { show: true },' >> $file +echo ' points: { show: true, fillColor: "#ffffff" },' >> $file +echo ' borderWidth: 1.5,' >> $file +echo ' borderColor: "#BEBEBE",' >> $file +echo ' markingsLineWidth: .75,' >> $file +echo ' hoverable: true,' >> $file +echo ' clickable: true,' >> $file +echo ' shadowSize: 0,' >> $file +echo ' color: "#00FF00",' >> $file +echo ' id: "maxTROMRendScore",' >> $file +echo ' data: [' >> $file + +@ i = 0 +foreach line ( "`cat ${tmpFile}`" ) + set separator = "," + if ( $i == $nLines - 1 ) then + set separator = "" + endif + + set tmp = ( $line ) + + set numWords = `echo $tmp | wc -w` + if ( $numWords < $maxNumWordsLine ) then + continue + endif + + set score = $tmp[20] + + echo ' ['"${i}, ${score}"']'${separator} >> $file + @ i++ + +end + echo ' ]' >> $file echo ' }' >> $file -# maxTablesizeCodecScore FLC +# maxTROMRendScore + echo ' ]' >> $file # end displays @@ -179,4 +532,4 @@ echo ' }' >> $file echo '};' >> $file mv -f $file $file_final -rm -f $tmpFile1 +rm -f $tmpFile diff --git a/ci/complexity_measurements/genWebpageData_WMOPS.csh b/ci/complexity_measurements/genWebpageData_WMOPS.csh index c030f4afac7ada79ddb0258e3bbf02b18f060ece..4993ae81f219405d04e9634101ee0c5b2c8cfdb4 100755 --- a/ci/complexity_measurements/genWebpageData_WMOPS.csh +++ b/ci/complexity_measurements/genWebpageData_WMOPS.csh @@ -1,6 +1,6 @@ #!/bin/tcsh -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/complexity_measurements/genWebpageData_WmopPerOperatingpoint.csh b/ci/complexity_measurements/genWebpageData_WmopPerOperatingpoint.csh index cac8183bda7ee07199a4e2bfd6a94978f1767b05..3d9d9d448c27fdce30724273e633cdf3697fdc0d 100755 --- a/ci/complexity_measurements/genWebpageData_WmopPerOperatingpoint.csh +++ b/ci/complexity_measurements/genWebpageData_WmopPerOperatingpoint.csh @@ -1,6 +1,6 @@ #!/bin/tcsh -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index b14933c91eb67a5db4f298dc6f9132f9ff985924..baec52ab6f1e7064b3be60679d0d1aafc8f681ad 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -1,6 +1,6 @@ #! /bin/bash -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ output_format=$2 date=`date +%Y%m%d` # used for log-file file ending shortDate=`date "+%b %d" | sed -e "s/\ /_/g"` # stored in the log-file fullDate=`date "+%c" | sed -e "s/\ /_/g"` # stored in the log-file - + commit_sha=`git rev-parse --short HEAD` destDir="." @@ -56,37 +56,31 @@ wmopsFilenameFlc=${destDir}/wmops/logs/${wmopsFilenameFlcLast} # instrument and build ./scripts/IvasBuildAndRunChecks.py -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format -f ${ep} --oc $output_format -# now get the info on worst case operating point: WMOPS number, enc-operating mode, dec-operating mode +# get the info on worst-case operating point: WMOPS number, enc-operating mode, dec-operating mode ### WMOPS ${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcLast}_WMOPS.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_wmops_all.txt # now update the webpage -tcsh ${scriptDir}/genWebpageData_WMOPS.csh ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/graphs_wmops_flc.js Graphs_WMOPS +tcsh ${scriptDir}/genWebpageData_WMOPS.csh ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/graphs_wmops_flc.js Graphs_WMOPS # per mode graph -tcsh ${scriptDir}/genWebpageData_WmopPerOperatingpoint.csh ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/graphs_wmops_flc_perOP.js Graphs_WMOPS_perOP +tcsh ${scriptDir}/genWebpageData_WmopPerOperatingpoint.csh ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/graphs_wmops_flc_perOP.js Graphs_WMOPS_perOP + # get memory info for webpage ### RAM -${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_SRAM.csv ${wmopsFilenameFlc}_DRAM.csv > ${wmopsFilenameFlc}_RAM.csv -${scriptDir}/parseNewsletterRam.py ${wmopsFilenameFlc}_SRAM.csv ${wmopsFilenameFlc}_DRAM.csv ${wmopsFilenameFlcLast}_RAM.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_ram_all.txt +${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv > ${wmopsFilenameFlc}_RAM.csv +${scriptDir}/parseNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv ${wmopsFilenameFlcLast}_RAM.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_ram_all.txt # generate java script from database tcsh ${scriptDir}/genWebpageData_Ram.csh ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/graphs_ram_flc.js Graphs_RAM ### ROM -${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_TABLES.csv ${wmopsFilenameFlcLast}_TABLES.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_rom_all.txt + +${scriptDir}/mergeNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv > ${wmopsFilenameFlc}_ROM.csv +${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv ${wmopsFilenameFlcLast}_ROM.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_rom_all.txt # generate java script from database tcsh ${scriptDir}/genWebpageData_Rom.csh ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/graphs_rom_flc.js Graphs_ROM -# now go on with BASOP -promFilenameBasopLast="null" -promScoreBasop=0 - -### PROM -${scriptDir}/parseNewsletterProm.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlcLast}_PROM.csv ${commit_sha} ${shortDate} ${fullDate} ${promScoreBasop} ${promFilenameBasopLast} >> ${destDir}/wmops/log_prom_all.txt - -# generate java script from database -tcsh ${scriptDir}/genWebpageData_Prom.csh ${destDir}/wmops/log_prom_all.txt ${destDir}/wmops/graphs_prom_flc.js Graphs_PROM diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index a131f56662034dcf7b31d61748c50a5fb1f7c9b3..de3d0975fcc69772aacacca3ef4529668869323b 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -1,7 +1,7 @@ - @@ -103,30 +102,6 @@ - - - -
  • PROM - - - - - -
  • - - -
  • FAQ
  • @@ -226,25 +201,25 @@
    • Max. total RAM Codec: - Dynamic + Static RAM, 32 bit words, Encoder + Decoder
    • -
    • Max. total RAM - Encoder: Dynamic + Static RAM, 32 bit words, Encoder only
    • -
    • Max. total RAM - Decoder: Dynamic + Static RAM, 32 bit words, Decoder only
    • + 32 bit words, Encoder + Decoder +
    • Max. total RAM Encoder: + 32 bit words, Encoder only
    • +
    • Max. total RAM Decoder: + 32 bit words, Decoder only
    • -
    • Max. static RAM Codec: - Static RAM, 32 bit words, Encoder + Decoder
    • -
    • Max. static RAM - Encoder: Static RAM, 32 bit words,, Encoder only
    • -
    • Max. static RAM - Decoder: Static RAM, 32 bit words, Decoder only
    • +
    • Max. HEAP Codec: + 32 bit words, Encoder + Decoder
    • +
    • Max. HEAP Encoder + 32 bit words, Encoder only
    • +
    • Max. HEAP Decoder + 32 bit words, Decoder only
    • -
    • Max. dynamic RAM - Codec: Dynamic RAM, 32 bit words, Encoder + Decoder
    • -
    • Max. dynamic RAM - Encoder: Dynamic RAM, 32 bit words, Encoder only
    • -
    • Max. dynamic RAM - Decoder: Dynamic RAM, 32 bit words, Decoder only
    • +
    • Max. STACK Codec: + 32 bit words, max(Encoder, Decoder)
    • +
    • Max. STACK Encoder: + 32 bit words, Encoder only
    • +
    • Max. STACK Decoder: + 32 bit words, Decoder only
    @@ -284,8 +259,17 @@
      -
    • Measured ROM table size, 32 - bit words (Float)
    • +
    • Max. total ROM Codec: Encoder + Decoder
    • + +
    • Max. max PROM Encoder Library: lib_enc only
    • +
    • Max. max PROM Decoder Library: lib_dec only
    • +
    • Max. max PROM Common Library: lib_com only/li> +
    • Max. max PROM Ext Renderer Library: lib_ren only
    • + +
    • Max. Table ROM Encoder Library: lib_enc only
    • +
    • Max. Table ROM Decoder Library: lib_dec only
    • +
    • Max. Table ROM Common Library: lib_com only
    • +
    • Max. Table ROM Ext Renderer Library: lib_rend only
    @@ -308,22 +292,6 @@
    --> -

    IVAS FORMAT - Worst Case PROM Demand

    - -
    -
    -
    - -
    -
      -
    • Measured PROM (Float, - trunk)
    • - -
    -
    - -
    -

    FAQ

    Q:
    What is the meaning of these funny symbols in the navigation box, in the left upper corner of this page?
    @@ -821,25 +789,25 @@ function RAM() { if( item.series.id == "maxTotalRamDecScore" ){ text += "Max. total RAM dec: " + graph.runs[x].maxTotalRamDec + "
    "; } - if( item.series.id == "maxDynamicRamCodecScore" ){ - text += "Max. dynamic RAM enc: " + graph.runs[x].maxDynamicRamEnc + "
    "; - text += "Max. dynamic RAM dec: " + graph.runs[x].maxDynamicRamDec + "
    "; + if( item.series.id == "maxStackCodecScore" ){ + text += "Max. Stack enc: " + graph.runs[x].maxStackEnc + "
    "; + text += "Max. Stack dec: " + graph.runs[x].maxStackDec + "
    "; } - if( item.series.id == "maxDynamicRamEncScore" ){ - text += "Max. dynamic RAM enc: " + graph.runs[x].maxDynamicRamEnc + "
    "; + if( item.series.id == "maxStackEncScore" ){ + text += "Max. Stack enc: " + graph.runs[x].maxStackEnc + "
    "; } - if( item.series.id == "maxDynamicRamDecScore" ){ - text += "Max. dynamic RAM dec: " + graph.runs[x].maxDynamicRamDec + "
    "; + if( item.series.id == "maxStackDecScore" ){ + text += "Max. Stack dec: " + graph.runs[x].maxStackDec + "
    "; } - if( item.series.id == "maxStaticRamCodecScore" ){ - text += "Max. static RAM enc: " + graph.runs[x].maxStaticRamEnc + "
    "; - text += "Max. static RAM dec: " + graph.runs[x].maxStaticRamDec + "
    "; + if( item.series.id == "maxHeapCodecScore" ){ + text += "Max. Heap enc: " + graph.runs[x].maxHeapEnc + "
    "; + text += "Max. Heap dec: " + graph.runs[x].maxHeapDec + "
    "; } - if( item.series.id == "maxStaticRamEncScore" ){ - text += "Max. static RAM enc: " + graph.runs[x].maxStaticRamEnc + "
    "; + if( item.series.id == "maxHeapEncScore" ){ + text += "Max. Heap enc: " + graph.runs[x].maxHeapEnc + "
    "; } - if( item.series.id == "maxStaticRamDecScore" ){ - text += "Max. static RAM dec: " + graph.runs[x].maxStaticRamDec + "
    "; + if( item.series.id == "maxHeapDecScore" ){ + text += "Max. Heap dec: " + graph.runs[x].maxHeapDec + "
    "; } text += "
    " @@ -941,7 +909,8 @@ function ROM() { previousPoint = item.datapoint; $("#tooltip").remove(); - if(item.series.id != "requirementRom"){ + if(item.series.id != "requirementRom") + { var x = item.datapoint[0]; var y = item.datapoint[1]; var text = 'Score: ' + y; @@ -971,13 +940,49 @@ function ROM() { } } +/* + if( item.series.id == "TotalRomCodecScore" ){ + text += "Worst case enc: " + graph.runs[x].TotalRomEnc + "
    "; + text += "Worst case dec: " + graph.runs[x].TotalRomDec + "
    "; + } + if( item.series.id == "TotalRomEncScore" ){ + text += "Worst case enc: " + graph.runs[x].TotalRomEnc + "
    "; + } + if( item.series.id == "TotalRomDecScore" ){ + text += "Worst case dec: " + graph.runs[x].TotalRomDec + "
    "; + } + if( item.series.id == "PROMCodecScore" ){ + text += "Worst case enc: " + graph.runs[x].PromEnc + "
    "; + text += "Worst case dec: " + graph.runs[x].PromDec + "
    "; + } + if( item.series.id == "PROMEncScore" ){ + text += "Worst case enc: " + graph.runs[x].PromEnc + "
    "; + } + if( item.series.id == "PROMDecScore" ){ + text += "Worst case dec: " + graph.runs[x].PromDec + "
    "; + } + if( item.series.id == "TROMCodecScore" ){ + text += "Worst case enc: " + graph.runs[x].TromEnc + "
    "; + text += "Worst case dec: " + graph.runs[x].TromDec + "
    "; + } + if( item.series.id == "TROMEncScore" ){ + text += "Worst case enc: " + graph.runs[x].TromEnc + "
    "; + } + if( item.series.id == "TROMDecScore" ){ + text += "Worst case dec: " + graph.runs[x].TromDec + "
    "; + } +*/ + text += "
    " text += "Revision: " + graph.runs[x].revision + "
    "; text += "Date: " + graph.runs[x].fullDate + "

    "; + text += "Logfile
    "; + /* if( item.series.id == "maxRomFlc" ){ text += "Logfile
    "; } + */ /* if( item.series.id == "maxRomBasop" ){ @@ -1056,182 +1061,11 @@ function ROM() { */ } - - -function PROM() { - - var previousPoint = null; - - function drawGraph(elt, graph, max_val) { - var options = { - yaxis: { - min: 0, - max: max_val, - tickFormatter: function (v, axis) { - if (graph.direction == -1) - return v + " Ops"; - return v; - }, - invert: graph.direction == 1 - }, - xaxis: { - tickFormatter: function (v, axis) { - v = Math.round(v); - if (!(v in graph.runs)) - return ''; - return graph.runs[v].shortDate; - } - }, - legend: { show: false }, - grid: { - hoverable: true, - clickable: true - } - }; - - $.plot(elt, graph.displays, options); - - elt.bind("plothover", function (event, pos, item) { - if (!item) { - // only remove if not in tooltip anymore - if ($('#tooltip:hover').length == 0) { - $("#tooltip").remove(); - } - previousPoint = null; - return; - } - - if (previousPoint && - (previousPoint[0] == item.datapoint[0]) && - (previousPoint[1] == item.datapoint[1])) { - return; - } - - previousPoint = item.datapoint; - $("#tooltip").remove(); - - if(item.series.id != "requirementProm"){ - var x = item.datapoint[0]; - var y = item.datapoint[1]; - var text = 'Score: ' + y; - - if (graph.direction == -1) - text += " Ops"; - text += "
    "; - - if (x > 0) { - var thisValue = parseFloat(y); - var prevValue = parseFloat(item.series.data[x - 1, x - 1][1]); - var diff = Math.round((thisValue - prevValue) * 100) / 100; - var pdiff = calcPercentDiff(thisValue, prevValue); - var better; - if ((pdiff < 0 && graph.direction == -1) || - (pdiff > 0 && graph.direction == 1)) { - better = "worse"; - } else { - better = "better"; - } - pdiff = Math.abs(pdiff); - if (diff === diff) { - text += String.fromCharCode(916) + ": " + diff; - if (graph.direction == -1) - text += " Ops"; - text += " (" + pdiff + "% " + better + ")
    "; - } - } - - text += "
    " - text += "Revision: " + graph.runs[x].revision + "
    "; - text += "Date: " + graph.runs[x].fullDate + "

    "; - - if( item.series.id == "promOpsFlc" ){ - text += "Logfile
    "; - } - - if( item.series.id == "promOpsBasop" ){ - text += "Logfile
    "; - } - if( item.series.id == "promOpsBasopFlc" ){ - text += "Logfile
    "; - } - - } else { - text = "PROM requirement: 54260 Ops"; - } - - showToolTip(item.pageX, item.pageY, text); - - }); - } - - $(document).ready(function () { - var max = get_max_y_val_for_plotting(Graphs_PROM.prom_worstcase.displays, 50000); - drawGraph($("#prom-graph"), Graphs_PROM.prom_worstcase, max); - }); - - - /* FLC */ - var testData = Graphs_PROM.prom_worstcase.displays[1]; - var refData = Graphs_PROM.prom_worstcase.displays[0]; - var nEntries = testData.data.length; - - if( testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { - document.getElementById("prom_tl_l").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { - document.getElementById("prom_tl_c").style.color="#FFFF00"; - } else { - document.getElementById("prom_tl_r").style.color="#00FF00"; - } - - if(nEntries > 1) { - if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { - document.getElementById("prom_trend").innerHTML="↑"; - document.getElementById("prom_trend").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { - document.getElementById("prom_trend").innerHTML="↓"; - document.getElementById("prom_trend").style.color="#00FF00"; - } else { - document.getElementById("prom_trend").innerHTML="→"; - document.getElementById("prom_trend").style.color="#FFFFFF"; - } - } - - - /* BASOP */ - var testData = Graphs_PROM.prom_worstcase.displays[2]; - var refData = Graphs_PROM.prom_worstcase.displays[0]; - var nEntries = testData.data.length; - - if( testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { - document.getElementById("prom_basop_tl_l").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { - document.getElementById("prom_basop_tl_c").style.color="#FFFF00"; - } else { - document.getElementById("prom_basop_tl_r").style.color="#00FF00"; - } - - if(nEntries > 1) { - if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { - document.getElementById("prom_basop_trend").innerHTML="↑"; - document.getElementById("prom_basop_trend").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { - document.getElementById("prom_basop_trend").innerHTML="↓"; - document.getElementById("prom_basop_trend").style.color="#00FF00"; - } else { - document.getElementById("prom_basop_trend").innerHTML="→"; - document.getElementById("prom_basop_trend").style.color="#FFFFFF"; - } - } - -} - - WMOPS(); WMOPS_perOP(); RAM(); ROM(); - PROM(); diff --git a/ci/complexity_measurements/mergeNewsletterRam.py b/ci/complexity_measurements/mergeNewsletterRam.py index c5e61a98548b481cd6712f7c4263ae2bcd81603b..e11a754d38ed4465623f0fb548f0379a471bc5de 100755 --- a/ci/complexity_measurements/mergeNewsletterRam.py +++ b/ci/complexity_measurements/mergeNewsletterRam.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # coding: utf-8 -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,23 +39,23 @@ shortDate = "" fullDate = "" if __name__ == "__main__": - newsletterFilenameSram = sys.argv[1] - newsletterFilenameDram = sys.argv[2] + newsletterFilenameHEAP = sys.argv[1] + newsletterFilenameSTACK = sys.argv[2] ram_table = {} -with open(newsletterFilenameSram, "r") as csvfile: - SRAM = csv.reader(csvfile, delimiter=";") - for row in SRAM: +with open(newsletterFilenameHEAP, "r") as csvfile: + HEAP = csv.reader(csvfile, delimiter=";") + for row in HEAP: if row[0] == "conf": continue key = row[0] lst = row[1:] ram_table[key] = lst -with open(newsletterFilenameDram, "r") as csvfile: - DRAM = csv.reader(csvfile, delimiter=";") - for row in DRAM: +with open(newsletterFilenameSTACK, "r") as csvfile: + STACK = csv.reader(csvfile, delimiter=";") + for row in STACK: if row[0] == "conf": continue key = row[0] @@ -63,13 +63,13 @@ with open(newsletterFilenameDram, "r") as csvfile: ram_table[key] += lst # now we have the following format -# SRAM enc, SRAM dec, SRAM total, DRAM enc, DRAM dec, DRAM max(enc, dec) +# HEAP enc, HEAP dec, HEAP total, STACK enc, STACK dec, STACK max(enc, dec) -print("conf;sram enc;sram dec;sram total;dram enc;dram dec;dram max;total") +print("conf;HEAP enc;HEAP dec;HEAP total;STACK enc;STACK dec;STACK max;total") for key in ram_table: ram = ram_table[key] - total = int(ram[1]) + int(ram[2]) + int(ram[5]) + total = int(ram[0]) + int(ram[1]) + int(ram[5]) print( key, ";", diff --git a/ci/complexity_measurements/mergeNewsletterRom.py b/ci/complexity_measurements/mergeNewsletterRom.py new file mode 100755 index 0000000000000000000000000000000000000000..89efc4aeb2f8177e2e92b38c7b68f61d6255ebd8 --- /dev/null +++ b/ci/complexity_measurements/mergeNewsletterRom.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. + +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. + +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. + +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. + +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. +import csv +import sys +import re + +newsletterFilename = "" +newsletterFilenameLast = "" +revision = "" +shortDate = "" +fullDate = "" + +if __name__ == "__main__": + newsletterFilenamePROM = sys.argv[1] + newsletterFilenameTROM = sys.argv[2] + +rom_table = {} + +with open(newsletterFilenamePROM, "r") as csvfile: + PROM = csv.reader(csvfile, delimiter=";") + for row in PROM: + if row[0] == "conf": + continue + key = row[0] + lst = row[1:] + rom_table[key] = lst + +with open(newsletterFilenameTROM, "r") as csvfile: + TROM = csv.reader(csvfile, delimiter=";") + for row in TROM: + if row[0] == "conf": + continue + key = row[0] + lst = row[1:] + rom_table[key] += lst + +# now we have the following format +# PROM enc, PROM dec, PROM com, PROM rend, PROM total, TROM enc, TROM dec, TROM com, TROM rend, TROM total + +print("conf;PROM enc;PROM dec;PROM com;PROM rend;PROM total;TROM enc;TROM dec;TROM com;TROM rend;TROM total;total") + +for key in rom_table: + rom = rom_table[key] + total = int(rom[4]) + int(rom[9]) + print( + key, + ";", + rom[0], + ";", + rom[1], + ";", + rom[2], + ";", + rom[3], + ";", + rom[4], + ";", + rom[5], + ";", + rom[6], + ";", + rom[7], + ";", + rom[8], + ";", + rom[9], + ";", + total, + sep="", + ) diff --git a/ci/complexity_measurements/parseNewsletterProm.py b/ci/complexity_measurements/parseNewsletterProm.py deleted file mode 100755 index 072cb03c21a7b022819ab63350d313f62e7c8182..0000000000000000000000000000000000000000 --- a/ci/complexity_measurements/parseNewsletterProm.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python3 -# coding: utf-8 -""" - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. -""" - -import csv -import sys -import re - -newsletterFilename = "" -newsletterFilenameLast = "" -revision = "" -shortDate = "" -fullDate = "" -maxPromOpsBasop = "" -logfileBasop = "" - -if __name__ == "__main__": - newsletterFilename = sys.argv[1] - newsletterFilenameLast = sys.argv[2] - revision = sys.argv[3] - shortDate = sys.argv[4] - fullDate = sys.argv[5] - maxPromOpsBasop = sys.argv[6] - logfileBasop = sys.argv[7] - -max_total = ["", 0] - -with open(newsletterFilename, "r") as csvfile: - prom = csv.reader(csvfile, delimiter=";") - for row in prom: - if row[0] == "conf": - continue - if int(row[4]) > max_total[1]: - max_total[0] = re.sub(" ", "_", row[0]) - max_total[1] = int(row[4]) - -print( - revision, - shortDate, - fullDate, - max_total[1], - newsletterFilenameLast, - maxPromOpsBasop, - logfileBasop, -) diff --git a/ci/complexity_measurements/parseNewsletterRam.py b/ci/complexity_measurements/parseNewsletterRam.py index b099fb450f955bccb69bb683ddcdc025192f633a..719d1581d8f6c5f79db8e81f081ad70b697a6062 100755 --- a/ci/complexity_measurements/parseNewsletterRam.py +++ b/ci/complexity_measurements/parseNewsletterRam.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # coding: utf-8 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,8 +41,8 @@ shortDate = "" fullDate = "" if __name__ == "__main__": - newsletterFilenameSram = sys.argv[1] - newsletterFilenameDram = sys.argv[2] + newsletterFilenameHEAP = sys.argv[1] + newsletterFilenameSTACK = sys.argv[2] newsletterFilenameLast = sys.argv[3] revision = sys.argv[4] shortDate = sys.argv[5] @@ -52,28 +52,28 @@ max_total_enc = ["", 0] max_total_dec = ["", 0] max_total_encdec = ["", 0] -max_dynamic_enc = ["", 0] -max_dynamic_dec = ["", 0] -max_dynamic_encdec = ["", 0] +max_stack_enc = ["", 0] +max_stack_dec = ["", 0] +max_stack_encdec = ["", 0] -max_static_enc = ["", 0] -max_static_dec = ["", 0] -max_static_encdec = ["", 0] +max_heap_enc = ["", 0] +max_heap_dec = ["", 0] +max_heap_encdec = ["", 0] ram_table = {} -with open(newsletterFilenameSram, "r") as csvfile: - SRAM = csv.reader(csvfile, delimiter=";") - for row in SRAM: +with open(newsletterFilenameHEAP, "r") as csvfile: + HEAP = csv.reader(csvfile, delimiter=";") + for row in HEAP: if row[0] == "conf": continue key = row[0] lst = row[1:] ram_table[key] = lst -with open(newsletterFilenameDram, "r") as csvfile: - DRAM = csv.reader(csvfile, delimiter=";") - for row in DRAM: +with open(newsletterFilenameSTACK, "r") as csvfile: + STACK = csv.reader(csvfile, delimiter=";") + for row in STACK: if row[0] == "conf": continue key = row[0] @@ -81,76 +81,82 @@ with open(newsletterFilenameDram, "r") as csvfile: ram_table[key] += lst # now we have the following format -# SRAM enc, SRAM dec, SRAM total, DRAM enc, DRAM dec, DRAM max(enc, dec) +# HEAP enc, HEAP dec, HEAP total, STACK enc, STACK dec, STACK max(enc, dec), total for key in ram_table: ram = ram_table[key] - static_enc = int(ram[0]) - static_dec = int(ram[1]) - static_encdec = static_enc + static_dec + heap_enc = int(ram[0]) + heap_dec = int(ram[1]) + heap_encdec = heap_enc + heap_dec - dynamic_enc = int(ram[3]) - dynamic_dec = int(ram[4]) - dynamic_encdec = int(ram[5]) + stack_enc = int(ram[3]) + stack_dec = int(ram[4]) + stack_encdec = int(ram[5]) - total_enc = static_enc + dynamic_enc - total_dec = static_dec + dynamic_dec - total_encdec = static_encdec + dynamic_encdec + total_enc = heap_enc + stack_enc + total_dec = heap_dec + stack_dec + total_encdec = heap_encdec + stack_encdec - if static_enc > max_static_enc[1]: - max_static_enc[0] = re.sub(" ", "_", key) - max_static_enc[1] = static_enc + if heap_enc > max_heap_enc[1]: + max_heap_enc[0] = re.sub(" ", "_", key) + max_heap_enc[1] = heap_enc - if static_dec > max_static_dec[1]: - max_static_dec[0] = re.sub(" ", "_", key) - max_static_dec[1] = static_dec + if heap_dec > max_heap_dec[1]: + max_heap_dec[0] = re.sub(" ", "_", key) + max_heap_dec[1] = heap_dec - if static_encdec > max_static_encdec[1]: - max_static_encdec[0] = re.sub(" ", "_", key) - max_static_encdec[1] = static_encdec + if heap_encdec > max_heap_encdec[1]: + max_heap_encdec[0] = re.sub(" ", "_", key) + max_heap_encdec[1] = heap_encdec - if dynamic_enc > max_dynamic_enc[1]: - max_dynamic_enc[0] = re.sub(" ", "_", key) - max_dynamic_enc[1] = dynamic_enc + if stack_enc > max_stack_enc[1]: + max_stack_enc[0] = re.sub(" ", "_", key) + max_stack_enc[1] = stack_enc - if dynamic_dec > max_dynamic_dec[1]: - max_dynamic_dec[0] = re.sub(" ", "_", key) - max_dynamic_dec[1] = dynamic_dec + if stack_dec > max_stack_dec[1]: + max_stack_dec[0] = re.sub(" ", "_", key) + max_stack_dec[1] = stack_dec - if dynamic_encdec > max_dynamic_encdec[1]: - max_dynamic_encdec[0] = re.sub(" ", "_", key) - max_dynamic_encdec[1] = dynamic_encdec + if stack_encdec > max_stack_encdec[1]: + max_stack_encdec[0] = re.sub(" ", "_", key) + max_stack_encdec[1] = stack_encdec if total_enc > max_total_enc[1]: max_total_enc[0] = re.sub(" ", "_", key) max_total_enc[1] = total_enc - if total_dec > max_static_dec[1]: + if total_dec > max_total_dec[1]: max_total_dec[0] = re.sub(" ", "_", key) max_total_dec[1] = total_dec - if total_encdec > max_static_encdec[1]: + if total_encdec > max_total_encdec[1]: max_total_encdec[0] = re.sub(" ", "_", key) max_total_encdec[1] = total_encdec + print( - revision, - shortDate, - fullDate, - max_total_encdec[1], - max_total_enc[0], - max_total_enc[1], - max_total_dec[0], - max_total_dec[1], - max_dynamic_encdec[1], - max_dynamic_encdec[0], - max_dynamic_enc[1], - max_dynamic_dec[0], - max_dynamic_dec[1], - max_static_enc[1] + max_static_dec[1], - max_static_enc[0], - max_static_enc[1], - max_static_dec[0], - max_static_dec[1], - newsletterFilenameLast, + revision, # string revision $tmp[1] + shortDate, # string shortDate $tmp[2] + fullDate, # string fullDate $tmp[3] + + max_total_encdec[1], # value maxTotalRamCodecScore $tmp[4] + + max_total_enc[0], # string maxTotalRamEnc $tmp[5] + max_total_enc[1], # value maxTotalRamEnc $tmp[6] + max_total_dec[0], # string maxTotalRamDec $tmp[7] + max_total_dec[1], # value maxTotalRamDecScore $tmp[8] + + max_stack_encdec[1], # value maxStackCodecScore $tmp[9] + max_stack_enc[0], # string maxStackEnc $tmp[10] + max_stack_enc[1], # value maxStackEncScore $tmp[11] + max_stack_dec[0], # string maxStackDec $tmp[12] + max_stack_dec[1], # value maxStackDecScore $tmp[13] + + max_heap_encdec[1], # value maxHeapCodecScore $tmp[14] + max_heap_enc[0], # string maxHeapEnc $tmp[15] + max_heap_enc[1], # value maxHeapEncScore $tmp[16] + max_heap_dec[0], # string maxHeapDec $tmp[17] + max_heap_dec[1], # value maxHeapDecScore $tmp[19] + + newsletterFilenameLast, # string logFile $tmp[19] ) diff --git a/ci/complexity_measurements/parseNewsletterRom.py b/ci/complexity_measurements/parseNewsletterRom.py index aeb7ee26507afecf3c2f5f3b54add17e2a61fd5a..e32051d91220f2e0947ae3590f8aa11fce2a6daa 100755 --- a/ci/complexity_measurements/parseNewsletterRom.py +++ b/ci/complexity_measurements/parseNewsletterRom.py @@ -2,7 +2,7 @@ # coding: utf-8 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,21 +42,127 @@ shortDate = "" fullDate = "" if __name__ == "__main__": - newsletterFilename = sys.argv[1] - newsletterFilenameLast = sys.argv[2] - revision = sys.argv[3] - shortDate = sys.argv[4] - fullDate = sys.argv[5] + newsletterFilenamePROM = sys.argv[1] + newsletterFilenameTROM = sys.argv[2] + newsletterFilenameLast = sys.argv[3] + revision = sys.argv[4] + shortDate = sys.argv[5] + fullDate = sys.argv[6] -max_total = ["", 0] +max_prom_enc = ["", 0] +max_prom_dec = ["", 0] +max_prom_com = ["", 0] +max_prom_rend = ["", 0] +max_prom_total = ["", 0] -with open(newsletterFilename, "r") as csvfile: - rom = csv.reader(csvfile, delimiter=";") - for row in rom: +max_trom_enc = ["", 0] +max_trom_dec = ["", 0] +max_trom_com = ["", 0] +max_trom_rend = ["", 0] +max_trom_total = ["", 0] + +max_total_encdec = ["", 0] + +rom_table = {} + +with open(newsletterFilenamePROM, "r") as csvfile: + PROM = csv.reader(csvfile, delimiter=";") + for row in PROM: + if row[0] == "conf": + continue + key = row[0] + lst = row[1:] + rom_table[key] = lst + +with open(newsletterFilenameTROM, "r") as csvfile: + TROM = csv.reader(csvfile, delimiter=";") + for row in TROM: if row[0] == "conf": continue - if int(row[4]) > max_total[1]: - max_total[0] = re.sub(" ", "_", row[0]) - max_total[1] = int(row[4]) + key = row[0] + lst = row[1:] + rom_table[key] += lst + +# now we have the following format +# PROM enc, PROM dec, PROM com, PROM rend, PROM total, TROM enc, TROM dec, TROM com, TROM rend, TROM total, total + +for key in rom_table: + rom = rom_table[key] + prom_enc = int(rom[0]) + prom_dec = int(rom[1]) + prom_com = int(rom[2]) + prom_rend = int(rom[3]) + prom_total = int(rom[4]) + + trom_enc = int(rom[5]) + trom_dec = int(rom[6]) + trom_com = int(rom[7]) + trom_rend = int(rom[8]) + trom_total = int(rom[9]) + + total_encdec = prom_total + trom_total + + if prom_enc > max_prom_enc[1]: + max_prom_enc[0] = re.sub(" ", "_", key) + max_prom_enc[1] = prom_enc + + if prom_dec > max_prom_dec[1]: + max_prom_dec[0] = re.sub(" ", "_", key) + max_prom_dec[1] = prom_dec + + if prom_com > max_prom_com[1]: + max_prom_com[0] = re.sub(" ", "_", key) + max_prom_com[1] = prom_com + + if prom_rend > max_prom_rend[1]: + max_prom_rend[0] = re.sub(" ", "_", key) + max_prom_rend[1] = prom_rend + + if trom_enc > max_trom_enc[1]: + max_trom_enc[0] = re.sub(" ", "_", key) + max_trom_enc[1] = trom_enc + + if trom_dec > max_trom_dec[1]: + max_trom_dec[0] = re.sub(" ", "_", key) + max_trom_dec[1] = trom_dec + + if trom_com > max_trom_com[1]: + max_trom_com[0] = re.sub(" ", "_", key) + max_trom_com[1] = trom_com + + if trom_rend > max_trom_rend[1]: + max_trom_rend[0] = re.sub(" ", "_", key) + max_trom_rend[1] = trom_rend + + if total_encdec > max_total_encdec[1]: + max_total_encdec[0] = re.sub(" ", "_", key) + max_total_encdec[1] = total_encdec + -print(revision, shortDate, fullDate, max_total[1], newsletterFilenameLast) +print( + revision, # string revision $tmp[1] + shortDate, # string shortDate $tmp[2] + fullDate, # string fullDate $tmp[3] + + max_total_encdec[1], # value maxTotalRomCodecScore $tmp[4] + + max_prom_enc[0], # string maxPROMEnc $tmp[5] + max_prom_enc[1], # value maxPROMEncScore $tmp[6] + max_prom_dec[0], # string maxPROMDec $tmp[7] + max_prom_dec[1], # value maxPROMDecScore $tmp[8] + max_prom_com[0], # string maxPROMCom $tmp[9] + max_prom_com[1], # value maxPROMComScore $tmp[10] + max_prom_rend[0], # string maxPROMRend $tmp[11] + max_prom_rend[1], # value maxPROMRendScore $tmp[12] + + max_trom_enc[0], # string maxTROMEnc $tmp[13] + max_trom_enc[1], # value maxTROMEncScore $tmp[14] + max_trom_dec[0], # string maxTROMDec $tmp[15] + max_trom_dec[1], # value maxTROMDecScore $tmp[16] + max_trom_com[0], # string maxTROMCom $tmp[17] + max_trom_com[1], # value maxTROMComScore $tmp[18] + max_trom_rend[0], # string maxTROMRend $tmp[19] + max_trom_rend[1], # value maxTROMRendScore $tmp[20] + + newsletterFilenameLast, # string logFile $tmp[21] +) diff --git a/ci/complexity_measurements/parseNewsletterWmops.py b/ci/complexity_measurements/parseNewsletterWmops.py index 06943726a00bd40115bec901a2aa101098be7dfc..3328d4ca1662771e83a81a2fc3480dca6b2aa357 100755 --- a/ci/complexity_measurements/parseNewsletterWmops.py +++ b/ci/complexity_measurements/parseNewsletterWmops.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # coding: utf-8 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/get_id_of_last_job_occurence.py b/ci/get_id_of_last_job_occurence.py index f6223d998063d6d92db1e0ea9e376607a1767658..12294cf9f558da52c5d21ca1319219d03c665d94 100755 --- a/ci/get_id_of_last_job_occurence.py +++ b/ci/get_id_of_last_job_occurence.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,44 +38,45 @@ PAGE_SUFFIX = "&page={}" API_BASE_URL = "https://forge.3gpp.org/rep/api/v4/projects/49" -parser = argparse.ArgumentParser() -parser.add_argument("branch_name") -parser.add_argument("job_name") - -args = parser.parse_args() - -branch_name = args.branch_name -job_name = args.job_name - - -job_id = -1 -# check last 500 pipelines max -for page in range(100): - url_pls = API_BASE_URL + "/pipelines" +def get_job_id(branch_name, job_name): + job_id = -1 + # check last 500 pipelines max + for page in range(100): + url_pls = API_BASE_URL + "/pipelines" + + # need both suffixes here to descend through the pages and get also older pipelines + suffix = PER_PAGE_SUFFIX + PAGE_SUFFIX.format(page) + resp_pls = requests.get(url_pls + suffix) + for pl in resp_pls.json(): + if pl["ref"] == branch_name: + url_jobs = url_pls + f"/{pl['id']}/jobs" + + # only one of the suffixes here - this assumes only max of 50 jobs per pipeline + # so only one page needed + resp_jobs = requests.get(url_jobs + PER_PAGE_SUFFIX) + + if job_name not in resp_jobs.text: + continue + + # find actual job by name + for job in resp_jobs.json(): + if job["name"] == job_name and job["status"] == "success": + job_id = job["id"] + break + if job_id >= 0: + break - # need both suffixes here to descend through the pages and get also older pipelines - suffix = PER_PAGE_SUFFIX + PAGE_SUFFIX.format(page) - resp_pls = requests.get(url_pls + suffix) - for pl in resp_pls.json(): - if pl["ref"] == branch_name: - url_jobs = url_pls + f"/{pl['id']}/jobs" - - # only one of the suffixes here - this assumes only max of 50 jobs per pipeline - # so only one page needed - resp_jobs = requests.get(url_jobs + PER_PAGE_SUFFIX) + if job_id >= 0: + break - if job_name not in resp_jobs.text: - continue + return job_id - # find actual job by name - for job in resp_jobs.json(): - if job["name"] == job_name and job["status"] == "success": - job_id = job["id"] - break - if job_id >= 0: - break +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument("branch_name") + parser.add_argument("job_name") - if job_id >= 0: - break + args = parser.parse_args() -print(job_id) + job_id = get_job_id(args.branch_name, args.job_name) + print(job_id) \ No newline at end of file diff --git a/ci/index-pages.html b/ci/index-pages.html index 0a2e73e78e5833b618991e1c189d79e54aa2b35b..9d60155e8fa9399e35cd4ff862cb99b780909309 100644 --- a/ci/index-pages.html +++ b/ci/index-pages.html @@ -16,4 +16,10 @@
  • StereoDmxEVS
  • +

    Test Coverage

    + + + diff --git a/ci/ivas_voip_be_test.sh b/ci/ivas_voip_be_test.sh new file mode 100755 index 0000000000000000000000000000000000000000..592451c345541b0e3c2d57424a4171bdbb40d460 --- /dev/null +++ b/ci/ivas_voip_be_test.sh @@ -0,0 +1,144 @@ +#! /usr/bin/bash + +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. + +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. + +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. + +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. + +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. + +function usage { + echo + echo "Usage:" + echo " ivas_voip_be_test.sh [MODE]" + echo + echo " MODE - test (default) or coverage" + exit +} + +if [ ! -d "lib_com" ]; then + echo "not in root directory! - please run in IVAS root" + exit 1 +fi + +if [ -z "$1" ] || [ "$1" == "test" ]; then + WORKERS="" + BUILD=1 + COVERAGE=0 +elif [ "$1" == "coverage" ]; then + WORKERS="-t 1" + BUILD=0 + COVERAGE=1 +else + usage +fi + +if [ $BUILD -eq 1 ];then + make clean + make all -j +fi + +# Configuration +modes=('SBA_b128_wb_cbr' 'MC_7_1_b96_fb_cbr' 'ISM2_b48_fb_cbr') +output_formats=('STEREO' 'FOA' '7_1' 'HOA3') +limit_input_to_x_seconds=30 + +cfg=./scripts/config/ci_linux.json +dly_profile=./scripts/dly_error_profiles/dly_error_profile_0.dat + +output_dir_default="out" +output_dir_voip="out_voip" + +# Run the same modes in VoIP and non-VoIP mode with a neutral delay profile +./scripts/runIvasCodec.py -p $cfg $WORKERS -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_default | tee voip_be_test_output.txt +./scripts/runIvasCodec.py -p $cfg $WORKERS -U $limit_input_to_x_seconds -m "${modes[@]}" --oc "${output_formats[@]}" -o $output_dir_voip -J "$dly_profile" | tee -a voip_be_test_output.txt + +# Check if Python scripts above failed. They return status 0 even when running a mode fails, so we have to parse log file +if grep -iq failed voip_be_test_output.txt ; then + echo "Run errors in runIvasCodec.py" + exit 1 +fi + +if [ $COVERAGE -eq 1 ];then + # Coverage analysis requires only running the codec and may exit before the comparison part + exit 0 +fi + +# Set up Python path +python_audio_module_path=$(pwd)/scripts +export PYTHONPATH=$python_audio_module_path:$PYTHONPATH +python_audiofile_script_path=$python_audio_module_path/pyaudio3dtools/audiofile.py + +# Trim JBM delay from VoIP output files +output_dir_voip_dec="$output_dir_voip"/dec +output_dir_voip_dec_trimmed="$output_dir_voip"/dec_trimmed + +if [[ ! -d $output_dir_voip_dec_trimmed ]]; then + mkdir $output_dir_voip_dec_trimmed +fi + +for cut in "$output_dir_voip_dec"/*.wav; do + output_path=${cut/$output_dir_voip_dec/$output_dir_voip_dec_trimmed} + output_path=${output_path/".wav"/".raw"} + python3 "$python_audiofile_script_path" pre-trim 60 "$cut" "$output_path" | tee -a voip_be_test_output.txt +done + +# Convert non-VoIP output from wav to pcm (comparison script doesn't support wav) +output_dir_default_dec="$output_dir_default"/dec +output_dir_default_dec_pcm="$output_dir_default"/dec_pcm + +if [[ ! -d $output_dir_default_dec_pcm ]]; then + mkdir $output_dir_default_dec_pcm +fi + +for ref in "$output_dir_default_dec"/*.wav; do + output_path=${ref/$output_dir_default_dec/$output_dir_default_dec_pcm} + output_path=${output_path/".wav"/".raw"} + python3 "$python_audiofile_script_path" convert "$ref" "$output_path" | tee -a voip_be_test_output.txt +done + +# Assert BE between non-VoIP and VoIP modes +all_be=1 + +cmp_tool_path=$(pwd)/tests/cmp_pcm.py + +for ref in "$output_dir_default_dec_pcm"/*; do + cut=${ref/$output_dir_default_dec_pcm/$output_dir_voip_dec_trimmed} + cut=${cut/".dec."/"_jbm_dly_error_profile_0_dat.dec."} + + # Print paths of compared files, since the script doesn't do it + printf "\nComparing %s and %s\n" "$ref" "$cut" | tee -a voip_be_test_output.txt + printout=$($cmp_tool_path "$ref" "$cut") + if [ $? -ne 0 ]; then + all_be=0 + fi + printf "%s\n" "$printout" | tee -a voip_be_test_output.txt +done + +if [ $all_be -eq 1 ]; then + printf "\n\nAll tested conditions are bit-exact\n" | tee -a voip_be_test_output.txt +else + printf "\n\nBitexactness problems found!\n" | tee -a voip_be_test_output.txt + exit 1; +fi diff --git a/ci/run_evs_be_test.py b/ci/run_evs_be_test.py index e3c6c750bba92b053f44230747416bdc19d17779..f7b705b0f47e100ead67786d6730f7024461ebc9 100755 --- a/ci/run_evs_be_test.py +++ b/ci/run_evs_be_test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/run_scheduled_sanitizer_test.py b/ci/run_scheduled_sanitizer_test.py index 2aaa49dee678eec94ab7f9b43c1992116a1db59f..aa6f2636a44848c9505034aac8f2511961bfc66a 100755 --- a/ci/run_scheduled_sanitizer_test.py +++ b/ci/run_scheduled_sanitizer_test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/ci/setup_pages.py b/ci/setup_pages.py new file mode 100755 index 0000000000000000000000000000000000000000..a8dffafa1387f1b770cc783420fe1b444c2a7249 --- /dev/null +++ b/ci/setup_pages.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +import os +import sys +import pathlib +import subprocess +from get_id_of_last_job_occurence import get_job_id + +JOBS = [ + "complexity-stereo-in-stereo-out", + "complexity-ism-in-binaural-out", + "complexity-sba-hoa3-in-hoa3-out", + "complexity-mc-in-7_1_4-out", + "complexity-masa-in-7_1_4-out", + "complexity-StereoDmxEVS-stereo-in-mono-out", + "coverage-test-on-main-scheduled", +] +ARTIFACTS = "artifacts.zip" +API_URL_BASE = "https://forge.3gpp.org/rep/api/v4/projects/{}/jobs" +PUBLIC = "./public" + + +def main(): + + public_folder = pathlib.Path(PUBLIC) + public_folder.mkdir() + + failed_count = 0 + for job in JOBS: + job_id = get_job_id(os.environ["CI_COMMIT_REF_NAME"], job) + print(f"{job_id} - {job}") + try: + curl_for_artifacts(job_id) + + job_public = job + "-public" + if job == "coverage-test-on-main-scheduled": + job_public = "coverage" + + pathlib.Path(job_public).rename(public_folder.joinpath(job_public)) + + except subprocess.CalledProcessError: + print(f"Could not get artifacts for {job}") + failed_count += 1 + + if failed_count == len(JOBS): + sys.exit(1) + + pathlib.Path("ci/index-pages.html").rename(public_folder.joinpath("index.html")) + sys.exit(0) + + +def curl_for_artifacts(job_id): + cmd = [ + "curl", + "--request", + "GET", + API_URL_BASE.format(os.environ["CI_PROJECT_ID"]) + f"/{job_id}/artifacts", + "--output", + ARTIFACTS, + ] + subprocess.run(cmd, check=True) + + # check for valid archive (if not, it is likely a 404 page, then display that) + cmd = ["unzip", "-t", ARTIFACTS] + try: + subprocess.run(cmd, check=True) + except subprocess.CalledProcessError: + with open(ARTIFACTS, "r") as f: + print(f.read()) + raise subprocess.CalledProcessError(-1, "Unzip check failed") + + # do the actual unzipping + cmd = ["unzip", ARTIFACTS] + subprocess.run(cmd, check=True) + + +if __name__ == "__main__": + main() diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 3d7b85fdba1a61cf1202a4f13672efd550346297..c11c72fbaaef154e4e08cd3c961f35a207a1368f 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -1,6 +1,6 @@ #! /usr/bin/bash -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -28,13 +28,73 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. +function usage { + echo + echo "Usage:" + echo " smoke_test.sh [MODE]" + echo + echo " MODE - test (default) or coverage" + exit +} + if [ ! -d "lib_com" ]; then echo "not in root directory! - please run in IVAS root" exit 1 fi -make clean -make all -j 8 +if [ -z "$1" ] || [ "$1" == "test" ]; then + WORKERS="" + BUILD=1 +elif [ "$1" == "coverage" ]; then + WORKERS="-t 1" + BUILD=0 +else + usage +fi + + +cfg=./scripts/config/ci_linux.json +dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat + +if [ $BUILD -eq 1 ];then + # Enable memory macros to find unbalanced memory allocations/deallocations + # Does not implement full memory analysis + make clean + + # Replace free -> free_, malloc -> malloc_, calloc -> calloc_ + ./scripts/prepare_mem_dryrun.py + + # Enable WMOPS and disable DEBUGGING + sed -i.bak -e "s/\/\*\s*\(#define\s*WMOPS\)\s*\*\//\1/g" lib_com/options.h + sed -i.bak -e "s/\/\/\s*\(#define\s*WMOPS\)/\1/g" lib_com/options.h +# sed -i.bak -e "s/\s*\(#define\s*DEBUGGING\)/\/\*\1*\//g" lib_com/options.h + + make all -j + +fi + +# run all modes vanilla-fashion +./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt +# run the decoding again, but with 15% frame loss +./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt + +# run JBM modes - EXT is excluded as not supported yet +modes_with_no_ext_out=$(./scripts/runIvasCodec.py -l | grep -v MASA | grep -v ISM) +./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt +./scripts/runIvasCodec.py -C MASA ISM1 ISM2 ISM3 ISM4 -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt + +# run all modes with binaural output using external files +modes_with_bin_out="SBA PlanarSBA MASA MC ISM1 ISM2 ISM3 ISM4" +bin_out_modes="BINAURAL BINAURAL_ROOM" + +wb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _wb_) +hrtf_wb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin" +./scripts/runIvasCodec.py -p $cfg -m $wb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_wb}" --decoder_only | tee -a smoke_test_output_hrtf.txt + +swb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _swb_) +hrtf_swb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin" +./scripts/runIvasCodec.py -p $cfg -m $swb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_swb}" --decoder_only | tee -a smoke_test_output_hrtf.txt -./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 | tee smoke_test_output.txt -./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt +fb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _fb_) +hrtf_fb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin" +./scripts/runIvasCodec.py -p $cfg -m $fb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_fb}" --decoder_only | tee -a smoke_test_output_hrtf.txt diff --git a/lib_com/ACcontextMapping.c b/lib_com/ACcontextMapping.c index 27c51eb17920d51fee780f4f08c09838b6e38a51..1705a3f7d353a66d075e8aedba7e096bbf8e241f 100644 --- a/lib_com/ACcontextMapping.c +++ b/lib_com/ACcontextMapping.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * get_next_coeff_mapped() diff --git a/lib_com/ari.c b/lib_com/ari.c index 3b7ccfd9a41b3688e587d3237e0d04f7f1b48d05..2ee0be62310edc98d315593d6f269ca2529a6423 100644 --- a/lib_com/ari.c +++ b/lib_com/ari.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "prot.h" #include "basop_util.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- diff --git a/lib_com/ari_hm.c b/lib_com/ari_hm.c index 78e639ea91d95dbcfe2904ff15a2722d6f957659..f1f9d5a42b213ddeb1a4050607d530af740a1236 100644 --- a/lib_com/ari_hm.c +++ b/lib_com/ari_hm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "basop_util.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * UnmapIndex() @@ -196,7 +196,7 @@ int16_t CountIndexBits( return 8; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /*-------------------------------------------------------------------* * tcx_hm_render() @@ -301,3 +301,5 @@ void tcx_hm_modify_envelope( return; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/arith_coder.c b/lib_com/arith_coder.c index e534a23e04a7b57ddcac4d93293daf4ad812c59d..1912b4cbf279d6130a558a8486542b2702272ace 100644 --- a/lib_com/arith_coder.c +++ b/lib_com/arith_coder.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,10 +45,11 @@ #include "prot.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP + /*-------------------------------------------------------* * expfp() * @@ -573,3 +574,5 @@ void tcx_arith_render_envelope( return; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/basop32.c b/lib_com/basop32.c index b12e336e9c7aff2c033587ac3294198520160919..1f28351c7922a05a9c5c2ef2d48db2d2ec969161 100644 --- a/lib_com/basop32.c +++ b/lib_com/basop32.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -30,7 +30,6 @@ *******************************************************************************************************/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ /* v.2.3 - 30.Nov.2009 ============================================================================= @@ -167,6 +166,8 @@ HISTORY: #include "ivas_error.h" #include "ivas_error_utils.h" +#define WMC_TOOL_SKIP + #ifdef _MSC_VER #pragma warning( disable : 4310 ) #endif @@ -3203,4 +3204,4 @@ Word32 L_msu0( Word32 L_var3, Word16 var1, Word16 var2 ) #endif /* ! BASOP_NOGLOB */ -/* end of file */ +#undef WMC_TOOL_SKIP diff --git a/lib_com/basop32.h b/lib_com/basop32.h index f1bd65bc8e1c2b871ccb6f3adf15008867f47a93..ff41a1d81da38fc2da042eb48464986c3ae76ae8 100644 --- a/lib_com/basop32.h +++ b/lib_com/basop32.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/basop_com_lpc.c b/lib_com/basop_com_lpc.c index a24c100d54194aea6d1e68ffa944180ed912fa50..442afe554c1e02eeaa23c7b5e5370018c806ce8f 100644 --- a/lib_com/basop_com_lpc.c +++ b/lib_com/basop_com_lpc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,6 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ #include #include @@ -41,10 +40,11 @@ #include "typedef.h" #include "basop_proto_func.h" #include "cnst.h" - #include "basop_util.h" #include "stl.h" +#define WMC_TOOL_SKIP + #define UNROLL_CHEBYSHEV_INNER_LOOP #define NC_MAX 8 #define GUESS_TBL_SZ 256 @@ -259,3 +259,5 @@ void basop_lsf2lsp( const Word16 lsf[], Word16 lsp[] ) return; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/basop_lsf_tools.c b/lib_com/basop_lsf_tools.c index 7a7e655f8105b17a8fc431af6a03010356774dfa..eddce99e83929a2ae105b6117512512f20fd1880 100644 --- a/lib_com/basop_lsf_tools.c +++ b/lib_com/basop_lsf_tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,6 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ #include #include @@ -42,6 +41,8 @@ #include "control.h" #include "basop_util.h" +#define WMC_TOOL_SKIP + #define NC_MAX 8 static Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ); @@ -309,3 +310,5 @@ static Word16 E_LPC_f_lsp_pol_get( } return Ovf; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/basop_mpy.c b/lib_com/basop_mpy.c index 478dff4cfe26010a55d055919b511f43f72b34d5..db2a14c0b08d33792d79ebb389e3f6ac468c54e5 100644 --- a/lib_com/basop_mpy.c +++ b/lib_com/basop_mpy.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,6 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ #include "basop_mpy.h" #include @@ -42,6 +41,8 @@ #include "debug.h" #endif +#define WMC_TOOL_SKIP + Word32 Mpy_32_16_1( Word32 x, Word16 y ) { Word32 mh; @@ -87,3 +88,5 @@ Word32 Mpy_32_32( Word32 x, Word32 y ) return ( mh ); } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/basop_mpy.h b/lib_com/basop_mpy.h index 699039dd1564b181880b73a7f709a4f0c5a0313e..4a8d4473c65b7d2df22393ac2f75de4c1479101f 100644 --- a/lib_com/basop_mpy.h +++ b/lib_com/basop_mpy.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/basop_proto_func.h b/lib_com/basop_proto_func.h index a9a64ac4c225c13de3eb13573eaca52dbfe1bed5..0c514475f324d6a587142fb07f75d6648a816986 100644 --- a/lib_com/basop_proto_func.h +++ b/lib_com/basop_proto_func.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/basop_settings.h b/lib_com/basop_settings.h index 0689fa419ddaf03563fb4541bfccad9db505e3c4..758a99650cea4a0a7c0fc7ca59c4bab70953dbf0 100644 --- a/lib_com/basop_settings.h +++ b/lib_com/basop_settings.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/basop_tcx_utils.c b/lib_com/basop_tcx_utils.c index ea306d34b28018d647bfd7d523711e814f9641ff..6d2c80f6b74c3cc635e40226eeb756e676faee0c 100644 --- a/lib_com/basop_tcx_utils.c +++ b/lib_com/basop_tcx_utils.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,6 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ #include #include @@ -47,6 +46,8 @@ #include "prot.h" #include "rom_com.h" +#define WMC_TOOL_SKIP + /* compare two positive normalized 16 bit mantissa/exponent values */ /* return value: positive if first value greater, negative if second value greater, zero if equal */ static Word16 compMantExp16Unorm( Word16 m1, Word16 e1, Word16 m2, Word16 e2 ) @@ -436,3 +437,5 @@ void basop_PsychAdaptLowFreqDeemph( Word32 x[], const Word16 lpcGains[], const W } } } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/basop_util.c b/lib_com/basop_util.c index 71feed1276a96d36445669b05d6d1f4b4ac1f541..bfd05e09e2b7c2d942d3dee75965eabcfb071a89 100644 --- a/lib_com/basop_util.c +++ b/lib_com/basop_util.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,6 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ #include #include @@ -48,6 +47,8 @@ #include "control.h" #include "cnst.h" +#define WMC_TOOL_SKIP + extern const Word32 SqrtTable[32]; extern const Word16 SqrtDiffTable[32]; @@ -1107,3 +1108,5 @@ Word32 Sqrt_l( return ( L_y ); } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/basop_util.h b/lib_com/basop_util.h index 3ab56150344db60810211d51e3975a67ec1d5d64..c09b8ea62ca4e8321ef2227978afb9df7aac680d 100644 --- a/lib_com/basop_util.h +++ b/lib_com/basop_util.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/bitalloc.c b/lib_com/bitalloc.c index 97acd28c58324406a85e835da7b3b30ff6159b23..e8db20d13373e10b69cec977df5eeb4f2708cb71 100644 --- a/lib_com/bitalloc.c +++ b/lib_com/bitalloc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * bitalloc() @@ -221,7 +221,8 @@ void bitalloc( } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP + /*-------------------------------------------------------------------* * BitAllocF() * @@ -1020,3 +1021,5 @@ int16_t BitAllocWB( return (Word16) t_fx; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/bitallocsum.c b/lib_com/bitallocsum.c index 124bf69fe5119fce2093c315560956749d49017a..d3f880752d9bb05ef5a823cd574835946bdf5b42 100644 --- a/lib_com/bitallocsum.c +++ b/lib_com/bitallocsum.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * bitallocsum() diff --git a/lib_com/bits_alloc.c b/lib_com/bits_alloc.c index e9f9878853d553b4b6439ba1f2a3905643dd256d..41acc25b48329646c859750c26c8ff86a9f049a4 100644 --- a/lib_com/bits_alloc.c +++ b/lib_com/bits_alloc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "ivas_cnst.h" #include "ivas_rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index a542a4f23030233a101fde27f93a210185e304b6..e5f72590a60dc700b31ed3d3f6b089f9d6a333b9 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -49,7 +49,7 @@ #include "ivas_prot.h" #include "ivas_cnst.h" #include "ivas_rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUGGING @@ -622,7 +622,7 @@ uint16_t get_indice_1( return st->bit_stream[pos]; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /*-------------------------------------------------------------------* * reset_indices_enc() @@ -879,10 +879,6 @@ static ivas_error write_indices_element( for ( n = 0; n < n_channels; n++ ) { - if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) ) - { - continue; - } reset_indices_enc( sts[n]->hBstr, MAX_NUM_INDICES ); } } @@ -1950,24 +1946,12 @@ ivas_error preview_indices( /* read number of objects from the bitstream */ st_ivas->nchan_transport = 1; -#ifdef FIX_ISM_DECODER_PRINTOUT k = (int16_t) ( ( total_brate / FRAMES_PER_SEC ) - 1 ); while ( bit_stream[k] == 1 && st_ivas->nchan_transport < MAX_NUM_OBJECTS ) { st_ivas->nchan_transport++; k--; } -#else - if ( total_brate != SID_2k40 && total_brate != FRAME_NO_DATA ) - { - k = (int16_t) ( ( total_brate / FRAMES_PER_SEC ) - 1 ); - while ( bit_stream[k] == 1 && st_ivas->hDecoderConfig->nchan_out < MAX_NUM_OBJECTS ) - { - st_ivas->nchan_transport++; - k--; - } - } -#endif st_ivas->transport_config = AUDIO_CONFIG_EXTERNAL + st_ivas->nchan_transport; st_ivas->ism_mode = ivas_ism_mode_select( st_ivas->nchan_transport, total_brate ); @@ -2028,7 +2012,7 @@ ivas_error read_indices( file_read_FECpattern( &st_ivas->bfi ); st_ivas->bfi |= bfi; - if ( bfi ) + if ( bfi == FRAMEMODE_MISSING ) /* TODO(mcjbm): This fixes channel-aware mode BE. Still requires review from a bitstream reading expert */ { for ( k = 0; k < num_bits; k++ ) { @@ -2193,8 +2177,10 @@ ivas_error read_indices( } /* handle bad/lost speech frame(and CS bad SID frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ - if ( ( ( *CNG != 0 ) && ( ( speech_bad != 0 ) || ( speech_lost != 0 ) ) ) || /* SP_BAD or SPEECH_LOST) --> stay in CNG */ - ( sid_upd_bad != 0 ) ) /* SID_UPD_BAD --> start CNG */ + if ( ( + bfi != FRAMEMODE_FUTURE && /* TODO(mcjbm): This fixes channel-aware mode BE. Still requires review from a bitstream reading expert */ + ( *CNG != 0 ) && ( ( speech_bad != 0 ) || ( speech_lost != 0 ) ) ) || /* SP_BAD or SPEECH_LOST) --> stay in CNG */ + ( sid_upd_bad != 0 ) ) /* SID_UPD_BAD --> start CNG */ { st_ivas->bfi = 0; /* bfi=0 needed to activate CNG code */ total_brate = FRAME_NO_DATA; @@ -2236,7 +2222,8 @@ ivas_error read_indices( } /* GOOD frame */ - if ( st_ivas->bfi == 0 ) + if ( st_ivas->bfi == 0 || st_ivas->bfi == FRAMEMODE_FUTURE /* TODO(mcjbm): This fixes channel-aware mode BE. Still requires review from a bitstream reading expert */ + ) { /* GOOD frame - convert ITU-T G.192 words to short values */ st_ivas->hDecoderConfig->ivas_total_brate = total_brate; @@ -2739,116 +2726,6 @@ void get_NextCoderType( return; } -/*-------------------------------------------------------------------* - * read_indices_from_djb() - * - * Read indices from the de-jitter buffer payload (works also for AMR-WB IO mode) - *-------------------------------------------------------------------*/ -void read_indices_from_djb( - Decoder_State *st, /* i/o: decoder state structure */ - uint8_t *pt_stream, /* i : bitstream file */ - int16_t *CNG, - const int16_t num_bits, /* i : input frame length in bits */ - const Word16 isAMRWB_IOmode, - const Word16 core_mode, - const Word16 qbit, - const Word16 bitstreamformat, - const Word16 amrwb_rfc4867_flag, - const int16_t partialframe, /* i : partial frame information */ - const int16_t next_coder_type /* i : next coder type information */ -) -{ - int16_t k; - UWord8 mask = 0x80; - Word16 no_data = 0; - Word16 sti = -1; - uint16_t *bit_stream_ptr; - int32_t total_brate; - int16_t speech_lost = 0; - - st->bfi = 0; - st->BER_detect = 0; - st->mdct_sw_enable = 0; - st->mdct_sw = 0; - reset_indices_dec( st ); - - st->bfi = !qbit; - total_brate = (Word32) (num_bits) *50; - - if ( num_bits == 0 ) /* guess type of missing frame for SP_LOST and NO_DATA */ - { - speech_lost = *CNG == 0; - no_data = *CNG != 0; - } - - if ( partialframe || st->prev_use_partial_copy ) - { - st->next_coder_type = next_coder_type; - } - else - { - st->next_coder_type = INACTIVE; - } - - if ( partialframe == 1 ) - { - st->bfi = 2; - } - - /* unpack speech data */ - bit_stream_ptr = st->bit_stream; - /* convert bitstream from compact bytes to short values and store it in decoder state */ - for ( k = 0; k < num_bits; k++ ) - { - if ( bitstreamformat == VOIP_RTPDUMP && isAMRWB_IOmode ) - { - st->bit_stream[sort_ptr[core_mode][k]] = unpack_bit( &pt_stream, &mask ); - bit_stream_ptr++; - } - else - { - *bit_stream_ptr++ = unpack_bit( &pt_stream, &mask ); - } - } - - /* unpack auxiliary bits */ - if ( isAMRWB_IOmode && total_brate == SID_1k75 ) - { - if ( bitstreamformat == VOIP_RTPDUMP ) - { - /* A.2.2.1.3: AMR-WB SID_1k75 frame is followed by STI bit and CMI bits */ - sti = unpack_bit( &pt_stream, &mask ); - } - else - { - /* VOIP_G192_RTP does not contain STI and CMI */ - sti = 1; - } - read_indices_mime_handle_sti_and_all_zero_bits( st, &total_brate, sti ); - } - - /* add two zero bytes for arithmetic coder flush */ - for ( k = 0; k < 8 * 2; ++k ) - { - *bit_stream_ptr++ = 0; - } - - total_brate = read_indices_mime_handle_dtx( st, CNG, isAMRWB_IOmode, core_mode, total_brate, sti, speech_lost, no_data, amrwb_rfc4867_flag ); - /* st->CNG set inside */ - - if ( st->bfi != 1 ) - { - /* select Mode 1 or Mode 2 */ - decoder_selectCodec( st, total_brate, *st->bit_stream ? 1 : 0 ); - - /* a change of the total bitrate should not be known to the decoder, if the received frame was truly lost */ - st->total_brate = total_brate; - - mdct_switching_dec( st ); - } - - return; -} /*-------------------------------------------------------------------* * get_indice_preview() @@ -2958,14 +2835,17 @@ void evs_dec_previewFrame( void dtx_read_padding_bits( DEC_CORE_HANDLE st, - int16_t num_bits ) + const int16_t num_bits ) { /* TODO: temporary hack, need to decide what to do with core-coder bitrate */ int32_t tmp; + tmp = st->total_brate; st->total_brate = st->total_brate + num_bits * FRAMES_PER_SEC; get_next_indice( st, num_bits ); st->total_brate = tmp; + + return; } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP diff --git a/lib_com/calc_st_com.c b/lib_com/calc_st_com.c index 5f1c3776d9aa45174e3e60b2587d82d3810a3ade..2f2cc56333ef7799daa532fc45d58fa77711878e 100644 --- a/lib_com/calc_st_com.c +++ b/lib_com/calc_st_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------------- diff --git a/lib_com/cb_shape.c b/lib_com/cb_shape.c index b44c46ab0f341c445e2495abfc250f4fd93616e5..364ed639f323b294b764f924d7c69f572d1695f1 100644 --- a/lib_com/cb_shape.c +++ b/lib_com/cb_shape.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * cb_shape() diff --git a/lib_com/cldfb.c b/lib_com/cldfb.c index 1d9fefcebb61432c0d2ecb4e47a917423e33b404..61539e2355ec5d9db3603452ca0f257c09c449ed 100644 --- a/lib_com/cldfb.c +++ b/lib_com/cldfb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "stat_dec.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #if __STDC_VERSION__ >= 199901L #if defined __ICL @@ -706,7 +706,7 @@ ivas_error openCldfb( HANDLE_CLDFB_FILTER_BANK hs; int16_t buf_len; - hs = (HANDLE_CLDFB_FILTER_BANK) count_malloc( sizeof( CLDFB_FILTER_BANK ) ); + hs = (HANDLE_CLDFB_FILTER_BANK) malloc( sizeof( CLDFB_FILTER_BANK ) ); if ( hs == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for CLDFB" ); @@ -728,7 +728,7 @@ ivas_error openCldfb( buf_len = hs->p_filter_length; } - hs->cldfb_state = (float *) count_malloc( buf_len * sizeof( float ) ); + hs->cldfb_state = (float *) malloc( buf_len * sizeof( float ) ); if ( hs->cldfb_state == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for CLDFB" ); @@ -889,9 +889,9 @@ void deleteCldfb( { if ( hs->cldfb_state ) { - count_free( hs->cldfb_state ); + free( hs->cldfb_state ); } - count_free( hs ); + free( hs ); *h_cldfb = NULL; } @@ -1148,7 +1148,7 @@ ivas_error cldfb_save_memory( hs->memory_length = hs->p_filter_length; } - hs->memory = (float *) count_malloc( hs->memory_length * sizeof( float ) ); + hs->memory = (float *) malloc( hs->memory_length * sizeof( float ) ); if ( hs->memory == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CLDFB\n" ); @@ -1199,7 +1199,7 @@ void cldfb_restore_memory( } hs->memory_length = 0; - count_free( hs->memory ); + free( hs->memory ); hs->memory = NULL; return; diff --git a/lib_com/cng_exc.c b/lib_com/cng_exc.c index 62955ee95505a58be0c88b3c36a2b7336c7cae6a..9f0a22320e8732322a1d2580499534d0dbca8544 100644 --- a/lib_com/cng_exc.c +++ b/lib_com/cng_exc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_com/cnst.h b/lib_com/cnst.h index eda4d0f1201e5a04f212bc71167742e95e5fe539..db1dc3d8982a768eff807f35d083dbabeae15f58 100644 --- a/lib_com/cnst.h +++ b/lib_com/cnst.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -1682,6 +1682,13 @@ enum #define HALF_D_STAB_TBL_FX ( (Word16) 422 ) /* Q13 0.1013138/2.0 */ #define NUM_ENV_STAB_PLC_STATES 2 /* Number of states of markov model */ +#define ENV_STAB_EST1 2.93f /* env_stab estimation coefficient 1 */ +#define ENV_STAB_EST2 (-2.20f) /* env_stab estimation coefficient 2 */ +#define ENV_STAB_EST3 0.741f /* env_stab estimation coefficient 3 */ +#define STAB_FAC_EST1 1.093f /* stab_fac HQ estimation coefficient 1 */ +#define STAB_FAC_EST2 (-5.84e-05f) /* stab_fac HQ estimation coefficient 2, including Q12 scaling */ +#define STAB_FAC_EST3 0.125f /* stab_fac HQ estimation coefficient 3 */ + #define ATT_LIM_HANGOVER 150 /* Number of hangover frames for disabling stability dependent attenuation */ #define DELTA_TH 5.0f /* Delta energy threshold for transient detection for envelope stability */ #define ENERGY_TH 100.0f /* Energy threshold for transient detection */ diff --git a/lib_com/codec_tcx_common.c b/lib_com/codec_tcx_common.c index 98a2fb4bd012eed1c32bdb46233fc398d5ac6542..7bb6dac40bb4b5d40bc869e53047fbcbc55e5db9 100644 --- a/lib_com/codec_tcx_common.c +++ b/lib_com/codec_tcx_common.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * tcxGetNoiseFillingTilt() diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index fa14ecff238815dfaa88f19ea690659ab7799c3c..a24e03f248de30a26ddda7320f1287a19d81ccd4 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -87,6 +87,14 @@ typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_qmetadata_frame_struct *IVAS_MASA_QMETADATA_HANDLE; typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; +#ifdef HRTF_BINARY_FILE +typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; +#endif +#ifdef HRTF_BINARY_FILE +typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE; + +typedef struct ivas_hrtfs_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE; +#endif #ifdef DEBUGGING typedef enum @@ -134,15 +142,17 @@ typedef struct ivas_LS_setup_custom IVAS_LSSETUP_CUSTOM_STRUCT; typedef struct _IVAS_JBM_TRACE_DATA { - double playTime; - int16_t partialCopyOffset; + uint32_t systemTimestamp_ms; + uint16_t extBufferedSamples; + uint16_t lastDecodedWasActive; + int32_t output_Fs; + int16_t dataUnit_flag; uint16_t sequenceNumber; uint32_t timeStamp; uint32_t rcvTime; - int16_t lastDecodedWasActive; - int16_t partial_frame_flag; - int16_t dataUnit_flag; + int16_t partial_frame; + int16_t partialCopyOffset; } IVAS_JBM_TRACE_DATA; diff --git a/lib_com/control.h b/lib_com/control.h index 2b3f92b5355b09aa9c32a11f37343c2c07e46ade..725163728dc88ec26e8cee3d1f0b2c7c28e5721e 100644 --- a/lib_com/control.h +++ b/lib_com/control.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/core_com_config.c b/lib_com/core_com_config.c index 7ffb4f0e9fd1fa702f962a5eb0a4fb38e81a1372..120d0876d1f32569cf4bd8afe3b5089af9924789 100644 --- a/lib_com/core_com_config.c +++ b/lib_com/core_com_config.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" diff --git a/lib_com/deemph.c b/lib_com/deemph.c index 20b5c43719ffb01913991cc2508412b8549b4e85..9f4463d6a820cb6ebeb4a170b3e7ab56008c20c6 100644 --- a/lib_com/deemph.c +++ b/lib_com/deemph.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * deemph() diff --git a/lib_com/delay_comp.c b/lib_com/delay_comp.c index c3e6aa1ac77c0bec1d55ab831615dd48660795fa..e7713f3b478260f516e91bba7b4f64f13d8fd833 100644 --- a/lib_com/delay_comp.c +++ b/lib_com/delay_comp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * get_delay() @@ -55,7 +55,6 @@ int32_t get_delay( const int32_t io_fs, /* i : input/output sampling frequency */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ - RENDERER_TYPE renderer_type, /* i : IVAS rendering type */ const int32_t binaural_latency_ns /* i : binaural renderer HRTF delay in ns */ ) { @@ -95,15 +94,14 @@ int32_t get_delay( { delay = IVAS_DEC_DELAY_NS; - if ( hCldfb != NULL || renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + if ( hCldfb != NULL ) { + /* compensate for filterbank delay */ delay += IVAS_FB_DEC_DELAY_NS; } - /* compensate for Binaural renderer HRTF delay */ - { - delay += binaural_latency_ns; - } + /* compensate for binauralization delay */ + delay += binaural_latency_ns; } } diff --git a/lib_com/disclaimer.c b/lib_com/disclaimer.c index 749f9fcce2541ad6b9f4c73f3c2e5c7dda36fbe1..ed55a45b063d596dea4b6d4968633533c8c3e177 100644 --- a/lib_com/disclaimer.c +++ b/lib_com/disclaimer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,6 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ #include #include "options.h" @@ -42,6 +41,8 @@ #endif #include "prot.h" +#define WMC_TOOL_SKIP + int16_t print_disclaimer( FILE *fPtr ) { diff --git a/lib_com/dlpc_bfi.c b/lib_com/dlpc_bfi.c index 33ba286c3c3312ca87ce46948cb5f287a6087b50..b894b845f803c57392987fba058d2d1b74d74b68 100644 --- a/lib_com/dlpc_bfi.c +++ b/lib_com/dlpc_bfi.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * routine: dlpc_bfi() diff --git a/lib_com/edct.c b/lib_com/edct.c index 8fe84049a60c56c19ede56a66e94db1ce988684e..6f6d6c32b65d0d7c5c671865cf8aeb419852676b 100644 --- a/lib_com/edct.c +++ b/lib_com/edct.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include /* for cosf, sinf */ static ivas_error get_edct_table( diff --git a/lib_com/enh1632.c b/lib_com/enh1632.c index 985398eec9fa3c98d02bec048df21178fefcb913..1dd192faaa7d9c2d0190c781c3a18af3cdda27db 100644 --- a/lib_com/enh1632.c +++ b/lib_com/enh1632.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -30,7 +30,6 @@ *******************************************************************************************************/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ /* =========================================================================== File: ENH1632.C v.2.3 - 30.Nov.2009 @@ -90,6 +89,8 @@ #include #include "stl.h" +#define WMC_TOOL_SKIP + /***************************************************************************** * * Constants and Globals @@ -629,5 +630,4 @@ Word32 L_rotl( Word32 L_var1, Word16 var2, Word16 *var3 ) return ( L_var_out ); } - -/* end of file */ +#undef WMC_TOOL_SKIP diff --git a/lib_com/enh1632.h b/lib_com/enh1632.h index a46fb8dbe74910e31b30baf2f4d8a2adac2a92a2..9216ea6c201a3b63690723318b65ea19367445c2 100644 --- a/lib_com/enh1632.h +++ b/lib_com/enh1632.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/enh40.c b/lib_com/enh40.c index 777bfffd8f0a41b3b72f65540c2afe4e5f00c915..8a48cece39bed8b7e709fedb9bd8c9b40c5354a0 100644 --- a/lib_com/enh40.c +++ b/lib_com/enh40.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -30,7 +30,6 @@ *******************************************************************************************************/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ /* =========================================================================== File: ENH40.C v.2.3 - 30.Nov.2009 @@ -93,6 +92,7 @@ * Include-Files * *****************************************************************************/ + #include #include #include "stl.h" @@ -100,6 +100,8 @@ #include #endif /* BASOP_NOGLOB */ +#define WMC_TOOL_SKIP + #ifdef _MSC_VER #pragma warning( disable : 4310 ) #endif @@ -161,7 +163,6 @@ #ifndef BASOP_NOGLOB Word40 L40_shl( Word40 L40_var1, Word16 var2 ) #else /* BASOP_NOGLOB */ - Word40 L40_shl_o( Word40 L40_var1, Word16 var2, Flag *Overflow ) #endif /* BASOP_NOGLOB */ { @@ -189,11 +190,10 @@ Word40 L40_shl_o( Word40 L40_var1, Word16 var2, Flag *Overflow ) { #if defined( _MSC_VER ) && ( _MSC_VER <= 1200 ) if ( L40_var_out > 0x003fffffffff ) - { #else if ( L40_var_out > 0x003fffffffffLL ) - { #endif + { #ifndef BASOP_NOGLOB Overflow = 1; exit( 1 ); @@ -258,11 +258,10 @@ Word40 L40_shl( Word40 L40_var1, Word16 var2 ) { #if defined( _MSC_VER ) && ( _MSC_VER <= 1200 ) if ( L40_var_out > 0x003fffffffff ) - { #else if ( L40_var_out > 0x003fffffffffLL ) - { #endif + { assert( 0 ); L40_var_out = MAX_40; break; @@ -542,7 +541,6 @@ Word40 L40_add( Word40 L40_var1, Word40 L40_var2 ) #ifndef BASOP_NOGLOB Word40 L40_sub( Word40 L40_var1, Word40 L40_var2 ) #else /* BASOP_NOGLOB */ - Word40 L40_sub_o( Word40 L40_var1, Word40 L40_var2, Flag *Overflow ) #endif /* BASOP_NOGLOB */ { @@ -1308,4 +1306,4 @@ Word40 L40_shl_r( Word40 L40_var1, Word16 var2 ) } -/* end of file */ +#undef WMC_TOOL_SKIP diff --git a/lib_com/enh40.h b/lib_com/enh40.h index d2a84652d49de4c263c820e931f2e56b7551c13e..a55bd925e9da5ca2408aa43f18f787a3ae32be64 100644 --- a/lib_com/enh40.h +++ b/lib_com/enh40.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/enhancer.c b/lib_com/enhancer.c index 2ed4271c05d55d80c41af33c08433d0b45134ab9..d0eeeb76c73ca4e185eafd8b6edd34006d66ee69 100644 --- a/lib_com/enhancer.c +++ b/lib_com/enhancer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_com/enr_1_az.c b/lib_com/enr_1_az.c index f5f88ed55c1d77fcfadf828948264bcd6bc21415..2b66a14d726bc263dd8feea5a484faeb81c1efe1 100644 --- a/lib_com/enr_1_az.c +++ b/lib_com/enr_1_az.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * enr_1_Az() diff --git a/lib_com/env_adj.c b/lib_com/env_adj.c index a169311615a49f6a4cdf4147d930d28823667fd4..03b7d6cef61c1c070a52ec6141ba51ca3d0f2b6c 100644 --- a/lib_com/env_adj.c +++ b/lib_com/env_adj.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * env_adj() diff --git a/lib_com/env_stab.c b/lib_com/env_stab.c index abe93eddcef7cfcfa6bff8996dc8f74ab216b693..b4da4ce9d70d675dc0de77f32c6d1ca061ede6d5 100644 --- a/lib_com/env_stab.c +++ b/lib_com/env_stab.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUGGING #include "assert.h" #endif @@ -63,10 +63,11 @@ /*--------------------------------------------------------------------------*/ float env_stability( - const int16_t *ynrm, /* i : Norm vector for current frame */ - const int16_t nb_sfm, /* i : Number of sub-bands */ - int16_t *mem_norm, /* i/o: Norm vector memory from past frame */ - int16_t *mem_env_delta /* i/o: Envelope stability memory for smoothing*/ + const int16_t *ynrm, /* i : Norm vector for current frame */ + const int16_t nb_sfm, /* i : Number of sub-bands */ + int16_t *mem_norm, /* i/o: Norm vector memory from past frame */ + int16_t *mem_env_delta, /* i/o: Envelope stability memory for smoothing*/ + const int16_t core_switching_flag /* i : Core switching flag */ ) { Word16 env_delta; @@ -82,53 +83,68 @@ float env_stability( Flag Overflow; #endif /* BASOP_NOGLOB */ - /* Calculate envelope stability parameter */ - L_env_delta = L_deposit_l( 0 ); - for ( i = 0; i < nb_sfm; i++ ) + if ( core_switching_flag ) { - tmp = sub( mem_norm[i], ynrm[i] ); - L_env_delta = L_mac0( L_env_delta, tmp, tmp ); - mem_norm[i] = ynrm[i]; + for ( i = 0; i < nb_sfm; i++ ) + { + mem_norm[i] = ynrm[i]; + } +#ifdef BASOP_NOGLOB + Overflow = 0; + env_delta = shl_o( *mem_env_delta, 1, &Overflow ); +#else + env_delta = shl_o( *mem_env_delta, 1 ); +#endif } + else + { + /* Calculate envelope stability parameter */ + L_env_delta = L_deposit_l( 0 ); + for ( i = 0; i < nb_sfm; i++ ) + { + tmp = sub( mem_norm[i], ynrm[i] ); + L_env_delta = L_mac0( L_env_delta, tmp, tmp ); + mem_norm[i] = ynrm[i]; + } #ifdef DEBUGGING - assert( nb_sfm == 27 || nb_sfm == 26 ); + assert( nb_sfm == 27 || nb_sfm == 26 ); #endif - inv_nb_sfm = 19418; /* Q19 */ - if ( nb_sfm == 26 ) - { - inv_nb_sfm = 20165; /* Q19 */ - } - exp = norm_l( L_env_delta ); - L_env_delta = Mult_32_16( L_shl( L_env_delta, exp ), inv_nb_sfm ); /* 0+exp+19-15 */ + inv_nb_sfm = 19418; /* Q19 */ + if ( nb_sfm == 26 ) + { + inv_nb_sfm = 20165; /* Q19 */ + } + exp = norm_l( L_env_delta ); + L_env_delta = Mult_32_16( L_shl( L_env_delta, exp ), inv_nb_sfm ); /* 0+exp+19-15 */ - L_tmp = Sqrt_l( L_env_delta, &exp2 ); /* exp+4+31+exp2 */ + L_tmp = Sqrt_l( L_env_delta, &exp2 ); /* exp+4+31+exp2 */ - exp = add( 35, add( exp, exp2 ) ); - if ( sub( s_and( exp, 1 ), 1 ) == 0 ) - { - L_tmp = Mult_32_16( L_tmp, 23170 ); /* 1/sqrt(2) in Q15 */ - } - exp = shr( exp, 1 ); + exp = add( 35, add( exp, exp2 ) ); + if ( sub( s_and( exp, 1 ), 1 ) == 0 ) + { + L_tmp = Mult_32_16( L_tmp, 23170 ); /* 1/sqrt(2) in Q15 */ + } + exp = shr( exp, 1 ); #ifndef BASOP_NOGLOB - env_delta = round_fx( L_shl( L_tmp, sub( 26, exp ) ) ); /* Q10 */ - L_tmp = L_mult0( 26214, env_delta ); /* 26214 is 0.1 in Q18. Q28 */ - L_tmp = L_mac( L_tmp, 29491, *mem_env_delta ); /* 29491 is 0.9 in Q15. Q28 */ - *mem_env_delta = round_fx( L_tmp ); /* Q12 */ -#else /* BASOP_NOGLOB */ - env_delta = round_fx_o( L_shl_o( L_tmp, sub( 26, exp ), &Overflow ), &Overflow ); /* Q10 */ - L_tmp = L_mult0( 26214, env_delta ); /* 26214 is 0.1 in Q18. Q28 */ - L_tmp = L_mac_o( L_tmp, 29491, *mem_env_delta, &Overflow ); /* 29491 is 0.9 in Q15. Q28 */ - *mem_env_delta = round_fx_o( L_tmp, &Overflow ); /* Q12 */ -#endif /* BASOP_NOGLOB */ - Overflow = 0; + env_delta = round_fx( L_shl( L_tmp, sub( 26, exp ) ) ); /* Q10 */ + L_tmp = L_mult0( 26214, env_delta ); /* 26214 is 0.1 in Q18. Q28 */ + L_tmp = L_mac( L_tmp, 29491, *mem_env_delta ); /* 29491 is 0.9 in Q15. Q28 */ + *mem_env_delta = round_fx( L_tmp ); /* Q12 */ +#else /* BASOP_NOGLOB */ + env_delta = round_fx_o( L_shl_o( L_tmp, sub( 26, exp ), &Overflow ), &Overflow ); /* Q10 */ + L_tmp = L_mult0( 26214, env_delta ); /* 26214 is 0.1 in Q18. Q28 */ + L_tmp = L_mac_o( L_tmp, 29491, *mem_env_delta, &Overflow ); /* 29491 is 0.9 in Q15. Q28 */ + *mem_env_delta = round_fx_o( L_tmp, &Overflow ); /* Q12 */ +#endif /* BASOP_NOGLOB */ + Overflow = 0; #ifndef BASOP_NOGLOB - env_delta = round_fx( L_shl( L_tmp, 1 ) ); /* Q13 */ -#else /* BASOP_NOGLOB */ - env_delta = round_fx_o( L_shl_o( L_tmp, 1, &Overflow ), &Overflow ); /* Q13 */ -#endif /* BASOP_NOGLOB */ - + env_delta = round_fx( L_shl( L_tmp, 1 ) ); /* Q13 */ +#else /* BASOP_NOGLOB */ + env_delta = round_fx_o( L_shl_o( L_tmp, 1, &Overflow ), &Overflow ); /* Q13 */ +#endif /* BASOP_NOGLOB */ + } if ( Overflow != 0 ) /* Saturated due to the above up-shifting operation. */ { env_stab = stab_trans_fx[L_STAB_TBL - 1]; /* The highest quantized index. */ diff --git a/lib_com/env_stab_trans.c b/lib_com/env_stab_trans.c index 6a8ca2b26645aae233641c08c60e5bd516eb053f..a2d4492b3f4288ed3d707b824092d26b19fad166 100644 --- a/lib_com/env_stab_trans.c +++ b/lib_com/env_stab_trans.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * env_stab_transient_detect() diff --git a/lib_com/est_tilt.c b/lib_com/est_tilt.c index e126f761f8fc00c7b5cf8376be9e066a1381e543..8073e39dfb19833c1ae9d6e7fe1db21f6e38b029 100644 --- a/lib_com/est_tilt.c +++ b/lib_com/est_tilt.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * est_tilt() diff --git a/lib_com/fd_cng_com.c b/lib_com/fd_cng_com.c index 98b5a3df750b16c2bc1bfc6a32848f768b804d5a..0203cd4fb75dd6eeb234c7fddcf30a3d692d34e3 100644 --- a/lib_com/fd_cng_com.c +++ b/lib_com/fd_cng_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- @@ -68,7 +68,7 @@ ivas_error createFdCngCom( HANDLE_FD_CNG_COM hs; /* Allocate memory */ - hs = (HANDLE_FD_CNG_COM) count_malloc( sizeof( FD_CNG_COM ) ); + hs = (HANDLE_FD_CNG_COM) malloc( sizeof( FD_CNG_COM ) ); if ( hs == NULL ) { @@ -162,7 +162,7 @@ void deleteFdCngCom( if ( hsCom != NULL ) { - count_free( hsCom ); + free( hsCom ); *hFdCngCom = NULL; } diff --git a/lib_com/fft.c b/lib_com/fft.c index ed0d6604e6760440e4af923480a19f957c73cc70..e6121e818ae1e58956c41a2b31f5fe3bd54abe08 100644 --- a/lib_com/fft.c +++ b/lib_com/fft.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef _MSC_VER #pragma warning( disable : 4310 ) @@ -6393,7 +6393,7 @@ void rfft( } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP #define SCALEFACTOR8 ( 4 ) #define SCALEFACTOR64 ( 7 ) @@ -6766,3 +6766,5 @@ void BASOP_cfft( return; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/fft_cldfb.c b/lib_com/fft_cldfb.c index 6967f87bcde8a7e6066b60991560e2044f991767..0ea848abdbba069cd73569df5054e417386a65fa 100644 --- a/lib_com/fft_cldfb.c +++ b/lib_com/fft_cldfb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "prot.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" #if __STDC_VERSION__ >= 199901L #if defined __ICL diff --git a/lib_com/fft_rel.c b/lib_com/fft_rel.c index a8b96e8217f50bf751bb0cb79c741bd5671b4489..46ee5e9434de472f4f967ecb2e8049e37c9ea617 100644 --- a/lib_com/fft_rel.c +++ b/lib_com/fft_rel.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_com/fill_spectrum.c b/lib_com/fill_spectrum.c index a3dbcf304b640025fe0ebb48970a45c796946fdf..6694824879aa5bcc6060d3cd6cb9d88a5479447d 100644 --- a/lib_com/fill_spectrum.c +++ b/lib_com/fill_spectrum.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * fill_spectrum() diff --git a/lib_com/findpulse.c b/lib_com/findpulse.c index e26980d2250907d667ee5654508e695d733f135b..3383397bcf939edd9426f6a5446c768c3e7e840a 100644 --- a/lib_com/findpulse.c +++ b/lib_com/findpulse.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------------------* * findpulse() diff --git a/lib_com/fine_gain_bits.c b/lib_com/fine_gain_bits.c index 240b174bef0d4b04836a4afff69b3b213a1ab367..c4c5ce3fca9b69e954e85058aab1a7de17227a6d 100644 --- a/lib_com/fine_gain_bits.c +++ b/lib_com/fine_gain_bits.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "rom_com.h" #include "prot.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * subband_gain_bits() diff --git a/lib_com/frame_ener.c b/lib_com/frame_ener.c index d5c38e6640fbbfd54e85cb79d07a83c47b3be320..f44cb099ce8c2e66a70d680c3488ab9b401b1517 100644 --- a/lib_com/frame_ener.c +++ b/lib_com/frame_ener.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------------------* * fer_energy() diff --git a/lib_com/get_gain.c b/lib_com/get_gain.c index 320d5ad12ce246927b50b8f5da73f9a01848f0ab..e3457128fe5c314636d81380d742a9d5a67e1595 100644 --- a/lib_com/get_gain.c +++ b/lib_com/get_gain.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------------------* * get_gain() diff --git a/lib_com/gs_bitallocation.c b/lib_com/gs_bitallocation.c index 8458fb754fdf0044c80e2595977de7c9a34fdc9e..7f7809428f9fb765f68dd2aceba11f608a4a8c85 100644 --- a/lib_com/gs_bitallocation.c +++ b/lib_com/gs_bitallocation.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_com/gs_gains.c b/lib_com/gs_gains.c index ea23b2778149d5d69599fc3b020364ba9e552949..40626468b65089c0eb8a84e209615bd55464a31b 100644 --- a/lib_com/gs_gains.c +++ b/lib_com/gs_gains.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_com/gs_inact_switching.c b/lib_com/gs_inact_switching.c index a9d2a80046e93d125437f1a782088a52e1d2100a..cd380e86e01e4776259663a806c235b331b60bfc 100644 --- a/lib_com/gs_inact_switching.c +++ b/lib_com/gs_inact_switching.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_com/gs_noisefill.c b/lib_com/gs_noisefill.c index 2885f324cabf420859365cebb3ac84fa7aeeb28a..a92aec07515888a5f48888eb667fe210c7496297 100644 --- a/lib_com/gs_noisefill.c +++ b/lib_com/gs_noisefill.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * gs_noisf() diff --git a/lib_com/gs_preech.c b/lib_com/gs_preech.c index b7ab89a879ec5ab5267ae3e05d277d18d9fe49df..5a98f409369c0a19f0983496d8963323c09e294d 100644 --- a/lib_com/gs_preech.c +++ b/lib_com/gs_preech.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_com/guided_plc_util.c b/lib_com/guided_plc_util.c index cb14c503c895980513c8ac8a8c4e8b83cf389342..884c2beeb860104d820e9dedadd5d0ef742ae43b 100644 --- a/lib_com/guided_plc_util.c +++ b/lib_com/guided_plc_util.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_com/hp50.c b/lib_com/hp50.c index 58b15a4211759df7ce791dac0f6bd95e76704cf1..57c297e1b142750f0a944c9b1cdc91c4ab8654fc 100644 --- a/lib_com/hp50.c +++ b/lib_com/hp50.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /* diff --git a/lib_com/hq2_bit_alloc.c b/lib_com/hq2_bit_alloc.c index b46f54480e78f00ab8bad762c518b94468c40fdd..6b53adec8f931b292bf97f51c06747c4a56930d8 100644 --- a/lib_com/hq2_bit_alloc.c +++ b/lib_com/hq2_bit_alloc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,9 +45,9 @@ #include "basop_util.h" #include "basop_mpy.h" #include "stl.h" -#include "wmops.h" +#include "wmc_auto.h" -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /*------------------------------------------------------------------- * Local constants @@ -375,6 +375,11 @@ void hq2_bit_alloc_har( Word32 L_y[BANDS_MAX]; +#ifdef BASOP_NOGLOB + Flag Overflow; + Overflow = 0; +#endif + grp_rngmax_fx[0] = 0; grp_rngmax_fx[1] = 0; @@ -639,7 +644,12 @@ void hq2_bit_alloc_har( L_temp = Mpy_32_16( L_Ravg_sub[GRP_SB - 1], sub( GRP_SB, 1 ) ); /* Qbe+0+1 */ L_temp = Mpy_32_16( L_temp, Inv_norm_sum_fx ); /* Qbe+1+QIpb+1 */ +#ifdef BASOP_NOGLOB + lf_hf_ge_r_fx = round_fx_o( L_shl_o( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ), &Overflow ), &Overflow ); + Overflow = 0; /* reset BASOP Overflow */ +#else lf_hf_ge_r_fx = round_fx( L_shl( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ) ) ); +#endif exp_normn = norm_s( norm_sum_fx ); exp_normn = sub( exp_normn, 1 ); @@ -1030,3 +1040,5 @@ void hq2_bit_alloc( } return; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/hq2_core_com.c b/lib_com/hq2_core_com.c index 33411f9334f4a4be4fa4610b232538658a9a38c3..aafe578b42507f58737fe96dd5cf4987041e0548 100644 --- a/lib_com/hq2_core_com.c +++ b/lib_com/hq2_core_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "prot.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * mdct_spectrum_denorm() @@ -306,7 +306,7 @@ void reverse_transient_frame_energies( return; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP void bit_allocation_second_fx( Word32 *Rk, Word32 *Rk_sort, @@ -415,7 +415,7 @@ void bit_allocation_second_fx( return; } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /*--------------------------------------------------------------------------* * spt_shorten_domain_pre() diff --git a/lib_com/hq2_noise_inject.c b/lib_com/hq2_noise_inject.c index 3eac77d81bb5c6ee6257879450b658d7cac9177a..0404056dd1ff41587e88825f5ead51872e9ad0d3 100644 --- a/lib_com/hq2_noise_inject.c +++ b/lib_com/hq2_noise_inject.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hq2_noise_inject() diff --git a/lib_com/hq_bit_allocation.c b/lib_com/hq_bit_allocation.c index fbb655e4f32d46e895bdc1aab14b9c3c6fbac152..faba9f8da9ac3e180010436fc99ae163b5f1ad36 100644 --- a/lib_com/hq_bit_allocation.c +++ b/lib_com/hq_bit_allocation.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hq_bit_allocation() diff --git a/lib_com/hq_conf.c b/lib_com/hq_conf.c index ed548171a16629c02424cc01f78da39ddcc77cea..ac9298159358bd297456c9fbee4046a305e83250 100644 --- a/lib_com/hq_conf.c +++ b/lib_com/hq_conf.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hq_configure() diff --git a/lib_com/hq_tools.c b/lib_com/hq_tools.c index 7a154a00a695890085459225c2f49727be3e789f..1d89d0314597493852e85af60f0e57247410d33c 100644 --- a/lib_com/hq_tools.c +++ b/lib_com/hq_tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * Local function prototypes diff --git a/lib_com/hvq_pvq_bitalloc.c b/lib_com/hvq_pvq_bitalloc.c index 9357a37964c7ef055b42e156a329ab7f29e915ab..2808030ae6715e74a318805fa8aaea01a603f2f3 100644 --- a/lib_com/hvq_pvq_bitalloc.c +++ b/lib_com/hvq_pvq_bitalloc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------*/ /* Function hvq_pvq_bitalloc */ diff --git a/lib_com/ifft_rel.c b/lib_com/ifft_rel.c index d0200f87be07faf57c7d7b1976863b08be4d6f4d..fc267a7a10bc80c9cfc5ed856e472959aa780f7c 100644 --- a/lib_com/ifft_rel.c +++ b/lib_com/ifft_rel.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants diff --git a/lib_com/igf_base.c b/lib_com/igf_base.c index 70b202770a9c4188e3fcf44c6368cd5ebaa61afe..ac196510091b86a46c00022395b6520d55d93e48 100644 --- a/lib_com/igf_base.c +++ b/lib_com/igf_base.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * IGF_ApplyTransFac() diff --git a/lib_com/index_pvq_opt.c b/lib_com/index_pvq_opt.c index e09c831dab77b5331c7809644c6925b9e469f162..c762e96c71a820ca99e270120ed74bff0b70f81e 100644 --- a/lib_com/index_pvq_opt.c +++ b/lib_com/index_pvq_opt.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * LOCAL DEFINITIONS @@ -89,8 +89,7 @@ static int16_t local_norm_l_opt( { int16_t l32res; -#define WMC_TOOL_MAN - MAC( 1 ); +#define WMC_TOOL_SKIP if ( l32var == (int32_t) MINNEG ) { @@ -115,7 +114,7 @@ static int16_t local_norm_l_opt( } } } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP return ( l32res ); } diff --git a/lib_com/int_lsp.c b/lib_com/int_lsp.c index 5e1175ab1e2dc944f230f3fb1ea763dc43bb25ce..ff1c9cace4f66b4bcfca0ccb00ef672fec98b867 100644 --- a/lib_com/int_lsp.c +++ b/lib_com/int_lsp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * int_lsp() diff --git a/lib_com/interleave_spectrum.c b/lib_com/interleave_spectrum.c index ae1432a1eb7b7d6527cebfd4ba3142fd5e3ede63..6046bf8f20959d616b33498e6c37edb6a48ca2c3 100644 --- a/lib_com/interleave_spectrum.c +++ b/lib_com/interleave_spectrum.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * interleave_spectrum() diff --git a/lib_com/interpol.c b/lib_com/interpol.c index da4b41a9f9d593c4f7903f1a659d4f1366a78601..4172c4acf7367433db573ef0d1d3c615bdc920b3 100644 --- a/lib_com/interpol.c +++ b/lib_com/interpol.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * interpolation() @@ -70,10 +70,10 @@ float interpolation( for ( i = 0; i < nb_coef; i++ ) { s += ( *x1-- ) * ( *c1 ) + ( *x2++ ) * ( *c2 ); -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP c1 += up_samp; c2 += up_samp; -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } return s; diff --git a/lib_com/isf_dec_amr_wb.c b/lib_com/isf_dec_amr_wb.c index 79eeda7b5464df8acbb1d41f7f32a656b60aa24e..d51731d1c005195f68a932df57fce09dd2d4e4dc 100644 --- a/lib_com/isf_dec_amr_wb.c +++ b/lib_com/isf_dec_amr_wb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * isf_dec_amr_wb() diff --git a/lib_com/ivas_agc_com.c b/lib_com/ivas_agc_com.c index b02853555b0be40eb3a9e173628419269c9ae3ed..e39b8df82d38b2e87b7b046e4b1dd9d5db121265 100644 --- a/lib_com/ivas_agc_com.c +++ b/lib_com/ivas_agc_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "debug.h" #endif #include -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" /*------------------------------------------------------------------------------------------* diff --git a/lib_com/ivas_arith.c b/lib_com/ivas_arith.c index 9edbf5f53c1dd7cd031c1d7466a6d9b82a0c1c78..3b8b75138b5d88880e48435726a258583e821c7f 100644 --- a/lib_com/ivas_arith.c +++ b/lib_com/ivas_arith.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" #include "ivas_prot.h" #include "stat_dec.h" diff --git a/lib_com/ivas_avq_pos_reorder_com.c b/lib_com/ivas_avq_pos_reorder_com.c index 66152d26fd6f84b861bc7190939ed3474030dfe4..6f75fa220129801be54f2a2cb7ac809d86111057 100644 --- a/lib_com/ivas_avq_pos_reorder_com.c +++ b/lib_com/ivas_avq_pos_reorder_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * ordr_esti() diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 422729dfd0ba8e808116a7815aa23b87f5bb0df2..30fd4d97b023e70228dc86a87d6c7b932fce1bab 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -107,8 +107,8 @@ typedef enum AUDIO_CONFIG_ISM2, /* ISM2 */ AUDIO_CONFIG_ISM3, /* ISM3 */ AUDIO_CONFIG_ISM4, /* ISM4 */ - AUDIO_CONFIG_MASA1, /* MASA1 */ - AUDIO_CONFIG_MASA2, /* MASA2 */ + AUDIO_CONFIG_MASA1, /* MASA1 */ // TBV: seems not to be used + AUDIO_CONFIG_MASA2, /* MASA2 */ // TBV: seems not to be used AUDIO_CONFIG_EXTERNAL /* external renderer */ } AUDIO_CONFIG; @@ -191,8 +191,6 @@ typedef enum #define IVAS_MAX_SBA_ORDER 3 /* Maximum supported Ambisonics order */ -#define IVAS_LIMITER_THRESHOLD 32729 /* -0.01 dBFS */ -#define IVAS_LIMITER_ATTACK_SECONDS 0.005f #define IVAS_NUM_SUPPORTED_FS 3 /* number of supported sampling-rates in IVAS */ /*----------------------------------------------------------------------------------* @@ -465,10 +463,8 @@ enum #define STEREO_DFT_OFFSET 1 #define STEREO_DFT_NBDIV 2 -#ifdef FIX_ITD_CNG #define STEREO_DFT_ITD_CNG_XFADE 100 #define STEREO_DFT_ITD_CNG_XFADE_RESET 2 -#endif #define STEREO_DFT_DELAY_DEC_BWE_NS ( STEREO_DFT_OFFSET * STEREO_DFT_HOP_NS - ACELP_LOOK_NS ) /* 1.25ms/2.5ms: max delay for core decoder*/ @@ -524,6 +520,8 @@ typedef enum #define STEREO_DFT_XCORR_LB_MAX 24 +#define STEREO_DFT_IPD_BUF_LEN 5 + #define STEREO_DFT_N_COH_PRED 4 /* Number of intra-frame predictors for coherence vector */ #define STEREO_DFT_COH_PRED_COEFFS 15 /* Number of coefficients per predictor */ #define STEREO_DFT_PRED_NBITS 2 /* Bits to signal predictor (log_2(4) = 2) */ @@ -535,9 +533,7 @@ typedef enum #define STEREO_DFT_SID_GIPD_NBITS 2 #define STEREO_DFT_FD_FILT 0.9f -#ifdef FIX_ITD_CNG #define STEREO_DFT_CNG_ITD_CNT 8 -#endif /*Residual prediction*/ #define STEREO_DFT_PAST_MAX 4 @@ -932,7 +928,7 @@ typedef enum { DIRAC_OPEN, /* initialize to default value */ DIRAC_RECONFIGURE /* HOA3 */ -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING , DIRAC_RECONFIGURE_MODE #endif @@ -1368,10 +1364,16 @@ typedef enum #define BINAURAL_MAXBANDS 60 /* Max number of bands */ #define BINAURAL_CONVBANDS 50 /* Bands upto which convolution is performed */ +#ifdef HRTF_BINARY_FILE +#define BINAURAL_NTAPS 7 +#endif #define BINAURAL_NTAPS_MAX 96 #define HRTF_SH_ORDER 3 #define HRTF_SH_CHANNELS 16 +#ifdef HRTF_BINARY_FILE +#define HRTF_LS_CHANNELS 15 +#endif #define HRTF_NUM_BINS 60 #define REVERB_PREDELAY_MAX 20 /* Max input delay for reverb module */ #define GAIN_LFE 1.88364911f /* Gain applied to LFE during renderering */ @@ -1380,6 +1382,17 @@ typedef enum #define BINAURAL_COHERENCE_DIFFERENCE_BINS 9 /* Number of bins for direction-dependent diffuse-field binaural coherence */ +#ifdef HRTF_BINARY_FILE +typedef enum +{ + BINAURAL_INPUT_AUDIO_CONFIG_INVALID, + BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, // 5_1, 5_1_2, 5_1_4, 7_1, 7_1_4 + BINAURAL_INPUT_AUDIO_CONFIG_HOA, // FOA, HOA2, HOA3 + BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED // Not used + +} BINAURAL_INPUT_AUDIO_CONFIG; + +#endif #define HEADROT_ORDER 3 #define HEADROT_SHMAT_DIM ( ( HEADROT_ORDER + 1 ) * ( HEADROT_ORDER + 1 ) ) #define HEADROT_SHMAT_DIM2 ( HEADROT_SHMAT_DIM * HEADROT_SHMAT_DIM ) @@ -1388,7 +1401,7 @@ typedef enum * TD Binaural Object renderer *----------------------------------------------------------------------------------*/ -#define MAX_NUM_TDREND_CHANNELS 16 /* max. number of channels in TD renderer (objects or loudspeaker channels) */ +#define MAX_NUM_TDREND_CHANNELS MAX_CICP_CHANNELS /* max. number of channels in TD renderer (objects or loudspeaker channels) */ #define SFX_SPAT_BIN_MAX_NO_OF_OUTPUT_SAMPLES 288 /* 288 = 6 msec @ 48 kHz. */ #define HRTF_MODEL_N_SECTIONS 3 /* No. sections used in approximate evaluation of model */ @@ -1397,18 +1410,20 @@ typedef enum #define SFX_SPAT_BIN_MAX_FILTER_LENGTH 256 #define SPAT_BIN_MAX_INPUT_CHANNELS 1 /* Max number of input channels per source/object. Mono for now, but stereo objects may be considered. */ -#ifdef FIX_ITD #define MAX_ITD 50 #define SFX_SPAT_BIN_SINC_M 5 #define SFX_SPAT_BIN_NUM_SUBSAMPLES 64 #define ITD_MEM_LEN (MAX_ITD + SFX_SPAT_BIN_SINC_M) #define L_SUBFRAME5MS_48k (L_FRAME48k/4) +#ifdef FIX_337_TDREND_INTP +#define MAX_ANGULAR_STEP (1.0f) +#else #define MAX_ANGULAR_STEP (15.0f) +#endif #define MAX_ANGULAR_STEP_INV ( 1.0f / MAX_ANGULAR_STEP ) #define MAX_INTERPOLATION_STEPS 12 +#ifndef FIX_310_TD_REND_DELAY #define BINAURAL_TD_LATENCY_S 0.0f /* ITD fix removes TD renderer delay -- should be cleaned out */ -#else -#define BINAURAL_TD_LATENCY_S 0.00675f /* Binaural TD renderer latency in second == 324 samples in between 333 and 315 */ #endif /* ----- Enums - TD Renderer ----- */ @@ -1441,11 +1456,6 @@ typedef enum typedef enum { TDREND_HRFILT_Method_BSplineModel -#ifdef TDREND_HRTF_TABLE_METHODS - , - TDREND_HRFILT_Method_Table_F, - TDREND_HRFILT_Method_Table_S -#endif } TDREND_HRFILT_Method_t; typedef enum @@ -1485,8 +1495,6 @@ typedef enum #define RV_LENGTH_NR_FC ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1 #define IVAS_REVERB_DEFAULT_N_BANDS 31 -#define IVAS_REVERB_DEFAULT_PRE_DELAY 0.016f -#define IVAS_REVERB_DEFAULT_INPUT_DELAY 0.1f /*----------------------------------------------------------------------------------* @@ -1607,6 +1615,15 @@ typedef enum #define SPAR_DIRAC_DTX_BANDS ( SPAR_DTX_BANDS + DIRAC_DTX_BANDS ) #define CLDFB_PAR_WEIGHT_START_BAND 7 + +/*----------------------------------------------------------------------------------* + * Limiter constants + *----------------------------------------------------------------------------------*/ + +#define IVAS_LIMITER_THRESHOLD 32729 /* -0.01 dBFS */ +#define IVAS_LIMITER_ATTACK_SECONDS 0.005f + + #endif /* clang-format on */ /* IVAS_CNST_H */ diff --git a/lib_com/ivas_cov_smooth.c b/lib_com/ivas_cov_smooth.c index eaaec6a9821d9b554aa7e1f63cd7a1207aa796e0..90be8b53853740b72bf8b1c9daa51df03af81de4 100644 --- a/lib_com/ivas_cov_smooth.c +++ b/lib_com/ivas_cov_smooth.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "debug.h" #endif #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" @@ -93,12 +93,12 @@ ivas_error ivas_spar_covar_smooth_enc_open( ivas_cov_smooth_state_t *hCovState; int16_t i, j; - if ( ( hCovState = (ivas_cov_smooth_state_t *) count_malloc( sizeof( ivas_cov_smooth_state_t ) ) ) == NULL ) + if ( ( hCovState = (ivas_cov_smooth_state_t *) malloc( sizeof( ivas_cov_smooth_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV encoder" ); } - if ( ( hCovState->pSmoothing_factor = (float *) count_malloc( sizeof( float ) * cov_smooth_cfg->max_bands ) ) == NULL ) + if ( ( hCovState->pSmoothing_factor = (float *) malloc( sizeof( float ) * cov_smooth_cfg->max_bands ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV encoder" ); } @@ -107,7 +107,7 @@ ivas_error ivas_spar_covar_smooth_enc_open( { for ( j = 0; j < nchan_inp; j++ ) { - if ( ( hCovState->pPrior_cov_real[i][j] = (float *) count_malloc( sizeof( float ) * cov_smooth_cfg->max_bands ) ) == NULL ) + if ( ( hCovState->pPrior_cov_real[i][j] = (float *) malloc( sizeof( float ) * cov_smooth_cfg->max_bands ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV encoder" ); } @@ -141,19 +141,19 @@ void ivas_spar_covar_smooth_enc_close( if ( hCovState != NULL ) { - count_free( hCovState->pSmoothing_factor ); + free( hCovState->pSmoothing_factor ); hCovState->pSmoothing_factor = NULL; for ( i = 0; i < nchan_inp; i++ ) { for ( j = 0; j < nchan_inp; j++ ) { - count_free( hCovState->pPrior_cov_real[i][j] ); + free( hCovState->pPrior_cov_real[i][j] ); hCovState->pPrior_cov_real[i][j] = NULL; } } - count_free( hCovState ); + free( hCovState ); hCovState_out = NULL; } diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index afb71a727898deeda4428000eeae55dc69b146d0..01f133a3b7f2fc2d6bd0c5e24ef94419c0dca733 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_prot.h" #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* diff --git a/lib_com/ivas_entropy_coder_common.c b/lib_com/ivas_entropy_coder_common.c index 1bc72598e2734fa51940ca33ae269bfd1a1f187b..3b4b0142dcb9c8d1431c0aa3230797ad74c8fb6e 100644 --- a/lib_com/ivas_entropy_coder_common.c +++ b/lib_com/ivas_entropy_coder_common.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_rom_com.h" #include "math.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------------------------* diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 07458f6b388d78acf3330e1e1f552adbce2954a2..6503249b342eb0f063865d7d3de97a75e686bb3b 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -81,6 +81,7 @@ typedef enum IVAS_ERR_INVALID_INDEX, IVAS_ERR_NOT_SUPPORTED_OPTION, IVAS_ERR_NOT_IMPLEMENTED, + IVAS_ERR_WAITING_FOR_BITSTREAM, IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH, IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT, IVAS_ERR_ISM_INVALID_METADATA_VALUE, diff --git a/lib_com/ivas_error_utils.h b/lib_com/ivas_error_utils.h index 412bd075b49c3e7fd575c905e636462345b3bc74..034369656bc8e54c703e986e3479a514eafa1c2b 100644 --- a/lib_com/ivas_error_utils.h +++ b/lib_com/ivas_error_utils.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/ivas_fb_mixer.c b/lib_com/ivas_fb_mixer.c index 84bbdf09035a082a9e9884a0b0a120fc88c43d4c..5787470e0fbfef766b2b14b562e2800f60befd75 100644 --- a/lib_com/ivas_fb_mixer.c +++ b/lib_com/ivas_fb_mixer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* @@ -110,7 +110,7 @@ ivas_error ivas_fb_set_cfg( { IVAS_FB_CFG *pFb_cfg; - if ( ( pFb_cfg = (IVAS_FB_CFG *) count_malloc( sizeof( IVAS_FB_CFG ) ) ) == NULL ) + if ( ( pFb_cfg = (IVAS_FB_CFG *) malloc( sizeof( IVAS_FB_CFG ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer config" ); } @@ -187,14 +187,14 @@ ivas_error ivas_FB_mixer_open( frame_len = (int16_t) ( sampling_rate / FRAMES_PER_SEC ); - if ( ( hFbMixer = (IVAS_FB_MIXER_HANDLE) count_malloc( sizeof( IVAS_FB_MIXER_DATA ) ) ) == NULL ) + if ( ( hFbMixer = (IVAS_FB_MIXER_HANDLE) malloc( sizeof( IVAS_FB_MIXER_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } if ( fb_cfg->num_out_chans > 0 ) { - if ( ( hFbMixer->pFb = (ivas_filterbank_t *) count_malloc( sizeof( ivas_filterbank_t ) ) ) == NULL ) + if ( ( hFbMixer->pFb = (ivas_filterbank_t *) malloc( sizeof( ivas_filterbank_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } @@ -227,12 +227,12 @@ ivas_error ivas_FB_mixer_open( { j = fb_cfg->remix_order[i]; - if ( ( hFbMixer->ppFilterbank_inFR_re[j] = (float *) count_malloc( sizeof( float ) * frame_len ) ) == NULL ) + if ( ( hFbMixer->ppFilterbank_inFR_re[j] = (float *) malloc( sizeof( float ) * frame_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } - if ( ( hFbMixer->ppFilterbank_inFR_im[j] = (float *) count_malloc( sizeof( float ) * frame_len ) ) == NULL ) + if ( ( hFbMixer->ppFilterbank_inFR_im[j] = (float *) malloc( sizeof( float ) * frame_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } @@ -249,7 +249,7 @@ ivas_error ivas_FB_mixer_open( } for ( i = 0; i < num_chs_alloc; i++ ) { - if ( ( hFbMixer->ppFilterbank_prior_input[i] = (float *) count_malloc( sizeof( float ) * fb_cfg->prior_input_length ) ) == NULL ) + if ( ( hFbMixer->ppFilterbank_prior_input[i] = (float *) malloc( sizeof( float ) * fb_cfg->prior_input_length ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } @@ -260,7 +260,7 @@ ivas_error ivas_FB_mixer_open( { float *pTemp_mem; - if ( ( pTemp_mem = (float *) count_malloc( sizeof( float ) * fb_cfg->num_out_chans * fb_cfg->num_in_chans * IVAS_MAX_NUM_BANDS ) ) == NULL ) + if ( ( pTemp_mem = (float *) malloc( sizeof( float ) * fb_cfg->num_out_chans * fb_cfg->num_in_chans * IVAS_MAX_NUM_BANDS ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer" ); } @@ -287,7 +287,7 @@ ivas_error ivas_FB_mixer_open( { for ( i = 0; i < num_bands; i++ ) { - if ( ( hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = (float *) count_malloc( sizeof( float ) * pActive_bins_per_band_abs[i] ) ) == NULL ) + if ( ( hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = (float *) malloc( sizeof( float ) * pActive_bins_per_band_abs[i] ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } @@ -305,12 +305,12 @@ ivas_error ivas_FB_mixer_open( for ( j = start_diff_band_non48k; j < num_bands; j++ ) { - if ( ( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[0][j] = (float *) count_malloc( sizeof( float ) * pActive_bins_per_band[j] ) ) == NULL ) + if ( ( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[0][j] = (float *) malloc( sizeof( float ) * pActive_bins_per_band[j] ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } - if ( ( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[1][j] = (float *) count_malloc( sizeof( float ) * pActive_bins_per_band[j] ) ) == NULL ) + if ( ( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[1][j] = (float *) malloc( sizeof( float ) * pActive_bins_per_band[j] ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } @@ -377,10 +377,10 @@ void ivas_FB_mixer_close( { j = fb_cfg->remix_order[i]; - count_free( hFbMixer->ppFilterbank_inFR_re[j] ); + free( hFbMixer->ppFilterbank_inFR_re[j] ); hFbMixer->ppFilterbank_inFR_re[j] = NULL; - count_free( hFbMixer->ppFilterbank_inFR_im[j] ); + free( hFbMixer->ppFilterbank_inFR_im[j] ); hFbMixer->ppFilterbank_inFR_im[j] = NULL; } } @@ -395,13 +395,13 @@ void ivas_FB_mixer_close( } for ( i = 0; i < num_chs_alloc; i++ ) { - count_free( hFbMixer->ppFilterbank_prior_input[i] ); + free( hFbMixer->ppFilterbank_prior_input[i] ); hFbMixer->ppFilterbank_prior_input[i] = NULL; } if ( ( fb_cfg->active_w_mixing != -1 ) && ( fb_cfg->num_out_chans > 0 ) ) { - count_free( hFbMixer->prior_mixer[0][0] ); + free( hFbMixer->prior_mixer[0][0] ); hFbMixer->prior_mixer[0][0] = NULL; } @@ -413,7 +413,7 @@ void ivas_FB_mixer_close( { for ( i = 0; i < num_bands; i++ ) { - count_free( hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] ); + free( hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] ); hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = NULL; } } @@ -425,10 +425,10 @@ void ivas_FB_mixer_close( for ( j = start_diff_band_non48k; j < num_bands; j++ ) { - count_free( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[0][j] ); + free( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[0][j] ); hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[0][j] = NULL; - count_free( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[1][j] ); + free( hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[1][j] ); hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[1][j] = NULL; } } @@ -436,17 +436,17 @@ void ivas_FB_mixer_close( if ( hFbMixer->pFb != NULL ) { - count_free( hFbMixer->pFb ); + free( hFbMixer->pFb ); hFbMixer->pFb = NULL; } if ( hFbMixer->fb_cfg != NULL ) { - count_free( hFbMixer->fb_cfg ); + free( hFbMixer->fb_cfg ); hFbMixer->fb_cfg = NULL; } - count_free( hFbMixer ); + free( hFbMixer ); hFbMixer = NULL; } diff --git a/lib_com/ivas_filters.c b/lib_com/ivas_filters.c index 898ba7fe896ddd2b031f849d583229e060834233..d89370e7951c9a45b9ebaeeb9ab56b2786c3fd29 100644 --- a/lib_com/ivas_filters.c +++ b/lib_com/ivas_filters.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "ivas_prot.h" #include "ivas_cnst.h" #include "ivas_stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* diff --git a/lib_com/ivas_ism_config.c b/lib_com/ivas_ism_config.c index 75ef0a2ae7a789310abe5f3ec0fab03e0659ccb4..b22d82a9da0c1dc1cade26bcaa9919b6b28c32a2 100644 --- a/lib_com/ivas_ism_config.c +++ b/lib_com/ivas_ism_config.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -199,11 +199,7 @@ ivas_error ivas_ism_config( diff = 0; for ( ch = 0; ch < n_ISms; ch++ ) { -#ifdef FIX_ISM_INACTIVE_BITS int16_t limit; -#else - int32_t limit; -#endif limit = MIN_BRATE_SWB_BWE / FRMS_PER_SECOND; if ( element_brate[ch] < MIN_BRATE_SWB_STEREO ) /* replicate function set_bw() -> check the coded audio band-width */ @@ -223,20 +219,12 @@ ivas_error ivas_ism_config( else if ( ism_imp[ch] == ISM_LOW_IMP ) { tmp = (int16_t) ( BETA_ISM_LOW_IMP * bits_CoreCoder[ch] ); -#ifdef FIX_ISM_INACTIVE_BITS tmp = max( limit, tmp ); -#else - tmp = (int16_t) max( limit, bits_CoreCoder[ch] - tmp ); -#endif } else if ( ism_imp[ch] == ISM_MEDIUM_IMP ) { tmp = (int16_t) ( BETA_ISM_MEDIUM_IMP * bits_CoreCoder[ch] ); -#ifdef FIX_ISM_INACTIVE_BITS tmp = max( limit, tmp ); -#else - tmp = (int16_t) max( limit, bits_CoreCoder[ch] - tmp ); -#endif } else /* ism_imp[ch] == ISM_HIGH_IMP */ { diff --git a/lib_com/ivas_masa_com.c b/lib_com/ivas_masa_com.c index f98dcd8414a94f1b52c4b04337e0d5d4b3321e7b..421b2882f4022f10e68722422dd9aef94dbb6173 100644 --- a/lib_com/ivas_masa_com.c +++ b/lib_com/ivas_masa_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- * Local constants diff --git a/lib_com/ivas_mc_com.c b/lib_com/ivas_mc_com.c index a6ee0069ffff3b9b3d68f8dd7ddccf1ff1a5d0ae..1b3e00adb06c0eed2e8f4ff518cddb249ec7944b 100644 --- a/lib_com/ivas_mc_com.c +++ b/lib_com/ivas_mc_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- diff --git a/lib_com/ivas_mc_param_com.c b/lib_com/ivas_mc_param_com.c index 3690c1219f84e50bf0db2f074d9aad3d83bfb9ad..502f33b2b487da863c688ae6526d5079c4269368 100644 --- a/lib_com/ivas_mc_param_com.c +++ b/lib_com/ivas_mc_param_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -218,7 +218,7 @@ void ivas_param_mc_metadata_close( { if ( hMetadataPMC->icc_map_full[i] ) { - count_free( hMetadataPMC->icc_map_full[i] ); + free( hMetadataPMC->icc_map_full[i] ); hMetadataPMC->icc_map_full[i] = NULL; } } @@ -276,7 +276,7 @@ void ivas_param_mc_create_full_icc_mapping( /* allocate memory for the map */ for ( i = 0; i < 2; i++ ) { - icc_map[i] = (int16_t *) count_malloc( *icc_map_size_full * sizeof( int16_t ) ); + icc_map[i] = (int16_t *) malloc( *icc_map_size_full * sizeof( int16_t ) ); } /* create map (non-LFE ICCs) */ @@ -330,6 +330,98 @@ void ivas_param_mc_default_icc_map( } +/*------------------------------------------------------------------------- + * ivas_param_mc_get_num_param_bands() + * + * + *------------------------------------------------------------------------*/ + +static int16_t ivas_param_mc_get_num_param_bands( + const MC_LS_SETUP mc_ls_setup, /* i : MC ls setup */ + const int32_t ivas_total_brate /* i : IVAS total bitrate */ +) +{ + int16_t num_parameter_bands; + + num_parameter_bands = 0; + + /* parameter bands */ + switch ( mc_ls_setup ) + { + case MC_LS_SETUP_5_1: + switch ( ivas_total_brate ) + { + case IVAS_48k: + num_parameter_bands = 10; + break; + case IVAS_64k: + case IVAS_80k: + num_parameter_bands = 14; + break; + default: + assert( 0 && "PARAM_MC: bitrate for CICP6 not supported!" ); + } + break; + + case MC_LS_SETUP_7_1: + switch ( ivas_total_brate ) + { + case IVAS_48k: + num_parameter_bands = 10; + break; + case IVAS_64k: + case IVAS_80k: + num_parameter_bands = 14; + break; + case IVAS_96k: + num_parameter_bands = 20; + break; + } + break; + case MC_LS_SETUP_5_1_2: + switch ( ivas_total_brate ) + { + case IVAS_48k: + num_parameter_bands = 10; + break; + case IVAS_64k: + case IVAS_80k: + num_parameter_bands = 14; + break; + case IVAS_96k: + num_parameter_bands = 20; + break; + } + break; + case MC_LS_SETUP_5_1_4: + switch ( ivas_total_brate ) + { + case IVAS_96k: + num_parameter_bands = 14; + break; + case IVAS_128k: + num_parameter_bands = 20; + break; + } + break; + case MC_LS_SETUP_7_1_4: + switch ( ivas_total_brate ) + { + case IVAS_128k: + num_parameter_bands = 20; + break; + case IVAS_160k: + num_parameter_bands = 20; + break; + } + break; + default: + assert( 0 && "PARAM_MC: channel configuration not supportet!" ); + } + + return num_parameter_bands; +} + /*------------------------------------------------------------------------- * Local functions *------------------------------------------------------------------------*/ @@ -427,79 +519,6 @@ static void ivas_param_mc_set_coding_scheme( assert( 0 && "PARAM_MC: channel configuration not supported!" ); } - /* parameter bands */ - switch ( mc_ls_setup ) - { - case MC_LS_SETUP_5_1: - switch ( ivas_total_brate ) - { - case IVAS_48k: - hMetadataPMC->num_parameter_bands = 10; - break; - case IVAS_64k: - case IVAS_80k: - hMetadataPMC->num_parameter_bands = 14; - break; - default: - assert( 0 && "PARAM_MC: bitrate for CICP6 not supported!" ); - } - break; - - case MC_LS_SETUP_7_1: - switch ( ivas_total_brate ) - { - case IVAS_48k: - hMetadataPMC->num_parameter_bands = 10; - break; - case IVAS_64k: - case IVAS_80k: - hMetadataPMC->num_parameter_bands = 14; - break; - case IVAS_96k: - hMetadataPMC->num_parameter_bands = 20; - break; - } - break; - case MC_LS_SETUP_5_1_2: - switch ( ivas_total_brate ) - { - case IVAS_48k: - hMetadataPMC->num_parameter_bands = 10; - break; - case IVAS_64k: - case IVAS_80k: - hMetadataPMC->num_parameter_bands = 14; - break; - case IVAS_96k: - hMetadataPMC->num_parameter_bands = 20; - break; - } - break; - case MC_LS_SETUP_5_1_4: - switch ( ivas_total_brate ) - { - case IVAS_96k: - hMetadataPMC->num_parameter_bands = 14; - break; - case IVAS_128k: - hMetadataPMC->num_parameter_bands = 20; - break; - } - break; - case MC_LS_SETUP_7_1_4: - switch ( ivas_total_brate ) - { - case IVAS_128k: - hMetadataPMC->num_parameter_bands = 20; - break; - case IVAS_160k: - hMetadataPMC->num_parameter_bands = 20; - break; - } - break; - default: - assert( 0 && "PARAM_MC: channel configuration not supportet!" ); - } - + hMetadataPMC->num_parameter_bands = ivas_param_mc_get_num_param_bands( mc_ls_setup, ivas_total_brate ); return; } diff --git a/lib_com/ivas_mcmasa_com.c b/lib_com/ivas_mcmasa_com.c index 2441cf7973792d920a5b72a94ecf98317ba1356f..27becd16a8c688d21d7c72098c8a2a51fd827408 100644 --- a/lib_com/ivas_mcmasa_com.c +++ b/lib_com/ivas_mcmasa_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* @@ -91,24 +91,41 @@ void ivas_mcmasa_set_separate_channel_mode( return; } + /*--------------------------------------------------------------------------* - * ivas_mcmasa_mono_brate() + * ivas_mcmasa_split_brate() * - * Set SCE bitrate for McMASA mono separated channel + * Split the total bitrate to elements in McMASA *--------------------------------------------------------------------------*/ -/*! r: McMASA SCE bitrate */ -int32_t ivas_mcmasa_mono_brate( - const int32_t ivas_total_brate /* i : IVAS total bitrate */ +void ivas_mcmasa_split_brate( + const uint8_t separateChannelEnabled, /* i : Transport running in "separate channel" mode */ + const int32_t ivas_total_brate, /* i : Total bitrate available to be split */ + const int16_t nSCE, /* i : Number of SCEs in use (0 or 1) */ + const int16_t nCPE, /* i : Number of CPEs in use (0 or 1) */ + int32_t *brate_sce, /* o : Pointer to SCE element bitrate */ + int32_t *brate_cpe /* o : Pointer to CPE element bitrate */ ) { - /* 25% of total bitrate is used for SCE below 96 kb/s (separated mono channel), otherwise 30% */ - if ( ivas_total_brate < IVAS_96k ) + if ( separateChannelEnabled ) { - return ( const int32_t )( MCMASA_MONOBITRATIO_64k * ivas_total_brate ); + /* 25% of total bitrate is used for SCE below 96 kb/s (separated mono channel), otherwise 30% */ + if ( ivas_total_brate < IVAS_96k ) + { + *brate_sce = (int32_t) ( MCMASA_MONOBITRATIO_64k * ivas_total_brate ); + } + else + { + *brate_sce = (int32_t) ( MCMASA_MONOBITRATIO * ivas_total_brate ); + } + + *brate_cpe = ivas_total_brate - *brate_sce; } else { - return ( const int32_t )( MCMASA_MONOBITRATIO * ivas_total_brate ); + *brate_sce = nSCE > 0 ? ivas_total_brate / ( nCPE + nSCE ) : 0; + *brate_cpe = nCPE > 0 ? ivas_total_brate / ( nCPE + nSCE ) : 0; } + + return; } diff --git a/lib_com/ivas_mct_com.c b/lib_com/ivas_mct_com.c index 97d7636a036a2fcbd4d912d50aefcfceb953b10b..01dd1721192e961909c59fc43a5629260e33b454 100644 --- a/lib_com/ivas_mct_com.c +++ b/lib_com/ivas_mct_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #include "ivas_cnst.h" #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include diff --git a/lib_com/ivas_mdct_core_com.c b/lib_com/ivas_mdct_core_com.c index fd80b2d0547f92ebaec5ef7e06dca424ef405c24..afb5303a7aa82c774655b53c89546ef91656433a 100644 --- a/lib_com/ivas_mdct_core_com.c +++ b/lib_com/ivas_mdct_core_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #include "ivas_cnst.h" #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * ivas_mdct_tcx10_bit_distribution() diff --git a/lib_com/ivas_mdct_imdct.c b/lib_com/ivas_mdct_imdct.c index 036f89201fb72f09a491a14b25aad764e6a4470a..5580973ed02eba244e3d2050d1e403598e34dc7c 100644 --- a/lib_com/ivas_mdct_imdct.c +++ b/lib_com/ivas_mdct_imdct.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,19 +38,20 @@ #include "debug.h" #endif #include "ivas_stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* * Local constants *------------------------------------------------------------------------------------------*/ + #define IVAS_IMDCT_SCALING_GAIN 2115.165304808f /*-----------------------------------------------------------------------------------------* * Function ivas_tda() * - * Time domain alias implementation + * Time domain aliasing *-----------------------------------------------------------------------------------------*/ void ivas_tda( @@ -67,6 +68,8 @@ void ivas_tda( pOut[i] = -pIn[len_by_2 - i - 1] + pIn[len_by_2 + i]; pOut[len_by_2 + i] = pIn[length * 2 - i - 1] + pIn[length + i]; } + + return; } diff --git a/lib_com/ivas_mdft_imdft.c b/lib_com/ivas_mdft_imdft.c index 61797d6746defa488ae35dc037f3607b59d9a5a4..e6f276575e1bc9672abd30b6be0c414e2bd9498d 100644 --- a/lib_com/ivas_mdft_imdft.c +++ b/lib_com/ivas_mdft_imdft.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #endif #include "ivas_rom_com.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------------------------* diff --git a/lib_com/ivas_pca_tools.c b/lib_com/ivas_pca_tools.c index 21f3c0c1ecec0f0509d50a80db22aaec7094d582..63285dabb10afe8a6a03c277d0ae8343a223caf8 100644 --- a/lib_com/ivas_pca_tools.c +++ b/lib_com/ivas_pca_tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include #include #include "ivas_rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 8885c60f3e82ee8c39adc11223efa6f988f2c2cc..a472ba211669682504470cbe3a9e7ed2086a7cf8 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,6 +40,9 @@ #include "stat_enc.h" #include "stat_dec.h" #include "stat_com.h" +#ifdef FIX_197_CREND_INTERFACE +#include "ivas_stat_rend.h" +#endif #include "ivas_stat_enc.h" #include "ivas_stat_dec.h" #include "ivas_stat_com.h" @@ -105,21 +108,23 @@ ivas_error mct_enc_reconfigure( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const uint16_t b_nchan_change /* i : flag indicating different channel count */ ); +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING ivas_error ivas_sba_enc_reinit( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #endif +#endif +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING int16_t get_sba_reinit_flag( int32_t ivas_total_bitrate, /* i : Current bitrate */ int32_t last_ivas_total_brate /* i : Previous bitrate */ -#ifdef SBA_BR_SWITCHING_2 , int16_t sba_order -#endif ); #endif -#ifdef SBA_BR_SWITCHING_2 +#endif +#ifdef SBA_BR_SWITCHING ivas_error ivas_spar_md_enc_init ( ivas_spar_md_enc_state_t *hMdEnc, /* o : MD encoder handle */ @@ -147,7 +152,10 @@ ivas_error ivas_corecoder_enc_reconfig( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ const int16_t nCPE_old, /* i : number of CPEs in previous frame */ - const int16_t nchan_transport_old /* i : number of TCs in previous frame */ + const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ + const int32_t brate_SCE, /* i : bitrate to be set for the SCEs */ + const int32_t brate_CPE, /* i : bitrate to be set for the CPEs */ + const MC_MODE last_mc_mode /* i : switching between MC modes: last mode */ ); ivas_error ivas_sce_enc( @@ -183,7 +191,6 @@ ivas_error pre_proc_front_ivas( const int16_t n, /* i : channel number */ float old_inp_12k8[], /* o : buffer of old input signal */ float old_inp_16k[], /* o : buffer of old input signal @16kHz */ - float *Etot, /* o : total energy */ float *ener, /* o : residual energy from Levinson-Durbin */ float *relE, /* o : frame relative energy */ float A[NB_SUBFR16k * ( M + 1 )], /* o : A(z) unquantized for the 4 subframes */ @@ -215,8 +222,9 @@ ivas_error pre_proc_front_ivas( const int16_t flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz */ const int16_t front_vad_flag, /* i : front-VAD flag to overwrite VAD decision */ const int16_t force_front_vad, /* i : flag to force VAD decision */ - const int16_t front_vad_dtx_flag /* i : front-VAD DTX flag to overwrite VAD decision*/ - ,const int32_t ivas_total_brate /* i : IVAS total bitrate */ + const int16_t front_vad_dtx_flag, /* i : front-VAD DTX flag to overwrite VAD decision*/ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + const int16_t ivas_format /* i : IVAS format */ ); ivas_error pre_proc_ivas( @@ -351,9 +359,11 @@ void ivas_mct_dec_close( ivas_error ivas_corecoder_dec_reconfig( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ - const int16_t nCPE_old, /* i : number of CPEs in previous frame */ - const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ - const int16_t sba_dirac_stereo_flag_old /* i : signal stereo output for SBA DirAC in previous frame */ + int16_t nCPE_old, /* i : number of CPEs in previous frame */ + const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ + const int16_t sba_dirac_stereo_flag_old, /* i : signal stereo rendering using DFT upmix in previous frame */ + const int32_t brate_SCE, /* i : bitrate to be set for the SCEs */ + const int32_t brate_CPE /* i : bitrate to be set for the CPEs */ ); ivas_error ivas_hp20_dec_reconfig( @@ -413,7 +423,6 @@ ivas_error ivas_core_enc( const int16_t n_CoreChannels, /* i : number of core channels to be coded */ float old_inp_12k8[CPE_CHANNELS][L_INP_12k8], /* i : buffer of old input signal */ float old_inp_16k[CPE_CHANNELS][L_INP], /* i : buffer of old input signal */ - const float Etot[CPE_CHANNELS], /* i : total energy */ float ener[CPE_CHANNELS], /* i : residual energy from Levinson-Durbin */ float A[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes */ float Aw[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquantized for subframes */ @@ -621,6 +630,13 @@ void set_transient_stereo( float currFlatness[] /* i/o: current flatness */ ); +/*! r: preliminary flag to force ACELP */ +int16_t transient_analysis( + TRAN_DET_HANDLE hTranDet, /* i : handle transient detection */ + const float cor_map_LT[], /* i : LT correlation map */ + const float multi_harm_limit /* i : multi harminic threshold */ +); + void ivas_post_proc( SCE_DEC_HANDLE hSCE, /* i/o: SCE decoder structure */ CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */ @@ -735,6 +751,39 @@ void ivas_imdft( const int16_t length /* i : signal length */ ); +void TonalMdctConceal_create_concealment_noise( + float concealment_noise[L_FRAME48k], + CPE_DEC_HANDLE hCPE, + const int16_t L_frameTCX, + const int16_t L_frame, + const int16_t idchan, + const int16_t subframe_idx, + const int16_t core, + const float crossfade_gain, + const TONALMDCTCONC_NOISE_GEN_MODE noise_gen_mode +); + +void TonalMdctConceal_whiten_noise_shape( + Decoder_State *st, + const int16_t L_frame, + const TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE +); + +/*! r: IGF start line */ +int16_t get_igf_startline( + Decoder_State *st, /* i : decoder state */ + const int16_t L_frame, /* i : length of the frame */ + const int16_t L_frameTCX /* i : full band frame length */ +); + +float rand_triangular_signed( + int16_t *seed ); + +void dtx_read_padding_bits( + DEC_CORE_HANDLE st, + const int16_t num_bits +); + /*----------------------------------------------------------------------------------* * ISm prototypes @@ -934,10 +983,8 @@ float stereo_dft_enc_synthesize( void stereo_dft_enc_process( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ -#ifdef FIX_ITD_CNG const int16_t vad_flag_dtx[], /* i: VAD dtx flags */ const int16_t vad_hover_flag[], /* i: VAD hangover flags */ -#endif const int16_t input_frame /* i : input frame length */ ); @@ -986,11 +1033,7 @@ void stereo_dft_dequantize_itd( void stereo_dft_enc_sid_calc_coh( STEREO_DFT_ENC_DATA_HANDLE hStereoDft, /* i/o: DFT stereo handle */ -#ifdef FIX_ITD_CNG float prev_cohBand[2*(STEREO_DFT_BAND_MAX/2)], /* i/o: Previous coherence */ -#else - float coh_crossfade[STEREO_DFT_BAND_MAX / 2], /* i/o: Coherence crossfade memory */ -#endif int16_t *td_active, /* i/o: TD stereo mode indicator */ int16_t *first_SID, /* i/o: First SID indicator */ float *cohBand /* i/o: Coherence per band */ @@ -1157,12 +1200,9 @@ void stereo_dft_dec_read_BS( void stereo_dft_dec_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle */ - const int16_t prev_sid_nodata /* i : Previous SID/No data indicator */ -#ifdef FIX_ITD_CNG - , + const int16_t prev_sid_nodata, /* i : Previous SID/No data indicator */ const int16_t active_frame_counter, /* i : Active frame counter */ const int32_t element_brate /* i : Element bitrate */ -#endif ); void stereo_dft_generate_res_pred( @@ -1318,10 +1358,8 @@ void stereo_dft_enc_compute_itd( float *DFT_R, const int16_t k_offset, const int16_t input_frame, -#ifdef FIX_ITD_CNG const int16_t vad_flag_dtx[], const int16_t vad_hover_flag[], -#endif float *bin_nrgL, float *bin_nrgR ); @@ -1738,6 +1776,7 @@ void tdm_ol_pitch_comparison( void tdm_configure_enc( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ + const float Etot_last[CPE_CHANNELS], /* i/o: Energy of last frame */ const int16_t tdm_SM_or_LRTD_Pri, /* i : channel combination scheme flag in TD stereo OR LRTD primary channel */ const int16_t tdm_ratio_idx, /* i : ratio index */ const int16_t tdm_ratio_idx_SM, /* i : ratio index in SM mode */ @@ -1877,10 +1916,8 @@ void deindex_lvq_SHB( void stereo_td_itd_mdct_stereo( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder handle */ -#ifdef FIX_ITD_CNG const int16_t vad_flag_dtx[], /* i: VAD dtx flags */ const int16_t vad_hover_flag[], /* i: VAD hangover flags */ -#endif const int16_t input_frame /* i : frame length */ ); @@ -2439,11 +2476,8 @@ void stereo_cng_upd_counters( const int32_t element_mode, /* i : element mode */ const int16_t nbands, /* i : Number of bands in active */ const float sidSideGain[], /* i : SID side gains */ - const int16_t burst_ho_count /* i : Hang-over count */ -#ifdef FIX_ITD_CNG - , + const int16_t burst_ho_count, /* i : Hang-over count */ int16_t *coh_fade_counter /* i : Coherence fade counter */ -#endif ); void stereo_cng_init_dec( @@ -2602,6 +2636,7 @@ ivas_error stereo_memory_dec( const int16_t nb_bits_metadata, /* i : number of metadata bits */ const int32_t output_Fs, /* i : output sampling rate */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const MC_MODE mc_mode, /* i : MC mode */ const int16_t nchan_transport /* i : number of transport channels */ ); @@ -2674,11 +2709,8 @@ void ivas_mct_core_enc( const int16_t nChannels, /* i : number of channels to be coded */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t switch_bw, /* i : flag bandwidth switch occurance */ - const int16_t lfe_bits /* i : bits spent for LFE */ -#ifdef FIX_I1_113 - , + const int16_t lfe_bits, /* i : bits spent for LFE */ const int16_t sba_order /* i : Ambisonic (SBA) order */ -#endif ); void ivas_mdct_quant_coder( @@ -3076,13 +3108,12 @@ void ivas_dirac_param_est_enc( float data_f[][L_FRAME48k], float **pp_fr_real, float **pp_fr_imag, - const int16_t input_frame - , + const int16_t input_frame, const SBA_MODE sba_mode ); /*----------------------------------------------------------------------------------* - * SBA mode prototypes + * SBA format prototypes *----------------------------------------------------------------------------------*/ /*! r: SBA format mode */ @@ -3100,15 +3131,17 @@ void ivas_sba_config( int16_t *nCPE, /* o : number of CPEs */ int16_t *element_mode /* o : element mode of the core coder */ ); + +ivas_error ivas_sba_dec_reconfigure( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +); +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING ivas_error ivas_sba_dec_reinit( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif - -ivas_error ivas_sba_dec_reconfigure( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -); +#endif void ivas_init_dec_get_num_cldfb_instances( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ @@ -3116,14 +3149,12 @@ void ivas_init_dec_get_num_cldfb_instances( int16_t *numCldfbSyntheses /* o : number of CLDFB synthesis instances */ ); -#ifdef BRATE_SWITCHING_RENDERING ivas_error ivas_cldfb_dec_reconfig( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ int16_t numCldfbAnalyses_old, /* i : number of CLDFB analysis instances in previous frame */ const int16_t numCldfbSyntheses_old /* i : number of CLDFB synthesis instances in previous frame */ ); -#endif /*! r: Ambisonic (SBA) order */ int16_t ivas_sba_get_order( const int16_t nb_channels, /* i : Number of ambisonic channels */ @@ -3136,10 +3167,6 @@ int16_t ivas_sba_get_analysis_order( const int16_t sba_order /* i : Ambisonic (SBA) order */ ); -int16_t ivas_sba_get_order_transport( - const int16_t nchan_transport /* i : Number of transport channels */ -); - /*! r: number of Ambisonic channels */ int16_t ivas_sba_get_nchan( const int16_t sba_order, /* i : Ambisonic (SBA) order */ @@ -3310,14 +3337,27 @@ void ivas_dirac_dec( const int16_t i_sf ); +#ifdef HRTF_BINARY_FILE +ivas_error ivas_dirac_dec_init_binaural_data( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ +); +#else ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); +#endif void ivas_dirac_dec_close_binaural_data( DIRAC_DEC_BIN_HANDLE *hBinaural /* i/o: decoder DirAC binaural data handle */ ); +#ifdef HRTF_BINARY_FILE +ivas_error ivas_dirac_dec_binaural_copy_hrtfs( + HRTFS_PARAMBIN_HANDLE *hHrtfParambin /* i/o: HRTF structure for rendering */ +); +#endif + void ivas_dirac_dec_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ @@ -3332,6 +3372,11 @@ ivas_error ivas_binaural_reverb_open( const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ const RENDERER_TYPE renderer_type /* i : renderer type */ +#ifdef HRTF_BINARY_FILE + , + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ + const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ +#endif ); void ivas_binaural_reverb_close( @@ -3556,6 +3601,10 @@ ivas_error ivas_param_mc_enc_open( Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); +ivas_error ivas_param_mc_enc_reconfig( + Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ +); + void ivas_param_mc_enc_close( PARAM_MC_ENC_HANDLE hParamMC, /* i/o: Parametric MC encoder handle */ const int32_t input_Fs /* i : input sampling rate */ @@ -3572,6 +3621,10 @@ ivas_error ivas_param_mc_dec_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); +ivas_error ivas_param_mc_dec_reconfig( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +); + void ivas_param_mc_dec_close( PARAM_MC_DEC_HANDLE *hParamMC /* i/o: Parametric MC decoder handle */ ); @@ -3944,7 +3997,6 @@ void ivas_spar_set_bitrate_config( const int16_t num_bands /* i : number of bands */ ); -#ifdef FIX_I1_113 void ivas_spar_bitrate_dist( int32_t core_brates_act[], /* o : bitrates per core-coder */ const int16_t nAvailBits, /* i : number of available bits */ @@ -3952,7 +4004,6 @@ void ivas_spar_bitrate_dist( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int16_t bwidth /* i : audio bandwidth */ ); -#endif void ivas_mdct( const float *pIn, float *pOut, const int16_t length ); void ivas_dct_windowing( const int16_t fade_len, const int16_t full_len, const int16_t dct_len, const int16_t zero_pad_len, const float *pWindow_coeffs, const int16_t frame_len, float *pOut_buf, float *pBuffer_prev, float *pTemp_lfe ); @@ -4063,6 +4114,9 @@ ivas_error ivas_spar_md_dec_open( const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t num_channels, /* i : number of internal channels */ const int16_t sba_order /* i : SBA order */ +#ifdef SBA_BR_SWITCHING_RECONFIG + ,const int16_t sid_format +#endif ); void ivas_spar_md_dec_close( @@ -4581,11 +4635,12 @@ void ivas_binRenderer_close( BINAURAL_RENDERER_HANDLE *hBinRenderer /* i/o: decoder binaural renderer handle */ ); +#ifdef DEBUGGING void ivas_binaural_cldfb( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ ); - +#endif void ivas_binRenderer( BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: fastconv binaural renderer handle */ HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i/o: head track handle */ @@ -4601,6 +4656,24 @@ void ivas_binaural_add_LFE( float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ ); +#ifdef HRTF_BINARY_FILE +ivas_error ivas_HRTF_fastconv_binary_open( + HRTFS_FASTCONV **hHrtfFastConv /* i/o: FASTCONV HRTF structure */ +); + +void ivas_HRTF_fastconv_binary_close( + HRTFS_FASTCONV **hHrtfFastConv /* i/o: FASTCONV HRTF structure */ +); + +ivas_error ivas_HRTF_parambin_binary_open( + HRTFS_PARAMBIN **hHrtfParambin /* i/o: Parametric binauralizer HRTF structure */ +); + +void ivas_HRTF_parambin_binary_close( + HRTFS_PARAMBIN **hHrtfParambin /* i/o: Parametric binauralizer HRTF structure */ +); +#endif + void QuatToRotMat( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ @@ -4689,7 +4762,6 @@ void ivas_ism_render( const int16_t output_frame /* i : output frame length per channel */ ); -#ifdef FIX_REND_ISM_STEREO_PANNING void ivas_ism_get_stereo_gains( const float azimuth, /* i : object azimuth */ const float elevation, /* i : object elevation */ @@ -4697,7 +4769,6 @@ void ivas_ism_get_stereo_gains( float *right_gain /* o : right channel gain */ ); -#endif void ivas_mc2sba( IVAS_OUTPUT_SETUP hIntSetup, /* i : Format of decoder output */ float buffer_td[][L_FRAME48k], /* i/o: MC signals (on input) and the HOA3 (on output) */ @@ -4847,6 +4918,14 @@ void ivas_mcmasa_enc_close( const int32_t input_Fs /* i : input sampling rate */ ); +ivas_error ivas_mcmasa_enc_reconfig( + Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ +); + +ivas_error ivas_mcmasa_dec_reconfig( + Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ +); + void ivas_mcmasa_setNumTransportChannels( int16_t* nchan_transport, /* o : Pointer to number of transport channels to be set */ int16_t* element_mode, /* o : Pointer to element mode to be set */ @@ -4859,9 +4938,13 @@ void ivas_mcmasa_set_separate_channel_mode( const int32_t ivas_total_brate /* i : Total bitrate of IVAS */ ); -/*! r: McMASA SCE bitrate */ -int32_t ivas_mcmasa_mono_brate( - const int32_t ivas_total_brate /* i : IVAS total bitrate */ +void ivas_mcmasa_split_brate( + const uint8_t separateChannelEnabled, /* i : Transport running in "separate channel" mode */ + const int32_t ivas_total_brate, /* i : Total bitrate available to be split */ + const int16_t nSCE, /* i : Number of SCEs in use (0 or 1) */ + const int16_t nCPE, /* i : Number of CPEs in use (0 or 1) */ + int32_t *brate_sce, /* o : Pointer to SCE element bitrate */ + int32_t *brate_cpe /* o : Pointer to CPE element bitrate */ ); void ivas_mcmasa_enc( @@ -4887,6 +4970,13 @@ void ivas_mcmasa_param_est_enc( const int16_t nchan_inp /* i : Number of input channels */ ); +void ivas_mcmasa_dmx_modify( + const int16_t n_samples, /* i : input frame length in samples */ + float dmx[][L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS )], /* i/o: downmix signal to be transformed into another format */ + const int16_t n_chnls_dmx_old, /* i : number of downmix channels in the old format */ + const int16_t n_chnls_dmx_new /* i : number of downmix channels in the target format */ +); + void v_multc_acc( const float x[], /* i : Input vector */ const float c, /* i : Constant */ @@ -4908,8 +4998,7 @@ void computeReferencePower_enc( float Cldfb_ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : Imag part of input signal */ float *reference_power, /* o : Estimated power */ const int16_t enc_param_start_band, /* i : first band to process */ - const int16_t num_freq_bands /* i : Number of frequency bands */ - , + const int16_t num_freq_bands, /* i : Number of frequency bands */ const SBA_MODE sba_mode /* i : SBA mode */ ); @@ -4961,7 +5050,7 @@ void ivas_lfe_enc( ivas_error ivas_create_lfe_dec( LFE_DEC_HANDLE *hLFE_out, /* o : IVAS LFE decoder structure */ const int32_t output_Fs, /* i : output sampling rate */ - const float add_delay_s /* i : additional LFE delay to sync with binaural filter */ + const int32_t binauralization_delay_ns /* i : additional LFE delay to sync with binaural renderer */ ); void ivas_lfe_dec_close( @@ -5050,13 +5139,9 @@ void GetFilterFromAngle( TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure */ const float Elev, /* i : Elevation, degrees */ float Azim, /* i : Azimuth, degrees */ -#ifdef FIX_ITD float *LeftFilter, /* o : Left HR filter */ float *RightFilter, /* o : Right HR filter */ int16_t *itd /* o : ITD value */ -#else - SFX_SpatBin_Params_t *SfxSpatBinParams_p /* i/o: Currently used HR filter */ -#endif ); void HRTF_model_precalc( @@ -5068,35 +5153,15 @@ void BSplineModelEvalDealloc( ModelEval_t *modelEval /* i : Model evaluation structure */ ); -void BSplineModelEvalITDDealloc( - ModelParamsITD_t *model /* i : Model parameters */ -); -#ifdef TDREND_HRTF_TABLE_METHODS -void TDREND_HRFILT_SetFiltSet( - TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR hilter set structure */ - FILE *f_hrtf /* i : File handle for HR filter parameters */ -); -#endif ivas_error TDREND_REND_RenderSourceHRFilt( TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ -#ifdef FIX_ITD const float *hrf_left_delta, /* i: Left filter interpolation delta */ const float *hrf_right_delta, /* i: Right filter interpolation delta */ const int16_t intp_count, /* i: Interpolation count */ -#else -#ifdef TDREND_HRTF_TABLE_METHODS - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ -#endif -#endif float output_buf[][L_SPATIAL_SUBFR_48k], /* o : Output buffer */ -#ifdef FIX_ITD const int16_t subframe_length /* i : Subframe length in use */ -#else - const int16_t subframe_length, /* i : Subframe length in use */ - const int32_t output_Fs /* i : Output sample rate */ -#endif ); /* ----- Object renderer - sources ----- */ @@ -5129,7 +5194,6 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ TDREND_SRC_REND_t *SrcRend_p, /* i/o: Source object */ TDREND_SRC_SPATIAL_t *SrcSpatial_p, /* i : Spatial aspects of source */ -#ifdef FIX_ITD float *hrf_left_prev, /* o: Left filter */ float *hrf_right_prev, /* o: Right filter */ float *hrf_left_delta, /* o: Left filter interpolation delta */ @@ -5140,9 +5204,6 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( float *Gain, /* o: Gain value */ TDREND_SRC_t *Src_p, const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ -#else - const int32_t output_Fs /* i : Output sample rate */ -#endif ); ivas_error TDREND_SRC_Alloc( @@ -5155,12 +5216,7 @@ void TDREND_SRC_Dealloc( void TDREND_SRC_Init( TDREND_SRC_t *Src_p, /* i/o: Source to initialize */ -#ifdef FIX_ITD const TDREND_PosType_t PosType /* i : Position type specifier */ -#else - const TDREND_PosType_t PosType, /* i : Position type specifier */ - const int32_t output_Fs /* i : Output sampling rate */ -#endif ); /* ----- Object renderer - vec ----- */ @@ -5205,12 +5261,7 @@ int16_t TDREND_SPATIAL_EvalOrthonormOrient( ivas_error TDREND_MIX_AddSrc( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ int16_t *SrcInd, /* o : Source index */ -#ifdef FIX_ITD const TDREND_PosType_t PosType /* i : Position type (absolute/relative) */ -#else - const TDREND_PosType_t PosType, /* i : Position type (absolute/relative) */ - const int32_t output_Fs /* i : Output sampling rate */ -#endif ); ivas_error TDREND_MIX_SetDistAttenModel( @@ -5241,31 +5292,7 @@ ivas_error TDREND_MIX_Init( ); /* ----- Object renderer - sfx ----- */ -#ifndef FIX_ITD -ivas_error TDREND_SFX_SpatBin_Initialize( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters handle */ - const int32_t output_Fs /* i : Output sampling rate */ -); -void TDREND_SFX_SpatBin_SetParams( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct to be updated */ - const SFX_SpatBin_Params_t *NewParam_p, /* i : New parameters struct */ - const int32_t output_Fs /* i : Output sample rate */ -); - -void TDREND_SFX_SpatBin_Execute_Main( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters handle */ - const float *InBuffer_p, /* i : Input buffer */ - const int16_t subframe_length, /* i : subframe length */ - float *LeftOutBuffer_p, /* o : Rendered left channel */ - float *RightOutBuffer_p, /* o : Rendered right channel */ - int16_t *NoOfUsedInputSamples_p, /* o : Number of input samples actually used */ - int16_t *NoOfDeliveredOutputSamples_p, /* o : Number of output samples actually rendered */ - const int32_t output_Fs /* i : Output sample rate */ -); -#endif - -#ifdef FIX_ITD void TDREND_Apply_ITD( float *input, /* i: Input SCE subframe to be time adjusted */ float *out_left, /* o: Output left channels with ITD applied */ @@ -5285,7 +5312,6 @@ void TDREND_firfilt( const int16_t subframe_length, /* i : Length of signal */ const int16_t filterlength /* i : Filter length */ ); -#endif /*----------------------------------------------------------------------------------* * Filter-bank (FB) Mixer *----------------------------------------------------------------------------------*/ @@ -5365,6 +5391,35 @@ int16_t ivas_get_num_bands_from_bw_idx( * Crend renderer *----------------------------------------------------------------------------------*/ +#ifdef HRTF_BINARY_FILE + +ivas_error ivas_HRTF_CRend_binary_open( + HRTFS_CREND **hSetOfHRTF /* i/o: Set of HRTF handle */ +); + +void ivas_HRTF_CRend_binary_close( + HRTFS_CREND **hSetOfHRTF /* i/o: Set of HRTF handle */ +); + +#ifndef FIX_197_CREND_INTERFACE + +ivas_error ivas_crend_init_from_setofhrtf( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +); + +ivas_error ivas_crend_init_from_hrtf_handle( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + HRTFS_HANDLE hrtf); +#endif + +ivas_error destroy_SetOfHRTF( + HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ +); + +#endif + +#ifndef FIX_197_CREND_INTERFACE + ivas_error ivas_crend_init_from_rom( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); @@ -5382,6 +5437,57 @@ ivas_error ivas_crend_process( float output[][L_FRAME48k] /* i/o: input/output audio channels */ ); +#else + +IVAS_REND_AudioConfigType getAudioConfigType( + const IVAS_REND_AudioConfig config ); + +ivas_error getAudioConfigNumChannels( + const IVAS_REND_AudioConfig config, + int16_t *numChannels ); + +IVAS_REND_AudioConfig getRendAudioConfigFromIvasAudioConfig( + AUDIO_CONFIG config ); + +ivas_error ivas_rend_initCrend( + CREND_WRAPPER *pCrend, + const IVAS_REND_AudioConfig inConfig, + const IVAS_REND_AudioConfig outConfig, + RENDER_CONFIG_DATA *hRendCfg, +#ifdef HRTF_BINARY_FILE + HRTFS_CREND_HANDLE hSetOfHRTF, +#endif + const int32_t output_Fs ); + +ivas_error ivas_rend_openCrend( + CREND_WRAPPER_HANDLE *pCrend, + const IVAS_REND_AudioConfig inConfig, + const IVAS_REND_AudioConfig outConfig, + RENDER_CONFIG_DATA *hRendCfg, + int16_t Opt_Headrotation, +#ifdef HRTF_BINARY_FILE + HRTFS_CREND_HANDLE hSetOfHRTF, +#endif + const int32_t output_Fs ); + +#ifdef FIX_197_CREND_INTERFACE +void ivas_rend_closeCrend( +#else +ivas_error ivas_rend_closeCrend( +#endif + CREND_WRAPPER_HANDLE *pCrend ); + +ivas_error ivas_rend_crendProcess( + const CREND_WRAPPER *pCrend, + const IVAS_REND_AudioConfig inConfig, + const IVAS_REND_AudioConfig outConfig, + DECODER_CONFIG_HANDLE hDecoderConfig, + HEAD_TRACK_DATA_HANDLE hHeadTrackData, + IVAS_OUTPUT_SETUP_HANDLE hIntSetup, + EFAP_HANDLE hEFAPdata, + float output[][L_FRAME48k], /* i/o: input/output audio channels */ + const int32_t output_Fs ); +#endif /*----------------------------------------------------------------------------------* * Renderer configuration @@ -5400,6 +5506,7 @@ ivas_error ivas_render_config_init_from_rom( const int16_t room_flag_on /* i : room effect on/off flag */ ); + /*----------------------------------------------------------------------------------* * Reverberator *----------------------------------------------------------------------------------*/ @@ -5566,6 +5673,9 @@ void ivas_reverb_calc_color_levels( void ivas_reverb_prepare_cldfb_params( ivas_roomAcoustics_t *pInput_params, +#ifdef HRTF_BINARY_FILE + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, +#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t output_Fs, @@ -5598,7 +5708,10 @@ void ivas_reverb_get_hrtf_set_properties( ); -/* Orientation tracking */ +/*----------------------------------------------------------------------------------* + * Orientation tracking + *----------------------------------------------------------------------------------*/ + void ivas_orient_trk_Init( ivas_orient_trk_state_t *pOTR ); @@ -5626,37 +5739,7 @@ ivas_error ivas_orient_trk_GetTrackedOrientation( float *roll ); -void TonalMdctConceal_create_concealment_noise( - float concealment_noise[L_FRAME48k], - CPE_DEC_HANDLE hCPE, - const int16_t L_frameTCX, - const int16_t L_frame, - const int16_t idchan, - const int16_t subframe_idx, - const int16_t core, - const float crossfade_gain, - const TONALMDCTCONC_NOISE_GEN_MODE noise_gen_mode -); - -void TonalMdctConceal_whiten_noise_shape( - Decoder_State *st, - const int16_t L_frame, - const TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE -); - -int16_t get_igf_startline( - Decoder_State *st, - int16_t L_frame, - int16_t L_frameTCX -); - -float rand_triangular_signed( - int16_t *seed ); /* clang-format on */ -void dtx_read_padding_bits( - DEC_CORE_HANDLE st, - int16_t num_bits ); - #endif /* IVAS_PROT_H */ diff --git a/lib_com/ivas_qmetadata_com.c b/lib_com/ivas_qmetadata_com.c index ee8cfd2f2f10de073c8647b8cfe7d740594752e6..4f1fe47a1ea9e78eb92fbe5ed017e2088652237f 100644 --- a/lib_com/ivas_qmetadata_com.c +++ b/lib_com/ivas_qmetadata_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_prot.h" #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * Local constants @@ -65,7 +65,7 @@ ivas_error ivas_qmetadata_open( ) { /* allocate MetaData handle */ - if ( ( *hQMetaData = (IVAS_QMETADATA_HANDLE) count_malloc( sizeof( IVAS_QMETADATA ) ) ) == NULL ) + if ( ( *hQMetaData = (IVAS_QMETADATA_HANDLE) malloc( sizeof( IVAS_QMETADATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for Q MetaData" ); } @@ -126,7 +126,7 @@ ivas_error ivas_qmetadata_allocate_memory( hQMetaData->no_directions = ndirs; hQMetaData->coherence_flag = coherence_flag; - hQMetaData->q_direction = (IVAS_QDIRECTION *) count_malloc( sizeof( IVAS_QDIRECTION ) * ndirs ); + hQMetaData->q_direction = (IVAS_QDIRECTION *) malloc( sizeof( IVAS_QDIRECTION ) * ndirs ); reservationFailed = hQMetaData->q_direction == NULL; if ( !reservationFailed ) @@ -140,7 +140,7 @@ ivas_error ivas_qmetadata_allocate_memory( } else { - hQMetaData->q_direction[dir].band_data = (IVAS_QDIRECTION_BAND_DATA *) count_malloc( sizeof( IVAS_QDIRECTION_BAND_DATA ) * hQMetaData->q_direction[dir].cfg.nbands ); + hQMetaData->q_direction[dir].band_data = (IVAS_QDIRECTION_BAND_DATA *) malloc( sizeof( IVAS_QDIRECTION_BAND_DATA ) * hQMetaData->q_direction[dir].cfg.nbands ); { int16_t j; for ( j = 0; j < nbands; j++ ) @@ -156,7 +156,7 @@ ivas_error ivas_qmetadata_allocate_memory( if ( coherence_flag ) { - hQMetaData->q_direction[dir].coherence_band_data = (IVAS_QDIRECTION_BAND_COHERENCE_DATA *) count_malloc( sizeof( IVAS_QDIRECTION_BAND_COHERENCE_DATA ) * hQMetaData->q_direction[dir].cfg.nbands ); + hQMetaData->q_direction[dir].coherence_band_data = (IVAS_QDIRECTION_BAND_COHERENCE_DATA *) malloc( sizeof( IVAS_QDIRECTION_BAND_COHERENCE_DATA ) * hQMetaData->q_direction[dir].cfg.nbands ); reservationFailed |= hQMetaData->q_direction[dir].coherence_band_data == NULL; } else @@ -173,7 +173,7 @@ ivas_error ivas_qmetadata_allocate_memory( if ( coherence_flag ) { - hQMetaData->surcoh_band_data = (IVAS_SURROUND_COHERENCE_BAND_DATA *) count_malloc( sizeof( IVAS_SURROUND_COHERENCE_BAND_DATA ) * hQMetaData->q_direction[0].cfg.nbands ); + hQMetaData->surcoh_band_data = (IVAS_SURROUND_COHERENCE_BAND_DATA *) malloc( sizeof( IVAS_SURROUND_COHERENCE_BAND_DATA ) * hQMetaData->q_direction[0].cfg.nbands ); reservationFailed |= hQMetaData->surcoh_band_data == NULL; } else @@ -215,23 +215,23 @@ static void ivas_qmetadata_free_memory( { if ( hQMetaData->q_direction[dir].band_data != NULL ) { - count_free( hQMetaData->q_direction[dir].band_data ); + free( hQMetaData->q_direction[dir].band_data ); hQMetaData->q_direction[dir].band_data = NULL; } if ( hQMetaData->q_direction[dir].coherence_band_data != NULL ) { - count_free( hQMetaData->q_direction[dir].coherence_band_data ); + free( hQMetaData->q_direction[dir].coherence_band_data ); hQMetaData->q_direction[dir].coherence_band_data = NULL; } } - count_free( hQMetaData->q_direction ); + free( hQMetaData->q_direction ); hQMetaData->q_direction = NULL; } if ( hQMetaData->surcoh_band_data != NULL ) { - count_free( hQMetaData->surcoh_band_data ); + free( hQMetaData->surcoh_band_data ); hQMetaData->surcoh_band_data = NULL; } @@ -256,7 +256,7 @@ void ivas_qmetadata_close( ivas_qmetadata_free_memory( *hQMetaData ); - count_free( *hQMetaData ); + free( *hQMetaData ); *hQMetaData = NULL; return; diff --git a/lib_com/ivas_qspherical_com.c b/lib_com/ivas_qspherical_com.c index cf88d4da30c009c3a3e0744dc56d6b64c51f08e1..039dea53eb97d18f2537058c841560ae1a90719a 100644 --- a/lib_com/ivas_qspherical_com.c +++ b/lib_com/ivas_qspherical_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_prot.h" #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index c824c94a40f126a1adb3159a08c28d23e54b0d28..f04538c4790ca72f0a52ecd09c9cf9ecf9c4269e 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "cnst.h" #include "ivas_cnst.h" #include "ivas_rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /* clang-format off */ diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h index 2b3755087cc246e6871b9891eb2ff0d61431b134..725e3922d72c393ae0aa49ae7fccbfbb0dea89ef 100644 --- a/lib_com/ivas_rom_com.h +++ b/lib_com/ivas_rom_com.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/ivas_sba_config.c b/lib_com/ivas_sba_config.c index 133bf3886d901acab3b98b19b9cb4820d4739759..d8ad889c3c5937a663726912ae24509ebd79e11e 100644 --- a/lib_com/ivas_sba_config.c +++ b/lib_com/ivas_sba_config.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -71,7 +71,7 @@ SBA_MODE ivas_sba_mode_select( return sba_mode; } - +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING /*-------------------------------------------------------------------* * get_sba_reinit_flag() @@ -80,24 +80,15 @@ SBA_MODE ivas_sba_mode_select( *-------------------------------------------------------------------*/ int16_t get_sba_reinit_flag( - int32_t ivas_total_bitrate, /* i : Current bitrate */ - int32_t last_ivas_total_brate /* i : Previous bitrate */ -#ifdef SBA_BR_SWITCHING_2 - , - int16_t sba_order -#endif -) + int32_t ivas_total_bitrate, /* i : Current bitrate */ + int32_t last_ivas_total_brate, /* i : Previous bitrate */ + int16_t sba_order ) { int16_t sba_reinit_flag; sba_reinit_flag = 0; -#ifdef SBA_BR_SWITCHING_2 if ( ivas_total_bitrate != last_ivas_total_brate && ( ivas_total_bitrate > IVAS_SID_5k2 ) ) -#else - if ( ivas_total_bitrate != last_ivas_total_brate && ( last_ivas_total_brate > IVAS_SID_5k2 ) && ( ivas_total_bitrate > IVAS_SID_5k2 ) ) -#endif { -#ifdef SBA_BR_SWITCHING_2 int16_t sba_analysis_order, nchan_transport_old, nchan_transport_new; SBA_MODE last_sba_mode, current_sba_mode; sba_analysis_order = ivas_sba_get_analysis_order( last_ivas_total_brate, sba_order ); @@ -108,17 +99,14 @@ int16_t get_sba_reinit_flag( nchan_transport_new = ivas_get_sba_num_TCs( ivas_total_bitrate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) ); if ( ( current_sba_mode != last_sba_mode ) || ( nchan_transport_new != nchan_transport_old ) ) { -#endif sba_reinit_flag = 1; -#ifdef SBA_BR_SWITCHING_2 } -#endif } return sba_reinit_flag; } #endif - +#endif /*-------------------------------------------------------------------* * ivas_sba_config() * @@ -247,33 +235,6 @@ int16_t ivas_sba_get_analysis_order( } -/*-------------------------------------------------------------------* - * ivas_sba_get_order_transport() - * - * Get effective Ambisonic order from number of transport channels - *-------------------------------------------------------------------*/ - -int16_t ivas_sba_get_order_transport( - const int16_t nchan_transport /* i : Number of transport channels */ -) -{ - int16_t sba_order; - - sba_order = SBA_FOA_ORDER; - - if ( nchan_transport > 6 ) - { - sba_order = SBA_HOA3_ORDER; - } - else if ( nchan_transport > 4 ) - { - sba_order = SBA_HOA2_ORDER; - } - - return ( sba_order ); -} - - /*-------------------------------------------------------------------* * ivas_sba_get_nchan() * diff --git a/lib_com/ivas_sns_com.c b/lib_com/ivas_sns_com.c index cc0f07ffe0ec7bd32ab611bd4fb91989f23e540a..e4515a98547ce096ec8f1ebcbb46b2a1ce0a0f7d 100644 --- a/lib_com/ivas_sns_com.c +++ b/lib_com/ivas_sns_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 31db5f1bbc7e1275f14996a2a6959954712d8c39..cb6ff23fc011ccfe3ca4364a1b38bb2a4143f6e0 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "ivas_rom_com.h" #include "cnst.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* @@ -2149,7 +2149,6 @@ void ivas_spar_set_bitrate_config( } -#ifdef FIX_I1_113 /*-----------------------------------------------------------------------------------------* * Function ivas_spar_bitrate_dist() * @@ -2239,4 +2238,3 @@ void ivas_spar_bitrate_dist( return; } -#endif diff --git a/lib_com/ivas_spar_com_quant_util.c b/lib_com/ivas_spar_com_quant_util.c index c095e2010791f4b6865dadd13ad60c51f781b51a..355e02ca76d05b1d187e3b950aa9ddd30e2b3ec1 100644 --- a/lib_com/ivas_spar_com_quant_util.c +++ b/lib_com/ivas_spar_com_quant_util.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------------------------* * Function ivas_quantise_real_values() diff --git a/lib_com/ivas_stat_com.h b/lib_com/ivas_stat_com.h index 79d29ea575361be5ef6f721c8ce1d02f6cbe14f9..5c9b60aceba75d6555209328a8e29556147167f1 100644 --- a/lib_com/ivas_stat_com.h +++ b/lib_com/ivas_stat_com.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/ivas_stereo_dft_com.c b/lib_com/ivas_stereo_dft_com.c index 2b889dde0a9747fd6d95f07347e1c0a294972917..1b7f0101efec5b88bfef9aeda897fb03c2423187 100644 --- a/lib_com/ivas_stereo_dft_com.c +++ b/lib_com/ivas_stereo_dft_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "ivas_prot.h" #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- * stereo_dft_config() diff --git a/lib_com/ivas_stereo_eclvq_com.c b/lib_com/ivas_stereo_eclvq_com.c index 76fcff139573a788984419435de761abd45fb3df..ff78a66eba27d9972f2a72ddb29ed072418d6d3f 100644 --- a/lib_com/ivas_stereo_eclvq_com.c +++ b/lib_com/ivas_stereo_eclvq_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include "ivas_cnst.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- * ECSQ_init_instance() diff --git a/lib_com/ivas_stereo_ica_com.c b/lib_com/ivas_stereo_ica_com.c index b35c438d2edee59b51bc853ecc3d5427fd0f73d2..f2fd09eca313f023215b7eb1cbff33a5c0d9c2c4 100644 --- a/lib_com/ivas_stereo_ica_com.c +++ b/lib_com/ivas_stereo_ica_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "rom_com.h" #include "ivas_rom_com.h" diff --git a/lib_com/ivas_stereo_mdct_bands_com.c b/lib_com/ivas_stereo_mdct_bands_com.c index 16149941e4e4f17f8b729b4ebad123ba30a70fa2..19a1295f2de1c68ac3819f9a031e474b97218f6f 100644 --- a/lib_com/ivas_stereo_mdct_bands_com.c +++ b/lib_com/ivas_stereo_mdct_bands_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "ivas_prot.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local union @@ -225,6 +225,9 @@ void stereo_mdct_init_igf_start_band( { int16_t i, bitRateIndex, igfStartLine; const int16_t *swb_offset; +#ifdef DEBUGGING + stbParams->sfbIgfStart = 0; +#endif bitRateIndex = IGF_MapBitRateToIndex( element_brate, bwidth, IVAS_CPE_MDCT, 0 ); swb_offset = &swb_offset_LB_new[bitRateIndex][1]; diff --git a/lib_com/ivas_stereo_mdct_stereo_com.c b/lib_com/ivas_stereo_mdct_stereo_com.c index cbb1423cd1c6c7e735923fb6ee869965e5b790c8..c9151b72df87f1e9d08b63734f7177c668f85579 100644 --- a/lib_com/ivas_stereo_mdct_stereo_com.c +++ b/lib_com/ivas_stereo_mdct_stereo_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -34,7 +34,7 @@ #include "options.h" #include "ivas_cnst.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include /*-------------------------------------------------------------------* diff --git a/lib_com/ivas_stereo_psychlpc_com.c b/lib_com/ivas_stereo_psychlpc_com.c index 8a50caaa29ce34a5b8eadd8fb577f926a276cd3e..aa24ef6b80bea06369a7a6028d11f14a2f83138f 100644 --- a/lib_com/ivas_stereo_psychlpc_com.c +++ b/lib_com/ivas_stereo_psychlpc_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "ivas_prot.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include /*-------------------------------------------------------------------* diff --git a/lib_com/ivas_stereo_td_bit_alloc.c b/lib_com/ivas_stereo_td_bit_alloc.c index 7d5b0afb5574e170a248273848f8925ce0ab090f..8b93558b219ea63fce4c737e2436d6221ff40ad0 100644 --- a/lib_com/ivas_stereo_td_bit_alloc.c +++ b/lib_com/ivas_stereo_td_bit_alloc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "ivas_rom_com.h" #include "ivas_cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_com/ivas_tools.c b/lib_com/ivas_tools.c index b8fbaa833ff71f8a22d5fb270b93b3f4a5e05d9e..b75c08379121fbeab38909b5b787ca0fec8a31e2 100644 --- a/lib_com/ivas_tools.c +++ b/lib_com/ivas_tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_rom_com.h" /*--------------------------------------------------------------- @@ -144,16 +144,6 @@ uint32_t ivas_syn_output( } } -#ifdef DEC_TO_REND_FLOAT_DUMP - for ( i = 0; i < output_frame; ++i ) - { - for ( n = 0; n < n_channels; ++n ) - { - dbgwrite( &synth[n][i], sizeof( float ), 1, 1, "./float_out.raw" ); - } - } -#endif - return noClipping; } @@ -1007,6 +997,25 @@ void lls_interp_n( return; } +/* helper function for panning_wrap_angles */ +static float wrap_azi( + const float azi_deg ) +{ + float azi = azi_deg; + + /* Wrap azimuth value */ + while ( azi > 180 ) + { + azi -= 360.0f; + } + + while ( azi <= -180 ) + { + azi += 360; + } + + return azi; +} /*-------------------------------------------------------------------* * panning_wrap_angles() @@ -1016,7 +1025,6 @@ void lls_interp_n( * elevation = [-90, 90] * Considers direction changes from large elevation values *-------------------------------------------------------------------*/ - void panning_wrap_angles( const float azi_deg, /* i : azimuth in degrees for panning direction (positive left) */ const float ele_deg, /* i : elevation in degrees for panning direction (positive up) */ @@ -1029,56 +1037,52 @@ void panning_wrap_angles( azi = azi_deg; ele = ele_deg; - /* Special case when elevation is a multiple of 90; azimuth is irrelevant */ - if ( ( ele != 0 ) && ( fmodf( ele, 90 ) == 0 ) ) + if ( fabsf( ele ) < 90 ) { - azi = 0; - while ( fabsf( ele ) > 90 ) - { - ele -= 360; - } + *ele_wrapped = ele; + *azi_wrapped = wrap_azi( azi ); + return; } else { - /* Wrap elevation and adjust azimuth accordingly */ - while ( fabsf( ele ) > 90 ) + /* Special case when elevation is a multiple of 90; azimuth is irrelevant */ + if ( ( fmodf( ele, 90 ) == 0 ) && ( fmodf( ele, 180 ) != 0 ) ) { - /* Flip to other hemisphere */ - azi += 180; - - /* Compensate elevation accordingly */ - if ( ele > 90 ) + *azi_wrapped = 0; + while ( ele > 90 ) { - ele -= 180; + ele -= 360; } - else if ( ele < -90 ) + while ( ele < -90 ) { - ele += 180; + ele += 360; } + *ele_wrapped = ele; } - - /* Wrap azimuth value */ - while ( fabsf( azi ) > 180 ) + else { - azi = fmodf( azi + 180, 360 ); - if ( azi < 0 ) + /* Wrap elevation and adjust azimuth accordingly */ + while ( fabsf( ele ) > 90 ) { - azi += 360; + /* Flip to other hemisphere */ + azi += 180; + + /* Compensate elevation accordingly */ + if ( ele > 90 ) + { + ele = 180 - ele; + } + else if ( ele < -90 ) + { + ele = -180 - ele; + } } - azi -= 180; + *azi_wrapped = wrap_azi( azi ); + *ele_wrapped = ele; } - } - /* Set -180 to 180 for deduplication purposes; angles are otherwise identical */ - if ( azi == -180 ) - { - azi = 180; + return; } - - *azi_wrapped = azi; - *ele_wrapped = ele; - - return; } /*-------------------------------------------------------------------------* diff --git a/lib_com/ivas_transient_det.c b/lib_com/ivas_transient_det.c index 0b398ec9d156f7c5bb9bebf9e4d8e6fa0172e2c0..01a4374f93fbcbe981957e4bc3618f28cb7b4e4e 100644 --- a/lib_com/ivas_transient_det.c +++ b/lib_com/ivas_transient_det.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "debug.h" #endif #include "math.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" #include "ivas_cnst.h" #include "ivas_prot.h" @@ -171,7 +171,7 @@ ivas_error ivas_spar_transient_det_open( { ivas_trans_det_state_t *hTranDet; - if ( ( hTranDet = (ivas_trans_det_state_t *) count_malloc( sizeof( ivas_trans_det_state_t ) ) ) == NULL ) + if ( ( hTranDet = (ivas_trans_det_state_t *) malloc( sizeof( ivas_trans_det_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR TD\n" ); } @@ -199,7 +199,7 @@ void ivas_spar_transient_det_close( return; } - count_free( *hTranDet ); + free( *hTranDet ); *hTranDet = NULL; return; diff --git a/lib_com/lag_wind.c b/lib_com/lag_wind.c index dba9f04de489a7a62cc79b107d121838f32a0e1b..c4c5e803beedaf2433793bce428f329326f7978e 100644 --- a/lib_com/lag_wind.c +++ b/lib_com/lag_wind.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_com/lerp.c b/lib_com/lerp.c index 4708dc5ca46a8c9159fb728662830596da90d7ad..1172710313bbb4057ca425e54c469f9260f74c4b 100644 --- a/lib_com/lerp.c +++ b/lib_com/lerp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------* diff --git a/lib_com/limit_t0.c b/lib_com/limit_t0.c index 33a3ba42316a8c64a178dfffe4ae7482f3bdcb42..0a844bbc5d72755f841126249cc52eeb5bb78682 100644 --- a/lib_com/limit_t0.c +++ b/lib_com/limit_t0.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------* * Local constants diff --git a/lib_com/logqnorm.c b/lib_com/logqnorm.c index 50ecd83898ee302a758ddb6c91b9e74de9382158..c8185dd5a20322a4be7941cecf359a6e91d647b8 100644 --- a/lib_com/logqnorm.c +++ b/lib_com/logqnorm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "prot.h" /* Function prototypes */ -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * logqnorm() diff --git a/lib_com/longarith.c b/lib_com/longarith.c index 2e5604d277ce8282485ac3b3e0fa3ded09c7ffb1..01a20c8417ea0091294f13b06829e567afcba36f 100644 --- a/lib_com/longarith.c +++ b/lib_com/longarith.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_com/low_rate_band_att.c b/lib_com/low_rate_band_att.c index 2ff62af41b8485eb9c0b751ec4beb7d14e51088f..393cae5ff24ba1eab58e016dc99736ad53d2e87b 100644 --- a/lib_com/low_rate_band_att.c +++ b/lib_com/low_rate_band_att.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * fine_gain_pred() diff --git a/lib_com/lpc_tools.c b/lib_com/lpc_tools.c index 7e84d83fb21f6e548a137dd855b90e3736759c8b..82c8cddbdac14a76317683c70f83bce9ec7d6efa 100644 --- a/lib_com/lpc_tools.c +++ b/lib_com/lpc_tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants diff --git a/lib_com/lsf_dec_bfi.c b/lib_com/lsf_dec_bfi.c index f6da9ffb21143c504ad7174b61d2169951dab5ba..70506b293c18856de3fad6c631b25648dc8fb9d5 100644 --- a/lib_com/lsf_dec_bfi.c +++ b/lib_com/lsf_dec_bfi.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * routine: lsf_dec_bfi() diff --git a/lib_com/lsf_msvq_ma.c b/lib_com/lsf_msvq_ma.c index 0f091463bd87ee0edca0a245912fe8d657fe4a9c..3396e9fde2ea604d13600ab510207d73dd1ebe71 100644 --- a/lib_com/lsf_msvq_ma.c +++ b/lib_com/lsf_msvq_ma.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "rom_com.h" #include "stl.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * midlsf_dec() diff --git a/lib_com/lsf_tools.c b/lib_com/lsf_tools.c index 3fc93a05f7ed6915b47b871eb53857c80c9a4510..19321e21d9bcea526d92d3f0fc6cebc6be6c87f2 100644 --- a/lib_com/lsf_tools.c +++ b/lib_com/lsf_tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes @@ -2079,7 +2079,7 @@ void msvq_dec( start = 0; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP v_add( uq + start, cb[i] + Idx[i] * maxn, uq + start, n ); IF( uq_ind != NULL ) @@ -2090,7 +2090,7 @@ void msvq_dec( uq_ind[start + j] = add( uq_ind[start + j], (Word16) ( cb[i][Idx[i] * maxn + j] * 2.0f * 1.28f ) ); } } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } return; diff --git a/lib_com/lsp_conv_poly.c b/lib_com/lsp_conv_poly.c index 1f882b5e904eb0556dbb31dc1f83d55f8a34f95d..d43d74fb5a8c73e6520a0a48fe1f6b34daa0d118 100644 --- a/lib_com/lsp_conv_poly.c +++ b/lib_com/lsp_conv_poly.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_com/mime.h b/lib_com/mime.h index 7ca2689dcf331a608e0c4cf6a68976cd4240ae0e..56f2fb4db96c6281ff0f0c57484480e56be8dd02 100644 --- a/lib_com/mime.h +++ b/lib_com/mime.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/modif_fs.c b/lib_com/modif_fs.c index a817f0c34865d17ebe2c0da4cb255179d0df3046..f1ae7c61d4571334e597980e53ff09970f80db54 100644 --- a/lib_com/modif_fs.c +++ b/lib_com/modif_fs.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * modify_Fs() @@ -113,7 +113,7 @@ int16_t modify_Fs( } } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* Retrieve and/or calculate the resampling parameters */ fac_num = cfg_ptr->fac_num; fac_den = (int16_t) ( ( cfg_ptr->fin * fac_num ) / cfg_ptr->fout ); @@ -133,7 +133,7 @@ int16_t modify_Fs( signal = signal_tab + 2 * L_FILT_MAX + L_FRAME48k - mem_len - lg; signal_ana = signal; mem_len_ana = mem_len; -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } /*-------------------------------------------------------------------* diff --git a/lib_com/move.h b/lib_com/move.h index f0e8238dec7b80e2e24e664722328923602f79e8..c7bee82cd41d3669da2a06759116db869ce61c29 100644 --- a/lib_com/move.h +++ b/lib_com/move.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/mslvq_com.c b/lib_com/mslvq_com.c index 4d0593ce56e3242437dea0cdbf349df50222493a..48384794aa4f882d3d0eaaa861ca9de8c66cd931 100644 --- a/lib_com/mslvq_com.c +++ b/lib_com/mslvq_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /*-----------------------------------------------------------------* diff --git a/lib_com/nelp.c b/lib_com/nelp.c index 63489ea27e74c0a5170bd68fb151784f369957a8..768b92f915f96879b0a2288a93a529db235d7a8e 100644 --- a/lib_com/nelp.c +++ b/lib_com/nelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * dequantize_uvg() diff --git a/lib_com/options.h b/lib_com/options.h index 55034562c49dd2915db15ffbd1bbdf0195ab8576..fb3e8e3afa03e23cb02a357b5ebded10ede9a2ea 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,6 @@ /* ################### Start compiler switches ######################## */ #define SUPPORT_JBM_TRACEFILE /* support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */ -#define RAM_COUNTING_TOOL /* tool to automatically count the dynamically alocated static memory consumption */ /* #################### End compiler switches ######################### */ @@ -51,16 +50,14 @@ #ifndef RELEASE #define DEBUGGING /* Activate debugging part of the code */ #endif -/*#define WMOPS*/ /* Activate complexity and memory counters (! the codec must be already instrumented with the WMC Tool (use /ic and /op options) !) */ -/*#define WMOPS_PER_FRAME*/ /* Output complexity in WMOPS per frame to the file "res/wmops" (one float value per frame) */ -/*#define WMOPS_DETAIL*/ /* Activate complexity detail printout for every function. Increases runtime overhead */ -/*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output WMOPS analysis for worst case frame */ -/*#define RAM_ANALYSIS*/ /* Output memory allocated with count_malloc each frame. Can be parsed and plotted with scripts/mem_analysis.m */ +/*#define WMOPS*/ /* Activate complexity and memory counters */ +/*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ +/*#define WMOPS_DETAIL*/ /* Output detailed complexity printout for every function. Increases runtime overhead */ +/*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output detailed complexity analysis for the worst-case frame */ +/*#define MEM_COUNT_DETAILS*/ /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */ #ifdef DEBUGGING -/*#define MEM_COUNT_DETAILS*/ /* RAM counting tool: print per sub-structure details */ - /*#define DEBUG_MODE_INFO*/ /* output most important parameters to the subdirectory "res/" */ #ifdef DEBUG_MODE_INFO /*#define DEBUG_MODE_ACELP*/ /* output most important ACELP core parameters to the subdirectory "res/" */ @@ -145,31 +142,26 @@ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -#define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ -#define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */ -#define SBA_BR_SWITCHING_2 /* Issue 114: Changes for sba bit rate switching with reconfigurations*/ -#define SBA_BR_SWITCHING /* Issue 114: Changes for sba bit rate switching*/ -#define FIX_ITD /* Contribution 16: TD renderer ITD improvement and code cleanup */ -#define BRATE_SWITCHING_RENDERING /* Bitrate switching changes related to the renderers */ -#define FIX_ISM_DECODER_PRINTOUT /* Issue 229: fix ISM decoder printout */ -#define FIX_REND_ISM_XFADE /* Issue 193: Crossfade inconsistencies in ISM between decoder and external renderer */ -#define FIX_REND_ISM_POS_ROUNDING /* Issue 193: (Temporary solution until fix for #215) Align rounding of ISM position data in external renderer */ -#define FIX_REND_ISM_STEREO_PANNING /* Issue 193: Use tangent panning for ISM to stereo in external renderer */ -#define FIX_REND_ROUNDING /* Issue 195: Align float to int16 conversion in renderer with decoder */ -#define FIX_REND_MONO_DMX /* Issue 195: Fix mono downmix coefficients in decoder and renderer */ -#define FIX_REND_ROT_MC_BIN /* Issue 195: Fix wrong EFAP handle passed to renderer, resulting in no rotation for BINAURAL_ROOM output */ -#define FIX_ITD_CNG /* Eri Contribution 11: Fix for CNG ITD */ -#define FIX_VBR_COMPLEXITY /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */ -#define FIX_ISM_INACTIVE_BITS /* Issue 230: fix bitbudget distribution in inactive frames in ISM format */ -#define IMPROVE_CMDLINE_ROBUSTNESS /* Issue 233: Improve robustness of command-line parameters */ -#define FIX_MDCT_AND_MC_MONO_ISSUES /* Issue 242: Fix some issues with TCX-LTP and delay alignement for mono output */ - -#define DFT_STEREO_SPAR_MIXING /* For SBA to stereo output, perform SPAR upmix in DFT domain */ +#define SBA_BR_SWITCHING /* Issue 114: Changes for SBA bit rate switching with reconfiguration for bitrates with same number of transport channels*/ +#ifdef SBA_BR_SWITCHING +#define SBA_BR_SWITCHING_RECONFIG /* Issue 114: Changes for SBA bitrate switching with reconfiguration for bitrates with different number of transport channels*/ +#endif + +#define FIX_FIX_I59 /* Issue 59: small fix concerning LFE delay rounding */ +#define HRTF_BINARY_FILE /* HRTF filters' binary file used for binaural rendering. */ +#define FIX_197_CREND_INTERFACE +#define FIX_301_PLC /* FhG: issue 301 - fix bug of missing update of overlap buffer for DFT-stereo PLC*/ +#define FIX_337_TDREND_INTP /* Issue 337: TD renderer interpolation threshold set too low */ + +#define FIX_310_TD_REND_DELAY /* Adding HRTF delay being read from ROM/Binary file, fix rounding for delay compensation in renderer */ + +#define DFT_STEREO_SPAR_MIXING #ifdef DFT_STEREO_SPAR_MIXING /*#define DFT_STEREO_SPAR_MIXING_DEBUG*/ /* more debugging output for DFT_STEREO_SPAR_MIXING_DEBUG */ #define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ #endif + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif diff --git a/lib_com/parameter_bitmaping.c b/lib_com/parameter_bitmaping.c index 95d5b77bbe53f2295900696a6a533c959f642452..d722c8a3b326deedd3cde800baf021908ecb55f5 100644 --- a/lib_com/parameter_bitmaping.c +++ b/lib_com/parameter_bitmaping.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include "stat_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /********************************/ @@ -117,9 +117,9 @@ void GetParameters( { ParamBitMap const *const param = ¶msBitMap->params[iParam]; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP pSubStruct = param->GetParamValue( pParameter, index, &value ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /* If a function for encoding/decoding value is defined than it should take care of 0 */ if ( param->fZeroAllowed || ( param->EncodeValue != NULL ) ) { @@ -130,9 +130,9 @@ void GetParameters( *( *pStream )++ = value - 1; } ++*pnSize; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP *pnBits += ( param->nBits != 0 ) ? param->nBits : param->GetNumberOfBits( value, index ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP if ( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) { GetParameters( param->pSubParamBitMap, value, ( pSubStruct != NULL ) ? pSubStruct : pParameter, pStream, pnSize, pnBits ); @@ -167,9 +167,9 @@ void SetParameters( /* If a function for encoding/decoding value is defined than it should take care of 0 */ value = *( *pStream )++ + ( param->fZeroAllowed || ( param->EncodeValue != NULL ) ? 0 : 1 ); -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP pSubStruct = param->SetParamValue( pParameter, index, value ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP ++*pnSize; if ( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) { @@ -207,9 +207,9 @@ void WriteToBitstream( TEncodeValue EncodeValue; int16_t value; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP nBits = ( param->nBits != 0 ) ? param->nBits : param->GetNumberOfBits( **pStream, index ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP fShiftValue = !param->fZeroAllowed && ( param->EncodeValue == NULL ); EncodeValue = ( param->EncodeValue == NULL ) ? &FixedWidthEncoding : param->EncodeValue; value = PutIntoBitstream( pStream, EncodeValue, index, hBstr, nBits ) + ( fShiftValue ? 1 : 0 ); diff --git a/lib_com/phase_dispersion.c b/lib_com/phase_dispersion.c index 7e1a1a4b14fcf8ff5589d52887ac5b81f4fe6c43..a89b98c152e7c2abc13d180b4377189b25c4a60c 100644 --- a/lib_com/phase_dispersion.c +++ b/lib_com/phase_dispersion.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * phase_dispersion() diff --git a/lib_com/ppp.c b/lib_com/ppp.c index 9008e1b441cb5b74d6ef64f9f3eeacd2c2b32684..73570bbd960bca187f855f5c115e6a91c64948ff 100644 --- a/lib_com/ppp.c +++ b/lib_com/ppp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Interpol_delay() diff --git a/lib_com/pred_lt4.c b/lib_com/pred_lt4.c index 3226c31b5793929dbe65385bef3286b52550aca4..832c7d0dc5353604cdb85bf97c7613020ec18ea1 100644 --- a/lib_com/pred_lt4.c +++ b/lib_com/pred_lt4.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * pred_lt4() diff --git a/lib_com/preemph.c b/lib_com/preemph.c index 32283198cdf420e3ed4531c0100e87cb2f8942d4..5e5eb23416f8c62988a2b24d22c6e3c138f305e1 100644 --- a/lib_com/preemph.c +++ b/lib_com/preemph.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------* * preemph() diff --git a/lib_com/prot.h b/lib_com/prot.h index 973f15ef5afca6255bdec249949ab9267e766ba3..784527e1bfadd8b7252f2c5ef9de827bafbc598c 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,15 +37,13 @@ #ifndef PROT_H #define PROT_H +#include +#include #include #include "options.h" #ifdef DEBUGGING #include "debug.h" #endif -#include -#ifndef RAM_COUNTING_TOOL -#include -#endif #include "typedef.h" #include "stat_enc.h" #include "stat_dec.h" @@ -55,28 +53,8 @@ #include "ivas_stat_dec.h" #include "cnst.h" #include "stl.h" -#ifdef RAM_COUNTING_TOOL -#include "mem_count.h" -#endif #include "ivas_error_utils.h" -/*----------------------------------------------------------------------------------* - * Prototypes of RAM counting tool macros - *----------------------------------------------------------------------------------*/ - -#ifdef RAM_COUNTING_TOOL -#define count_malloc( n1 ) MALLOC_FCT_CALL( n1 ) -#define count_calloc( n1, n2 ) CALLOC_FCT_CALL( n1, n2 ) -#define count_free( ptr ) FREE_FCT_CALL( ptr ) -#else -#define count_malloc( n1 ) malloc( n1 ) -#define count_calloc( n1, n2 ) calloc( n1, n2 ) -#define count_free( ptr ) free( ptr ) -#endif - -#define dynamic_malloc( n1 ) malloc( n1 ) -#define dynamic_calloc( n1, n2 ) calloc( n1, n2 ) -#define dynamic_free( n1 ) free( n1 ) /*----------------------------------------------------------------------------------* * Prototypes of global macros @@ -666,20 +644,6 @@ void evs_dec_previewFrame( ); -void read_indices_from_djb( - Decoder_State *st, /* i/o: decoder state structure */ - uint8_t *pt_stream, /* i : bitstream file */ - int16_t *CNG, - const int16_t num_bits, /* i : input frame length in bits */ - const Word16 isAMRWB_IOmode, /* i : AMRWB flag */ - const Word16 core_mode, /* i : core mode for frame */ - const Word16 qbit, /* i : Q bit for AMR-WB IO */ - const Word16 bitstreamformat, - const Word16 amrwb_rfc4867_flag, - const int16_t partialframe, /* i : partial frame information */ - const int16_t next_coder_type /* i : next coder type information */ -); - void getPartialCopyInfo( Decoder_State *st, /* i : decoder state structure */ int16_t *sharpFlag ); @@ -717,8 +681,7 @@ int32_t get_delay( const int32_t io_fs, /* i : input/output sampling frequency */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ - RENDERER_TYPE renderer_type, /* i : IVAS rendering type */ - const int32_t binaural_latency_ns /* i : binaural renderer HRTF delay in ns */ + const int32_t binaural_latency_ns /* i : binauralization delay in ns */ ); void decision_matrix_enc( @@ -2300,7 +2263,6 @@ void pre_proc( float old_inp_16k[], /* i/o: buffer of old input signal @ 16kHz */ float **inp, /* o : ptr. to inp. signal in the current frame*/ float fr_bands[2 * NB_BANDS], /* i : energy in frequency bands */ - float *Etot, /* i : total energy */ float *ener, /* o : residual energy from Levinson-Durbin */ #ifndef FIX_I4_OL_PITCH int16_t pitch_orig[3], /* o : open-loop pitch values for quantization */ @@ -2619,6 +2581,11 @@ void InitSWBencBuffer( TD_BWE_ENC_HANDLE hBWE_TD /* i/o: TD BWE data handle */ ); +void InitSWBencBufferStates( + TD_BWE_ENC_HANDLE hBWE_TD, /* i/o: TD BWE data handle */ + float *shb_speech /* o : SHB target signal (6-14kHz) at 16kHz */ +); + void swb_tbe_enc( Encoder_State *st, /* i/o: encoder state structure */ STEREO_ICBWE_ENC_HANDLE hStereoICBWE, /* i/o: IC-BWE state structure */ @@ -3832,11 +3799,8 @@ int16_t dtx_hangover_addition( const int16_t cldfb_subtraction, /* i : */ int16_t *vad_hover_flag, /* o : VAD hangover flag */ VAD_HANDLE hVAD, /* i/o: VAD handle for L or R channel */ - NOISE_EST_HANDLE hNoiseEst /* i : Noise estimation handle */ -#ifdef FIX_ITD_CNG - , - int16_t *rem_dtx_ho /* o : Expected remaining hangover frames */ -#endif + NOISE_EST_HANDLE hNoiseEst, /* i : Noise estimation handle */ + int16_t *rem_dtx_ho /* o : Expected remaining hangover frames */ ); int16_t wb_vad( @@ -3916,8 +3880,7 @@ void updt_enc( ); void updt_enc_common( - Encoder_State *st, /* i/o: encoder state structure */ - const float Etot /* i : total energy */ + Encoder_State *st /* i/o: encoder state structure */ ); void updt_IO_switch_enc( @@ -5425,14 +5388,16 @@ void IMDCT( float *acelp_zir ); void hq_hr_dec( - Decoder_State *st, /* i/o: decoder state structure */ - float *t_audio_q, /* o : transform-domain coefficients */ - const int16_t length, /* i : frame length */ - const int16_t num_bits, /* i : number of available bits */ - int16_t *ynrm, /* o : norm quantization index vector */ - int16_t *is_transient, /* o : transient flag */ - int16_t *hqswb_clas, /* o : HQ SWB class */ - float *SWB_fenv /* o : SWB frequency envelopes */ + Decoder_State *st, /* i/o: decoder state structure */ + float *t_audio_q, /* o : transform-domain coefficients */ + const int16_t length, /* i : frame length */ + const int16_t num_bits, /* i : number of available bits */ + int16_t *ynrm, /* o : norm quantization index vector */ + int16_t *is_transient, /* o : transient flag */ + int16_t *hqswb_clas, /* o : HQ SWB class */ + float *SWB_fenv, /* o : SWB frequency envelopes */ + const int16_t core_switching_flag /* i : Core switching flag */ + ); void hdecnrm_context( @@ -5856,10 +5821,11 @@ void env_adj( ); float env_stability( - const int16_t *ynrm, /* i : Norm vector for current frame */ - const int16_t nb_sfm, /* i : Number of sub-bands */ - int16_t *mem_norm, /* i/o: Norm vector memory from past frame */ - int16_t *mem_env_delta /* i/o: Envelope stability memory for smoothing*/ + const int16_t *ynrm, /* i : Norm vector for current frame */ + const int16_t nb_sfm, /* i : Number of sub-bands */ + int16_t *mem_norm, /* i/o: Norm vector memory from past frame */ + int16_t *mem_env_delta, /* i/o: Envelope stability memory for smoothing*/ + const int16_t core_switching_flag /* i : Core switching flag */ ); /*! r: New speech/music state */ @@ -7869,17 +7835,18 @@ void coder_tcx( ); void coder_tcx_post( - Encoder_State *st, /* i/o: decoder memory state */ - float *A, - const float *Ai ); + Encoder_State *st, /* i/o: encoder memory state */ + float *A, /* o : Quantized LPC coefficients */ + const float *Ai /* i : Unquantized (interpolated) LPC coefficients */ +); void decoder_tcx( - Decoder_State *st, /* i/o: coder memory state */ - int16_t prm[], /* i : parameters */ - float A[], /* i : coefficients NxAz[M+1] */ - Word16 Aind[], /* i : frame-independent coefficients Az[M+1]*/ - float synth[], /* i/o: synth[-M..lg] */ - float synthFB[], + Decoder_State *st, /* i/o: coder memory state */ + int16_t prm[], /* i : parameters */ + float A[], /* i : coefficients NxAz[M+1] */ + Word16 Aind[], /* i : frame-independent coefficients Az[M+1]*/ + float synth[], /* i/o: synth[-M..lg] */ + float synthFB[], /* i/o: encoder memory state */ const int16_t bfi, /* i : Bad frame indicator */ const int16_t frame_cnt, /* i : frame counter in the super_frame */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ @@ -7983,7 +7950,7 @@ void writeTCXparam( const int16_t pre_past_flag ); void enc_prm_rf( - Encoder_State *st, /* i/o: decoder memory state */ + Encoder_State *st, /* i/o: encoder memory state */ const int16_t rf_frame_type, const int16_t fec_offset ); diff --git a/lib_com/pvq_com.c b/lib_com/pvq_com.c index 750c20adb9eb8c1450d7e3dc43cf444d5e3b2807..133b7b62f743e0bc0720904fc7af82385cc40f92 100644 --- a/lib_com/pvq_com.c +++ b/lib_com/pvq_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "prot.h" #include "stl.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local definitions @@ -691,6 +691,8 @@ void srt_vec_ind_f( return; } +#define WMC_TOOL_SKIP + /*-------------------------------------------------------------------* * UMult_32_32() * @@ -814,7 +816,6 @@ Word16 atan2_fx( Word16 man, expo, reciprocal; Word16 angle, w, z; -#define WMC_TOOL_MAN IF( L_sub( x, 0 ) == 0 ) { return 25736; /* EVS_PI/2 in Q14 */ @@ -973,3 +974,5 @@ Word16 atan2_fx( return angle; /* Q14 between 0 and EVS_PI/2 radian. */ } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/range_com.c b/lib_com/range_com.c index 083b95edbb4a68e23b43b9d81c5c80acbc7e5e6a..b01dc7156e972acaeed28c5dc20c8092f9f1b82c 100644 --- a/lib_com/range_com.c +++ b/lib_com/range_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * rc_get_bits2() diff --git a/lib_com/re8_ppv.c b/lib_com/re8_ppv.c index ab48b24cedee2149923b35d5d0bde24d36f7871a..f6c5ab6814fd7adb4791161132f666ee2b9b3e55 100644 --- a/lib_com/re8_ppv.c +++ b/lib_com/re8_ppv.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,8 +41,8 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" -#include "wmops.h" +#include "wmc_auto.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_com/re8_util.c b/lib_com/re8_util.c index e4600774b4013e10bc8e25a5ae9423f365949ea4..d23ae1c0cd7848b92fb9cbc928d4e51296690aa2 100644 --- a/lib_com/re8_util.c +++ b/lib_com/re8_util.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_com/realft.c b/lib_com/realft.c index 0c0b8236c56a600a27915a8fb73d58d7ede2d169..b7a3fef0d9db4561a1456b336c79522ef99b9457 100644 --- a/lib_com/realft.c +++ b/lib_com/realft.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * four1() diff --git a/lib_com/recovernorm.c b/lib_com/recovernorm.c index b5e35de26870acbf65af5f4c8965469e397c1b85..52e9edcd2a0c02c9249a8139441eb6791582d446 100644 --- a/lib_com/recovernorm.c +++ b/lib_com/recovernorm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * recovernorm() diff --git a/lib_com/reordvct.c b/lib_com/reordvct.c index a497f28e4a8b2a69b9ca0dbd4f67715a58fd88f4..182050bfb65a2449045a887e88171454d5d8181a 100644 --- a/lib_com/reordvct.c +++ b/lib_com/reordvct.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * reordvct() diff --git a/lib_com/residu.c b/lib_com/residu.c index a897f70f253baec9b0f38a79e762d2baa2eaa7e3..e220d81c01d2b60118d0b0186a47d6a6104ebe17 100644 --- a/lib_com/residu.c +++ b/lib_com/residu.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------* * residu() diff --git a/lib_com/rom_com.c b/lib_com/rom_com.c index e5f2b7ce0bdd3243104e9c1abc38e608e3f4ee4a..b0c0c61978cd93adcbd9db91a0c0bf6768d711cb 100644 --- a/lib_com/rom_com.c +++ b/lib_com/rom_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "rom_com.h" #include "prot.h" #include "basop_util.h" -#include "wmops.h" +#include "wmc_auto.h" /* clang-format off */ diff --git a/lib_com/rom_com.h b/lib_com/rom_com.h index 83a7581491bd6569f7b4eb22f79bf3cb1e247e30..79971cba6a04ba94418cd46db8aa32c2d993191d 100644 --- a/lib_com/rom_com.h +++ b/lib_com/rom_com.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/stab_est.c b/lib_com/stab_est.c index 0ee40153a6207d0663b5df98c13098920c9c55eb..63466220c68c882d71e6834c3b3e749a62166c39 100644 --- a/lib_com/stab_est.c +++ b/lib_com/stab_est.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_com/stat_com.h b/lib_com/stat_com.h index 4cf9c05f1e0dd0badc6c8b2df217febaf3f26303..1546092269c5d3327f266238ccb3b7432d5b1a02 100644 --- a/lib_com/stat_com.h +++ b/lib_com/stat_com.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/stat_noise_uv_mod.c b/lib_com/stat_noise_uv_mod.c index 72b843d1db418a5d348d2b7cde03f3bd8bfb5fae..83c2d321cc584155851be33d275dc97ab459eb33 100644 --- a/lib_com/stat_noise_uv_mod.c +++ b/lib_com/stat_noise_uv_mod.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_com/stl.h b/lib_com/stl.h index c699fd899be89f5e14d4f2ca84c7479ce35a5d06..234aec9e1609d68771d2cd80be104a0d4b17126c 100644 --- a/lib_com/stl.h +++ b/lib_com/stl.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/swb_bwe_com.c b/lib_com/swb_bwe_com.c index 4e692fc22be61c7d46564faed3dad4ac07f6c834..4efbaa735d22eaa1acb8748e6c77c154c380e68f 100644 --- a/lib_com/swb_bwe_com.c +++ b/lib_com/swb_bwe_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * WB_BWE_gain_pred() diff --git a/lib_com/swb_bwe_com_hr.c b/lib_com/swb_bwe_com_hr.c index ebad781a99c4056a35e8c104f81913c28b7d25b0..fbdcf70b93b600faa5e949ec6e0776375d2d1337 100644 --- a/lib_com/swb_bwe_com_hr.c +++ b/lib_com/swb_bwe_com_hr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * swb_hr_nonzero_subband_noise_fill() diff --git a/lib_com/swb_bwe_com_lr.c b/lib_com/swb_bwe_com_lr.c index 963d881cb347378ab36d2eb03214795581872dea..daa7d167376ba9e5c2ef88de1601d8448af83935 100644 --- a/lib_com/swb_bwe_com_lr.c +++ b/lib_com/swb_bwe_com_lr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * hf_parinitiz() diff --git a/lib_com/swb_tbe_com.c b/lib_com/swb_tbe_com.c index cc0c70cbbf3753f6d2f5726ccae756f7d0080e20..235a3551f601478bffb52ef44ff941e41ea7704b 100644 --- a/lib_com/swb_tbe_com.c +++ b/lib_com/swb_tbe_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" #include @@ -1897,6 +1897,8 @@ void tbe_celp_exc( return; } + assert( bwe_exc != NULL && "BWE excitation is NULL" ); + if ( L_frame == L_FRAME ) { offset = tbe_celp_exc_offset( T0, T0_frac ); diff --git a/lib_com/syn_12k8.c b/lib_com/syn_12k8.c index 4323853f98348e1a3f4954f94931c427a9936dd1..15892f62c615bcdae800ca87e2ee9960a0d2293e 100644 --- a/lib_com/syn_12k8.c +++ b/lib_com/syn_12k8.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------ * syn_12k8() diff --git a/lib_com/syn_filt.c b/lib_com/syn_filt.c index d571b9cb7f84ea8ae628bd18ada205b7295197e9..08e687c12cdbe5fa7084314b2a387b856a213d99 100644 --- a/lib_com/syn_filt.c +++ b/lib_com/syn_filt.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include /*------------------------------------------------------------------* diff --git a/lib_com/tcq_position_arith.c b/lib_com/tcq_position_arith.c index 4c3c49e197c0f94bfd0566d27e5e0e5116bc68df..186956207473f5e0d1a3197ff7f79c407e49654f 100644 --- a/lib_com/tcq_position_arith.c +++ b/lib_com/tcq_position_arith.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" static void bitstream_save_bit( TCQ_PBITSTREAM pBS, const int16_t bit ); diff --git a/lib_com/tcx_ltp.c b/lib_com/tcx_ltp.c index 160a6e7875d79f59c00132a1739e153b15cf53cd..90dcb1515ce6bd332f2311975c12b9741ec828a2 100644 --- a/lib_com/tcx_ltp.c +++ b/lib_com/tcx_ltp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * Local constants diff --git a/lib_com/tcx_mdct.c b/lib_com/tcx_mdct.c index d9713c9cfcf16be802e9d5ef8e61640e72db0ed1..e8ac35d07aa1c67f1cc385de95ad4330e8d38464 100644 --- a/lib_com/tcx_mdct.c +++ b/lib_com/tcx_mdct.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * TCX_MDCT() diff --git a/lib_com/tcx_mdct_window.c b/lib_com/tcx_mdct_window.c index 2d1d474404858a9edc7438a2bbaadf2d9d710b35..0ef69587a8a690b4ee5917a5f6e12bace8317394 100644 --- a/lib_com/tcx_mdct_window.c +++ b/lib_com/tcx_mdct_window.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * mdct_window_sine() diff --git a/lib_com/tcx_utils.c b/lib_com/tcx_utils.c index 6e868add48f8ebdf4b92448318d2b017149bdb40..07618c7cd21ce15d5a3de2c053159ac4509b1636 100644 --- a/lib_com/tcx_utils.c +++ b/lib_com/tcx_utils.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * tcx_get_windows() diff --git a/lib_com/tec_com.c b/lib_com/tec_com.c index 18b2e79b94e8f6500f345825dff9610813cb7631..346d38292b237a1271c2d12d84dd9dbedfed14a6 100644 --- a/lib_com/tec_com.c +++ b/lib_com/tec_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "rom_com.h" #include "prot.h" #include "stat_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * Local constants diff --git a/lib_com/tns_base.c b/lib_com/tns_base.c index 94b014b59bc64027ccf0296826cbdde8b66768ca..881d7845cacfc257f4aff3225a8c129a81f0f9ca 100644 --- a/lib_com/tns_base.c +++ b/lib_com/tns_base.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "rom_com.h" #include "prot.h" #include "stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------------- diff --git a/lib_com/tools.c b/lib_com/tools.c index 2ab9952c0cf7ee4eee43e616cd7b1febde887380..db7c5a3f8e7a82c0653b81c6ba08031b6abf47a9 100644 --- a/lib_com/tools.c +++ b/lib_com/tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * own_random() @@ -1446,8 +1446,7 @@ void polezero_filter( return; } -#define WMC_TOOL_MAN - +#define WMC_TOOL_SKIP static float fleft_shift( float input, const int16_t shift ) { return ( input * (float) pow( 2.0, (double) shift ) ); @@ -1457,7 +1456,7 @@ static float fright_shift( float input, const int16_t shift ) { return ( input * (float) pow( 0.5, (double) shift ) ); } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /*--------------------------------------------------------------------------------* @@ -1487,7 +1486,7 @@ float root_a( return 0.0; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* This next piece of code implements a "norm" function */ /* and returns the shift needed to scale "a" to have a */ /* 1 in the (MSB-1) position. This is equivalent to */ @@ -1506,7 +1505,7 @@ float root_a( mod_a *= 2.0; shift_a++; } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP shift_a &= 0xfffe; mod_a = fleft_shift( a, shift_a ); @@ -1554,21 +1553,23 @@ float root_a_over_b( { return 0.0; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP if ( isinf( a ) ) +#undef WMC_TOOL_SKIP { return FLT_MAX; } +#define WMC_TOOL_SKIP if ( isinf( b ) ) +#undef WMC_TOOL_SKIP { return 0.f; } -#undef WMC_TOOL_MAN a += 0x00000001; b += 0x00000001; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* This next piece of code implements a "norm" function */ /* and returns the shift needed to scale "a" to have a */ /* 1 in the (MSB-1) position. This is equivalent to */ @@ -1587,12 +1588,12 @@ float root_a_over_b( mod_a *= 2.0; shift_a++; } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP shift_a &= 0xfffe; mod_a = fleft_shift( a, shift_a ); -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* This next piece of code implements a "norm" function */ /* and returns the shift needed to scale "b" to have a */ /* 1 in the (MSB-1) position. This is equivalent to */ @@ -1611,7 +1612,7 @@ float root_a_over_b( mod_b *= 2.0; shift_b++; } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP shift_b &= 0xfffe; mod_b = fleft_shift( b, shift_b ); diff --git a/lib_com/trans_direct.c b/lib_com/trans_direct.c index d6e35d583eda5bf7ccf39a7192f7c2ee84d207f9..964ba36f76cb531d2dee5a5b7e750a42374f38c4 100644 --- a/lib_com/trans_direct.c +++ b/lib_com/trans_direct.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * direct_transform() diff --git a/lib_com/trans_inv.c b/lib_com/trans_inv.c index 18c5fe0431e33607140874eb7d535d882eba935b..1eea807b2ffe951fcb9df0598f8135a5a333ccc4 100644 --- a/lib_com/trans_inv.c +++ b/lib_com/trans_inv.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * Local constants diff --git a/lib_com/typedef.h b/lib_com/typedef.h index ec617a585742c3e6fa786746c689c40d1e73dae2..9b1ed7bc9327f535c43c82018a4ee7d6e3a5e031 100644 --- a/lib_com/typedef.h +++ b/lib_com/typedef.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_com/vlpc_2st_com.c b/lib_com/vlpc_2st_com.c index 86fdf68c5ff96114e7cc32be3f1f420811c94d25..e180454c3e412fbba0de5970fdc6ae0173705531 100644 --- a/lib_com/vlpc_2st_com.c +++ b/lib_com/vlpc_2st_com.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * lsf_weight_2st() diff --git a/lib_com/weight.c b/lib_com/weight.c index e50707b68821764d48b88c44799f57c09d8ae3ab..6c2e1c291af10340e0883d603fbb559fc1b5b309 100644 --- a/lib_com/weight.c +++ b/lib_com/weight.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * sfm2mqb() diff --git a/lib_com/weight_a.c b/lib_com/weight_a.c index 0eda2133cea20421320bb8ac3ef9ad1f735270c3..96b8014e41ceb31bed1edbd4067e1fe2f628d509 100644 --- a/lib_com/weight_a.c +++ b/lib_com/weight_a.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------ * weight_a() diff --git a/lib_com/wi.c b/lib_com/wi.c index b0d16671b043d4e02e175df858bc9018af7df377..7710f75789516faae113d2ffaa8b69cda4e42a83 100644 --- a/lib_com/wi.c +++ b/lib_com/wi.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,11 +40,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" - -#ifdef FIX_VBR_COMPLEXITY -#define WMC_TOOL_MAN -#endif +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants @@ -77,18 +73,17 @@ ivas_error DTFS_new( int16_t i; DTFS_STRUCTURE *dtfs = NULL; - dtfs = (DTFS_STRUCTURE *) dynamic_malloc( sizeof( DTFS_STRUCTURE ) ); + dtfs = (DTFS_STRUCTURE *) malloc( sizeof( DTFS_STRUCTURE ) ); if ( dtfs == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTFS (SC-VBR) structure\n" ) ); } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP MOVE( 2 ); LOOP( 1 ); MOVE( 2 ); -#endif dtfs->lag = 0; dtfs->nH = 0; dtfs->nH_4kHz = 0; @@ -103,6 +98,8 @@ ivas_error DTFS_new( dtfs->sampling_rate = -1; *dtfs_out = dtfs; +#undef WMC_TOOL_SKIP + return IVAS_ERR_OK; } @@ -119,7 +116,8 @@ void DTFS_copy( ) { int16_t k; -#ifdef FIX_VBR_COMPLEXITY + +#define WMC_TOOL_SKIP LOOP( 1 ); for ( k = 0; k < MAXLAG_WI; k++ ) { @@ -138,21 +136,7 @@ void DTFS_copy( Xout->nH_4kHz = Xinp.nH_4kHz; Xout->upper_cut_off_freq_of_interest = Xinp.upper_cut_off_freq_of_interest; Xout->upper_cut_off_freq = Xinp.upper_cut_off_freq; -#else - for ( k = 0; k < MAXLAG_WI; k++ ) - { - Xout->a[k] = Xinp.a[k]; - } - for ( k = 0; k < MAXLAG_WI; k++ ) - { - Xout->b[k] = Xinp.b[k]; - } - Xout->lag = Xinp.lag; - Xout->nH = Xinp.nH; - Xout->nH_4kHz = Xinp.nH_4kHz; - Xout->upper_cut_off_freq_of_interest = Xinp.upper_cut_off_freq_of_interest; - Xout->upper_cut_off_freq = Xinp.upper_cut_off_freq; -#endif +#undef WMC_TOOL_SKIP return; } @@ -173,7 +157,7 @@ void DTFS_sub( { int16_t i; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP MULT( 1 ); LOOP( 1 ); for ( i = 0; i <= X1.lag / 2; i++ ) @@ -199,23 +183,7 @@ void DTFS_sub( tmp->nH_4kHz = max( X1.nH_4kHz, X2.nH_4kHz ); tmp->upper_cut_off_freq_of_interest = X1.upper_cut_off_freq_of_interest; tmp->upper_cut_off_freq = X1.upper_cut_off_freq; -#else - for ( i = 0; i <= X1.lag / 2; i++ ) - { - tmp->a[i] = X1.a[i]; - tmp->b[i] = X1.b[i]; - } - for ( i = 0; i <= X2.lag / 2; i++ ) - { - tmp->a[i] -= X2.a[i]; - tmp->b[i] -= X2.b[i]; - } - tmp->lag = max( X1.lag, X2.lag ); - tmp->nH = max( X1.nH, X2.nH ); - tmp->nH_4kHz = max( X1.nH_4kHz, X2.nH_4kHz ); - tmp->upper_cut_off_freq_of_interest = X1.upper_cut_off_freq_of_interest; - tmp->upper_cut_off_freq = X1.upper_cut_off_freq; -#endif +#undef WMC_TOOL_SKIP return; } @@ -240,7 +208,7 @@ static void DTFS_fast_fs_inv( N = X1_DTFS->lag; } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP /* Populate the dbuf array */ dbuf[1] = X1_DTFS->a[0]; dbuf[2] = 0.0; @@ -276,36 +244,7 @@ static void DTFS_fast_fs_inv( ADD( 1 ); out[i - 1] = dbuf[i] / N_2; } -#else - /* Populate the dbuf array */ - dbuf[1] = X1_DTFS->a[0]; - dbuf[2] = 0.0; - for ( i = 1; i < M_2; i++ ) - { - dbuf[2 * i + 1] = X1_DTFS->a[i] * N_2; - dbuf[2 * i + 2] = X1_DTFS->b[i] * N_2; - } - - if ( N_2 != M_2 ) - { - dbuf[2 * i + 1] = X1_DTFS->a[i] * N_2; - dbuf[2 * i + 2] = X1_DTFS->b[i] * N_2; - i++; - } - - /* Zero-padding in the frequency domain */ - for ( ; i < N_2; i++ ) - { - dbuf[2 * i + 1] = dbuf[2 * i + 2] = 0.0; - } - - realft( dbuf, N_2, -1 ); - - for ( i = 1; i <= N; i++ ) - { - out[i - 1] = dbuf[i] / N_2; - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -333,7 +272,7 @@ static float DTFS_alignment_weight( float pwf = 0.7f, tmplpc[M + 1]; DTFS_STRUCTURE X1_DTFS; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP FUNC( 2 ); DTFS_copy( &X1_DTFS, refX1_DTFS ); FUNC( 2 ); @@ -351,7 +290,6 @@ static float DTFS_alignment_weight( tmplpc[k] = LPC1[k] * ( tmp *= pwf ); } - FUNC( 3 ); DTFS_zeroFilter( &X1_DTFS, tmplpc, M + 1 ); FUNC( 3 ); @@ -421,55 +359,7 @@ static float DTFS_alignment_weight( maxcorr = wcorr; } } -#else - DTFS_copy( &X1_DTFS, refX1_DTFS ); - DTFS_adjustLag( &X1_DTFS, X2_DTFS.lag ); - DTFS_poleFilter( &X1_DTFS, LPC1, M + 1 ); - tmp = 1.0; - for ( k = 0, tmp = 1.0; k < M + 1; k++ ) - { - tmplpc[k] = LPC1[k] * ( tmp *= pwf ); - } - - - DTFS_zeroFilter( &X1_DTFS, tmplpc, M + 1 ); - DTFS_poleFilter( &X2_DTFS, LPC2, M + 1 ); - for ( k = 0, tmp = 1.0; k < M + 1; k++ ) - { - /* can be stored as a table */ - tmplpc[k] = LPC2[k] * ( tmp *= pwf ); - } - DTFS_zeroFilter( &X2_DTFS, tmplpc, M + 1 ); - maxcorr = (float) -HUGE_VAL; - fshift = Eshift; - Adiff = max( 6, 0.15f * X2_DTFS.lag ); - if ( X2_DTFS.lag < 60 ) - { - diff = 0.25; - } - else - { - diff = 0.5; - } - for ( n = Eshift - Adiff; n <= Eshift + Adiff; n += diff ) - { - corr = tmp = 0.0f; - /* bit-exact optimization - PI2/X2_DTFS.lag should be counted as a single divide */ - tmp1 = (float) ( PI2 * n / X2_DTFS.lag ); - for ( k = 0; k <= min( X2_DTFS.lag >> 1, X2_DTFS.nH_4kHz ); k++, tmp += tmp1 ) - { - /* Not counting math function cos and sin since they will be implemented as look-up tables */ - corr += (float) ( ( X1_DTFS.a[k] * X2_DTFS.a[k] + X1_DTFS.b[k] * X2_DTFS.b[k] ) * cos( tmp ) ); - corr += (float) ( ( X1_DTFS.b[k] * X2_DTFS.a[k] - X1_DTFS.a[k] * X2_DTFS.b[k] ) * sin( tmp ) ); - } - wcorr = (float) ( corr * ( 1.0f - 0.01f * fabs( n - Eshift ) ) ); - if ( wcorr > maxcorr ) - { - fshift = n; - maxcorr = wcorr; - } - } -#endif +#undef WMC_TOOL_SKIP return fshift; } @@ -490,7 +380,7 @@ float DTFS_alignment_full( int16_t k; float maxcorr, corr, tmp, tmp1, fshift, n, diff; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOGIC( 1 ); if ( X1_DTFS.lag < X2_DTFS.lag ) { @@ -536,34 +426,7 @@ float DTFS_alignment_full( maxcorr = corr; } } -#else - if ( X1_DTFS.lag < X2_DTFS.lag ) - { - DTFS_zeroPadd( X2_DTFS.lag, &X1_DTFS ); - } - - maxcorr = (float) -HUGE_VAL; - /* bit-exact optimization - 1/num_steps can be constant => should be counted as a multiply */ - diff = (float) X2_DTFS.lag / num_steps; - - for ( fshift = n = 0.0; n < (float) X2_DTFS.lag; n += diff ) - { - corr = tmp = 0.0f; - tmp1 = (float) ( PI2 * n / X2_DTFS.lag ); - - for ( k = 0; k <= min( X2_DTFS.lag >> 1, X2_DTFS.nH_4kHz ); k++, tmp += tmp1 ) - - { - corr += (float) ( ( X1_DTFS.a[k] * X2_DTFS.a[k] + X1_DTFS.b[k] * X2_DTFS.b[k] ) * cos( tmp ) ); - corr += (float) ( ( X1_DTFS.b[k] * X2_DTFS.a[k] - X1_DTFS.a[k] * X2_DTFS.b[k] ) * sin( tmp ) ); - } - if ( corr > maxcorr ) - { - fshift = n; - maxcorr = corr; - } - } -#endif +#undef WMC_TOOL_SKIP return fshift; } @@ -586,7 +449,7 @@ void DTFS_phaseShift( int16_t k; float tmp, tmp2 = 0.0f; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP ADD( 1 ); LOOP( 1 ); for ( k = 0; k <= min( X->lag >> 1, X->nH ); k++, tmp2 += ph ) @@ -601,14 +464,7 @@ void DTFS_phaseShift( MAC( 1 ); X->b[k] = (float) ( tmp * sin( tmp2 ) + X->b[k] * cos( tmp2 ) ); } -#else - for ( k = 0; k <= min( X->lag >> 1, X->nH ); k++, tmp2 += ph ) - { - tmp = X->a[k]; - X->a[k] = (float) ( tmp * cos( tmp2 ) - X->b[k] * sin( tmp2 ) ); - X->b[k] = (float) ( tmp * sin( tmp2 ) + X->b[k] * cos( tmp2 ) ); - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -628,11 +484,13 @@ void DTFS_zeroPadd( int16_t i; float diff; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOGIC( 1 ); if ( N == X->lag ) { +#undef WMC_TOOL_SKIP return; +#define WMC_TOOL_SKIP } ADD( 1 ); LOOP( 1 ); @@ -655,24 +513,7 @@ void DTFS_zeroPadd( { X->nH++; } -#else - if ( N == X->lag ) - { - return; - } - for ( i = ( X->lag >> 1 ) + 1; i <= N >> 1; i++ ) - { - X->a[i] = X->b[i] = 0.0; - } - X->lag = N; - /* recompute nH for new lag */ - X->nH = (int16_t) floor( X->upper_cut_off_freq / ( 12800.0 / X->lag ) ); - diff = 12800.0f / X->lag; - if ( X->upper_cut_off_freq - ( diff * X->nH ) >= diff ) - { - X->nH++; - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -718,7 +559,7 @@ void DTFS_to_fs( X->sampling_rate = INT_FS_16k; } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP X->lag = N; MOVE( 1 ); MULT( 1 ); @@ -813,69 +654,7 @@ void DTFS_to_fs( } X->nH = nH_band; X->nH_4kHz = nH_4kHz; -#else - X->lag = N; - nH_band = (int16_t) floor( X->upper_cut_off_freq / ( 12800.0 / X->lag ) ); - - nH_4kHz = (int16_t) floor( 4000 / ( 12800.0 / X->lag ) ); - diff = 12800.0f / X->lag; - if ( X->upper_cut_off_freq - ( diff * nH_band ) >= diff ) - { - nH_band++; - } - if ( 4000 - ( diff * nH_4kHz ) >= diff ) - { - nH_4kHz++; - } - /* Number of harmonics excluding the ones at 0 and at pi */ - nH = ( N - 1 ) >> 1; - /* The DC component */ - X->a[0] = 0.0; - X->b[0] = 0.0; - for ( n = 0; n < N; n++ ) - { - X->a[0] += x[n]; - } - X->a[0] /= N; - - /* Strictly set the DC componet to zero */ - X->a[0] = 0.0; - - /* The harmonics excluding the one at pi */ - for ( k = 1; k <= nH; k++ ) - { - X->a[k] = x[0]; - X->b[k] = 0.0; - sum = tmp = (float) ( PI2 * k / N ); - for ( n = 1; n < N; n++, sum += tmp ) - { - X->a[k] += (float) ( x[n] * cos( sum ) ); - X->b[k] += (float) ( x[n] * sin( sum ) ); - } - X->a[k] *= ( 2.0f / N ); - X->b[k] *= ( 2.0f / N ); - } - - /* The harmonic at 'pi' */ - if ( N % 2 == 0 ) - { - X->a[k] = 0.0; - tmp = 1.0; - for ( n = 0; n < N; n++, tmp *= -1.0 ) - { - X->a[k] += x[n] * tmp; - } - X->a[k] /= N; - X->b[k] = 0.0; - } - for ( k = nH_band + 1; k <= min( ( X->lag >> 1 ), ( MAXLAG_WI - 1 ) ); k++ ) - { - X->a[k] = 0.0; - X->b[k] = 0.0; - } - X->nH = nH_band; - X->nH_4kHz = nH_4kHz; -#endif +#undef WMC_TOOL_SKIP return; } @@ -897,7 +676,7 @@ void DTFS_fs_inv( float phase, tmp; int16_t k, n; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOOP( 1 ); for ( n = 0; n < N; n++ ) { @@ -915,17 +694,7 @@ void DTFS_fs_inv( x[n] += (float) ( X->a[k] * cos( tmp ) + X->b[k] * sin( tmp ) ); } } -#else - for ( n = 0; n < N; n++ ) - { - x[n] = X->a[0]; - tmp = phase = (float) ( PI2 * n / X->lag + ph0 ); - for ( k = 1; k <= min( X->lag >> 1, X->nH ); k++, tmp += phase ) - { - x[n] += (float) ( X->a[k] * cos( tmp ) + X->b[k] * sin( tmp ) ); - } - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -976,7 +745,7 @@ static void DTFS_transform( IVAS_ERROR( error, "Error creating DTFS structure 3" ); } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP FUNC( 2 ); DTFS_copy( tmp1_dtfs, X ); FUNC( 2 ); @@ -1087,128 +856,37 @@ static void DTFS_transform( out[i] = sum1; } -#else - DTFS_copy( tmp1_dtfs, X ); - DTFS_copy( tmp2_dtfs, X2 ); - DTFS_fast_fs_inv( tmp1_dtfs, x1_256, 256 ); - DTFS_fast_fs_inv( tmp2_dtfs, x2_256, 256 ); +#undef WMC_TOOL_SKIP - tmp = (float) ( log( 1.0 - WI_THRESHLD ) / ( X.lag - N ) ); - for ( i = 0; i < N; i++ ) - { - if ( FR_flag == 0 ) - { - /* should not be counted inside the loop */ - if ( N - WI_SAMPLE_THLD > X.lag ) - { - /* pre-computed and stored in a table */ - w = (float) ( 1.0 - exp( -( i + 1 ) * tmp ) ); - } - else - { - /* can be a look-up table */ - w = (float) ( i + 1 ) / N; - } - } - else - { - if ( nrg_flag ) - { - w = (float) ( i + 1 ) / N; - } - else - { - if ( N <= tmp2_dtfs->lag ) - { - N = tmp2_dtfs->lag + 1; - } - - N1 = N - tmp2_dtfs->lag; - if ( i < N1 ) - { - w = (float) ( i + 1 ) / N1; - } - else - { - w = 1.0; - } - } - } - - /* add sinc interpolation of two time domain waveforms at - appropriate phase position */ - j = ( LL_OS * 10 + (int16_t) rint_new( phase[i] * LL_OS / PI2 ) ) % LL_OS; - - if ( j < 0 ) - { - j = 0; - } - - k = j % WARP_OS_RATE; - l1 = j / WARP_OS_RATE; - - set_f( x_r_fx, 0.0f, L_FRAME ); - - temp_w = ( 1 - w ); - - for ( j1 = 0; j1 < 12; j1++ ) - { - m = ( 1000 * LL + l1 - OSLENGTH / 2 + j1 ) % LL; - - if ( m < 0 ) - { - m = 0; - } - - x_r_fx[m] = x1_256[m] * temp_w + x2_256[m] * w; - } - - for ( j1 = 0, sum1 = sum2 = 0.0; j1 < OSLENGTH; j1++ ) - { - /* mult or div by constants should be done once outside the loop */ - m = ( 1000 * LL + l1 - OSLENGTH / 2 + j1 ) % LL; - - if ( m < 0 ) - { - m = 0; - } - - sum1 += x_r_fx[m] * sinc[k][j1]; - } - - out[i] = sum1; - } -#endif - - dynamic_free( tmp1_dtfs ); - dynamic_free( tmp2_dtfs ); - dynamic_free( tmp3_dtfs ); - - return; -} - - -/*-------------------------------------------------------------------* - * DTFS_zeroFilter() - * - * DTFS zero filter response. - *-------------------------------------------------------------------*/ - -void DTFS_zeroFilter( - DTFS_STRUCTURE *X, /* i/o: DTFS to zeroFilter inplace */ - const float *LPC, /* i : LPCs */ - const int16_t N /* i : LPC order */ -) -{ - float tmp, tmp1, tmp2, sum1, sum2; - int16_t k, n; - -#ifdef FIX_VBR_COMPLEXITY - MOVE( 1 ); - MULT( 1 ); - tmp1 = (float) ( PI2 / X->lag ); - LOOP( 1 ); - for ( k = 0; k <= min( X->lag >> 1, X->nH ); k++ ) + free( tmp1_dtfs ); + free( tmp2_dtfs ); + free( tmp3_dtfs ); + + return; +} + + +/*-------------------------------------------------------------------* + * DTFS_zeroFilter() + * + * DTFS zero filter response. + *-------------------------------------------------------------------*/ + +void DTFS_zeroFilter( + DTFS_STRUCTURE *X, /* i/o: DTFS to zeroFilter inplace */ + const float *LPC, /* i : LPCs */ + const int16_t N /* i : LPC order */ +) +{ + float tmp, tmp1, tmp2, sum1, sum2; + int16_t k, n; + +#define WMC_TOOL_SKIP + MOVE( 1 ); + MULT( 1 ); + tmp1 = (float) ( PI2 / X->lag ); + LOOP( 1 ); + for ( k = 0; k <= min( X->lag >> 1, X->nH ); k++ ) { MOVE( 2 ); MULT( 1 ); @@ -1239,25 +917,7 @@ void DTFS_zeroFilter( MAC( 1 ); X->b[k] = X->b[k] * sum1 + tmp * sum2; } -#else - tmp1 = (float) ( PI2 / X->lag ); - for ( k = 0; k <= min( X->lag >> 1, X->nH ); k++ ) - { - tmp = tmp2 = k * tmp1; - /* Calculate sum1 and sum2 */ - sum1 = 1.0; - sum2 = 0.0; - for ( n = 0; n < N; n++, tmp2 += tmp ) - { - sum1 += (float) ( LPC[n] * cos( tmp2 ) ); - sum2 += (float) ( LPC[n] * sin( tmp2 ) ); - } - /* Calculate the circular convolution */ - tmp = X->a[k]; - X->a[k] = tmp * sum1 - X->b[k] * sum2; - X->b[k] = X->b[k] * sum1 + tmp * sum2; - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -1278,7 +938,7 @@ void DTFS_poleFilter( float tmp, tmp1, tmp2, sum1, sum2; int16_t k, n; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP MOVE( 1 ); MULT( 1 ); tmp1 = (float) ( PI2 / X->lag ); @@ -1316,26 +976,7 @@ void DTFS_poleFilter( ADD( 1 ); X->b[k] = ( -tmp * sum2 + X->b[k] * sum1 ) / tmp2; } -#else - tmp1 = (float) ( PI2 / X->lag ); - for ( k = 0; k <= min( X->lag >> 1, X->nH ); k++ ) - { - tmp = tmp2 = k * tmp1; - /* Calculate sum1 and sum2 */ - sum1 = 1.0; - sum2 = 0.0; - for ( n = 0; n < N; n++, tmp2 += tmp ) - { - sum1 += (float) ( LPC[n] * cos( tmp2 ) ); - sum2 += (float) ( LPC[n] * sin( tmp2 ) ); - } - /* Calculate the circular convolution */ - tmp = X->a[k]; - tmp2 = sum1 * sum1 + sum2 * sum2; - X->a[k] = ( tmp * sum1 + X->b[k] * sum2 ) / tmp2; - X->b[k] = ( -tmp * sum2 + X->b[k] * sum1 ) / tmp2; - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -1355,14 +996,16 @@ static float DTFS_setEngy( int16_t k; float en1, tmp; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP FUNC( 1 ); MOVE( 1 ); en1 = DTFS_getEngy( *X_DTFS ); LOGIC( 1 ); if ( en1 == 0.0 ) { +#undef WMC_TOOL_SKIP return 0.0; +#define WMC_TOOL_SKIP } MOVE( 1 ); DIV( 1 ); @@ -1376,19 +1019,7 @@ static float DTFS_setEngy( MULT( 1 ); X_DTFS->b[k] *= tmp; } -#else - en1 = DTFS_getEngy( *X_DTFS ); - if ( en1 == 0.0 ) - { - return 0.0; - } - tmp = (float) sqrt( en2 / en1 ); - for ( k = 0; k <= min( X_DTFS->lag >> 1, X_DTFS->nH ); k++ ) - { - X_DTFS->a[k] *= tmp; - X_DTFS->b[k] *= tmp; - } -#endif +#undef WMC_TOOL_SKIP return en1; } @@ -1408,11 +1039,13 @@ void DTFS_adjustLag( int16_t k; float en, diff; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOGIC( 1 ); if ( N == X_DTFS->lag ) { +#undef WMC_TOOL_SKIP return; +#define WMC_TOOL_SKIP } LOGIC( 1 ); @@ -1459,41 +1092,7 @@ void DTFS_adjustLag( X_DTFS->nH_4kHz++; } } -#else - if ( N == X_DTFS->lag ) - { - return; - } - - if ( N > X_DTFS->lag ) - { - DTFS_zeroPadd( N, X_DTFS ); - } - else - { - en = DTFS_getEngy( *X_DTFS ); - for ( k = ( N >> 1 ) + 1; k <= min( X_DTFS->lag >> 1, X_DTFS->nH ); k++ ) - { - X_DTFS->a[k] = 0.0; - X_DTFS->b[k] = 0.0; - } - DTFS_setEngy( X_DTFS, en ); - X_DTFS->lag = N; - /* recompute nH for new lag */ - X_DTFS->nH = (int16_t) floor( X_DTFS->upper_cut_off_freq / ( 12800.0 / X_DTFS->lag ) ); - - X_DTFS->nH_4kHz = (int16_t) floor( 4000.0 / ( 12800.0 / X_DTFS->lag ) ); - diff = 12800.0f / X_DTFS->lag; - if ( X_DTFS->upper_cut_off_freq - ( diff * X_DTFS->nH ) >= diff ) - { - X_DTFS->nH++; - } - if ( 4000.0 - ( diff * X_DTFS->nH_4kHz ) >= diff ) - { - X_DTFS->nH_4kHz++; - } - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -1513,7 +1112,7 @@ float DTFS_getEngy( float en; en = 0.0f; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOOP( 1 ); for ( k = 1; k <= min( ( X.lag - 1 ) >> 1, X.nH ); k++ ) { @@ -1533,18 +1132,7 @@ float DTFS_getEngy( ADD( 1 ); en += X.a[k] * X.a[k] + X.b[k] * X.b[k]; } -#else - for ( k = 1; k <= min( ( X.lag - 1 ) >> 1, X.nH ); k++ ) - { - en += X.a[k] * X.a[k] + X.b[k] * X.b[k]; - } - en /= 2.0; - en += X.a[0] * X.a[0]; - if ( X.lag % 2 == 0 ) - { - en += X.a[k] * X.a[k] + X.b[k] * X.b[k]; - } -#endif +#undef WMC_TOOL_SKIP return en; } @@ -1563,7 +1151,7 @@ void DTFS_car2pol( int16_t k; float tmp; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOOP( 1 ); for ( k = 1; k <= min( ( X->lag - 1 ) >> 1, X->nH ); k++ ) { @@ -1587,21 +1175,7 @@ void DTFS_car2pol( MOVE( 1 ); X->b[k] = (float) atan2( X->b[k], tmp ); } -#else - for ( k = 1; k <= min( ( X->lag - 1 ) >> 1, X->nH ); k++ ) - { - tmp = X->a[k]; - X->a[k] = (float) ( 0.5f * sqrt( tmp * tmp + X->b[k] * X->b[k] ) ); - X->b[k] = (float) atan2( X->b[k], tmp ); - } - - if ( X->lag % 2 == 0 ) - { - tmp = X->a[k]; - X->a[k] = (float) sqrt( tmp * tmp + X->b[k] * X->b[k] ); - X->b[k] = (float) atan2( X->b[k], tmp ); - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -1620,7 +1194,7 @@ void DTFS_pol2car( int16_t k; float tmp; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOOP( 1 ); for ( k = 1; k <= min( ( X->lag - 1 ) >> 1, X->nH ); k++ ) { @@ -1645,21 +1219,7 @@ void DTFS_pol2car( MULT( 1 ); X->a[k] = (float) ( X->a[k] * cos( tmp ) ); } -#else - for ( k = 1; k <= min( ( X->lag - 1 ) >> 1, X->nH ); k++ ) - { - tmp = X->b[k]; - X->b[k] = (float) ( 2.0f * X->a[k] * sin( tmp ) ); - X->a[k] = (float) ( 2.0f * X->a[k] * cos( tmp ) ); - } - - if ( X->lag % 2 == 0 ) - { - tmp = X->b[k]; - X->b[k] = (float) ( X->a[k] * sin( tmp ) ); - X->a[k] = (float) ( X->a[k] * cos( tmp ) ); - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -1689,7 +1249,7 @@ float DTFS_setEngyHarm( en1 = 0.0f; count = 0; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOGIC( 1 ); if ( f1 == 0.0 ) { @@ -1767,68 +1327,17 @@ float DTFS_setEngyHarm( X->a[k] *= factor; } } -#else - if ( f1 == 0.0 ) - { - en1 += X->a[0] * X->a[0]; - count++; - } - for ( k = 1, tmp = diff; k <= min( ( X->lag - 1 ) >> 1, X->nH ); k++, tmp += diff ) - { - if ( X->a[k] < EPSILON ) - { - X->a[k] = 0; - } +#undef WMC_TOOL_SKIP - if ( tmp > f1 && tmp <= f2 ) - { - en1 += X->a[k] * X->a[k]; - count++; - } - } + return (float) ( en1 + 1e-20 ); +} - if ( count <= 0.0 ) - { - count = 1; - } - en1 /= count; - - if ( en2 < 0.0 ) - { - en2 = 0.0; - } - - if ( en1 > 0.0 ) - { - factor = (float) sqrt( en2 / en1 ); - } - else - { - factor = 0.0f; - } - if ( g1 == 0.0 ) - { - X->a[k] *= factor; - } - for ( k = 1, tmp = diff; k <= min( ( X->lag - 1 ) >> 1, X->nH ); k++, tmp += diff ) - { - if ( tmp > g1 && tmp <= g2 ) - { - X->a[k] *= factor; - } - } -#endif - - return (float) ( en1 + 1e-20 ); -} - - -/*-------------------------------------------------------------------* - * cubicPhase() - * - * Compute coefficients of cubic phase function - *-------------------------------------------------------------------*/ +/*-------------------------------------------------------------------* + * cubicPhase() + * + * Compute coefficients of cubic phase function + *-------------------------------------------------------------------*/ static void cubicPhase( float ph1, /* i : phase offset */ @@ -1843,7 +1352,7 @@ static void cubicPhase( int16_t n; double diff; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP ADD( 1 ); N -= (int16_t) L2; @@ -1911,39 +1420,7 @@ static void cubicPhase( ADD( 2 ); phOut[n] = (float) ( phOut[n - 1] + diff ); } -#else - N -= (int16_t) L2; - - if ( N <= 0 ) - { - N = 1; - } - - /* Computation of the coefficients of the cubic phase function */ - f1 = (float) ( PI2 / L1 ); - f2 = (float) ( PI2 / L2 ); - ph1 = (float) fmod( (double) ( ph1 ), PI2 ); - ph2 = (float) fmod( (double) ( ph2 ), PI2 ); - coef[3] = ph1; - coef[2] = f1; - factor = (float) ( anint( ( ph1 - ph2 + 0.5 * N * ( f2 + f1 ) ) / PI2 ) ); - c1 = f2 - f1; - c2 = (float) ( ph2 - ph1 - N * f1 + PI2 * factor ); - coef[0] = ( N * c1 - 2 * c2 ) / ( N * N * N ); - coef[1] = ( c1 - 3 * N * N * coef[0] ) / ( 2 * N ); - - /* Computation of the phase value at each sample point */ - phOut[0] = ph1; - for ( n = 1; n < N; n++ ) - { - phOut[n] = _POLY3( n, coef ); - } - diff = (float) ( PI2 / L2 ); - for ( ; n < N + (int16_t) L2; n++ ) - { - phOut[n] = (float) ( phOut[n - 1] + diff ); - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -1977,7 +1454,7 @@ void DTFS_to_erb( erb = &( erb_WB[0] ); } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOOP( 1 ); for ( i = 0; i < num_erb; i++ ) { @@ -2027,43 +1504,7 @@ void DTFS_to_erb( out[i] /= count[i]; } } -#else - for ( i = 0; i < num_erb; i++ ) - { - count[i] = 0; - out[i] = 0.0; - } - diff = 12800.0f / X.lag; - for ( i = j = 0, freq = 0.0; i <= min( X.lag >> 1, X.nH ); i++, freq += diff ) - { - if ( !( freq <= erb[num_erb] ) ) - { - freq = erb[num_erb]; - } - - for ( ; j < num_erb; j++ ) - { - if ( freq < erb[j + 1] ) - { - if ( X.a[i] < 0.0f ) - { - X.a[i] = 0.0f; - } - - out[j] += X.a[i]; - count[j]++; - break; - } - } - } - for ( i = 0; i < num_erb; i++ ) - { - if ( count[i] > 1 ) - { - out[i] /= count[i]; - } - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -2100,7 +1541,7 @@ void erb_slot( erb = &( erb_WB[0] ); } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP MOVE( 1 ); MULT( 1 ); nH_band = (int16_t) floor( upper_cut_off_freq / ( 12800.0 / lag ) ); @@ -2160,48 +1601,7 @@ void erb_slot( mfreq[j] /= out[j]; } } -#else - nH_band = (int16_t) floor( upper_cut_off_freq / ( 12800.0 / lag ) ); - - for ( i = 0; i < num_erb; i++ ) - { - out[i] = 0; - mfreq[i] = 0.0; - } - diff = 12800.0f / lag; - if ( upper_cut_off_freq - ( diff * nH_band ) >= diff ) - { - nH_band++; - } - for ( i = j = 0, freq = 0.0; i <= min( lag >> 1, nH_band ); i++, freq += diff ) - { - - if ( !( freq <= erb[num_erb] ) ) - { - freq = erb[num_erb]; - } - - freq = min( freq, upper_cut_off_freq ); - - for ( ; j < num_erb; j++ ) - { - if ( freq < erb[j + 1] ) - { - mfreq[j] += freq; - out[j]++; - break; - } - } - } - - for ( j = 0; j < num_erb; j++ ) - { - if ( out[j] > 1 ) - { - mfreq[j] /= out[j]; - } - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -2239,7 +1639,7 @@ void DTFS_erb_inv( erb = &( erb_WB[0] ); } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP MOVE( 1 ); f[m] = 0.0; MOVE( 1 ); @@ -2312,57 +1712,7 @@ void DTFS_erb_inv( X->a[0] = 0.0f; } -#else - f[m] = 0.0; - amp[m] = 0.0; - m++; - for ( i = 0; i < num_erb; i++ ) - { - if ( slot[i] != 0 ) - { - f[m] = mfreq[i]; - amp[m] = in[i]; - m++; - } - } - f[m] = upper_cut_off_freq; - amp[m] = 0.0; - m++; - - diff = 12800.0f / X->lag; - - for ( i = 0, j = 1, freq = 0.0; i <= min( X->lag >> 1, X->nH ); i++, freq += diff ) - { - if ( !( freq <= erb[num_erb] ) ) - { - freq = erb[num_erb]; - } - - if ( !( m <= num_erb + 2 ) ) - { - m = num_erb + 2; - } - - if ( freq > upper_cut_off_freq ) - { - freq = upper_cut_off_freq; - } - for ( ; j < m; j++ ) - { - if ( freq <= f[j] ) - { - X->a[i] = amp[j] * ( freq - f[j - 1] ) + amp[j - 1] * ( f[j] - freq ); - if ( f[j] != f[j - 1] ) - { - X->a[i] /= ( f[j] - f[j - 1] ); - } - break; - } - } - - X->a[0] = 0.0f; - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -2385,7 +1735,7 @@ static void LPCPowSpect( float w, tmp, Re, Im; int16_t i, k; -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP LOOP( 1 ); for ( k = 0; k < Nf; k++ ) { @@ -2414,21 +1764,7 @@ static void LPCPowSpect( DIV( 1 ); out[k] = 1.0f / ( Re * Re + Im * Im ); } -#else - for ( k = 0; k < Nf; k++ ) - { - Re = 1.0; - Im = 0.0; - /* Note that freq ranges between [0 UPPER_CUT_OFF_FREQ] */ - tmp = (float) ( freq[k] / 12800.0f * PI2 ); - for ( i = 0, w = tmp; i < Np; i++, w += tmp ) - { - Re += (float) ( LPC[i] * cos( w ) ); - Im -= (float) ( LPC[i] * sin( w ) ); - } - out[k] = 1.0f / ( Re * Re + Im * Im ); - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -2465,7 +1801,7 @@ void erb_diff( AmpCB1 = AmpCB1_WB; } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP FUNC( 3 ); erb_slot( l, cslot, mfreq, num_erb ); FUNC( 3 ); @@ -2702,165 +2038,7 @@ void erb_diff( MOVE( 1 ); index[1] = mmseindex; -#else - erb_slot( l, cslot, mfreq, num_erb ); - erb_slot( pl, pslot, t_prev_erb, num_erb ); - for ( i = 0, tmp = 1.0f; i < M + 1; i++ ) - { - LPC[i] = curr_lsp[i] * ( tmp *= 0.78f ); - } - LPCPowSpect( mfreq, num_erb, LPC, M + 1, PowSpect ); - - for ( i = 0; i < num_erb; i++ ) - { - t_prev_erb[i] = prev_erb[i]; - } - - if ( pl > l ) - { - tmp = t_prev_erb[0]; - for ( i = 0; i < num_erb; i++ ) - { - if ( pslot[i] < 0 ) - { - pslot[i] = 0; - } - - if ( pslot[i] != 0 ) - { - tmp = t_prev_erb[i]; - } - else - { - t_prev_erb[i] = tmp; - } - } - } - else if ( l > pl ) - { - tmp = t_prev_erb[num_erb - 1]; - for ( i = num_erb - 1; i >= 0; i-- ) - { - if ( pslot[i] != 0 ) - { - tmp = t_prev_erb[i]; - } - else - { - t_prev_erb[i] = tmp; - } - } - } - - for ( i = 0; i < num_erb; i++ ) - { - out[i] = curr_erb[i] - t_prev_erb[i]; - } - - /* First Band Amplitude Search */ - mmse = (float) HUGE_VAL; - mmseindex = -1; - for ( j = 0; j < ERB_CBSIZE1; j++ ) - { - tmp = 0.0; - for ( i = 1; i < 11; i++ ) - { - if ( cslot[i] != 0 ) - { - if ( AmpCB1[j][i - 1] < -t_prev_erb[i] ) - { - tmp1 = PowSpect[i] * SQR( curr_erb[i] ); - } - else - { - tmp1 = (float) ( PowSpect[i] * SQR( out[i] - AmpCB1[j][i - 1] ) ); - } - if ( AmpCB1[j][i - 1] < out[i] ) - { - tmp1 *= 0.9f; - } - tmp += tmp1; - } - } - - if ( tmp < mmse ) - { - mmse = tmp; - mmseindex = j; - } - } - - if ( !( mmseindex < ERB_CBSIZE1 && mmseindex >= 0 ) ) - { - mmseindex = 0; - } - - index[0] = mmseindex; - - /* Second Band Amplitude Search */ - mmse = (float) HUGE_VAL; - mmseindex = -1; - for ( j = 0; j < ERB_CBSIZE2; j++ ) - { - tmp = 0.0; - for ( i = 11; i < num_erb; i++ ) - { - if ( num_erb == NUM_ERB_NB ) - { - if ( cslot[i] != 0 ) - { - if ( AmpCB2_NB[j][i - 11] < -t_prev_erb[i] ) - { - tmp1 = PowSpect[i] * SQR( curr_erb[i] ); - } - else - { - tmp1 = (float) ( PowSpect[i] * SQR( out[i] - AmpCB2_NB[j][i - 11] ) ); - } - - if ( AmpCB2_NB[j][i - 11] < out[i] ) - { - tmp1 *= 0.9f; - } - tmp += tmp1; - } - } - else if ( num_erb == NUM_ERB_WB ) - { - if ( cslot[i] != 0 ) - { - if ( AmpCB2_WB[j][i - 11] < -t_prev_erb[i] ) - { - tmp1 = PowSpect[i] * SQR( curr_erb[i] ); - } - else - { - tmp1 = (float) ( PowSpect[i] * SQR( out[i] - AmpCB2_WB[j][i - 11] ) ); - } - - if ( AmpCB2_WB[j][i - 11] < out[i] ) - { - tmp1 *= 0.9f; - } - tmp += tmp1; - } - } - } - - if ( tmp < mmse ) - { - mmse = tmp; - mmseindex = j; - } - } - - if ( !( mmseindex < ERB_CBSIZE2 && mmseindex >= 0 ) ) - { - mmseindex = 0; - } - - index[1] = mmseindex; -#endif +#undef WMC_TOOL_SKIP return; } @@ -2893,7 +2071,7 @@ void erb_add( AmpCB1 = AmpCB1_WB; } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP FUNC( 3 ); erb_slot( l, cslot, t_prev_erb, num_erb ); FUNC( 3 ); @@ -3000,84 +2178,7 @@ void erb_add( curr_erb[i] = 0.0f; } } -#else - erb_slot( l, cslot, t_prev_erb, num_erb ); - erb_slot( pl, pslot, t_prev_erb, num_erb ); - - for ( i = 0; i < num_erb; i++ ) - { - t_prev_erb[i] = prev_erb[i]; - } - - if ( pl > l ) - { - tmp = t_prev_erb[0]; - for ( i = 0; i < num_erb; i++ ) - { - if ( !( pslot[i] >= 0 ) ) - { - pslot[i] = 0; - } - - if ( pslot[i] != 0 ) - { - tmp = t_prev_erb[i]; - } - else - { - t_prev_erb[i] = tmp; - } - } - } - else if ( l > pl ) - { - tmp = t_prev_erb[num_erb - 1]; - for ( i = num_erb - 1; i >= 0; i-- ) - { - if ( pslot[i] != 0 ) - { - tmp = t_prev_erb[i]; - } - else - { - t_prev_erb[i] = tmp; - } - } - } - - for ( i = 1; i < 11; i++ ) - { - if ( cslot[i] != 0 ) - { - curr_erb[i] = (float) ( AmpCB1[index[0]][i - 1] + t_prev_erb[i] ); - curr_erb[i] = max( 0.0f, curr_erb[i] ); - } - else - { - curr_erb[i] = 0.0; - } - } - for ( i = 11; i < ( num_erb - 2 ); i++ ) - { - if ( cslot[i] != 0 ) - { - if ( num_erb == NUM_ERB_NB ) - { - curr_erb[i] = (float) ( AmpCB2_NB[index[1]][i - 11] + t_prev_erb[i] ); - curr_erb[i] = max( 0.0f, curr_erb[i] ); - } - else if ( num_erb == NUM_ERB_WB ) - { - curr_erb[i] = (float) ( AmpCB2_WB[index[1]][i - 11] + t_prev_erb[i] ); - curr_erb[i] = max( 0.0f, curr_erb[i] ); - } - } - else - { - curr_erb[i] = 0.0f; - } - } -#endif +#undef WMC_TOOL_SKIP return; } @@ -3106,7 +2207,7 @@ ivas_error WIsyn( error = IVAS_ERR_OK; - if ( ( phase = (float *) dynamic_malloc( N * sizeof( float ) ) ) == NULL ) + if ( ( phase = (float *) malloc( N * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for WI structure\n" ) ); } @@ -3116,7 +2217,7 @@ ivas_error WIsyn( return IVAS_ERROR( error, "Error creating new DTFS structure\n" ); } -#ifdef FIX_VBR_COMPLEXITY +#define WMC_TOOL_SKIP FUNC( 2 ); DTFS_copy( CURRCW_DTFS, *CURRCW_DTFS_out ); @@ -3187,58 +2288,10 @@ ivas_error WIsyn( MOVE( 1 ); DIV( 1 ); *ph_offset = (float) fmod( (double) ( tmp ), PI2 ); -#else - DTFS_copy( CURRCW_DTFS, *CURRCW_DTFS_out ); +#undef WMC_TOOL_SKIP - /* Calculating the expected alignment shift */ - alignment = (float) ( *ph_offset / PI2 * PREVCW.lag ); - if ( flag == 1 ) - { - alignment *= I; - } - /* Calculating the expected alignment shift */ - tmp = (float) fmod( ( N % ( ( PREVCW.lag + CURRCW_DTFS->lag ) >> 1 ) + alignment ), CURRCW_DTFS->lag ); - - /* Compute the alignment shift */ - if ( FR_flag == 0 ) - { - alignment = DTFS_alignment_weight( PREVCW, *CURRCW_DTFS, tmp, curr_lpc, curr_lpc ); - } - else /* FR case */ - { - alignment = DTFS_alignment_full( PREVCW, *CURRCW_DTFS, CURRCW_DTFS->lag * 2 ); - } - - tmp = (float) ( PI2 * alignment / CURRCW_DTFS->lag ); - DTFS_phaseShift( CURRCW_DTFS, tmp ); - DTFS_phaseShift( CURRCW_DTFS_out, (float) ( PI2 * alignment / CURRCW_DTFS_out->lag ) ); - - /* Compute the cubic phase track and transform to 1-D signal */ - cubicPhase( *ph_offset, tmp, (float) PREVCW.lag, (float) CURRCW_DTFS->lag, N, phase ); - - if ( FR_flag == 0 ) - { - DTFS_transform( PREVCW, *CURRCW_DTFS, phase, out, N, 0 ); - } - else - { - DTFS_transform( PREVCW, *CURRCW_DTFS, phase, out, N, 1 ); - } - - /* Adjust the phase offset and wrap it between 0 and 2pi */ - if ( flag == 2 ) - { - tmp *= I; - } - *ph_offset = (float) fmod( (double) ( tmp ), PI2 ); -#endif - - dynamic_free( phase ); - dynamic_free( CURRCW_DTFS ); + free( phase ); + free( CURRCW_DTFS ); return error; } - -#ifdef FIX_VBR_COMPLEXITY -#undef WMC_TOOL_MAN -#endif diff --git a/lib_com/window.c b/lib_com/window.c index a3bf82ac7e98cd60ad5095dc4ae733729b94ec90..093dbd4fc62342b2d96d2706ef31a04c1a36a201 100644 --- a/lib_com/window.c +++ b/lib_com/window.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,16 +33,17 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ #include +#include #include "options.h" #ifdef DEBUGGING #include "debug.h" #endif -#include #include "prot.h" +#define WMC_TOOL_SKIP + /*------------------------------------------------------------------- * ham_cos_window() * @@ -75,3 +76,5 @@ void ham_cos_window( return; } + +#undef WMC_TOOL_SKIP diff --git a/lib_com/window_ola.c b/lib_com/window_ola.c index 7a5b1536363e383e59e75686df7884a6eedc79c3..07798af16ed4fcdadbe7dfbfb90251c0c9235d04 100644 --- a/lib_com/window_ola.c +++ b/lib_com/window_ola.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * window_ola() diff --git a/lib_com/wtda.c b/lib_com/wtda.c index cd8d588ed5493d566d7d990f1ddabde182670c74..3bd839e5ac4f9b28121f77ad819a2f59cc7ef316 100644 --- a/lib_com/wtda.c +++ b/lib_com/wtda.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_com.h" #include -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif diff --git a/lib_debug/debug.c b/lib_debug/debug.c index 5ee8f10e31963161ba751ee449caae658d759e4b..4b2a68259171ce69fca0de8a2d6c7b70bb915d7e 100644 --- a/lib_debug/debug.c +++ b/lib_debug/debug.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,6 @@ #include #include #include "options.h" -#include "prot.h" #ifdef DEBUGGING #include "debug.h" #ifdef DEBUG_MODE_INFO @@ -53,7 +52,7 @@ #include #else #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_debug/debug.h b/lib_debug/debug.h index abf246674ab451196d64a8ac6e7dc987a8897782..3d59cb00a0555a73c094ba80aa34de7fd9013710 100644 --- a/lib_debug/debug.h +++ b/lib_debug/debug.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,9 @@ * Global variables used for debugging *------------------------------------------------------------------------------------------*/ +#ifdef DEBUGGING extern int32_t frame; +#endif #ifdef DEBUGGING extern uint16_t g_nPrintedLines; diff --git a/lib_debug/mem_count.c b/lib_debug/mem_count.c deleted file mode 100644 index 278126d35e0b25bff1bad675f77a36f38e8bcc42..0000000000000000000000000000000000000000 --- a/lib_debug/mem_count.c +++ /dev/null @@ -1,933 +0,0 @@ -/* - * Memory Counting Tool - * - * Copyright 2022 VoiceAge Corporation. All Rights Reserved. - * - * This software is protected by copyright law and by international treaties. - * VoiceAge Corporation retains full ownership rights in their respective contributions in the software. - * No license of any kind, including but not limited to patent license, of any foregoing parties is - * hereby granted by implication, estoppel or otherwise. - * - * This software is provided "AS IS", without any express or implied warranties. The software is in the - * development stage. It is intended exclusively for experts who have experience with such software and - * solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - * and/or fitness for a particular purpose are hereby disclaimed and excluded. - * - * Written by : Guy J. Richard - August 2017 - * - */ - -#include -#include "options.h" -#include "mem_count.h" - -#include /* for printf, ... */ -#include /* for stricmp, ... */ -#include /* for alloc, NULL, ... */ -#include /* for tolower */ - -/* Mostly to get a 'int32_t' */ -#if !defined( _MSC_VER ) || _MSC_VER >= 1600 -#include -#else -#include -#endif - -#ifdef RAM_COUNTING_TOOL - -#if defined( _MSC_VER ) && _MSC_VER < 1600 -typedef UINT32 uint32_t; -typedef INT32 int32_t; -typedef UINT64 uint64_t; -typedef INT64 int64_t; -#endif - -#ifndef TRUE -#define TRUE ( 0 == 0 ) -#endif -#ifndef FALSE -#define FALSE 0 -#endif - -#ifdef RAM_ANALYSIS -#include "debug.h" -#endif - -/* How to use the tool notes - ========================= - - The tool measure SRAM memory allocated by malloc(), calloc() and - deallocated by free(). - - In order to run the tool, one needs to: - 1) Prepend 'count_' to all calls to 'malloc', 'calloc' and 'free' except debug files. - 2) Add the following code into e.g. prot.h, so that all files with calls to these functions see it. - #ifdef RAM_COUNTING_TOOL - #define count_malloc(n1) MALLOC_FCT_CALL(n1) - #define count_calloc(n1,n2) CALLOC_FCT_CALL(n1, n2) - #define count_free(ptr) FREE_FCT_CALL(ptr) - #else - #define count_malloc(n1) malloc(n1) - #define count_calloc(n1,n2) calloc(n1, n2) - #define count_free(ptr) free(ptr) - #endif - 3) Call mem_count_init() at the beginning of encoding/decoding - - The first param allows to set a limit on the RAM that can be allocated. - While the codec is running, if memory is requested such that the maximum - is passed (Mem Alloc > Limit), the codec will stop and the summary will - be printed. - - The second param allows to decide the units (bytes, shorts or longs). - Please note that the unit specified is combined with the limit param to - produce the total size that can be allocated. Ex ..init(1000, USE_16BITS); - will set the limit to 1000 x 16 Bits Word (2000 bytes in total). - 4) Call mem_count_summary() at the end of encoding/decoding to print-out the results. - - The first parameter allows to overwrite the initial units configuration. - The Total size allocated (always in bytes internally) will be converted - to the unit selected before being reported. - - The switch 'RAM_COUNTING_TOOL' also has to be defined to enable memory counting. - - There is a define 'MEM_COUNT_DETAILS' in options.h that enables printing per - sub-structure details when DEBUGGING is activated. -*/ - -/*-------------------------------------------------------------------* - * LOCAL CONSTANTS - *-------------------------------------------------------------------*/ - -/* This is the maximum number of allocations for which to keep information. - It can be increased if required. */ -#ifdef SBA_BR_SWITCHING -#define MAX_INFO_RECORDS 8000 -#else -#define MAX_INFO_RECORDS 3000 -#endif -/* This is the length after which the function name - will be truncated when the summary is printed. */ -#define MAX_FUNCTION_NAME_LENGTH 18 - -/* This is the length after which the parameter to - the allocating function will be truncated when - the summary is printed. */ -#define MAX_PARAMS_LENGTH 36 - -/* This is the value (in bytes) towards which the block size - is rounded. For example, a block of 123 bytes, when using - a 32 bits system, will end up taking 124 bytes since - the last unused byte cannot be used for another block. */ -#ifdef MEM_ALIGN_64BITS -#define BLOCK_ROUNDING 8 -#else /* Align on 32 Bits Instead */ -#define BLOCK_ROUNDING 4 -#endif - -#define N_32BITS_BLOCKS ( BLOCK_ROUNDING / sizeof( int32_t ) ) - -/* Special Value to See if Memory was ever written */ -#define MAGIC_VALUE_OOB 0x12A534F0 /* Put Before & After Buffer */ -#define MAGIC_VALUE_USED ( ~MAGIC_VALUE_OOB ) /* To Detect if Memory was Written */ -/* OOB Flags */ -#define OOB_START 0x1 -#define OOB_END 0x2 - -/*-------------------------------------------------------------------* - * LOCAL MACROS - *-------------------------------------------------------------------*/ - -#define ROUND_BLOCK_SIZE( n ) ( ( ( n ) + BLOCK_ROUNDING - 1 ) & ~( BLOCK_ROUNDING - 1 ) ) -#define IS_CALLOC( str ) ( ( size_str[0] ) == 'c' ) - -#define WARNING( msg ) \ - do \ - { \ - printf( "Fct=%s, Ln=%i: %s!\n", func_name, func_lineno, msg ); \ - } while ( 0 ) -#define ERROR( msg ) \ - do \ - { \ - WARNING( msg ); \ - exit( -1 ); \ - } while ( 0 ) - -/*-------------------------------------------------------------------* - * LOCAL TYPES - *-------------------------------------------------------------------*/ - -typedef struct -{ - void *block_ptr; - size_t block_size; - int lineno; - char name[MAX_FUNCTION_NAME_LENGTH + 1]; /* +1 for NUL */ - char params[1 + MAX_PARAMS_LENGTH + 1]; /* +1 for 'm'/'c' alloc & +1 for NUL */ - int used; - int OOB_Flag; - int seq_no; /* To Help Sorting by Order of Creation when all else is identical */ - int noccurances; -} allocator_record; - -typedef allocator_record allocation_list[MAX_INFO_RECORDS]; - -/*-------------------------------------------------------------------* - * LOCAL DATA - *-------------------------------------------------------------------*/ - -static allocation_list Current_Allocations, Peak_Allocations, Freed_Allocations; -static size_t RAM_Limit = NO_RAM_LIMIT; /* Always in Bytes */ -static size_t Current_RAM = 0, Peak_RAM = 0; /* In Bytes */ -static unsigned int Num_Records_Cur_RAM = 0, Num_Records_Peak_RAM = 0, Num_Records_Freed_RAM = 0; -static int Seq_No = 0; - -static size_t Stat_Cnt_Size = USE_BYTES; - -#ifndef DISABLE_NULL_PTR_FREE_WARNING -static allocation_list Missing_Allocations; -static unsigned int Num_Records_Missing_Alloc_Warnings = 0; -#endif - -/*-------------------------------------------------------------------* - * LOCAL CONST DATA - *-------------------------------------------------------------------*/ - -/* Suffix after numeral value printed in the summary */ -/* One char for each size */ -static const char Count_suffix[] = "BsL"; /* Using 's' because 'S' - looks a lot like '5'. */ -/* */ -static const char *Count_Name[] = { "Bytes", "Shorts", "Longs" }; - -/*-------------------------------------------------------------------* - * GLOBAL FUNCTIONS - *-------------------------------------------------------------------*/ - -/* It is not necessary to call dyn_mem_stats_init() since all static - variables are pre-initialised. It can be used to run stats again. */ -void mem_count_init( size_t limit, Counting_Size cnt_size ) -{ - if ( cnt_size != USE_DEFAULT ) - Stat_Cnt_Size = cnt_size; - Current_RAM = Peak_RAM = 0; - RAM_Limit = limit << Stat_Cnt_Size; - Num_Records_Cur_RAM = Num_Records_Peak_RAM = Num_Records_Freed_RAM = 0; -#ifndef DISABLE_NULL_PTR_FREE_WARNING - Num_Records_Missing_Alloc_Warnings = 0; -#endif - Seq_No = 0; -} - -/* This Function basically uses 'malloc' to allocate memory but also - records information about which functions allocated memory, the peak, ... - When, dyn_mem_print_stats() is called, all this info is printed as - well as the memory that has not been de-allocated; it is useful to - find memory leaks. */ -void *mem_alloc( - const char *func_name, - int func_lineno, - size_t size, - char *size_str /* the first char indicates m-alloc or c-alloc */ ) -{ - size_t rounded_size; - void *block_ptr; - char *tmp_ptr; - allocator_record *record_ptr; - size_t n, f; - int32_t fill_value; - int32_t *ptr32; - int32_t mask, temp; - unsigned int check; - - /* Do not Support Empty Requests */ - if ( size == 0 ) - { - ERROR( "Size of Zero not Supported" ); - } - - if ( Num_Records_Cur_RAM == MAX_INFO_RECORDS ) - { - ERROR( "Too Many Allocs. Increase 'MAX_INFO_RECORDS'" ); - } - - /* Round Up Block Size */ - rounded_size = ROUND_BLOCK_SIZE( size ); - - /* Allocate using the standard mem allocator. - Allocate a bit More to Have Room for Signature Values */ - block_ptr = malloc( rounded_size + BLOCK_ROUNDING * 2 ); - - /* the split line is to prevent a 'search/replace' adding a '_' to the name */ - /* We request more memory to have room to put signatures at the start - and end of the allocated buffer to check for OOBounds accesses. */ - /* Stop if it Failed */ - if ( block_ptr == NULL ) - { - ERROR( "Out of System RAM" ); - } - - /* Cannot use #if sizeof(int32_t) to catch this at compile time - because the preprocessor doesn't know anything about types - or sizes. */ - check = sizeof( int32_t ); - if ( check != 4 ) - { - ERROR( "Expecting 'int32_t' to be a 32 Bits Integer" ); - } - - /* Set Signatures and Fill (or Clear) Memory */ - ptr32 = (int32_t *) block_ptr; - /* Signature at Start of Block */ - n = N_32BITS_BLOCKS; - do - { - *ptr32++ = MAGIC_VALUE_OOB; - } while ( --n ); - /* Fill with Pattern or Clear Memory */ - fill_value = MAGIC_VALUE_USED; - if ( IS_CALLOC( size_str ) ) - { - fill_value = 0x00000000; - } - n = size / sizeof( int32_t ); - while ( n-- ) - { - *ptr32++ = fill_value; - } - n = rounded_size - size; - /* When Initializing with '0' */ - /* Need to Adapt the Magic Value */ - f = n % sizeof( int32_t ); - if ( f != 0 ) - { - /* For f=, shift by [1->24, 2->16, 3->8] */ - mask = 0xFFFFFFFF << ( ( sizeof( int32_t ) - f ) * 8 ); /* (1) */ - temp = MAGIC_VALUE_OOB & mask; - if ( fill_value != 0x0 ) - { /* Using M-Alloc */ - /* Merge Fill Value */ - temp += ( ~mask ) & MAGIC_VALUE_USED; - } /* for C-Alloc, the code in (1) hereabove already introduces zeros */ - *ptr32++ = temp; - } - n /= sizeof( int32_t ); - n += N_32BITS_BLOCKS; - /* Signature at End of Block */ - do - { - *ptr32++ = MAGIC_VALUE_OOB; - } while ( --n ); - - /* Adjust Pointer (Magic Value Before and After the Memory Region Requested) */ - tmp_ptr = (char *) block_ptr; - tmp_ptr += BLOCK_ROUNDING; - block_ptr = (void *) tmp_ptr; - - /* Save Information about Function Requesting the RAM */ - record_ptr = &Current_Allocations[Num_Records_Cur_RAM]; - - /* Save Name (and NUL Terminate it) */ - strncpy( record_ptr->name, func_name, MAX_FUNCTION_NAME_LENGTH ); - record_ptr->name[MAX_FUNCTION_NAME_LENGTH] = '\0'; - /* Save Params (and NUL Terminate it) - There string starts with a Marker (either 'm' or 'c') - that indicates the type of allocation requested. */ - strncpy( record_ptr->params, size_str, MAX_PARAMS_LENGTH ); - record_ptr->params[MAX_PARAMS_LENGTH] = '\0'; - /* Save Other Info */ - record_ptr->lineno = func_lineno; - record_ptr->block_ptr = block_ptr; - record_ptr->block_size = size; - record_ptr->used = -1; /* By default do not check mem usage */ - record_ptr->seq_no = ++Seq_No; - record_ptr->noccurances = 1; - - /* Increase # of Records */ - Num_Records_Cur_RAM++; - /* Update Amount of RAM Allocated */ - Current_RAM += rounded_size; - - /* Is this the Worst Case */ - if ( Peak_RAM < Current_RAM ) - { /* Yes */ - /* Update the Peak RAM */ - Peak_RAM = Current_RAM; - /* Keep the Information */ - memmove( Peak_Allocations, Current_Allocations, sizeof( allocator_record ) * Num_Records_Cur_RAM ); - Num_Records_Peak_RAM = Num_Records_Cur_RAM; - } - - /* Limit Busted? */ - if ( RAM_Limit != NO_RAM_LIMIT ) - { - if ( Current_RAM > RAM_Limit ) - { - char info_msg[100]; - - mem_count_summary( USE_DEFAULT ); - - sprintf( info_msg, "Alloc Limit of %lu %s was Passed", (unsigned long) RAM_Limit >> Stat_Cnt_Size, Count_Name[Stat_Cnt_Size] ); - ERROR( info_msg ); - } - } - - return block_ptr; -} - -/* Calculate Memory Usage of Block (Look for Signature) */ -static void mem_set_usage( allocator_record *record_ptr ) -{ - int total_bytes_used; - - size_t n; - int32_t *ptr32; - char *ptr8; - size_t total_bytes; - int32_t fill_value; - - fill_value = MAGIC_VALUE_USED; - if ( ( record_ptr->params[0] ) == 'c' ) - { - fill_value = 0x00000000; - } - - total_bytes = record_ptr->block_size; - - /* Check 4 bytes at a time */ - ptr32 = (int32_t *) record_ptr->block_ptr; - total_bytes_used = 0; - for ( n = total_bytes / sizeof( int32_t ); n > 0; n-- ) - { - if ( *ptr32++ != fill_value ) - total_bytes_used += sizeof( int32_t ); - } - - /* Check Remaining Bytes (If Applicable) */ - ptr8 = (char *) ptr32; - for ( n = total_bytes % sizeof( int32_t ); n > 0; n-- ) - { - if ( *ptr8++ != (char) fill_value ) - total_bytes_used++; - /* Update Value */ - fill_value >>= 8; - } - - /* Save Space Used */ - record_ptr->used = total_bytes_used; -} - -static void mem_check_OOB( allocator_record *record_ptr ) -{ - int32_t *ptr32; - unsigned int OOB_Flag = 0x0; - int32_t mask; - size_t i; - int f; - - ptr32 = (int32_t *) record_ptr->block_ptr - N_32BITS_BLOCKS; - /* Check at Beginning of Block */ - i = N_32BITS_BLOCKS; - do - { - if ( *ptr32++ ^ MAGIC_VALUE_OOB ) - OOB_Flag |= OOB_START; - } while ( --i ); - - /* Advance to End (Snap to lowest 32 Bits) */ - ptr32 += record_ptr->block_size / sizeof( int32_t ); - - /* Calculate Unused Space That has been - added to get to the rounded Block Size */ - i = ROUND_BLOCK_SIZE( record_ptr->block_size ) - record_ptr->block_size; - - /* Partial Check (For Block Size that have been rounded) */ - f = i % sizeof( int32_t ); - if ( f != 0 ) - { - mask = 0xFFFFFFFF << ( ( sizeof( int32_t ) - f ) * 8 ); - if ( ( *ptr32++ ^ MAGIC_VALUE_OOB ) & mask ) - OOB_Flag |= OOB_END; - } - - /* Full Check (all 32 Bits) for Remaining */ - i /= sizeof( int32_t ); - i += N_32BITS_BLOCKS; - do - { - if ( *ptr32++ ^ MAGIC_VALUE_OOB ) - OOB_Flag |= OOB_END; - } while ( --i ); - - record_ptr->OOB_Flag = OOB_Flag; -} - -/* Just to make the code cleaner */ -static int is_same_record( const allocator_record *record_ptr1, allocator_record *record_ptr2 ) -{ - return record_ptr2->block_size == record_ptr1->block_size && - record_ptr2->lineno == record_ptr1->lineno && - strcmp( record_ptr2->name, record_ptr1->name ) == 0 && - strcmp( record_ptr2->params, record_ptr1->params ) == 0 && - record_ptr2->OOB_Flag == record_ptr1->OOB_Flag - ? 1 - : 0; -} - -/* This Function basically uses 'free' and removes the - Information about the memory block from the list of - currently allocated Memory */ -void mem_free( const char *func_name, int func_lineno, void *ptr ) -{ - unsigned int i, j, k; - char *tmp_ptr; - allocator_record *record_ptr, *record_ptr2; - - char info_msg[100]; - - /* Search for the Block Pointer in the List */ - record_ptr = &Current_Allocations[0]; - for ( i = 0; i < Num_Records_Cur_RAM; i++ ) - { - /* Same Pointer? */ - if ( ptr == record_ptr->block_ptr ) - { /* Yes, Found it */ - if ( Num_Records_Freed_RAM == MAX_INFO_RECORDS ) - { - ERROR( "Too Many Allocs. Increase 'MAX_INFO_RECORDS'" ); - } - - for ( j = 0; j < Num_Records_Peak_RAM; j++ ) - { - /* Is this Block Part of the Peak RAM? */ - if ( memcmp( record_ptr, &Peak_Allocations[j], sizeof( *record_ptr ) ) == 0 ) - { - break; /* Stop the 'j' loop */ - } - } - - mem_set_usage( record_ptr ); - mem_check_OOB( record_ptr ); - - /* De-Allocated Block was Part of Peak RAM? */ - if ( j == Num_Records_Peak_RAM ) - { /* No */ - /* Here, in order to avoid filling this list with repetitive blocks */ - /* that are allocated and deallocated repeatedly, we look for a block */ - /* that has the same module, line #, size & same OOB characteristics. */ - /* We then just increase the # of occurances of this block definition. */ - /* The % used will be merged */ - record_ptr2 = &Freed_Allocations[0]; - for ( k = 0; k < Num_Records_Freed_RAM; k++ ) - { - /* Same Block but allocated many times */ - if ( is_same_record( record_ptr2, record_ptr ) ) - { - record_ptr2->noccurances++; - record_ptr2->used += record_ptr->used; - break; - } - record_ptr2++; - } - /* Found it */ - } - else - { - /* Force Add to List */ - k = Num_Records_Freed_RAM; - } - - if ( k == Num_Records_Freed_RAM ) - { /* No */ - /* Add to List */ - memmove( &Freed_Allocations[Num_Records_Freed_RAM], record_ptr, sizeof( allocator_record ) ); - /* Increase # of Records for Deallocated Block List */ - Num_Records_Freed_RAM++; - } - - /* De-Allocated Block was Part of Peak RAM? */ - if ( j != Num_Records_Peak_RAM ) - { /* Yes */ - /* Update Block Info There too (The Info here is Bytes Used and OOB Flags) */ - memmove( &Peak_Allocations[j], record_ptr, sizeof( *record_ptr ) ); - } - - /* First Adjust Pointer to Get to the Start of the Block */ - tmp_ptr = (char *) ptr; - tmp_ptr -= BLOCK_ROUNDING; - ptr = (void *) tmp_ptr; - /* De-allocate using the standard memory facilities */ - fr\ -ee( ptr ); /* the split line is to prevent a 'search/replace' adding a '_' to the name */ - - /* Decrease # of Records */ - Num_Records_Cur_RAM--; - /* Update (decrease) Amount of RAM Allocated */ - Current_RAM -= ROUND_BLOCK_SIZE( record_ptr->block_size ); - - /* Erase the entry (Move the Last One over it) */ - memmove( record_ptr, &Current_Allocations[Num_Records_Cur_RAM], sizeof( allocator_record ) ); - - return; - } - record_ptr++; - } - - /* Not Found, Problem! */ - if ( ptr != NULL ) - { - /* Stop */ - sprintf( info_msg, "Invalid Pointer: '%p'", ptr ); - ERROR( info_msg ); - } -#ifndef DISABLE_NULL_PTR_FREE_WARNING - else - { /* Warn about Freeing of NULL Pointers */ - /* Search to Warn Only Once. */ - record_ptr = &Missing_Allocations[0]; - for ( i = 0; i < Num_Records_Missing_Alloc_Warnings; i++ ) - { - /* Same Name? */ - if ( strncmp( record_ptr->name, func_name, MAX_FUNCTION_NAME_LENGTH ) == 0 ) - { /* Yes */ - /* Same Line Number? */ - if ( record_ptr->lineno == func_lineno ) - { /* Yes */ - /* No Need to Warn Again */ - return; - } - } - record_ptr++; - } - /* Save Name */ - strncpy( record_ptr->name, func_name, MAX_FUNCTION_NAME_LENGTH ); - record_ptr->name[MAX_FUNCTION_NAME_LENGTH] = '\0'; - - /* Save Line No */ - record_ptr->lineno = func_lineno; - /* Save Pointer */ - record_ptr->block_ptr = ptr; - /* Save Size */ - record_ptr->block_size = 0; /* It is an Unknown Block, so there is no size, we put a '0' */ - - Num_Records_Missing_Alloc_Warnings++; - - WARNING( "Trying to Free 'NULL' Pointer" ); - } -#endif -} - -#ifdef MEM_COUNT_DETAILS -/* Used to Sort Block Information Records */ -static int compare_mem_records( const void *ptr1, const void *ptr2 ) -{ - const allocator_record *record_ptr1 = (const allocator_record *) ptr1, - *record_ptr2 = (const allocator_record *) ptr2; - int result; - - /* Sort First by 'Name', then by 'Line No' and finaly by 'Block Size' */ - - /* Compare Function Name */ - result = strcmp( record_ptr1->name, record_ptr2->name ); - /* Same Function Name? */ - if ( result == 0 ) - { /* Yes */ - /* Compare Line Number */ - result = record_ptr1->lineno - record_ptr2->lineno; - /* Same Line Number */ - if ( result == 0 ) - { /* Yes */ - /* Compare Block Size */ - result = record_ptr1->block_size - record_ptr2->block_size; - /* Same Size? */ - if ( result == 0 ) - { - result = record_ptr1->seq_no - record_ptr2->seq_no; - } - } - } - - return result; -} - -static void mem_print_records( allocator_record *record_ptr, int num_records, Counting_Size cnt_size, int print_size ) -{ - int i, sum, total; - char *last_name = NULL; - int single_flag; - char chr = Count_suffix[cnt_size]; - size_t nwords, rounded_block_size; - char nblocks_str[22]; - char quantity_str[22]; - char format_str[50]; - char *tmp_ptr; - int nblocks; - - char *OOB_str[] = { "- ", "beg", "end", "b+e" }; - - strcpy( format_str, "\n %-*s %5i %-*s %3s %3.0f%% %8s" ); - if ( print_size != FALSE ) - strcat( format_str, " %6u" ); - - /* Sort it */ - qsort( record_ptr, num_records, sizeof( allocator_record ), compare_mem_records ); - - single_flag = 0; - - nblocks = 0; - - if ( num_records > 0 ) - { - /* Print Header */ - printf( " %-*s Ln No %-*s OOB Used Quantity%s", MAX_FUNCTION_NAME_LENGTH, "Function Name", MAX_PARAMS_LENGTH, "Parameters ('m' or 'c' alloc)", print_size != FALSE ? " Size" : "" ); - - total = sum = 0; - for ( i = num_records - 1; i >= 0; i-- ) - { - if ( sum == 0 ) - { - last_name = record_ptr->name; - } - - rounded_block_size = ROUND_BLOCK_SIZE( record_ptr->block_size ) >> cnt_size; - nwords = rounded_block_size * record_ptr->noccurances; - - /* Calc Usage (It has already been done for a De-Allocated Block - That was part of the Peak Mem. But not for a Block that is - still allocated (never freed). */ - if ( record_ptr->used < 0 ) - { - mem_set_usage( record_ptr ); - /* Check Out of Bounds Too */ - mem_check_OOB( record_ptr ); - } - - sprintf( quantity_str, "%i", record_ptr->noccurances ); - - /* Print Quantity x Size */ - tmp_ptr = strchr( quantity_str, '\0' ); - *tmp_ptr++ = 'x'; - sprintf( tmp_ptr, "%i", (int) rounded_block_size ); - - printf( format_str, MAX_FUNCTION_NAME_LENGTH, record_ptr->name, record_ptr->lineno, MAX_PARAMS_LENGTH, record_ptr->params, OOB_str[record_ptr->OOB_Flag], ( record_ptr->used * 100.0f / record_ptr->block_size / record_ptr->noccurances ), quantity_str, (uint32_t) nwords ); - /* Count $ of Blocks */ - nblocks += record_ptr->noccurances; - /* Add Size */ - sum += nwords; - /* Advance */ - record_ptr++; - - if ( print_size != FALSE ) - { - /* End Reached or New Function? */ - if ( i == 0 || strcmp( last_name, record_ptr->name ) != 0 ) - { - /* Cumulate Total */ - total += sum; - - if ( i == 0 && total == sum ) - single_flag = 1; -#ifdef MEM_COUNT_TOTAL_PER_FUNC - /* Print 'Total' on the Line if there is only one Function - that allocated all the RAM */ - printf( " %7i%c", sum, chr ); -#endif - /* Reset Sum */ - sum = 0; - } - } - } - /* Print the Total */ - if ( !single_flag && print_size != FALSE ) - { -#ifdef MEM_COUNT_TOTAL_PER_FUNC -#define SPACES 9 -#else -#define SPACES 0 -#endif - - sprintf( nblocks_str, "%i Blocks", nblocks ); - - printf( "\n %*s %*s %*s --------\n", MAX_FUNCTION_NAME_LENGTH, "", MAX_PARAMS_LENGTH, "", SPACES, "" ); - printf( " %-*s %-*s %*s%7i%c\n", MAX_FUNCTION_NAME_LENGTH, "Total", MAX_PARAMS_LENGTH, nblocks_str, SPACES, "", total, chr ); - } - else - printf( "\n" ); - } - else - { - printf( " \n" ); - } -} -#endif - -/* Print Memory Summary. - Return Peak Memory Used (according to Units Specified) */ -size_t mem_count_summary( Counting_Size cnt_size ) -{ - size_t size; -#ifdef MEM_COUNT_DETAILS - unsigned int i, j; - size_t num; - allocation_list Allocations; -#endif - if ( cnt_size == USE_DEFAULT ) - cnt_size = Stat_Cnt_Size; - - size = Peak_RAM >> cnt_size; -#ifdef MEM_COUNT_DETAILS - printf( "\n\n====== STATIC RAM COUNTING TOOL: MEMORY SUMMARY ======\n\n" ); - - printf( " NOTES\n" - " 1) %c = %s, %c = %s (16 Bits Words) & %c = %s (32 Bits Words).\n" - " 2) The '%%' of 'Used' memory is not very reliable for c-alloc.\n" - " 3) The Out Of Bounds (OOB) Checking is primitive as it checks\n" - " only for writing before and past the buffer when it is freed\n" - " or when the summary is printed.\n" - " 4) Quantity Filed format is N x Block Size.\n" - " When it is 1: Size = Block Size\n" - " Otherwise, Size = The Total Size Allocated for the 'N' Blocks.\n" - "\n", - Count_suffix[USE_BYTES], Count_Name[USE_BYTES], Count_suffix[USE_16BITS], Count_Name[USE_16BITS], Count_suffix[USE_32BITS], Count_Name[USE_32BITS] ); - - /* Create a Temporary List of Block to Print */ - /* from all the Block Allocated in the Peak */ - /* Scenario. We want to Merge Entries allocated */ - /* from the exact same code location and having */ - /* the same block size. In order to simplifiy the */ - /* printout. */ - num = 0; - for ( i = 0; i < Num_Records_Peak_RAM; i++ ) - { - /* Check if an Identical Block Before Adding to List */ - for ( j = 0; j < num; j++ ) - { - if ( is_same_record( &Peak_Allocations[i], &Allocations[j] ) ) - { - Allocations[j].noccurances++; - Allocations[j].used += Peak_Allocations[i].used; - break; - } - } - - /* Unique Block? */ - if ( j == num ) - { /* Yes */ - /* Add to List */ - memmove( &Allocations[num++], &Peak_Allocations[i], sizeof( allocator_record ) ); - } - } - /* Print the Peak Allocated */ - printf( " Peak Memory Allocated\n" ); - mem_print_records( &Allocations[0], num, cnt_size, TRUE ); - printf( "\n" ); - - /* Create a Temporary List of Block to Print */ - /* from all the Block Allocated BUT excluding */ - /* blocks that are part of the peak (and that */ - /* are already printed). */ - /* This is done every time the summary is printed */ - /* so that the code can continue to be executed */ - /* and the summary can be printed again with blocks */ - /* that are part of the peak having changed and thus */ - /* those that end up in this 'catch all' category. */ - num = 0; - for ( i = 0; i < Num_Records_Freed_RAM; i++ ) - { - /* Check if Record is in the Peak */ - for ( j = 0; j < Num_Records_Peak_RAM; j++ ) - { - /* Is this Block Part of the Peak RAM OR Still Allocated ? */ - if ( is_same_record( &Freed_Allocations[i], &Peak_Allocations[j] ) ) - { /* Yes */ - break; /* Stop the 'j' loop */ - } - } - /* If part of the Peak, skip it */ - if ( j == Num_Records_Peak_RAM ) - { /* Not Part of Peak */ - /* Check if an Identical Block Before Adding to List */ - for ( j = 0; j < num; j++ ) - { -#ifndef MEM_COUNT_SEPARATE_OTHER_BLOCKS - /* Just Check for Same Size, Params and OOB Result */ - if ( Freed_Allocations[i].block_size == Allocations[j].block_size && - strcmp( Freed_Allocations[i].params, Allocations[j].params ) == 0 && - Freed_Allocations[i].OOB_Flag == Allocations[j].OOB_Flag ) - { - Allocations[j].noccurances += Freed_Allocations[i].noccurances; - Allocations[j].used += Freed_Allocations[i].used; - /* Indicate that Locations are Multiple */ - strncpy( Allocations[j].name, "MULTIPLE LOCATIONS", MAX_FUNCTION_NAME_LENGTH ); - /* Wipe the Line # */ - Allocations[j].lineno = 0; - break; - } -#else - if ( is_same_record( &Freed_Allocations[i], &Allocations[j] ) ) - { - Allocations[j].noccurances++; - Allocations[j].used += Freed_Allocations[i].used; - break; - } -#endif - } - - /* Unique Block? */ - if ( j == num ) - { /* Yes */ - /* Add to List */ - memmove( &Allocations[num++], &Freed_Allocations[i], sizeof( allocator_record ) ); - } - } - } - - if ( num != 0 ) - { - /* Print all Other Block (Those that have been Freed but are not Part - of the Peak Memory). */ - printf( " Other Memory Allocated\n" ); - mem_print_records( &Allocations[0], num, cnt_size, FALSE /*Do not print the size column*/ ); - printf( "\n" ); - } - - /* If we have busted the RAM Limit, we will end up in the - summary function (here) and abort. Hence, no point printing - the memory still allocated, it will be the same as the Peak! */ - if ( RAM_Limit == 0 || Current_RAM <= RAM_Limit ) - { - /* Print the Not Deallocated */ - printf( " Memory Still Allocated\n" ); - mem_print_records( &Current_Allocations[0], Num_Records_Cur_RAM, cnt_size, TRUE ); - printf( "\n" ); - } -#endif - -#ifndef MEM_COUNT_DETAILS - if ( Num_Records_Cur_RAM > 0 ) - { - printf( "\nWarning: Part of the SRAM is still allocated! Activate MEM_COUNT_DETAILS for more details.\n" ); - } -#endif - printf( "Peak SRAM Allocated: %i%c\n\n\n", (int) size, Count_suffix[cnt_size] ); - - return size; -} - -#ifdef DEBUGGING -#ifdef RAM_ANALYSIS -void mem_analyze( void ) -{ - unsigned int i; - char buffer[1024]; - - for ( i = 0; i < Num_Records_Cur_RAM; i++ ) - { - sprintf( buffer, "%s:%d,%ld;", Current_Allocations[i].name, Current_Allocations[i].lineno, Current_Allocations[i].block_size ); - dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); - } - sprintf( buffer, "\n" ); - dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); - - return; -} -#endif -#endif - -#endif diff --git a/lib_debug/mem_count.h b/lib_debug/mem_count.h deleted file mode 100644 index 38ccb0bac6ca236d970888f4461281830fa9f235..0000000000000000000000000000000000000000 --- a/lib_debug/mem_count.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * mem_count.h - * - * Copyright 2022 VoiceAge Corporation. All Rights Reserved. - * - * This software is protected by copyright law and by international treaties. - * VoiceAge Corporation retains full ownership rights in their respective contributions in the software. - * No license of any kind, including but not limited to patent license, of any foregoing parties is - * hereby granted by implication, estoppel or otherwise. - * - * This software is provided "AS IS", without any express or implied warranties. The software is in the - * development stage. It is intended exclusively for experts who have experience with such software and - * solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - * and/or fitness for a particular purpose are hereby disclaimed and excluded. - * - * Written by : Guy J. Richard - August 2017 - * - */ - -#ifndef __MEM_COUNT_H__ -#define __MEM_COUNT_H__ - -#include -#include "options.h" -#include /* for size_t, ... */ - -#ifdef RAM_COUNTING_TOOL -/*-------------------------------------------------------------------* - * Global Constants - *-------------------------------------------------------------------*/ - -#define NO_RAM_LIMIT 0 - -/* Define this when using 64 Bits values in the code (ex: double) */ -/*#define MEM_ALIGN_64BITS */ /* Will Align on 32 Bits if not Defined */ - -/*#define DISABLE_NULL_PTR_FREE_WARNING*/ - -/*#define MEM_COUNT_DETAILS*/ - -/*#define MEM_COUNT_SEPARATE_OTHER_BLOCKS */ /* Print separate lines with location details if the same block is allocated in multiple places and is not a part of the Peak memory */ - /* if not defined, MULTIPLE LOCATIONS is printed instead */ - -/*-------------------------------------------------------------------* - * Global Types - *-------------------------------------------------------------------*/ - -typedef enum -{ - USE_DEFAULT = -1, - USE_BYTES, - USE_16BITS, - USE_32BITS -} Counting_Size; - -/*-------------------------------------------------------------------* - * Global Macros - *-------------------------------------------------------------------*/ - -#define STRINGIFY( x ) #x -#define TO_STRING( x ) STRINGIFY( x ) - -#if ( defined( _WIN32 ) && ( _MSC_VER <= 1800 ) && ( _MSC_VER >= 1300 ) ) -#define __func__ __FUNCTION__ -#elif defined( __STDC_VERSION__ ) && __STDC_VERSION__ < 199901L -#if ( __GNUC__ >= 2 ) -#define __func__ __FUNCTION__ -#else -#define __func__ "" -#endif -#elif defined( __GNUC__ ) -#define __func__ __extension__ __FUNCTION__ -#endif - -/* MALLOC_FCT_CALL, FREE_FCT_CALL, ... are defined here because 'wmc_auto.h' uses */ -/* them to map malloc, free & calloc to a Memory Counting Mechanism. If the WMC Tool */ -/* is not used, then these definitions will have no effect and are harmless. */ -#define MALLOC_FCT_CALL( size ) mem_alloc( __func__, __LINE__, size, "m:" TO_STRING( size ) ) -#define FREE_FCT_CALL( ptr ) mem_free( __func__, __LINE__, ptr ) -#define CALLOC_FCT_CALL( n, sz ) mem_alloc( __func__, __LINE__, ( n ) * ( sz ), "c:" TO_STRING( n ) ", " TO_STRING( sz ) ) - - -/*-------------------------------------------------------------------* - * Prototypes - *-------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -{ -#endif - - extern void mem_count_init( size_t limit, Counting_Size cnt_size ); - extern size_t mem_count_summary( Counting_Size cnt_size ); - - extern void *mem_alloc( const char *func_name, int func_lineno, size_t size, char *alloc_str ); - extern void mem_free( const char *func_name, int func_lineno, void *ptr ); - -#ifdef DEBUGGING -#ifdef RAM_ANALYSIS - extern void mem_analyze( void ); -#endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif - -#endif diff --git a/lib_debug/memory.c b/lib_debug/memory.c deleted file mode 100644 index afd292ddbcc62e607829daa65541bf3cb7baf6c2..0000000000000000000000000000000000000000 --- a/lib_debug/memory.c +++ /dev/null @@ -1,187 +0,0 @@ -/****************************************************************************************************** - - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. - -*******************************************************************************************************/ - -#include "options.h" -#include -#include -#include -#include - -#include "prot.h" -#include "debug.h" -#include "wmops.h" -#include "rom_enc.h" -#include "rom_dec.h" -#include "rom_com.h" -#include "stat_enc.h" -#include "stat_dec.h" - -#ifdef WMOPS - -/*-------------------------------------------------------------------* - * Memory counting tool - *--------------------------------------------------------------------*/ - -int16_t *ptr_base_stack = 0; /* Pointer to the bottom of stack (base pointer). Stack grows up. */ -int16_t *ptr_max_stack = 0; /* Pointer to the maximum stack pointer (the farest point from the bottom of stack) */ -int32_t wc_frame = 0; /* Frame corresponding to the worst-case stack usage */ -char location_max_stack[256] = "undefined"; -#define MAX_FCT_NAME_LENGTH 30 -typedef struct -{ - char function_name[MAX_FCT_NAME_LENGTH + 1]; - int16_t *stack_ptr; -} caller_info; -int current_calls = 0; -#define MAX_RECORDABLE_CALLS 40 -caller_info stack_callers[2][MAX_RECORDABLE_CALLS]; - - -/*-------------------------------------------------------------------* - * reset_stack() - * - * Initialize/reset the base stack counter.. - *--------------------------------------------------------------------*/ - -void reset_stack() -{ - int16_t something; - - ptr_base_stack = &something; - ptr_max_stack = ptr_base_stack; -} - -/*-------------------------------------------------------------------* - * push_stack() - * - * Check the current stack pointer and update the maximum stack pointer, if new maximum found. - *--------------------------------------------------------------------*/ - -int push_stack( const char *filename, const char *fctname ) -{ - int16_t something; - - (void) *filename; /* to avoid compilation warning */ - - /* Is there room to save the caller's information? */ - if ( current_calls >= MAX_RECORDABLE_CALLS ) - { /* No */ - fprintf( stderr, "memory.c: No more room to store call stack info. Please increase MAX_RECORDABLE_CALLS" ); - exit( -1 ); - } - /* Valid Function Name? */ - if ( fctname[0] == 0 ) - { /* No */ - fprintf( stderr, "memory.c: Invalid function name for call stack info." ); - exit( -1 ); - } - /* Save the Name of the Calling Function in the Table */ - strncpy( stack_callers[0][current_calls].function_name, fctname, MAX_FCT_NAME_LENGTH ); - stack_callers[0][current_calls].function_name[MAX_FCT_NAME_LENGTH] = 0; /* Nul Terminate */ - /* Save the Stack Pointer */ - stack_callers[0][current_calls].stack_ptr = &something; - /* Increase Stack Calling Tree Level */ - current_calls++; - /* Is this the First Time or the Worst Case? */ - if ( &something < ptr_max_stack || ptr_max_stack == NULL ) - { /* Yes */ - /* Save Info about it */ - ptr_max_stack = &something; - wc_frame = frame; - strncpy( location_max_stack, fctname, sizeof( location_max_stack ) - 1 ); - location_max_stack[sizeof( location_max_stack ) - 1] = '\0'; - - /* Save Call Tree */ - memmove( stack_callers[1], stack_callers[0], sizeof( caller_info ) * current_calls ); - - /* Terminate the List (Unless Full) */ - if ( current_calls < MAX_RECORDABLE_CALLS ) - { - stack_callers[1][current_calls].function_name[0] = 0; - } - } - return 0 /* for Now */; -} - -int pop_stack( const char *filename, const char *fctname ) -{ - caller_info *caller_info_ptr; - - (void) *filename; /* to avoid compilation warning */ - - /* Decrease Stack Calling */ - current_calls--; - - /* Get Pointer to Caller Information */ - caller_info_ptr = &stack_callers[0][current_calls]; - - /* Check if Names Match */ - if ( strncmp( caller_info_ptr->function_name, fctname, MAX_FCT_NAME_LENGTH ) != 0 ) - { - fprintf( stderr, "memory.c: Invalid pop_stack()" ); - exit( -1 ); - } - - /* Erase Entry */ - caller_info_ptr->function_name[0] = 0; - - return 0 /* for Now */; -} - -void print_stack_call_tree( void ) -{ - caller_info *caller_info_ptr; - int call_level; - - fprintf( stdout, "Stack Call Tree (frame #%5d) Stack Usage in words\n", wc_frame ); - caller_info_ptr = &stack_callers[1][0]; - for ( call_level = 0; call_level < MAX_RECORDABLE_CALLS; call_level++ ) - { - /* Done? */ - if ( caller_info_ptr->function_name[0] == 0 ) - break; - /* Print Name */ - fprintf( stdout, "%-42s", caller_info_ptr->function_name ); - /* Print Stack Usage (Based on Difference) */ - if ( call_level != 0 ) - { - fprintf( stdout, "%ld\n", ( ( caller_info_ptr - 1 )->stack_ptr - caller_info_ptr->stack_ptr ) * sizeof( int16_t ) / sizeof( float ) ); - } - else - fprintf( stdout, "\n" ); - /* Advance */ - caller_info_ptr++; - } - fprintf( stdout, "\n" ); -} - -#endif /* WMOPS */ diff --git a/lib_debug/sba_debug.c b/lib_debug/sba_debug.c index 68fd39f4c083e412ef023a1e357fd1fe52710608..040cadf88774b68fad67286377ef5ad721c15ee5 100644 --- a/lib_debug/sba_debug.c +++ b/lib_debug/sba_debug.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,10 +37,9 @@ #include #include "options.h" #include "ivas_cnst.h" -#include "prot.h" #include "sba_debug.h" #include -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_SBA #include #include "tinywaveout_c.h" diff --git a/lib_debug/sba_debug.h b/lib_debug/sba_debug.h index 86e07e5a41ae08d484b655c131f37ce2c9b6dd97..cd4fd58c11a22f39e99b8d73a6c6dd12ce7212d1 100644 --- a/lib_debug/sba_debug.h +++ b/lib_debug/sba_debug.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_debug/segsnr.c b/lib_debug/segsnr.c index 561a4e239d4987558e9c0346c44520ed35370466..5e5cee48b0d6f629890140af827eea0571350c3e 100644 --- a/lib_debug/segsnr.c +++ b/lib_debug/segsnr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -34,12 +34,12 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include #include "options.h" #include "prot.h" -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP #ifdef OUTPUT_SNR /*_____________________________________________________________________ @@ -101,3 +101,5 @@ float segsnr( float x[], float xe[], int16_t n, int16_t nseg ) return ( snr ); } #endif + +#undef WMC_TOOL_SKIP diff --git a/lib_debug/snr.c b/lib_debug/snr.c index a524b35c26e6d5f6004cd8a3600f82060785e81e..e9fad1c3446f74c27a3f5ee867bee22299aa60da 100644 --- a/lib_debug/snr.c +++ b/lib_debug/snr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -32,15 +32,15 @@ #include #include "options.h" -#include "rom_com.h" #ifdef DEBUGGING #include "debug.h" #endif #include #include -#include "wmops.h" +#include +#include "wmc_auto.h" #include "cnst.h" -#include "prot.h" +#include "ivas_cnst.h" #ifdef DEBUGGING @@ -79,6 +79,133 @@ static float mem_deemph_y[MAX_INPUT_CHANNELS] = { 0 }; static float mem_synth_snr[MAX_INPUT_CHANNELS][M]; +/*-------------------------------------------------------------------* + * Local functions - they are copies of functions declared in prot.h but + here we do not want to include prot.h due to its dependencies + *--------------------------------------------------------------------*/ + +static float sum2_f( + const float *vec, /* i : input vector */ + const int16_t lvec /* i : length of input vector */ +) +{ + int16_t i; + float tmp; + + tmp = 0.0f; + for ( i = 0; i < lvec; i++ ) + { + tmp += vec[i] * vec[i]; + } + + return tmp; +} + + +static void mvr2r( + const float x[], /* i : input vector */ + float y[], /* o : output vector */ + const int16_t n /* i : vector size */ +) +{ + int16_t i; + + if ( n <= 0 ) + { + /* cannot transfer vectors with size 0 */ + return; + } + + if ( y < x ) + { + for ( i = 0; i < n; i++ ) + { + y[i] = x[i]; + } + } + else + { + for ( i = n - 1; i >= 0; i-- ) + { + y[i] = x[i]; + } + } + + return; +} + +static void residu( + const float *a, /* i : LP filter coefficients */ + const int16_t m, /* i : order of LP filter */ + const float *x, /* i : input signal (usually speech) */ + float *y, /* o : output signal (usually residual) */ + const int16_t l /* i : size of filtering */ +) +{ + float s; + int16_t i, j; + + for ( i = 0; i < l; i++ ) + { + s = x[i]; + for ( j = 1; j <= m; j++ ) + { + s += a[j] * x[i - j]; + } + y[i] = s; + } + + return; +} + +static void deemph( + float *signal, /* i/o: signal */ + const float mu, /* i : deemphasis factor */ + const int16_t L, /* i : vector size */ + float *mem /* i/o: memory (y[-1]) */ +) +{ + int16_t i; + + signal[0] = signal[0] + mu * ( *mem ); + for ( i = 1; i < L; i++ ) + { + signal[i] = signal[i] + mu * signal[i - 1]; + } + + *mem = signal[L - 1]; + + if ( ( *mem < 1e-10 ) & ( *mem > -1e-10 ) ) + { + *mem = 0; + } + + return; +} + +static void weight_a( + const float *a, /* i : LP filter coefficients */ + float *ap, /* o : weighted LP filter coefficients */ + const float gamma, /* i : weighting factor */ + const int16_t m /* i : order of LP filter */ +) +{ + float f; + int16_t i; + + ap[0] = a[0]; + f = gamma; + + for ( i = 1; i <= m; i++ ) + { + ap[i] = f * a[i]; + f *= gamma; + } + + return; +} + + /*-------------------------------------------------------------------* * snr() * diff --git a/lib_debug/wmc_auto.c b/lib_debug/wmc_auto.c new file mode 100644 index 0000000000000000000000000000000000000000..112336225fd2a838c769f623a126ddfcbcb9108e --- /dev/null +++ b/lib_debug/wmc_auto.c @@ -0,0 +1,1908 @@ +/* + * (C) 2022 copyright VoiceAge Corporation. All Rights Reserved. + * + * This software is protected by copyright law and by international treaties. The source code, and all of its derivations, + * is provided by VoiceAge Corporation under the "ITU-T Software Tools' General Public License". Please, read the license file + * or refer to ITU-T Recommendation G.191 on "SOFTWARE TOOLS FOR SPEECH AND AUDIO CODING STANDARDS". + * + * Any use of this software is permitted provided that this notice is not removed and that neither the authors nor + * VoiceAge Corporation are deemed to have made any representations as to the suitability of this software + * for any purpose nor are held responsible for any defects of this software. THERE IS NO WARRANTY FOR THIS SOFTWARE. + * + * Authors: Guy Richard, Vladimir Malenovsky (Vladimir.Malenovsky@USherbrooke.ca) + */ + +#include +#include +#include +#include +#include + +#ifndef _MSC_VER +#include +#include +#else +#include +#endif + +#include "options.h" +#include "wmc_auto.h" + + +#define WMC_TOOL_SKIP /* Skip the instrumentation of this file, if invoked by accident */ + +#ifdef WMOPS + +/*-------------------------------------------------------------------* + * Complexity counting tool + *--------------------------------------------------------------------*/ + +#define MAX_RECORDS 1024 +#define MAX_CHAR 64 +#define MAX_STACK 64 +#define DOUBLE_MAX 0x80000000 + +struct wmops_record +{ + char label[MAX_CHAR]; + long call_number; + long update_cnt; + int call_tree[MAX_RECORDS]; + double start_selfcnt; + double current_selfcnt; + double max_selfcnt; + double min_selfcnt; + double tot_selfcnt; + double start_cnt; /* The following take into account the decendants */ + double current_cnt; + double max_cnt; + double min_cnt; + double tot_cnt; +#ifdef WMOPS_WC_FRAME_ANALYSIS + int32_t current_call_number; + double wc_cnt; + double wc_selfcnt; + int32_t wc_call_number; +#endif +}; + +double ops_cnt; +double prom_cnt; +double inst_cnt[NUM_INST]; + +static struct wmops_record wmops[MAX_RECORDS]; +static int stack[MAX_STACK]; +static int sptr; +static int num_records; +static int current_record; +static long update_cnt; +static double start_cnt; +static double max_cnt; +static double min_cnt; +static double inst_cnt_wc[NUM_INST]; +static long fnum_cnt_wc; + +static int *heap_allocation_call_tree = NULL, heap_allocation_call_tree_size = 0, heap_allocation_call_tree_max_size = 0; + + +void reset_wmops( void ) +{ + int i, j; + + for ( i = 0; i < MAX_RECORDS; i++ ) + { + strcpy( &wmops[i].label[0], "\0" ); + wmops[i].call_number = 0; + wmops[i].update_cnt = 0; + for ( j = 0; j < MAX_RECORDS; j++ ) + { + wmops[i].call_tree[j] = -1; + } + wmops[i].start_selfcnt = 0.0; + wmops[i].current_selfcnt = 0.0; + wmops[i].max_selfcnt = 0.0; + wmops[i].min_selfcnt = DOUBLE_MAX; + wmops[i].tot_selfcnt = 0.0; + wmops[i].start_cnt = 0.0; + wmops[i].current_cnt = 0.0; + wmops[i].max_cnt = 0.0; + wmops[i].min_cnt = DOUBLE_MAX; + wmops[i].tot_cnt = 0.0; +#ifdef WMOPS_WC_FRAME_ANALYSIS + wmops[i].wc_cnt = 0.0; + wmops[i].wc_selfcnt = 0.0; + wmops[i].current_call_number = 0; +#endif + } + + for ( i = 0; i < MAX_STACK; i++ ) + { + stack[i] = -1; + } + sptr = 0; + num_records = 0; + current_record = -1; + update_cnt = 0; + + max_cnt = 0.0; + min_cnt = DOUBLE_MAX; + start_cnt = 0.0; + ops_cnt = 0.0; +} + + +void push_wmops( const char *label ) +{ + int new_flag; + int i, j; + + /* Check if new function record label */ + new_flag = 1; + for ( i = 0; i < num_records; i++ ) + { + if ( strcmp( wmops[i].label, label ) == 0 ) + { + new_flag = 0; + break; + } + } + + /* Configure new record */ + if ( new_flag ) + { + if ( num_records >= MAX_RECORDS ) + { + fprintf( stdout, "push_wmops(): exceeded MAX_RECORDS count.\n\n" ); + exit( -1 ); + } + strcpy( wmops[i].label, label ); + num_records++; + } + + /* Push current context onto stack */ + if ( current_record >= 0 ) + { + if ( sptr >= MAX_STACK ) + { + fprintf( stdout, "\r push_wmops(): stack exceeded, try inreasing MAX_STACK\n" ); + exit( -1 ); + } + stack[sptr++] = current_record; + + /* accumulate op counts */ + wmops[current_record].current_selfcnt += ops_cnt - wmops[current_record].start_selfcnt; + + /* update call tree */ + for ( j = 0; j < MAX_RECORDS; j++ ) + { + if ( wmops[i].call_tree[j] == current_record ) + { + break; + } + else if ( wmops[i].call_tree[j] == -1 ) + { + wmops[i].call_tree[j] = current_record; + break; + } + } + } + + /* init current record */ + current_record = i; + wmops[current_record].start_selfcnt = ops_cnt; + wmops[current_record].start_cnt = ops_cnt; + wmops[current_record].call_number++; +#ifdef WMOPS_WC_FRAME_ANALYSIS + wmops[current_record].current_call_number++; +#endif + + return; +} + + +void pop_wmops( void ) +{ + + /* Check for underflow */ + if ( current_record < 0 ) + { + fprintf( stdout, "\r pop_wmops(): stack underflow, too many calls to pop_wmops()\n" ); + exit( -1 ); + } + + /* update count of current record */ + wmops[current_record].current_selfcnt += ops_cnt - wmops[current_record].start_selfcnt; + wmops[current_record].current_cnt += ops_cnt - wmops[current_record].start_cnt; + + /* Get back previous context from stack */ + if ( sptr > 0 ) + { + current_record = stack[--sptr]; + wmops[current_record].start_selfcnt = ops_cnt; + } + else + { + current_record = -1; + } + + return; +} + + +void update_wmops( void ) +{ + int i; + double current_cnt; +#ifdef WMOPS_PER_FRAME + static FILE *fid = NULL; + const char filename[] = "wmops_analysis"; + float tmpF; +#endif + + if ( sptr != 0 ) + { + fprintf( stdout, "update_wmops(): Stack must be empty!\n" ); + exit( -1 ); + } + +#ifdef WMOPS_PER_FRAME + /* Check, if the output file has already been opened */ + if ( fid == NULL ) + { + fid = fopen( filename, "wb" ); + + if ( fid == NULL ) + { + fprintf( stderr, "\nCannot open %s!\n\n", filename ); + exit( -1 ); + } + } + + /* Write current complexity to the external file */ + tmpF = (float) ( FAC * wmops[0].current_cnt ); + fwrite( &tmpF, sizeof( float ), 1, fid ); +#endif + +#ifdef WMOPS_WC_FRAME_ANALYSIS + if ( ops_cnt - start_cnt > max_cnt ) + { + for ( i = 0; i < num_records; i++ ) + { + wmops[i].wc_cnt = wmops[i].current_cnt; + wmops[i].wc_selfcnt = wmops[i].current_selfcnt; + wmops[i].wc_call_number = wmops[i].current_call_number; + } + } +#endif + + for ( i = 0; i < num_records; i++ ) + { + wmops[i].tot_selfcnt += wmops[i].current_selfcnt; + wmops[i].tot_cnt += wmops[i].current_cnt; + + if ( wmops[i].current_selfcnt > 0 ) + { + if ( wmops[i].current_selfcnt > wmops[i].max_selfcnt ) + { + wmops[i].max_selfcnt = wmops[i].current_selfcnt; + } + + if ( wmops[i].current_selfcnt < wmops[i].min_selfcnt ) + { + wmops[i].min_selfcnt = wmops[i].current_selfcnt; + } + } + + wmops[i].current_selfcnt = 0; + + if ( wmops[i].current_cnt > 0 ) + { + if ( wmops[i].current_cnt > wmops[i].max_cnt ) + { + wmops[i].max_cnt = wmops[i].current_cnt; + } + + if ( wmops[i].current_cnt < wmops[i].min_cnt ) + { + wmops[i].min_cnt = wmops[i].current_cnt; + } + + wmops[i].update_cnt++; + } + + wmops[i].current_cnt = 0; +#ifdef WMOPS_WC_FRAME_ANALYSIS + wmops[i].current_call_number = 0; +#endif + } + + current_cnt = ops_cnt - start_cnt; + if ( current_cnt > max_cnt ) + { + max_cnt = current_cnt; + + for ( i = 0; i < NUM_INST; i++ ) + { + inst_cnt_wc[i] = inst_cnt[i]; + } + + fnum_cnt_wc = update_cnt + 1; + } + + if ( current_cnt < min_cnt ) + { + min_cnt = current_cnt; + } + + for ( i = 0; i < NUM_INST; i++ ) + { + inst_cnt[i] = 0.0; + } + + start_cnt = ops_cnt; + + /* increment frame counter */ + update_cnt++; + + return; +} + + +void print_wmops( void ) +{ + int i; + + char *sfmts = "%20s %8s %8s %7s %7s\n"; + char *dfmts = "%20s %8.2f %8.3f %7.3f %7.3f\n"; + char *sfmt = "%20s %8s %8s %7s %7s %7s %7s %7s\n"; + char *dfmt = "%20s %8.2f %8.3f %7.3f %7.3f %7.3f %7.3f %7.3f\n"; + +#ifdef WMOPS_WC_FRAME_ANALYSIS + int j, label_len, max_label_len; + char *sfmtt = "%20s %4s %15s\n"; + char *dfmtt = "%20s %4d "; +#endif + + fprintf( stdout, "\n\n --- Complexity analysis [WMOPS] --- \n\n" ); + + fprintf( stdout, "%54s %23s\n", "|------ SELF ------|", "|--- CUMULATIVE ---|" ); + fprintf( stdout, sfmt, " routine", " calls", " min ", " max ", " avg ", " min ", " max ", " avg " ); + fprintf( stdout, sfmt, "---------------", "------", "------", "------", "------", "------", "------", "------" ); + + for ( i = 0; i < num_records; i++ ) + { + fprintf( stdout, dfmt, wmops[i].label, update_cnt == 0 ? 0 : (float) wmops[i].call_number / update_cnt, + wmops[i].min_selfcnt == DOUBLE_MAX ? 0 : FAC * wmops[i].min_selfcnt, + FAC * wmops[i].max_selfcnt, + wmops[i].update_cnt == 0 ? 0 : FAC * wmops[i].tot_selfcnt / wmops[i].update_cnt, + wmops[i].min_cnt == DOUBLE_MAX ? 0 : FAC * wmops[i].min_cnt, + FAC * wmops[i].max_cnt, + wmops[i].update_cnt == 0 ? 0 : FAC * wmops[i].tot_cnt / wmops[i].update_cnt ); + } + + fprintf( stdout, sfmts, "---------------", "------", "------", "------", "------" ); + fprintf( stdout, dfmts, "total", (float) update_cnt, FAC * min_cnt, FAC * max_cnt, update_cnt == 0 ? 0 : FAC * ops_cnt / update_cnt ); + fprintf( stdout, "\n" ); + +#ifdef WMOPS_WC_FRAME_ANALYSIS + /* calculate maximum label length for compact prinout */ + max_label_len = 0; + for ( i = 0; i < num_records; i++ ) + { + label_len = strlen( wmops[i].label ); + if ( label_len > max_label_len ) + { + max_label_len = label_len; + } + } + max_label_len += 4; + + fprintf( stdout, "\nComplexity analysis for the worst-case frame %ld:\n", fnum_cnt_wc ); + fprintf( stdout, "%*s %8s %10s %12s\n", max_label_len, " routine", " calls", " SELF", " CUMULATIVE" ); + fprintf( stdout, "%*s %8s %10s %10s\n", max_label_len, "---------------", "------", "------", "----------" ); + + for ( i = 0; i < num_records; i++ ) + { + fprintf( stdout, "%*s %8d %10.3f %12.3f\n", max_label_len, wmops[i].label, wmops[i].wc_call_number, FAC * wmops[i].wc_selfcnt, FAC * wmops[i].wc_cnt ); + } + + fprintf( stdout, "\nCall Tree:\n\n" ); + fprintf( stdout, sfmtt, " function", "num", "called by: " ); + fprintf( stdout, sfmtt, "---------------", "---", "--------------" ); + + for ( i = 0; i < num_records; i++ ) + { + fprintf( stdout, dfmtt, wmops[i].label, i ); + for ( j = 0; wmops[i].call_tree[j] != -1; j++ ) + { + if ( j != 0 ) + { + fprintf( stdout, ", " ); + } + fprintf( stdout, "%d", wmops[i].call_tree[j] ); + } + fprintf( stdout, "\n" ); + } + + fprintf( stdout, sfmtt, "---------------", "---", "--------------" ); + fprintf( stdout, "\n\n" ); + + fprintf( stdout, "\nInstruction type analysis for the worst-case frame %ld:\n\n", fnum_cnt_wc ); /* added -- JPA */ + for ( i = 0; i < NUM_INST; i++ ) + { + switch ( (enum instructions) i ) + { + case _ADD: + fprintf( stdout, "\tAdds: %12.1f\n", inst_cnt_wc[i] ); + break; + case _ABS: + fprintf( stdout, "\tAbsolutes: %12.1f\n", inst_cnt_wc[i] ); + break; + case _MULT: + fprintf( stdout, "\tMultiplies: %12.1f\n", inst_cnt_wc[i] ); + break; + case _MAC: + fprintf( stdout, "\tMACs: %12.1f\n", inst_cnt_wc[i] ); + break; + case _MOVE: + fprintf( stdout, "\tMoves: %12.1f\n", inst_cnt_wc[i] ); + break; + case _STORE: + fprintf( stdout, "\tStores: %12.1f\n", inst_cnt_wc[i] ); + break; + case _LOGIC: + fprintf( stdout, "\tLogicals: %12.1f\n", inst_cnt_wc[i] ); + break; + case _SHIFT: + fprintf( stdout, "\tShifts: %12.1f\n", inst_cnt_wc[i] ); + break; + case _BRANCH: + fprintf( stdout, "\tBranches: %12.1f\n", inst_cnt_wc[i] ); + break; + case _DIV: + fprintf( stdout, "\tDivisions: %12.1f\n", inst_cnt_wc[i] ); + break; + case _SQRT: + fprintf( stdout, "\tSquare Root: %12.1f\n", inst_cnt_wc[i] ); + break; + case _TRANS: + fprintf( stdout, "\tTrans: %12.1f\n", inst_cnt_wc[i] ); + break; + case _FUNC: + fprintf( stdout, "\tFunc Call: %12.1f\n", inst_cnt_wc[i] ); + break; + case _LOOP: + fprintf( stdout, "\tLoop Init: %12.1f\n", inst_cnt_wc[i] ); + break; + case _INDIRECT: + fprintf( stdout, "\tIndirect Addr: %12.1f\n", inst_cnt_wc[i] ); + break; + case _PTR_INIT: + fprintf( stdout, "\tPointer Init: %12.1f\n", inst_cnt_wc[i] ); + break; + case _TEST: + fprintf( stdout, "\tExtra condit.: %12.1f\n", inst_cnt_wc[i] ); + break; + case _POWER: + fprintf( stdout, "\tExponential: %12.1f\n", inst_cnt_wc[i] ); + break; + case _LOG: + fprintf( stdout, "\tLogarithm: %12.1f\n", inst_cnt_wc[i] ); + break; + case _MISC: + fprintf( stdout, "\tAll other op.: %12.1f\n", inst_cnt_wc[i] ); + break; + default: + fprintf( stdout, "\tERROR: Invalid instruction type: %d\n\n", i ); + } + } +#endif + + return; +} + + +/*-------------------------------------------------------------------* + * Memory counting tool measuring RAM usage (stack and heap) + * + * Maximum RAM is measured by monitoring the total allocated memory (stack and heap) in each frame. + * + * Maximum stack is measured by monitoring the difference between the 'top' and 'bottom' of the stack. The 'bottom' of the stack is updated in each function + * with a macro 'func_start_' which is inserted automatically to all functions during the instrumentation process. + * + * Maximum heap is measured by summing the sizes of all memory blocks allocated by malloc() or calloc() and deallocated by free(). The maximum heap size is + * updated each time when the macros malloc_() or calloc_() is invoked. The macros 'malloc_ and calloc_' are inserted automatically during the instrumentation process. + * As part of heap measurements, intra-frame heap and inter-frame heap are measured separately. Intra-frame heap refers to heap memory which is allocated and deallocated + * within a single frame. Inter-frame heap, on the contrary, refers to heap memory which is reserved for more than one frame. + * + * In order to run the memory counting tool the function reset_mem(cnt_size) must be called at the beginning of the encoding/decoding process. + * The unit in which memory consumption is reported is set via the parameter 'cnt_size'. It can be set to 0 (bytes), 1 (32b words) or 2 (64b words). + * At the end of the encoding/decoding process, 'print_mem()' function may be called to print basic information about memory consumption. If the macro 'MEM_COUNT_DETAILS' + * is activated, detailed information is printed + * + * The macro 'WMOPS' needs to be activated to enable memory counting. To avoid the instrumentation of malloc()/calloc()/free() calls, use + * #define WMC_TOOL_SKIP ... #undef WMC_TOOL_SKIP macro pair around the malloc(), calloc() and free(). + *--------------------------------------------------------------------*/ + +#define MAX_RECORDABLE_CALLS 100 +#define MAX_FUNCTION_NAME_LENGTH 35 /* Maximum length that the function string will be truncated to */ +#define MAX_PARAMS_LENGTH 50 /* Maximum length that the parameter string will be truncated to */ +#define MAX_NUM_RECORDS 300 /* Initial maximum number of memory records -> mightb be increased during runtime, if needed */ +#define MAX_NUM_RECORDS_REALLOC_STEP 50 /* When re-allocating the list of memory records, increase the number of records by this number */ + +/* This is the value (in bytes) towards which the block size is rounded. For example, a block of 123 bytes, when using + a 32 bits system, will end up taking 124 bytes since the last unused byte cannot be used for another block. */ +#ifdef MEM_ALIGN_64BITS +#define BLOCK_ROUNDING 8 /* Align on 64 Bits */ +#else +#define BLOCK_ROUNDING 4 /* Align on 32 Bits */ +#endif + +#define N_32BITS_BLOCKS ( BLOCK_ROUNDING / sizeof( int32_t ) ) + +#define MAGIC_VALUE_OOB 0x12A534F0 /* Signature value which is inserted before and after each allocated memory block, used to detect out-of-bound access */ +#define MAGIC_VALUE_USED ( ~MAGIC_VALUE_OOB ) /* Value used to pre-fill allocated memory blocks, used to calculate actual memory usage */ +#define OOB_START 0x1 /* Flag indicating out-of-bounds access before memory block */ +#define OOB_END 0x2 /* Flag indicating out-of-bounds access after memory block */ + +#define ROUND_BLOCK_SIZE( n ) ( ( ( n ) + BLOCK_ROUNDING - 1 ) & ~( BLOCK_ROUNDING - 1 ) ) +#define IS_CALLOC( str ) ( str[0] == 'c' ) + +#ifdef MEM_COUNT_DETAILS +const char *csv_filename = "mem_analysis.csv"; +static FILE *fid_csv_filename = NULL; +#endif + +typedef struct +{ + char function_name[MAX_FUNCTION_NAME_LENGTH + 1]; + int16_t *stack_ptr; +} caller_info; + +caller_info stack_callers[2][MAX_RECORDABLE_CALLS]; + +typedef struct +{ + char name[MAX_FUNCTION_NAME_LENGTH + 1]; /* +1 for NUL */ + char params[1 + MAX_PARAMS_LENGTH + 1]; /* +1 for 'm'/'c' alloc & +1 for NUL */ + unsigned long hash; + int lineno; + void *block_ptr; + int block_size; + unsigned long total_block_size; /* Cumulative sum of the allocated size in the session */ + unsigned long total_used_size; /* Cumulative sum of the used size in the session */ + int wc_heap_size_intra_frame; /* Worst-Case Intra-Frame Heap Size */ + int wc_heap_size_inter_frame; /* Worst-Case Inter-Frame Heap Size */ + int frame_allocated; /* Frame number in which the Memory Block has been allocated (-1 if not allocated at the moment) */ + int OOB_Flag; + int noccurances; /* Number of times that the memory block has been allocated in a frame */ +} allocator_record; + +allocator_record *allocation_list = NULL; + +static int16_t *ptr_base_stack = 0; /* Pointer to the bottom of stack (base pointer). Stack grows up. */ +static int16_t *ptr_current_stack = 0; /* Pointer to the current stack pointer */ +static int16_t *ptr_max_stack = 0; /* Pointer to the maximum stack pointer (the farest point from the bottom of stack) */ +static int32_t wc_stack_frame = 0; /* Frame corresponding to the worst-case stack usage */ +static int32_t wc_ram_size, wc_ram_frame; +static int32_t current_heap_size; +static int current_calls = 0; +static char location_max_stack[256] = "undefined"; +static int Num_Records, Max_Num_Records; +static size_t Stat_Cnt_Size = USE_BYTES; +static const char *Count_Unit[] = { "bytes", "words", "words" }; + +static int *list_wc_intra_frame_heap, n_items_wc_intra_frame_heap, max_items_wc_intra_frame_heap, size_wc_intra_frame_heap, location_wc_intra_frame_heap; +static int *list_current_inter_frame_heap, n_items_current_inter_frame_heap, max_items_current_inter_frame_heap, size_current_inter_frame_heap; +static int *list_wc_inter_frame_heap, n_items_wc_inter_frame_heap, max_items_wc_inter_frame_heap, size_wc_inter_frame_heap, location_wc_inter_frame_heap; + +/* Local Functions */ +static unsigned long malloc_hash( const char *func_name, int func_lineno, char *size_str ); +allocator_record *get_mem_record( unsigned long *hash, const char *func_name, int func_lineno, char *size_str, int *index_record ); +static void *mem_alloc_block( size_t size, const char *size_str ); + +/*-------------------------------------------------------------------* + * reset_mem() + * + * Initialize/reset memory counting tool (stack and heap) + *--------------------------------------------------------------------*/ + +void reset_mem( Counting_Size cnt_size ) +{ + int16_t something; + size_t tmp_size; + + /* initialize stack pointers */ + ptr_base_stack = &something; + ptr_max_stack = ptr_base_stack; + ptr_current_stack = ptr_base_stack; + + Stat_Cnt_Size = cnt_size; + + /* Check, if sizeof(int32_t) is 4 bytes */ + tmp_size = sizeof( int32_t ); + if ( tmp_size != 4 ) + { + fprintf( stderr, "Error: Expecting 'int32_t' to be a 32 Bits Integer!" ); + exit( -1 ); + } + + /* create allocation list for malloc() memory blocks */ + if ( allocation_list == NULL ) + { + allocation_list = malloc( MAX_NUM_RECORDS * sizeof( allocator_record ) ); + } + + if ( allocation_list == NULL ) + { + fprintf( stderr, "Error: Unable to Create List of Memory Blocks!" ); + exit( -1 ); + } + + Num_Records = 0; + Max_Num_Records = MAX_NUM_RECORDS; + + wc_ram_size = 0; + wc_ram_frame = -1; + current_heap_size = 0; + + /* heap allocation tree */ + heap_allocation_call_tree_max_size = MAX_NUM_RECORDS; + if ( heap_allocation_call_tree == NULL ) + { + heap_allocation_call_tree = (int *) malloc( heap_allocation_call_tree_max_size * sizeof( int ) ); + memset( heap_allocation_call_tree, -1, heap_allocation_call_tree_max_size * sizeof( int ) ); + } + heap_allocation_call_tree_size = 0; + + /* wc intra-frame heap */ + max_items_wc_intra_frame_heap = MAX_NUM_RECORDS; + if ( list_wc_intra_frame_heap == NULL ) + { + list_wc_intra_frame_heap = (int *) malloc( max_items_wc_intra_frame_heap * sizeof( int ) ); + memset( list_wc_intra_frame_heap, -1, max_items_wc_intra_frame_heap * sizeof( int ) ); + } + n_items_wc_intra_frame_heap = 0; + size_wc_intra_frame_heap = 0; + location_wc_intra_frame_heap = -1; + + /* current inter-frame heap */ + max_items_current_inter_frame_heap = MAX_NUM_RECORDS; + if ( list_current_inter_frame_heap == NULL ) + { + list_current_inter_frame_heap = (int *) malloc( max_items_current_inter_frame_heap * sizeof( int ) ); + memset( list_current_inter_frame_heap, -1, max_items_current_inter_frame_heap * sizeof( int ) ); + } + n_items_current_inter_frame_heap = 0; + size_current_inter_frame_heap = 0; + + /* wc inter-frame heap */ + max_items_wc_inter_frame_heap = MAX_NUM_RECORDS; + if ( list_wc_inter_frame_heap == NULL ) + { + list_wc_inter_frame_heap = (int *) malloc( max_items_wc_inter_frame_heap * sizeof( int ) ); + memset( list_wc_inter_frame_heap, -1, max_items_wc_inter_frame_heap * sizeof( int ) ); + } + n_items_wc_inter_frame_heap = 0; + size_wc_inter_frame_heap = 0; + location_wc_inter_frame_heap = -1; + +#ifdef MEM_COUNT_DETAILS + /* Check, if the .csv file has already been opened */ + if ( fid_csv_filename == NULL ) + { + fid_csv_filename = fopen( csv_filename, "wb" ); + + if ( fid_csv_filename == NULL ) + { + fprintf( stderr, "\nCannot open %s!\n\n", csv_filename ); + exit( -1 ); + } + } + else + { + /* reset file */ + rewind( fid_csv_filename ); + } +#endif + + return; +} + +/*-------------------------------------------------------------------* + * reset_stack() + * + * Reset stack pointer + *--------------------------------------------------------------------*/ + +void reset_stack( void ) +{ + int16_t something; + + /* initialize/reset stack pointers */ + ptr_base_stack = &something; + ptr_max_stack = ptr_base_stack; + ptr_current_stack = ptr_base_stack; + + return; +} + +/*-------------------------------------------------------------------* + * push_stack() + * + * Check the current stack pointer and update the maximum stack pointer, if new maximum found. + *--------------------------------------------------------------------*/ + +int push_stack( const char *filename, const char *fctname ) +{ + int16_t something; + int32_t current_stack_size; + + ptr_current_stack = &something; + + (void) *filename; /* to avoid compilation warning */ + + /* Is there room to save the caller's information? */ + if ( current_calls >= MAX_RECORDABLE_CALLS ) + { /* No */ + fprintf( stderr, "No more room to store call stack info. Please increase MAX_RECORDABLE_CALLS" ); + exit( -1 ); + } + + /* Valid Function Name? */ + if ( fctname[0] == 0 ) + { /* No */ + fprintf( stderr, "Invalid function name for call stack info." ); + exit( -1 ); + } + + /* Save the Name of the Calling Function in the Table */ + strncpy( stack_callers[0][current_calls].function_name, fctname, MAX_FUNCTION_NAME_LENGTH ); + stack_callers[0][current_calls].function_name[MAX_FUNCTION_NAME_LENGTH] = 0; /* Nul Terminate */ + + /* Save the Stack Pointer */ + stack_callers[0][current_calls].stack_ptr = ptr_current_stack; + + /* Increase Stack Calling Tree Level */ + current_calls++; + + /* Is this the First Time or the Worst Case? */ + if ( ptr_current_stack < ptr_max_stack || ptr_max_stack == NULL ) + { /* Yes */ + /* Save Info about it */ + ptr_max_stack = ptr_current_stack; + + wc_stack_frame = update_cnt; /* current frame number is stored in the variable update_cnt and updated in the function update_wmops() */ + strncpy( location_max_stack, fctname, sizeof( location_max_stack ) - 1 ); + location_max_stack[sizeof( location_max_stack ) - 1] = '\0'; + + /* Save Call Tree */ + memmove( stack_callers[1], stack_callers[0], sizeof( caller_info ) * current_calls ); + + /* Terminate the List (Unless Full) */ + if ( current_calls < MAX_RECORDABLE_CALLS ) + { + stack_callers[1][current_calls].function_name[0] = 0; + } + } + + /* Check, if This is the New Worst-Case RAM (stack + heap) */ + current_stack_size = (int32_t) ( ( ( ptr_base_stack - ptr_current_stack ) * sizeof( int16_t ) ) ); + + if ( current_stack_size < 0 ) + { + /* prevent negative stack size */ + current_stack_size = 0; + } + + if ( current_stack_size + current_heap_size > wc_ram_size ) + { + wc_ram_size = current_stack_size + current_heap_size; + wc_ram_frame = update_cnt; + } + + return 0 /* for Now */; +} + +/*-------------------------------------------------------------------* + * pop_stack() + * + * Remove stack caller entry from the list + *--------------------------------------------------------------------*/ + +int pop_stack( const char *filename, const char *fctname ) +{ + caller_info *caller_info_ptr; + + (void) *filename; /* to avoid compilation warning */ + + /* Decrease Stack Calling */ + current_calls--; + + /* Get Pointer to Caller Information */ + caller_info_ptr = &stack_callers[0][current_calls]; + + /* Check, if Names Match */ + if ( strncmp( caller_info_ptr->function_name, fctname, MAX_FUNCTION_NAME_LENGTH ) != 0 ) + { + fprintf( stderr, "Invalid usage of pop_stack()" ); + exit( -1 ); + } + + /* Erase Entry */ + caller_info_ptr->function_name[0] = 0; + + /* Retrieve previous stack pointer */ + if ( current_calls == 0 ) + { + ptr_current_stack = ptr_base_stack; + } + else + { + ptr_current_stack = stack_callers[0][current_calls - 1].stack_ptr; + } + + return 0 /* for Now */; +} + +#ifdef MEM_COUNT_DETAILS +/*-------------------------------------------------------------------* + * print_stack_call_tree() + * + * Print detailed information about worst-case stack usage + *--------------------------------------------------------------------*/ + +static void print_stack_call_tree( void ) +{ + caller_info *caller_info_ptr; + int call_level; + char fctname[MAX_FUNCTION_NAME_LENGTH + 1]; + + fprintf( stdout, "\nList of functions when maximum stack size is reached:\n\n" ); + + caller_info_ptr = &stack_callers[1][0]; + for ( call_level = 0; call_level < MAX_RECORDABLE_CALLS; call_level++ ) + { + /* Done? */ + if ( caller_info_ptr->function_name[0] == 0 ) + { + break; + } + + /* Print Name */ + strncpy( fctname, caller_info_ptr->function_name, MAX_FUNCTION_NAME_LENGTH ); + strcat( fctname, "()" ); + fprintf( stdout, "%-42s", fctname ); + + /* Print Stack Usage (Based on Difference) */ + if ( call_level != 0 ) + { + fprintf( stdout, "%lu %s\n", ( ( ( caller_info_ptr - 1 )->stack_ptr - caller_info_ptr->stack_ptr ) * sizeof( int16_t ) ) >> Stat_Cnt_Size, Count_Unit[Stat_Cnt_Size] ); + } + else + { + fprintf( stdout, "%lu %s\n", ( ( ptr_base_stack - caller_info_ptr->stack_ptr ) * sizeof( int16_t ) ) >> Stat_Cnt_Size, Count_Unit[Stat_Cnt_Size] ); + } + + /* Advance */ + caller_info_ptr++; + } + + fprintf( stdout, "\n" ); + + return; +} +#endif + + +/*-------------------------------------------------------------------* + * mem_alloc() + * + * Creates new record, stores auxiliary information about which function allocated the memory, line number, parameters, etc. + * Finally, it allocates physical memory using malloc() + * The function also updates worst-case heap size and worst-case RAM size + *--------------------------------------------------------------------*/ + +void *mem_alloc( + const char *func_name, + int func_lineno, + size_t size, + char *size_str /* the first char indicates m-alloc or c-alloc */ ) +{ + int index_record; + int32_t current_stack_size; + unsigned long hash; + allocator_record *ptr_record; + + if ( size == 0 ) + { + fprintf( stderr, "Fct=%s, Ln=%i: %s!\n", func_name, func_lineno, "Size of Zero not Supported" ); + exit( -1 ); + } + + /* Search for an existing record (that has been de-allocated before) */ + index_record = 0; + while ( ( ptr_record = get_mem_record( &hash, func_name, func_lineno, size_str, &index_record ) ) != NULL ) + { + if ( ptr_record->frame_allocated == -1 ) + { + break; + } + else + { + index_record++; + } + } + + /* Create new record */ + if ( ptr_record == NULL ) + { + if ( Num_Records >= Max_Num_Records ) + { + /* There is no room for a new record -> reallocate memory */ + Max_Num_Records += MAX_NUM_RECORDS_REALLOC_STEP; + allocation_list = realloc( allocation_list, Max_Num_Records * sizeof( allocator_record ) ); + } + + ptr_record = &( allocation_list[Num_Records] ); + + /* Initialize new record */ + ptr_record->hash = hash; + ptr_record->noccurances = 0; + ptr_record->total_block_size = 0; + ptr_record->total_used_size = 0; + ptr_record->frame_allocated = -1; + ptr_record->OOB_Flag = 0; + ptr_record->wc_heap_size_intra_frame = -1; + ptr_record->wc_heap_size_inter_frame = -1; + + index_record = Num_Records; + Num_Records++; + } + + /* Allocate memory block for the new record, add signature before the beginning and after the memory block and fill it with magic value */ + ptr_record->block_ptr = mem_alloc_block( size, size_str ); + + if ( ptr_record->block_ptr == NULL ) + { + fprintf( stderr, "Fct=%s, Ln=%i: %s!\n", func_name, func_lineno, "Error: Cannot Allocate Memory!" ); + exit( -1 ); + } + + /* Save all auxiliary information about the memory block */ + strncpy( ptr_record->name, func_name, MAX_FUNCTION_NAME_LENGTH ); + ptr_record->name[MAX_FUNCTION_NAME_LENGTH] = '\0'; + strncpy( ptr_record->params, size_str, MAX_PARAMS_LENGTH ); /* Note: The size string starts with either 'm' or 'c' to indicate 'm'alloc or 'c'alloc */ + ptr_record->params[MAX_PARAMS_LENGTH] = '\0'; + ptr_record->lineno = func_lineno; + ptr_record->block_size = size; + ptr_record->total_block_size += size; + +#ifdef MEM_COUNT_DETAILS + /* Export heap memory allocation record to the .csv file */ + fprintf( fid_csv_filename, "A,%d,%s,%d,%d\n", update_cnt, ptr_record->name, ptr_record->lineno, ptr_record->block_size ); +#endif + + if ( ptr_record->frame_allocated != -1 ) + { + fprintf( stderr, "Fct=%s, Ln=%i: %s!\n", func_name, func_lineno, "Error: Attempt to Allocate the Same Memory Block with Freeing it First!" ); + exit( -1 ); + } + + ptr_record->frame_allocated = update_cnt; /* Store the current frame number -> later it will be used to determine the total duration */ + + /* Update Heap Size in the current frame */ + current_heap_size += ptr_record->block_size; + + /* Check, if this is the new Worst-Case RAM (stack + heap) */ + current_stack_size = (int32_t) ( ( ( ptr_base_stack - ptr_current_stack ) * sizeof( int16_t ) ) ); + if ( current_stack_size + current_heap_size > wc_ram_size ) + { + wc_ram_size = current_stack_size + current_heap_size; + wc_ram_frame = update_cnt; + } + + /* Add new entry to the heap allocation call tree */ + if ( heap_allocation_call_tree == NULL ) + { + fprintf( stderr, "Error: Heap allocation call tree not created!" ); + exit( -1 ); + } + + /* check, if the maximum size of the call tree has been reached -> resize if so */ + if ( heap_allocation_call_tree_size >= heap_allocation_call_tree_max_size ) + { + heap_allocation_call_tree_max_size += MAX_NUM_RECORDS_REALLOC_STEP; + heap_allocation_call_tree = (int *) realloc( heap_allocation_call_tree, heap_allocation_call_tree_max_size * sizeof( int ) ); + } + + /* push new entry (positive number means push op, neagtive number means pop op; zero index must be converted to 0.01 :-) */ + heap_allocation_call_tree[heap_allocation_call_tree_size++] = index_record; + + return ptr_record->block_ptr; +} + +/*-------------------------------------------------------------------* + * mem_alloc_block() + * + * Physical allocation of memory using malloc(). Appends 'signature' before and after the block, + * pre-fills memory block with magic value + *--------------------------------------------------------------------*/ + +static void *mem_alloc_block( size_t size, const char *size_str ) +{ + size_t rounded_size; + void *block_ptr; + char *tmp_ptr; + size_t n, f; + int32_t fill_value; + int32_t *ptr32; + int32_t mask, temp; + + /* Round Up Block Size */ + rounded_size = ROUND_BLOCK_SIZE( size ); + + /* Allocate memory using the standard malloc() by adding room for Signature Values */ + block_ptr = malloc( rounded_size + BLOCK_ROUNDING * 2 ); + + if ( block_ptr == NULL ) + { + return NULL; + } + + /* Add Signature Before the Start of the Block */ + ptr32 = (int32_t *) block_ptr; + n = N_32BITS_BLOCKS; + do + { + *ptr32++ = MAGIC_VALUE_OOB; + } while ( --n ); + + /* Fill Memory Block with Magic Value or 0 */ + fill_value = MAGIC_VALUE_USED; + if ( IS_CALLOC( size_str ) ) + { + fill_value = 0x00000000; + } + n = size / sizeof( int32_t ); + while ( n-- ) + { + *ptr32++ = fill_value; + } + + /* Fill the Reminder of the Memory Block - After Rounding */ + n = rounded_size - size; + f = n % sizeof( int32_t ); + if ( f != 0 ) + { + /* when filling with '0' need to adapt the magic value */ + /* shift by [1->24, 2->16, 3->8] */ + mask = 0xFFFFFFFF << ( ( sizeof( int32_t ) - f ) * 8 ); /* (1) */ + temp = MAGIC_VALUE_OOB & mask; + if ( fill_value != 0x0 ) + { /* for malloc merge fill value */ + temp += ( ~mask ) & MAGIC_VALUE_USED; + } /* for calloc the code in (1) above already introduces zeros */ + *ptr32++ = temp; + } + n /= sizeof( int32_t ); + n += N_32BITS_BLOCKS; + + /* Add Signature After the End of Block */ + do + { + *ptr32++ = MAGIC_VALUE_OOB; + } while ( --n ); + + /* Adjust the Memory Block Pointer (Magic Value Before and After the Memory Block Requested) */ + tmp_ptr = (char *) block_ptr; + tmp_ptr += BLOCK_ROUNDING; + block_ptr = (void *) tmp_ptr; + + return block_ptr; +} + +/*-------------------------------------------------------------------* + * mem_set_usage() + * + * Calculates actual usage of memory block by checking the magic value that was used to pre-fill + * each memory block during its allocation + *--------------------------------------------------------------------*/ + +static int mem_set_usage( allocator_record *record_ptr ) +{ + int total_bytes_used; + + size_t n; + int32_t *ptr32; + char *ptr8; + size_t total_bytes; + int32_t fill_value; + + fill_value = MAGIC_VALUE_USED; + if ( ( record_ptr->params[0] ) == 'c' ) + { + fill_value = 0x00000000; + } + + total_bytes = record_ptr->block_size; + + /* Check 4 bytes at a time */ + ptr32 = (int32_t *) record_ptr->block_ptr; + total_bytes_used = 0; + for ( n = total_bytes / sizeof( int32_t ); n > 0; n-- ) + { + if ( *ptr32++ != fill_value ) + { + total_bytes_used += sizeof( int32_t ); + } + } + + /* Check remaining bytes (If Applicable) 1 byte at a time */ + ptr8 = (char *) ptr32; + for ( n = total_bytes % sizeof( int32_t ); n > 0; n-- ) + { + if ( *ptr8++ != (char) fill_value ) + { + total_bytes_used++; + } + + /* Update Value */ + fill_value >>= 8; + } + + return total_bytes_used; +} + +/*-------------------------------------------------------------------* + * mem_check_OOB() + * + * Checks, if out-of-bounds access has occured. This is done by inspecting the 'signature' value + * taht has been added before and after the memory block during its allocation + *--------------------------------------------------------------------*/ + +static unsigned int mem_check_OOB( allocator_record *record_ptr ) +{ + int32_t *ptr32; + unsigned int OOB_Flag = 0x0; + int32_t mask; + size_t i; + int f; + + ptr32 = (int32_t *) record_ptr->block_ptr - N_32BITS_BLOCKS; + + /* Check the Signature at the Beginning of Memory Block */ + i = N_32BITS_BLOCKS; + do + { + if ( *ptr32++ ^ MAGIC_VALUE_OOB ) + { + OOB_Flag |= OOB_START; + } + } while ( --i ); + + /* Advance to End (Snap to lowest 32 Bits) */ + ptr32 += record_ptr->block_size / sizeof( int32_t ); + + /* Calculate Unused Space That has been added to get to the rounded Block Size */ + i = ROUND_BLOCK_SIZE( record_ptr->block_size ) - record_ptr->block_size; + + /* Partial Check of Signature at the End of Memory Block (for block size that has been rounded) */ + f = i % sizeof( int32_t ); + if ( f != 0 ) + { + mask = 0xFFFFFFFF << ( ( sizeof( int32_t ) - f ) * 8 ); + if ( ( *ptr32++ ^ MAGIC_VALUE_OOB ) & mask ) + { + OOB_Flag |= OOB_END; + } + } + + /* Full Check of Signature at the End of Memory Block, i.e. all 32 Bits (for the remainder after rounding) */ + i /= sizeof( int32_t ); + i += N_32BITS_BLOCKS; + do + { + if ( *ptr32++ ^ MAGIC_VALUE_OOB ) + { + OOB_Flag |= OOB_END; + } + } while ( --i ); + + return OOB_Flag; +} + +/*-------------------------------------------------------------------* + * malloc_hash() + * + * Calculate hash from function name, line number and malloc size + *--------------------------------------------------------------------*/ + +static unsigned long malloc_hash( const char *func_name, int func_lineno, char *size_str ) +{ + unsigned long hash = 5381; + const char *ptr_str; + + ptr_str = func_name; + while ( ptr_str != NULL && *ptr_str != '\0' ) + { + hash = ( ( hash << 5 ) + hash ) + *ptr_str++; /* hash * 33 + char */ + } + + hash = ( ( hash << 5 ) + hash ) + func_lineno; /* hash * 33 + func_lineno */ + + ptr_str = size_str; + while ( ptr_str != NULL && *ptr_str != '\0' ) + { + hash = ( ( hash << 5 ) + hash ) + *ptr_str++; /* hash * 33 + char */ + } + + return hash; +} + +/*-------------------------------------------------------------------* + * get_mem_record() + * + * Search for memory record in the internal list, return NULL if not found + * Start from index_record + *--------------------------------------------------------------------*/ + +allocator_record *get_mem_record( unsigned long *hash, const char *func_name, int func_lineno, char *size_str, int *index_record ) +{ + int i; + + if ( *index_record < 0 || *index_record > Num_Records ) + { + return NULL; + } + + /* calculate hash */ + *hash = malloc_hash( func_name, func_lineno, size_str ); + + for ( i = *index_record; i < Num_Records; i++ ) + { + /* check, if memory block is not allocated at the moment and the hash matches */ + if ( allocation_list[i].block_ptr == NULL && *hash == allocation_list[i].hash ) + { + *index_record = i; + return &( allocation_list[i] ); + } + } + + /* not found */ + *index_record = -1; + return NULL; +} + + +/*-------------------------------------------------------------------* + * mem_free() + * + * This function de-allocatesd the memory block and frees the mphysical memory with free(). + * It also updates actual and average usage of the memory block. + * + * Note: The record is not removed from the list and may be reused later on in mem_alloc()! + *--------------------------------------------------------------------*/ + +void mem_free( const char *func_name, int func_lineno, void *ptr ) +{ + int i, index_record; + char *tmp_ptr; + allocator_record *ptr_record; + + /* Search for the Block Pointer in the List */ + ptr_record = NULL; + index_record = -1; + for ( i = 0; i < Num_Records; i++ ) + { + if ( ptr == allocation_list[i].block_ptr ) + { /* Yes, Found it */ + ptr_record = &( allocation_list[i] ); + index_record = i; + break; + } + } + + if ( ptr_record == NULL ) + { + fprintf( stderr, "Fct=%s, Ln=%i: %s!\n", func_name, func_lineno, "Error: Unable to Find Record Corresponding to the Allocated Memory Block!" ); + exit( -1 ); + } + + /* Update the Heap Size */ + current_heap_size -= ptr_record->block_size; + + /* Calculate the Actual Usage of the Memory Block (Look for Signature) */ + ptr_record->total_used_size += mem_set_usage( ptr_record ); + + /* Check, if Out-Of-Bounds Access has been Detected */ + ptr_record->OOB_Flag = mem_check_OOB( ptr_record ); + +#ifdef MEM_COUNT_DETAILS + /* Export heap memory de-allocation record to the .csv file */ + fprintf( fid_csv_filename, "D,%d,%s,%d,%d\n", update_cnt, ptr_record->name, ptr_record->lineno, ptr_record->block_size ); +#endif + + /* De-Allocate Memory Block */ + tmp_ptr = (char *) ptr; + tmp_ptr -= BLOCK_ROUNDING; + ptr = (void *) tmp_ptr; + free( ptr ); + + /* Add new entry to the heap allocation call tree */ + if ( heap_allocation_call_tree == NULL ) + { + fprintf( stderr, "Error: Heap allocation call tree not created!" ); + exit( -1 ); + } + + /* check, if the maximum size of the call tree has been reached -> resize if so */ + if ( heap_allocation_call_tree_size >= heap_allocation_call_tree_max_size ) + { + heap_allocation_call_tree_max_size += MAX_NUM_RECORDS_REALLOC_STEP; + heap_allocation_call_tree = (int *) realloc( heap_allocation_call_tree, heap_allocation_call_tree_max_size * sizeof( int ) ); + } + + heap_allocation_call_tree[heap_allocation_call_tree_size++] = -index_record; + + /* Reset memory block pointer (this is checked when updating wc intra-frame and inter-frame memory) */ + ptr_record->block_ptr = NULL; + + return; +} + + +/*-------------------------------------------------------------------* + * update_mem() + * + * This function updates the worst-case intra-frame memory and the worst-case inter-frame memory. + *--------------------------------------------------------------------*/ + +void update_mem( void ) +{ + int i, j, flag_alloc = -1, i_record; + int32_t size_current_intra_frame_heap; + int *list_current_intra_frame_heap = NULL, n_items_current_intra_frame_heap; + allocator_record *ptr_record; + + /* process the heap allocation call tree */ + n_items_current_intra_frame_heap = 0; + size_current_intra_frame_heap = 0; + for ( i = 0; i < heap_allocation_call_tree_size; i++ ) + { + /* get the record */ + i_record = heap_allocation_call_tree[i]; + + if ( i_record > 0 ) + { + flag_alloc = 1; + } + else if ( i_record < 0 ) + { + flag_alloc = 0; + i_record = -i_record; + } + ptr_record = &( allocation_list[i_record] ); + + if ( ptr_record->frame_allocated == update_cnt && ptr_record->block_ptr == NULL ) + { + /* intra-frame heap memory */ + if ( list_current_intra_frame_heap == NULL ) + { + list_current_intra_frame_heap = (int *) malloc( heap_allocation_call_tree_size * sizeof( int ) ); + memset( list_current_intra_frame_heap, -1, heap_allocation_call_tree_size * sizeof( int ) ); + } + + /* zero index doesn't have sign to determine whether it's allocated or de-allocated -> we need to search the list */ + if ( i_record == 0 ) + { + flag_alloc = 1; + for ( j = 0; j < n_items_current_intra_frame_heap; j++ ) + { + if ( list_current_intra_frame_heap[j] == i_record ) + { + flag_alloc = 0; + break; + } + } + } + + if ( flag_alloc ) + { + /* add to list */ + list_current_intra_frame_heap[n_items_current_intra_frame_heap++] = i_record; + size_current_intra_frame_heap += ptr_record->block_size; + + /* check, if this is the new worst-case */ + if ( size_current_intra_frame_heap > size_wc_intra_frame_heap ) + { + if ( n_items_current_intra_frame_heap >= max_items_wc_intra_frame_heap ) + { + /* resize list, if needed */ + max_items_wc_intra_frame_heap = n_items_current_intra_frame_heap + MAX_NUM_RECORDS_REALLOC_STEP; + list_wc_intra_frame_heap = realloc( list_wc_intra_frame_heap, max_items_wc_intra_frame_heap * sizeof( int ) ); + } + + /* save to wc list */ + memmove( list_wc_intra_frame_heap, list_current_intra_frame_heap, n_items_current_intra_frame_heap * sizeof( int ) ); + n_items_wc_intra_frame_heap = n_items_current_intra_frame_heap; + size_wc_intra_frame_heap = size_current_intra_frame_heap; + location_wc_intra_frame_heap = update_cnt; + ptr_record->wc_heap_size_intra_frame = ptr_record->block_size; + } + } + else + { + /* remove from list */ + for ( j = 0; j < n_items_current_intra_frame_heap; j++ ) + { + if ( list_current_intra_frame_heap[j] == i_record ) + { + break; + } + } + memmove( &list_current_intra_frame_heap[j], &list_current_intra_frame_heap[j + 1], ( n_items_current_intra_frame_heap - j ) * sizeof( int ) ); + n_items_current_intra_frame_heap--; + size_current_intra_frame_heap -= ptr_record->block_size; + + /* reset block size */ + ptr_record->frame_allocated = -1; + ptr_record->block_size = 0; + } + } + else + { + /* inter-frame heap memory */ + + /* zero index doesn't have sign to determine whether it's allocated or de-allocated -> we need to search the list */ + if ( i_record == 0 ) + { + flag_alloc = 1; + for ( j = 0; j < n_items_current_inter_frame_heap; j++ ) + { + if ( list_current_inter_frame_heap[j] == i_record ) + { + flag_alloc = 0; + break; + } + } + } + + if ( flag_alloc ) + { + /* add to list */ + if ( n_items_current_inter_frame_heap >= max_items_current_inter_frame_heap ) + { + /* resize list, if needed */ + max_items_current_inter_frame_heap = n_items_current_inter_frame_heap + MAX_NUM_RECORDS_REALLOC_STEP; + list_current_inter_frame_heap = realloc( list_current_inter_frame_heap, max_items_current_inter_frame_heap * sizeof( int ) ); + } + + list_current_inter_frame_heap[n_items_current_inter_frame_heap++] = i_record; + size_current_inter_frame_heap += ptr_record->block_size; + + /* check, if this is the new worst-case */ + if ( size_current_inter_frame_heap > size_wc_inter_frame_heap ) + { + if ( n_items_current_inter_frame_heap >= max_items_wc_inter_frame_heap ) + { + /* resize list, if needed */ + max_items_wc_inter_frame_heap = n_items_current_inter_frame_heap + MAX_NUM_RECORDS_REALLOC_STEP; + list_wc_inter_frame_heap = realloc( list_wc_inter_frame_heap, max_items_wc_inter_frame_heap * sizeof( int ) ); + } + + memmove( list_wc_inter_frame_heap, list_current_inter_frame_heap, n_items_current_inter_frame_heap * sizeof( int ) ); + n_items_wc_inter_frame_heap = n_items_current_inter_frame_heap; + size_wc_inter_frame_heap = size_current_inter_frame_heap; + location_wc_inter_frame_heap = update_cnt; + ptr_record->wc_heap_size_inter_frame = ptr_record->block_size; + } + } + else + { + /* remove from list */ + for ( j = 0; j < n_items_current_inter_frame_heap; j++ ) + { + if ( list_current_inter_frame_heap[j] == i_record ) + { + break; + } + } + memmove( &list_current_inter_frame_heap[j], &list_current_inter_frame_heap[j + 1], ( n_items_current_inter_frame_heap - j ) * sizeof( int ) ); + n_items_current_inter_frame_heap--; + size_current_inter_frame_heap -= ptr_record->block_size; + + /* reset block size */ + ptr_record->frame_allocated = -1; + ptr_record->block_size = 0; + } + } + } + + /* reset heap allocation call tree */ + heap_allocation_call_tree_size = 0; + + if ( list_current_intra_frame_heap ) + { + free( list_current_intra_frame_heap ); + } + + return; +} + +#ifdef MEM_COUNT_DETAILS +/*-------------------------------------------------------------------* + * subst() + * + * Substitute character in string + *--------------------------------------------------------------------*/ + +static void subst( char *s, char from, char to ) +{ + while ( *s == from ) + { + *s++ = to; + } + + return; +} + + +/*-------------------------------------------------------------------* + * mem_count_summary() + * + * Print detailed (per-item) information about heap memory usage + *--------------------------------------------------------------------*/ + +static void mem_count_summary( void ) +{ + int i, j, index, index_record; + size_t length; + char buf[300], format_str[50], name_str[MAX_FUNCTION_NAME_LENGTH + 3], parms_str[MAX_PARAMS_LENGTH + 1], type_str[10], usage_str[20], size_str[20], line_str[10]; + allocator_record *ptr_record, *ptr; + + /* Prepare format string */ + sprintf( format_str, "%%-%ds %%5s %%6s %%-%ds %%20s %%6s ", MAX_FUNCTION_NAME_LENGTH, MAX_PARAMS_LENGTH ); + + if ( n_items_wc_intra_frame_heap > 0 ) + { + /* Intra-Frame Heap Size */ + fprintf( stdout, "\nList of memory blocks when maximum intra-frame heap size is reached:\n\n" ); + + /* Find duplicate records (same hash and worst-case heap size) */ + for ( i = 0; i < n_items_wc_intra_frame_heap; i++ ) + { + index_record = list_wc_intra_frame_heap[i]; + if ( index_record == -1 ) + { + continue; + } + + ptr_record = &( allocation_list[index_record] ); + for ( j = i + 1; j < n_items_wc_intra_frame_heap; j++ ) + { + index = list_wc_intra_frame_heap[j]; + if ( index == -1 ) + { + continue; + } + ptr = &( allocation_list[index] ); + + if ( ptr->hash == ptr_record->hash && ptr->wc_heap_size_intra_frame == ptr_record->wc_heap_size_intra_frame ) + { + ptr_record->noccurances++; + list_wc_intra_frame_heap[j] = -1; + } + } + } + + /* Print Header */ + sprintf( buf, format_str, "Function Name", "Line", "Type", "Function Parameters", "Maximum Size", "Usage" ); + puts( buf ); + length = strlen( buf ); + sprintf( buf, "%0*d\n", (int) length - 1, 0 ); + subst( buf, '0', '-' ); + puts( buf ); + + for ( i = 0; i < n_items_wc_intra_frame_heap; i++ ) + { + index_record = list_wc_intra_frame_heap[i]; + + if ( index_record != -1 ) + { + /* get the record */ + ptr_record = &( allocation_list[index_record] ); + + /* prepare information strings */ + strncpy( name_str, ptr_record->name, MAX_FUNCTION_NAME_LENGTH ); + strcat( name_str, "()" ); + name_str[MAX_FUNCTION_NAME_LENGTH] = '\0'; + strncpy( parms_str, &( ptr_record->params[2] ), MAX_PARAMS_LENGTH ); + parms_str[MAX_PARAMS_LENGTH] = '\0'; + + if ( ptr_record->params[0] == 'm' ) + { + strcpy( type_str, "malloc" ); + } + else + { + strcpy( type_str, "calloc" ); + } + + sprintf( line_str, "%d", ptr_record->lineno ); + + /* prepare average usage & memory size strings */ + sprintf( usage_str, "%d%%", (int) ( ( (float) ptr_record->total_used_size / ( ptr_record->total_block_size + 1 ) ) * 100.0f ) ); + + if ( ptr_record->noccurances > 1 ) + { + sprintf( size_str, "%dx%d %s", ptr_record->noccurances, (int) ( ( ptr_record->noccurances * ptr_record->wc_heap_size_intra_frame ) >> Stat_Cnt_Size ), Count_Unit[Stat_Cnt_Size] ); + } + else + { + sprintf( size_str, "%d %s", (int) ( ptr_record->wc_heap_size_intra_frame >> Stat_Cnt_Size ), Count_Unit[Stat_Cnt_Size] ); + } + + sprintf( buf, format_str, name_str, line_str, type_str, parms_str, size_str, usage_str ); + puts( buf ); + } + } + + fprintf( stdout, "\n" ); + } + + if ( n_items_wc_inter_frame_heap > 0 ) + { + /* Inter-Frame Heap Size */ + fprintf( stdout, "\nList of memory blocks when maximum inter-frame heap size is reached:\n\n" ); + + /* Find duplicate records (same hash and worst-case heap size) */ + for ( i = 0; i < n_items_wc_inter_frame_heap; i++ ) + { + index_record = list_wc_inter_frame_heap[i]; + if ( index_record == -1 ) + { + continue; + } + ptr_record = &( allocation_list[index_record] ); + ptr_record->noccurances = 1; /* reset the counter because som blocks may be both, intra-frame and inter-frame */ + for ( j = i + 1; j < n_items_wc_inter_frame_heap; j++ ) + { + index = list_wc_inter_frame_heap[j]; + if ( index == -1 ) + { + continue; + } + ptr = &( allocation_list[index] ); + + if ( ptr->hash == ptr_record->hash && ptr->wc_heap_size_inter_frame == ptr_record->wc_heap_size_inter_frame ) + { + ptr_record->noccurances++; + list_wc_inter_frame_heap[j] = -1; + } + } + } + + /* Print Header */ + sprintf( buf, format_str, "Function Name", "Line", "Type", "Function Parameters", "Maximum Size", "Usage" ); + puts( buf ); + length = strlen( buf ); + sprintf( buf, "%0*d\n", (int) length - 1, 0 ); + subst( buf, '0', '-' ); + puts( buf ); + + for ( i = 0; i < n_items_wc_inter_frame_heap; i++ ) + { + index_record = list_wc_inter_frame_heap[i]; + + if ( index_record != -1 ) + { + /* get the record */ + ptr_record = &( allocation_list[index_record] ); + + /* prepare information strings */ + strncpy( name_str, ptr_record->name, MAX_FUNCTION_NAME_LENGTH ); + strcat( name_str, "()" ); + name_str[MAX_FUNCTION_NAME_LENGTH] = '\0'; + strncpy( parms_str, &( ptr_record->params[2] ), MAX_PARAMS_LENGTH ); + parms_str[MAX_PARAMS_LENGTH] = '\0'; + + if ( ptr_record->params[0] == 'm' ) + { + strcpy( type_str, "malloc" ); + } + else + { + strcpy( type_str, "calloc" ); + } + + sprintf( line_str, "%d", ptr_record->lineno ); + + /* prepare average usage & memory size strings */ + sprintf( usage_str, "%d%%", (int) ( ( (float) ptr_record->total_used_size / ( ptr_record->total_block_size + 1 ) ) * 100.0f ) ); + + if ( ptr_record->noccurances > 1 ) + { + sprintf( size_str, "%dx%d %s", ptr_record->noccurances, (int) ( ( ptr_record->noccurances * ptr_record->wc_heap_size_inter_frame ) >> Stat_Cnt_Size ), Count_Unit[Stat_Cnt_Size] ); + } + else + { + sprintf( size_str, "%d %s", (int) ( ptr_record->wc_heap_size_inter_frame >> Stat_Cnt_Size ), Count_Unit[Stat_Cnt_Size] ); + } + + sprintf( buf, format_str, name_str, line_str, type_str, parms_str, size_str, usage_str ); + puts( buf ); + } + } + + fprintf( stdout, "\n" ); + } + + return; +} + +#endif + +/*-------------------------------------------------------------------* + * print_mem() + * + * Print information about ROM and RAM memory usage + *--------------------------------------------------------------------*/ + +void print_mem( ROM_Size_Lookup_Table Const_Data_PROM_Table[] ) +{ + int i, nElem; + + fprintf( stdout, "\n\n --- Memory usage --- \n\n" ); + + if ( Const_Data_PROM_Table != NULL ) + { + nElem = 0; + while ( strcmp( Const_Data_PROM_Table[nElem].file_spec, "" ) != 0 ) + nElem++; + + for ( i = 0; i < nElem; i++ ) + { + fprintf( stdout, "Program ROM size (%s): %d instruction words\n", Const_Data_PROM_Table[i].file_spec, Const_Data_PROM_Table[i].PROM_size ); + } + + for ( i = 0; i < nElem; i++ ) + { + if ( Const_Data_PROM_Table[i].Get_Const_Data_Size_Func == NULL ) + { + fprintf( stdout, "Error: Cannot retrieve or calculate Table ROM size of (%s)!\n", Const_Data_PROM_Table[i].file_spec ); + } + + fprintf( stdout, "Table ROM (const data) size (%s): %d %s\n", Const_Data_PROM_Table[i].file_spec, Const_Data_PROM_Table[i].Get_Const_Data_Size_Func() >> Stat_Cnt_Size, Count_Unit[Stat_Cnt_Size] ); + } + } + else + { + fprintf( stdout, "Program ROM size: not available\n" ); + fprintf( stdout, "Table ROM (const data) size: not available\n" ); + } + + if ( wc_ram_size > 0 ) + { + fprintf( stdout, "Maximum RAM (stack + heap) size: %d %s in frame %d\n", wc_ram_size >> Stat_Cnt_Size, Count_Unit[Stat_Cnt_Size], wc_ram_frame ); + } + else + { + fprintf( stdout, "Maximum RAM (stack + heap) size: not available\n" ); + } + + /* check, if the stack is empty */ + if ( ptr_current_stack != ptr_base_stack ) + { + fprintf( stderr, "Warning: Stack is not empty.\n" ); + } + + if ( ptr_base_stack - ptr_max_stack > 0 ) + { + fprintf( stdout, "Maximum stack size: %lu %s in frame %d\n", ( ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) ) >> Stat_Cnt_Size, Count_Unit[Stat_Cnt_Size], + wc_stack_frame ); + } + else + { + fprintf( stdout, "Maximum stack size: not available\n" ); + } + + /* last update of intra-frame memory and inter-frame memory, if needed */ + if ( heap_allocation_call_tree_size > 0 ) + { + update_mem(); + } + + /* check, if all memory blocks have been deallocated (freed) */ + for ( i = 0; i < Num_Records; i++ ) + { + if ( allocation_list[i].block_ptr != NULL ) + { + fprintf( stderr, "Fct=%s, Ln=%i: %s!\n", allocation_list[i].name, allocation_list[i].lineno, "Error: Memory Block has not been De-Allocated with free()!" ); + exit( -1 ); + } + } + + if ( n_items_wc_intra_frame_heap > 0 ) + { + fprintf( stdout, "Maximum intra-frame heap size: %d %s in frame %d\n", size_wc_intra_frame_heap >> Stat_Cnt_Size, Count_Unit[Stat_Cnt_Size], location_wc_intra_frame_heap ); + } + else + { + fprintf( stdout, "Maximum intra-frame heap size: 0\n" ); + } + + if ( n_items_wc_inter_frame_heap > 0 ) + { + fprintf( stdout, "Maximum inter-frame heap size: %d %s in frame %d\n", size_wc_inter_frame_heap >> Stat_Cnt_Size, Count_Unit[Stat_Cnt_Size], location_wc_inter_frame_heap ); + } + else + { + fprintf( stdout, "Maximum inter-frame heap size: 0\n" ); + } + +#ifdef MEM_COUNT_DETAILS + /* Print detailed information about worst-case stack usage */ + if ( ptr_base_stack - ptr_max_stack > 0 ) + { + print_stack_call_tree(); + } + + /* Print detailed information about worst-case heap usage */ + mem_count_summary(); +#endif + + if ( Stat_Cnt_Size > 0 ) + { + fprintf( stdout, "\nNote: 1 word = %d bits\n", 8 << Stat_Cnt_Size ); + fprintf( stdout, "This is an optimistic estimate of memory consumption assuming that each variable type is stored with sizeof(type) bits\n" ); + } + + if ( n_items_wc_intra_frame_heap > 0 ) + { + fprintf( stdout, "Intra-frame heap memory is allocated and de-allocated in the same frame\n" ); + } + + /* De-allocate list of heap memory blocks */ + if ( allocation_list != NULL ) + { + free( allocation_list ); + } + + /* De-allocate heap allocation call tree */ + if ( heap_allocation_call_tree != NULL ) + { + free( heap_allocation_call_tree ); + } + + /* De-allocate intra-frame and inter-frame heap lists */ + if ( list_wc_intra_frame_heap != NULL ) + { + free( list_wc_intra_frame_heap ); + } + + if ( list_current_inter_frame_heap != NULL ) + { + free( list_current_inter_frame_heap ); + } + + if ( list_wc_inter_frame_heap != NULL ) + { + free( list_wc_inter_frame_heap ); + } + +#ifdef MEM_COUNT_DETAILS + if ( fid_csv_filename != NULL ) + { + fclose( fid_csv_filename ); + } +#endif + + return; +} + +#endif /* WMOPS */ + +#ifndef WMOPS +int cntr_push_pop = 0; /* global counter for checking balanced push_wmops()/pop_wmops() pairs when WMOPS is not activated */ +#endif diff --git a/lib_debug/wmops.h b/lib_debug/wmc_auto.h similarity index 62% rename from lib_debug/wmops.h rename to lib_debug/wmc_auto.h index f18c990ed5ba33a0117a4c20c9686476d5e77094..9e20a4c7c8162126ead7cf45fbc8aab5f506c435 100644 --- a/lib_debug/wmops.h +++ b/lib_debug/wmc_auto.h @@ -1,147 +1,43 @@ -/****************************************************************************************************** - - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. - -*******************************************************************************************************/ +/* + * (C) 2022 copyright VoiceAge Corporation. All Rights Reserved. + * + * This software is protected by copyright law and by international treaties. The source code, and all of its derivations, + * is provided by VoiceAge Corporation under the "ITU-T Software Tools' General Public License". Please, read the license file + * or refer to ITU-T Recommendation G.191 on "SOFTWARE TOOLS FOR SPEECH AND AUDIO CODING STANDARDS". + * + * Any use of this software is permitted provided that this notice is not removed and that neither the authors nor + * VoiceAge Corporation are deemed to have made any representations as to the suitability of this software + * for any purpose nor are held responsible for any defects of this software. THERE IS NO WARRANTY FOR THIS SOFTWARE. + * + * Authors: Guy Richard, Vladimir Malenovsky (Vladimir.Malenovsky@USherbrooke.ca) + */ #ifndef WMOPS_H #define WMOPS_H -#include -#include "options.h" - - -/*------------------------------------------------------------------------------------------* - * Memory calculation tool - *------------------------------------------------------------------------------------------*/ - -#ifdef WMOPS - -#ifdef _MSC_VER -#pragma warning( disable : 4033 ) -#pragma warning( disable : 4702 ) -#pragma warning( disable : 4709 ) +#ifndef EXIT_FAILURE +#include /* stdlib is needed for exit() */ #endif -extern int Const_Data_Size_rom_enc( void ); -extern int Const_Data_Size_rom_com( void ); -extern int Const_Data_Size_rom_dec( void ); -extern int Const_Data_Size_ivas_rom_enc( void ); -extern int Const_Data_Size_ivas_rom_com( void ); -extern int Const_Data_Size_ivas_rom_dec( void ); -extern int Const_Data_Size_ivas_spar_rom_com( void ); -extern int Const_Data_Size_ivas_rom_binauralRen( void ); -extern int Const_Data_Size_ivas_rom_TdBinauralR( void ); -extern int Const_Data_Size_ivas_rom_binaural_cr( void ); - -int push_stack( const char *filename, const char *fctname ); -int pop_stack( const char *filename, const char *fctname ); -void reset_stack( void ); -void print_stack_call_tree( void ); +#ifndef EOF +#include /* stdio is needed for fprintf() */ +#endif -#else - -#define push_stack( file, fct ) -#define pop_stack( file, fct ) -#define reset_stack() -#define print_mem_enc( x ) -#define print_mem_dec( x ) -#define print_stack_call_tree() +/* To Prevent "warning: '$' in identifier or number" message under GCC */ +#ifdef __GNUC__ +#pragma GCC system_header #endif -/******************************************************************************************/ - /* Real-time relationships */ #define FRAMES_PER_SECOND 50.0 #define MILLION_CYCLES 1e6 +#define WMOPS_BOOST_FAC ( 1.0f ) /* scaling factor for equalizing the difference between automatic and manual instrumentation */ +#define FAC ( FRAMES_PER_SECOND / MILLION_CYCLES * WMOPS_BOOST_FAC ) +#define NUM_INST 20 /* Total number of instruction types (in enum below) */ -#define WMC_AUTO_WEIGHTING_FACT 0.91f /* constant to equalize difference between automatic and manual instrumentation */ -#define WMOPS_BOOST_FAC ( 1.0f / WMC_AUTO_WEIGHTING_FACT ) /* complexity scaling factor for manually instrumented code */ - -#define FAC ( FRAMES_PER_SECOND / MILLION_CYCLES * WMOPS_BOOST_FAC ) - -/******************************************************************************************/ - - -#define FLC_MSU( c ) MAC( c ) /* multiply and subtract is currently seen as MAC operation */ -#define FLC_MAX( c ) MISC( c ) /* max() is seen as MISC like abs() */ -#define FLC_MIN( c ) MISC( c ) /* min() is seen as MISC like abs() */ -#define FLC_NEG( c ) ADD( c ) /* negation is seen as addion: a = 0 - a */ -#define FLC_CAST( c ) /* type conversion is costfree for the moment, but who knows it for the future ? */ -#define FLC_INLINE_FUNC( c ) /* inline function calls are costfree, parameters/retval are currently not counted */ - /* example: FLC_INLINE_FUNC(3); SET_FLOAT(ptr,value,num); */ -#define FLC_ATAN2( c ) \ - DIV( c ); \ - TRANS( c ) /* atan2 is curently seen as division followed by atan */ - -/* inline function for memset in combination with float pointer */ -#define SET_FLOAT( ptr, value, num ) \ - { \ - int i; \ - LOOP( 1 ); \ - MOVE( num ); \ - for ( i = 0; i < num; i++ ) \ - { \ - ptr[i] = value; \ - } \ - } - -/* inline function for memset in combination with integer */ -#define SET_INT( ptr, value, num ) \ - { \ - int i; \ - LOOP( 1 ); \ - MOVE( num ); \ - for ( i = 0; i < num; i++ ) \ - { \ - ptr[i] = value; \ - } \ - } #ifdef WMOPS -#ifndef WMOPS_DETAIL -#define STACK_DEPTH_FCT_CALL push_stack( __FILE__, __func__ ) /* Define stack counting function for WMC Tool */ - -#define STACK_DEPTH_FCT_RETURN pop_stack( __FILE__, __func__ ) /* Define stack counting function for WMC Tool */ -#else -#define STACK_DEPTH_FCT_CALL ( push_wmops( __func__ ), push_stack( __FILE__, __func__ ) ) /* Define stack counting function for WMC Tool */ - -#define STACK_DEPTH_FCT_RETURN ( pop_wmops(), pop_stack( __FILE__, __func__ ) ) /* Define stack counting function for WMC Tool */ -#endif - -#define ENABLE_WMOPS 1 /* Only for the WMC_Tool */ -#define ENABLE_TREE 0 /* Call tree may be activated by setting this flag to 1 */ -#define NUM_INST 20 /* Total number of instruction types (in enum below) */ - -#define FLC_OPS_COND if ( ops_cnt_activ > 0 ) - enum instructions { _ADD, @@ -165,31 +61,6 @@ enum instructions _LOG, _MISC }; -enum flc_fields -{ - FLC_NOP = 0, - FLC_ADD, - FLC_MULT, - FLC_MAC, - FLC_MOVE, - FLC_STORE, - FLC_LOGIC, - FLC_SHIFT, - FLC_BRANCH, - FLC_DIV, - FLC_SQRT, - FLC_TRANS, - FLC_FUNC, - FLC_LOOP, - FLC_INDIRECT, - FLC_PTR_INIT, - FLC_MISC, - FLC_TEST, - FLC_POWER, - FLC_LOG, - FLC_OPEND -}; - #define _ADD_C 1 #define _ABS_C 1 @@ -235,7 +106,6 @@ enum flc_fields #define ADD( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _ADD_C * ( x ) ); \ inst_cnt[_ADD] += ( x ); \ @@ -251,7 +121,6 @@ enum flc_fields } #define ABS( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _ABS_C * ( x ) ); \ inst_cnt[_ABS] += ( x ); \ @@ -267,7 +136,6 @@ enum flc_fields } #define MULT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _MULT_C * ( x ) ); \ inst_cnt[_MULT] += ( x ); \ @@ -283,7 +151,6 @@ enum flc_fields } #define MAC( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _MAC_C * ( x ) ); \ inst_cnt[_MAC] += ( x ); \ @@ -299,7 +166,6 @@ enum flc_fields } #define MOVE( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _MOVE_C * ( x ) ); \ inst_cnt[_MOVE] += ( x ); \ @@ -315,7 +181,6 @@ enum flc_fields } #define STORE( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _STORE_C * ( x ) ); \ inst_cnt[_STORE] += ( x ); \ @@ -331,7 +196,6 @@ enum flc_fields } #define LOGIC( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _LOGIC_C * ( x ) ); \ inst_cnt[_LOGIC] += ( x ); \ @@ -347,7 +211,6 @@ enum flc_fields } #define SHIFT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _SHIFT_C * ( x ) ); \ inst_cnt[_SHIFT] += ( x ); \ @@ -363,7 +226,6 @@ enum flc_fields } #define BRANCH( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _BRANCH_C * ( x ) ); \ inst_cnt[_BRANCH] += ( x ); \ @@ -379,7 +241,6 @@ enum flc_fields } #define DIV( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _DIV_C * ( x ) ); \ inst_cnt[_DIV] += ( x ); \ @@ -395,7 +256,6 @@ enum flc_fields } #define SQRT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _SQRT_C * ( x ) ); \ inst_cnt[_SQRT] += ( x ); \ @@ -411,7 +271,6 @@ enum flc_fields } #define TRANS( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _TRANS_C * ( x ) ); \ inst_cnt[_TRANS] += ( x ); \ @@ -427,7 +286,6 @@ enum flc_fields } #define LOOP( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _LOOP_C * ( x ) ); \ inst_cnt[_LOOP] += ( x ); \ @@ -443,7 +301,6 @@ enum flc_fields } #define INDIRECT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _INDIRECT_C * ( x ) ); \ inst_cnt[_INDIRECT] += ( x ); \ @@ -459,7 +316,6 @@ enum flc_fields } #define PTR_INIT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _PTR_INIT_C * ( x ) ); \ inst_cnt[_PTR_INIT] += ( x ); \ @@ -475,7 +331,6 @@ enum flc_fields } #define TEST( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _TEST_C * ( x ) ); \ inst_cnt[_TEST] += ( x ); \ @@ -491,7 +346,6 @@ enum flc_fields } #define POWER( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _POWER_C * ( x ) ); \ inst_cnt[_POWER] += ( x ); \ @@ -507,7 +361,6 @@ enum flc_fields } #define LOG( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _LOG_C * ( x ) ); \ inst_cnt[_LOG] += ( x ); \ @@ -523,7 +376,6 @@ enum flc_fields } #define MISC( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _MISC_C * ( x ) ); \ inst_cnt[_MISC] += ( x ); \ @@ -540,7 +392,6 @@ enum flc_fields #define FUNC( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( _FUNC_C + _MOVE_C * ( x ) ); \ inst_cnt[_FUNC]++; \ @@ -558,7 +409,6 @@ enum flc_fields #define DADD( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _ADD_C * ( x ) ); \ inst_cnt[_ADD] += ( x ); \ @@ -574,7 +424,6 @@ enum flc_fields } #define DMULT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _MULT_C * ( x ) ); \ inst_cnt[_MULT] += ( x ); \ @@ -590,7 +439,6 @@ enum flc_fields } #define DMAC( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _MAC_C * ( x ) ); \ inst_cnt[_MAC] += ( x ); \ @@ -606,7 +454,6 @@ enum flc_fields } #define DMOVE( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _MOVE_C * ( x ) ); \ inst_cnt[_MOVE] += ( x ); \ @@ -622,7 +469,6 @@ enum flc_fields } #define DSTORE( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _STORE_C * ( x ) ); \ inst_cnt[_STORE] += ( x ); \ @@ -638,7 +484,6 @@ enum flc_fields } #define DLOGIC( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _LOGIC_C * ( x ) ); \ inst_cnt[_LOGIC] += ( x ); \ @@ -654,7 +499,6 @@ enum flc_fields } #define DSHIFT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _SHIFT_C * ( x ) ); \ inst_cnt[_SHIFT] += ( x ); \ @@ -670,7 +514,6 @@ enum flc_fields } #define DDIV( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _DIV_C * ( x ) ); \ inst_cnt[_DIV] += ( x ); \ @@ -686,7 +529,6 @@ enum flc_fields } #define DSQRT( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _SQRT_C * ( x ) ); \ inst_cnt[_SQRT] += ( x ); \ @@ -702,7 +544,6 @@ enum flc_fields } #define DTRANS( x ) \ { \ - FLC_OPS_COND \ { \ ops_cnt += ( 2 * _TRANS_C * ( x ) ); \ inst_cnt[_TRANS] += ( x ); \ @@ -725,19 +566,18 @@ extern int ops_cnt_activ; void reset_wmops( void ); void push_wmops( const char *label ); void pop_wmops( void ); -void wmops_sub_start( const char *label ); -void wmops_sub_end( void ); void update_wmops( void ); +void update_mem( void ); void print_wmops( void ); #else /* WMOPS counting disabled */ #define reset_wmops() -#define push_wmops( x ) -#define pop_wmops() -#define wmops_sub_start( x ) -#define wmops_sub_end() -#define update_wmops() +extern int cntr_push_pop; +#define push_wmops( x ) ( cntr_push_pop++ ) +#define pop_wmops() ( cntr_push_pop-- ) +#define update_wmops() ( assert( cntr_push_pop == 0 ) ) +#define update_mem() #define print_wmops() #define ADD( x ) @@ -774,4 +614,426 @@ void print_wmops( void ); #endif +/* mac & msu (Non Instrumented Versions) */ +#ifndef mac +#define mac( a, b, c ) ( ( a ) + ( b ) * ( c ) ) +#endif +#ifndef mac +#define msu( a, b, c ) ( ( a ) - ( b ) * ( c ) ) +#endif + +#ifndef WMOPS +/* DESACTIVATE the Counting Mechanism */ +#define OP_COUNT_( op, n ) + +/* DESACTIVATE Operation Counter Wrappers */ +#define OP_COUNT_WRAPPER1_( op, val ) ( val ) +#define OP_COUNT_WRAPPER2_( expr ) +#define OP_COUNT_WRAPPER3_( op, expr ) expr + +/* DESACTIVATE Logical & Ternary Operators */ +#define __ +#define _ + +#else + +/* '*ops_cnt_ptr' is Used to Avoid: "warning: operation on 'ops_cnt' may be undefined" with Cygwin gcc Compiler */ +static double *ops_cnt_ptr = &ops_cnt; +#define OP_COUNT_( op, x ) ( *ops_cnt_ptr += ( op##_C * ( x ) ), inst_cnt[op] += ( x ) ) + +/******************************************************************/ +/* NOTES: */ +/* The 'wmc_flag_' flag is global to avoid declaration in every */ +/* function and 'static' to avoid clashing with other modules */ +/* that include this header file. */ +/* */ +/* The declarations of 'wmc_flag_' and 'wops_' in this header */ +/* file prevent the addition of a 'C' file to the Project. */ +/******************************************************************/ + +/* General Purpose Global Flag */ +static int wmc_flag_ = 0; + +/* Operation Counter Wrappers */ +#define OP_COUNT_WRAPPER1_( op, val ) ( op, val ) +#define OP_COUNT_WRAPPER2_( expr ) \ + if ( expr, 0 ) \ + ; \ + else +#define OP_COUNT_WRAPPER3_( op, expr ) \ + if ( op, 0 ) \ + ; \ + else \ + expr + +#endif + +/* Define all Macros without '{' & '}' (None of these should be called externally!) */ +#define ABS_( x ) OP_COUNT_( _ABS, ( x ) / WMOPS_BOOST_FAC ) +#define ADD_( x ) OP_COUNT_( _ADD, ( x ) / WMOPS_BOOST_FAC ) +#define MULT_( x ) OP_COUNT_( _MULT, ( x ) / WMOPS_BOOST_FAC ) +#define MAC_( x ) OP_COUNT_( _MAC, ( x ) / WMOPS_BOOST_FAC ) +#define MOVE_( x ) OP_COUNT_( _MOVE, ( x ) / WMOPS_BOOST_FAC ) +#define STORE_( x ) OP_COUNT_( _STORE, ( x ) / WMOPS_BOOST_FAC ) +#define LOGIC_( x ) OP_COUNT_( _LOGIC, ( x ) / WMOPS_BOOST_FAC ) +#define SHIFT_( x ) OP_COUNT_( _SHIFT, ( x ) / WMOPS_BOOST_FAC ) +#define BRANCH_( x ) OP_COUNT_( _BRANCH, ( x ) / WMOPS_BOOST_FAC ) +#define DIV_( x ) OP_COUNT_( _DIV, ( x ) / WMOPS_BOOST_FAC ) +#define SQRT_( x ) OP_COUNT_( _SQRT, ( x ) / WMOPS_BOOST_FAC ) +#define TRANS_( x ) OP_COUNT_( _TRANS, ( x ) / WMOPS_BOOST_FAC ) +#define POWER_( x ) TRANS_( x ) +#define LOG_( x ) TRANS_( x ) +#define LOOP_( x ) OP_COUNT_( _LOOP, ( x ) / WMOPS_BOOST_FAC ) +#define INDIRECT_( x ) OP_COUNT_( _INDIRECT, ( x ) / WMOPS_BOOST_FAC ) +#define PTR_INIT_( x ) OP_COUNT_( _PTR_INIT, ( x ) / WMOPS_BOOST_FAC ) +#define FUNC_( x ) ( OP_COUNT_( _MOVE, ( x ) / WMOPS_BOOST_FAC ), OP_COUNT_( _FUNC, 1 ) ) +#define MISC_( x ) ABS_( x ) + +/* Math Operations */ +#define abs_ OP_COUNT_WRAPPER1_( ABS_( 1 ), abs ) +#define fabs_ OP_COUNT_WRAPPER1_( ABS_( 1 ), fabs ) +#define labs_ OP_COUNT_WRAPPER1_( ABS_( 1 ), labs ) +#define floor_ OP_COUNT_WRAPPER1_( MISC_( 1 ), floor ) +#define sqrt_ OP_COUNT_WRAPPER1_( SQRT_( 1 ), sqrt ) +#define pow_ OP_COUNT_WRAPPER1_( POWER_( 1 ), pow ) +#define exp_ OP_COUNT_WRAPPER1_( POWER_( 1 ), exp ) +#define log_ OP_COUNT_WRAPPER1_( LOG_( 1 ), log ) +#define log10_ OP_COUNT_WRAPPER1_( LOG_( 1 ), log10 ) +#define cos_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), cos ) +#define sin_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), sin ) +#define tan_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), tan ) +#define acos_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), acos ) +#define asin_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), asin ) +#define atan_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), atan ) +#define atan2_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), atan2 ) +#define cosh_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), cosh ) +#define sinh_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), sinh ) +#define tanh_ OP_COUNT_WRAPPER1_( TRANS_( 1 ), tanh ) +#define fmod_ OP_COUNT_WRAPPER1_( DIV_( 1 ), fmod ) +/* these macros use any local macros already defined */ +/* min/max and their Variants */ +#define min_( a, b ) OP_COUNT_WRAPPER1_( MISC_( 1 ), min( ( a ), ( b ) ) ) +#define max_( a, b ) OP_COUNT_WRAPPER1_( MISC_( 1 ), max( ( a ), ( b ) ) ) +#define MIN_( a, b ) OP_COUNT_WRAPPER1_( MISC_( 1 ), MIN( ( a ), ( b ) ) ) +#define MAX_( a, b ) OP_COUNT_WRAPPER1_( MISC_( 1 ), MAX( ( a ), ( b ) ) ) +#define Min_( a, b ) OP_COUNT_WRAPPER1_( MISC_( 1 ), Min( ( a ), ( b ) ) ) +#define Max_( a, b ) OP_COUNT_WRAPPER1_( MISC_( 1 ), Max( ( a ), ( b ) ) ) +/* Square and its Variants */ +#define sqr_( x ) OP_COUNT_WRAPPER1_( MULT_( 1 ), sqr( ( x ) ) ) +#define Sqr_( x ) OP_COUNT_WRAPPER1_( MULT_( 1 ), Sqr( ( x ) ) ) +#define SQR_( x ) OP_COUNT_WRAPPER1_( MULT_( 1 ), SQR( ( x ) ) ) +#define square_( x ) OP_COUNT_WRAPPER1_( MULT_( 1 ), square( ( x ) ) ) +#define Square_( x ) OP_COUNT_WRAPPER1_( MULT_( 1 ), Square( ( x ) ) ) +#define SQUARE_( x ) OP_COUNT_WRAPPER1_( MULT_( 1 ), SQUARE( ( x ) ) ) +/* Sign and its Variants */ +#define sign_( x ) OP_COUNT_WRAPPER1_( MOVE_( 1 ), sign( ( x ) ) ) +#define Sign_( x ) OP_COUNT_WRAPPER1_( MOVE_( 1 ), Sign( ( x ) ) ) +#define SIGN_( x ) OP_COUNT_WRAPPER1_( MOVE_( 1 ), SIGN( ( x ) ) ) +/* Square Root and its Variants */ +#define sqrtf_( x ) OP_COUNT_WRAPPER1_( SQRT_( 1 ), sqrtf( ( x ) ) ) +/* Invert Square Root and its Variants */ +#define inv_sqrt_( x ) OP_COUNT_WRAPPER1_( SQRT_( 1 ), inv_sqrt( ( x ) ) ) +/* Others */ +#define log_base_2_( x ) OP_COUNT_WRAPPER1_( ( LOG_( 1 ), MULT_( 1 ) ), log_base_2( ( x ) ) ) +#define log2_f_( x ) OP_COUNT_WRAPPER1_( ( LOG_( 1 ), MULT_( 1 ) ), log2_f( ( x ) ) ) +/* The 'wmc_flag_=wmc_flag_' is Used to Avoid: "warning: left-hand operand of comma expression has no effect" + with Cygwin gcc Compiler */ +#define _round_( x ) OP_COUNT_WRAPPER1_( wmc_flag_ = wmc_flag_, _round( ( x ) ) ) +#define round_f_( x ) OP_COUNT_WRAPPER1_( wmc_flag_ = wmc_flag_, round_f( ( x ) ) ) +#define _squant_( x ) OP_COUNT_WRAPPER1_( wmc_flag_ = wmc_flag_, _squant( ( x ) ) ) +/* Set Min/Max */ +#define set_min_( a, b ) OP_COUNT_WRAPPER3_( ( ADD_( 1 ), BRANCH_( 1 ), MOVE_( 1 ) ), set_min( ( a ), ( b ) ) ) +#define set_max_( a, b ) OP_COUNT_WRAPPER3_( ( ADD_( 1 ), BRANCH_( 1 ), MOVE_( 1 ) ), set_max( ( a ), ( b ) ) ) +/* mac & msu (Instrumented Versions) */ +#define mac_( a, b, c ) OP_COUNT_WRAPPER1_( MAC_( 1 ), mac( a, b, c ) ) +#define msu_( a, b, c ) OP_COUNT_WRAPPER1_( MAC_( 1 ), msu( a, b, c ) ) + +/* Functions */ +#define func_( name, x ) OP_COUNT_WRAPPER1_( FUNC_( x ), name ) + +/* Logical Operators */ +#ifndef __ +#define __ ( BRANCH_( 1 ), 1 ) && +#endif + +/* Ternary Operators (? and :) */ +#ifndef _ +#define _ ( BRANCH_( 1 ), 0 ) ? 0: #endif + +/* Flow Control keywords */ +#define if_ \ + OP_COUNT_WRAPPER2_( BRANCH_( 1 ) ) \ + if +#define for_ OP_COUNT_WRAPPER2_( LOOP_(1)) for +#define while_( c ) \ + while \ + OP_COUNT_WRAPPER1_( BRANCH_( 1 ), ( c ) ) /* needs extra "()" if ',' encountered */ +#define do_ \ + do \ + { +#define _while \ + BRANCH_( 1 ); \ + } \ + while + +#define goto_ \ + OP_COUNT_WRAPPER2_( BRANCH_( 1 ) ) \ + goto +#define break_ \ + OP_COUNT_WRAPPER2_( BRANCH_( 1 ) ) \ + break +#define continue_ \ + OP_COUNT_WRAPPER2_( BRANCH_( 1 ) ) \ + continue +#define return_ \ + OP_COUNT_WRAPPER2_( ( wmc_flag_ = stack_tree_level_, STACK_DEPTH_FCT_RETURN ) ) \ + return + +#define switch_ \ + OP_COUNT_WRAPPER2_( ( BRANCH_( 1 ), wmc_flag_ = 1 ) ) \ + switch +#define cost_( n ) OP_COUNT_WRAPPER2_( wmc_flag_ ? ( ADD_( n ), BRANCH_( n ), wmc_flag_ = 0 ) : 0 ); + +#ifdef WMOPS + +#define ACC 2 +#define MUL 1 + +/* Counting Function (should not be called externally!) */ +static void wops_( const char *ops ) +{ + char lm = 0; /* lm: Last Operation is Math */ + static char lo = 0; /* Last Operation */ + + void ( *fct )( const char *ops ) = wops_; + +st: + while ( *ops != '\0' ) + { + switch ( *ops++ ) + { + int cnt; + case '-': + for ( cnt = 0; ops[cnt] == '>'; cnt++ ) + ; + if ( cnt & 1 ) + goto ind; + case '+': + lm = 2; + if ( lo & MUL ) + { + MULT_( -1 ); + MAC_( 1 ); + break; + } + lo = ACC << 2; + case 'U': + case 'D': + ADD_( 1 ); + break; + case '*': + lm = 2; + if ( lo & ACC ) + { + ADD_( -1 ); + MAC_( 1 ); + break; + } + lo = MUL << 2; + MULT_( 1 ); + break; + case '/': + case '%': + lm = 2; + DIV_( 1 ); + break; + case '&': + case '|': + case '^': + lm = 2; + case '~': + LOGIC_( 1 ); + break; + case '<': + case '>': + if ( *ops != ops[-1] ) + goto error; + ops++; + case -85: + case -69: + lm = 2; + SHIFT_( 1 ); + break; + case 'L': + case 'G': + if ( *ops == 't' ) + goto comp; + case 'E': + case 'N': + if ( *ops != 'e' ) + goto error; + comp: + ops++; + ADD_( 1 ); + break; + case '!': + MISC_( 2 ); + break; + case 'M': + MOVE_( 1 ); + break; + case 'S': + STORE_( 1 ); + break; + case 'P': + PTR_INIT_( 1 ); + break; + case '[': + case ']': + goto st; + ind: + ops++; + case 'I': + case '.': + INDIRECT_( 1 ); + break; + case '=': + if ( lm ) + goto st; + case '\0': + /* This Shouldn't Happen */ + /* These are Used to Avoid: "warning: 'name' defined but not used" with Cygwin gcc Compiler */ + wmc_flag_ = wmc_flag_; + ops_cnt_ptr = ops_cnt_ptr; + fct( "" ); + error: + default: + fprintf( stderr, "\r wops: Invalid Counting Operation '%s'\n", ops - 1 ); + exit( -1 ); + } + lm >>= 1; + lo >>= 2; + } + + return; +} + +#endif + +/* All Other Operations */ +#define $( str ) OP_COUNT_WRAPPER2_( wops_( str ) ) + + +/*-------------------------------------------------------------------* + * Memory counting tool + *-------------------------------------------------------------------*/ + +/* Enhanced Const Data Size Counting (Rounding Up to the Nearest 'Integer' Size) */ +#define rsize( item ) ( ( sizeof( item ) + sizeof( int ) - 1 ) / sizeof( int ) * sizeof( int ) ) + +#ifdef _MSC_VER +/* Disable "warning C4210: nonstandard extension used : function given file scope" with Visual Studio Compiler */ +#pragma warning( disable : 4210 ) +#endif + +/* Const Data Size and PROM Size Wrapper Functions */ +#define Const_Data_Size_Func( file ) Const_Data_Size_##file( void ) +#define Get_Const_Data_Size( file, val_ptr ) \ + { \ + extern int Const_Data_Size_##file( void ); \ + *( val_ptr ) = Const_Data_Size_##file(); \ + } +#define PROM_Size_Func( file ) PROM_Size_##file( void ) +#define Get_PROM_Size( file, val_ptr ) \ + { \ + int PROM_Size_##file( void ); \ + *( val_ptr ) = PROM_Size_##file(); \ + } + +/* ROM Size Lookup Table - contains information about PROM size and Const Data Size in all source files */ +/* The print_mem() function looks for this table to print the results of Const Data usage and PROM usage */ +typedef struct ROM_Size_Lookup_Table +{ + const char file_spec[255]; + int PROM_size; + int ( *Get_Const_Data_Size_Func )( void ); +} ROM_Size_Lookup_Table; + +/* The WMC tool inserts the following declaration during the innstrumentation process in the .c file where the function print_mem() is located */ +/* and modifies it to print_mem(Const_Data_PROM_Table) */ + +/* #ifdef WMOPS + * ROM_Size_Lookup_Table Const_Data_PROM_Table[] = + * { + * {"../lib_enc/rom_enc.c", 0, NULL}, + * {"../lib_com/*.c", 0, NULL}, + * {"", -1, NULL} + * }; + * #endif + */ + +/*#define MEM_ALIGN_64BITS */ /* Define this when using 64 Bits values in the code (ex: double), otherwise it will align on 32 Bits */ +/*#define MEM_COUNT_DETAILS*/ + +typedef enum +{ + USE_BYTES = 0, + USE_16BITS = 1, + USE_32BITS = 2 +} Counting_Size; + +#if ( defined( _WIN32 ) && ( _MSC_VER <= 1800 ) && ( _MSC_VER >= 1300 ) ) +#define __func__ __FUNCTION__ +#elif defined( __STDC_VERSION__ ) && __STDC_VERSION__ < 199901L +#if ( __GNUC__ >= 2 ) +#define __func__ __FUNCTION__ +#else +#define __func__ "" +#endif +#elif defined( __GNUC__ ) +#define __func__ __extension__ __FUNCTION__ +#endif + + +#ifdef WMOPS + +void *mem_alloc( const char *func_name, int func_lineno, size_t size, char *alloc_str ); +void mem_free( const char *func_name, int func_lineno, void *ptr ); + +#define malloc_( size ) mem_alloc( __func__, __LINE__, size, "m:" #size ) +#define calloc_( n, size ) mem_alloc( __func__, __LINE__, ( n ) * ( size ), "c:" #n ", " #size ) +#define free_( ptr ) mem_free( __func__, __LINE__, ptr ) + +void reset_mem( Counting_Size cnt_size ); +void print_mem( ROM_Size_Lookup_Table Const_Data_PROM_Table[] ); + +int push_stack( const char *filename, const char *fctname ); +int pop_stack( const char *filename, const char *fctname ); + +#ifdef WMOPS_DETAIL +#define STACK_DEPTH_FCT_CALL ( push_wmops( __FUNCTION__ ), push_stack( __FILE__, __FUNCTION__ ) ) /* add push_wmops() in all function calls */ +#define STACK_DEPTH_FCT_RETURN ( pop_wmops(), pop_stack( __FILE__, __FUNCTION__ ) ) /* add pop_wmops() in all function returns */ +#else +#define STACK_DEPTH_FCT_CALL push_stack( __FILE__, __FUNCTION__ ) +#define STACK_DEPTH_FCT_RETURN pop_stack( __FILE__, __FUNCTION__ ) +#endif + +void reset_stack( void ); +#define func_start_ int stack_tree_level_ = STACK_DEPTH_FCT_CALL; + +#else +#define malloc_( n1 ) malloc( n1 ) +#define calloc_( n1, n2 ) calloc( n1, n2 ) +#define free_( ptr ) free( ptr ) +#define reset_mem( cnt_size ) +#define print_mem( Const_Data_PROM_Table ) + +#define push_stack( file, fct ) +#define pop_stack( file, fct ) +#define reset_stack() +#define func_start_ + +#endif + +#endif /* WMOPS_H */ diff --git a/lib_debug/wmops.c b/lib_debug/wmops.c deleted file mode 100644 index fe75a207ff0d24b73f6a56899f227a88a05900ce..0000000000000000000000000000000000000000 --- a/lib_debug/wmops.c +++ /dev/null @@ -1,503 +0,0 @@ -/****************************************************************************************************** - - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. - -*******************************************************************************************************/ - -#include -#include -#include -#include -#include "options.h" -#ifdef DEBUGGING -#include "debug.h" -#endif -#include "wmops.h" - - -/*-------------------------------------------------------------------* - * WMOPS counting tool - *--------------------------------------------------------------------*/ - -#ifdef WMOPS - -#define MAX_RECORDS 1024 -#define MAX_CHAR 64 -#define MAX_STACK 64 -#define DOUBLE_MAX 0x80000000; - -struct wmops_record -{ - char label[MAX_CHAR]; - int32_t call_number; - int32_t update_cnt; - int call_tree[MAX_RECORDS]; - double start_selfcnt; - double current_selfcnt; - double max_selfcnt; - double min_selfcnt; - double tot_selfcnt; - double start_cnt; /* The following take into account the decendants */ - double current_cnt; - double max_cnt; - double min_cnt; - double tot_cnt; -#ifdef WMOPS_WC_FRAME_ANALYSIS - int32_t current_call_number; - double wc_cnt; - double wc_selfcnt; - int32_t wc_call_number; -#endif -}; - -double ops_cnt; -double prom_cnt; -double inst_cnt[NUM_INST]; - -int ops_cnt_activ = 1; - -static struct wmops_record wmops[MAX_RECORDS]; -static int stack[MAX_STACK]; -static int sptr; -static int num_records; -static int current_record; -static int32_t update_cnt; -static double start_cnt; -static double max_cnt; -static double min_cnt; -static double inst_cnt_wc[NUM_INST]; -static int32_t fnum_cnt_wc; - - -void reset_wmops( void ) -{ - int i, j; - - for ( i = 0; i < MAX_RECORDS; i++ ) - { - strcpy( &wmops[i].label[0], "\0" ); - wmops[i].call_number = 0; - wmops[i].update_cnt = 0; - for ( j = 0; j < MAX_RECORDS; j++ ) - { - wmops[i].call_tree[j] = -1; - } - wmops[i].start_selfcnt = 0.0; - wmops[i].current_selfcnt = 0.0; - wmops[i].max_selfcnt = 0.0; - wmops[i].min_selfcnt = DOUBLE_MAX; - wmops[i].tot_selfcnt = 0.0; - wmops[i].start_cnt = 0.0; - wmops[i].current_cnt = 0.0; - wmops[i].max_cnt = 0.0; - wmops[i].min_cnt = DOUBLE_MAX; - wmops[i].tot_cnt = 0.0; -#ifdef WMOPS_WC_FRAME_ANALYSIS - wmops[i].wc_cnt = 0.0; - wmops[i].wc_selfcnt = 0.0; - wmops[i].current_call_number = 0; -#endif - } - - for ( i = 0; i < MAX_STACK; i++ ) - { - stack[i] = -1; - } - sptr = 0; - num_records = 0; - current_record = -1; - update_cnt = 0; - - max_cnt = 0.0; - min_cnt = DOUBLE_MAX; - start_cnt = 0.0; - ops_cnt = 0.0; -} - - -void push_wmops( const char *label ) -{ - int new_flag; - int i, j; - - /* Check if new function record label */ - new_flag = 1; - for ( i = 0; i < num_records; i++ ) - { - if ( strcmp( wmops[i].label, label ) == 0 ) - { - new_flag = 0; - break; - } - } - - /* Configure new record */ - if ( new_flag ) - { - if ( num_records >= MAX_RECORDS ) - { - fprintf( stdout, "push_wmops(): exceeded MAX_RECORDS count.\n\n" ); - exit( -1 ); - } - strcpy( wmops[i].label, label ); - num_records++; - } - - /* Push current context onto stack */ - if ( current_record >= 0 ) - { - if ( sptr >= MAX_STACK ) - { - fprintf( stdout, "\r push_wmops(): stack exceeded, try inreasing MAX_STACK\n" ); - exit( -1 ); - } - stack[sptr++] = current_record; - - /* accumulate op counts */ - wmops[current_record].current_selfcnt += ops_cnt - wmops[current_record].start_selfcnt; - - /* update call tree */ - for ( j = 0; j < MAX_RECORDS; j++ ) - { - if ( wmops[i].call_tree[j] == current_record ) - { - break; - } - else if ( wmops[i].call_tree[j] == -1 ) - { - wmops[i].call_tree[j] = current_record; - break; - } - } - } - - /* init current record */ - current_record = i; - wmops[current_record].start_selfcnt = ops_cnt; - wmops[current_record].start_cnt = ops_cnt; - wmops[current_record].call_number++; -#ifdef WMOPS_WC_FRAME_ANALYSIS - wmops[current_record].current_call_number++; -#endif -} - -void wmops_sub_start( const char *label ) -{ -#ifndef WMOPS_DETAIL - push_wmops( label ); -#endif -} - -void pop_wmops( void ) -{ - - /* Check for underflow */ - if ( current_record < 0 ) - { - fprintf( stdout, "\r pop_wmops(): stack underflow, too many calls to pop_wmops()\n" ); - exit( -1 ); - } - - /* update count of current record */ - wmops[current_record].current_selfcnt += ops_cnt - wmops[current_record].start_selfcnt; - wmops[current_record].current_cnt += ops_cnt - wmops[current_record].start_cnt; - - /* Get back previous context from stack */ - if ( sptr > 0 ) - { - current_record = stack[--sptr]; - wmops[current_record].start_selfcnt = ops_cnt; - } - else - { - current_record = -1; - } -} - -void wmops_sub_end( void ) -{ -#ifndef WMOPS_DETAIL - pop_wmops(); -#endif -} - -void update_wmops( void ) -{ - int i; - double current_cnt; - - if ( sptr != 0 ) - { - fprintf( stdout, "update_wmops(): Stack must be empty!\n" ); - exit( -1 ); - } - -#ifdef WMOPS_PER_FRAME /* output complexity in WMOPS per frame - note that "frame" number was already incremented before calling this function */ - { - float tmpF = (float) ( FAC * wmops[0].current_cnt ); - dbgwrite( &tmpF, 4, 1, 1, "res/wmops" ); - } -#endif - -#ifdef WMOPS_WC_FRAME_ANALYSIS - if ( ops_cnt - start_cnt > max_cnt ) - { - for ( i = 0; i < num_records; i++ ) - { - wmops[i].wc_cnt = wmops[i].current_cnt; - wmops[i].wc_selfcnt = wmops[i].current_selfcnt; - wmops[i].wc_call_number = wmops[i].current_call_number; - } - } -#endif - - for ( i = 0; i < num_records; i++ ) - { - wmops[i].tot_selfcnt += wmops[i].current_selfcnt; - wmops[i].tot_cnt += wmops[i].current_cnt; - - if ( wmops[i].current_selfcnt > 0 ) - { - if ( wmops[i].current_selfcnt > wmops[i].max_selfcnt ) - { - wmops[i].max_selfcnt = wmops[i].current_selfcnt; - } - - if ( wmops[i].current_selfcnt < wmops[i].min_selfcnt ) - { - wmops[i].min_selfcnt = wmops[i].current_selfcnt; - } - } - - wmops[i].current_selfcnt = 0; - - if ( wmops[i].current_cnt > 0 ) - { - if ( wmops[i].current_cnt > wmops[i].max_cnt ) - { - wmops[i].max_cnt = wmops[i].current_cnt; - } - - if ( wmops[i].current_cnt < wmops[i].min_cnt ) - { - wmops[i].min_cnt = wmops[i].current_cnt; - } - - wmops[i].update_cnt++; - } - - wmops[i].current_cnt = 0; -#ifdef WMOPS_WC_FRAME_ANALYSIS - wmops[i].current_call_number = 0; -#endif - } - - current_cnt = ops_cnt - start_cnt; - if ( current_cnt > max_cnt ) - { - max_cnt = current_cnt; - - for ( i = 0; i < NUM_INST; i++ ) - { - inst_cnt_wc[i] = inst_cnt[i]; - } - - fnum_cnt_wc = update_cnt; - } - - if ( current_cnt < min_cnt ) - { - min_cnt = current_cnt; - } - - for ( i = 0; i < NUM_INST; i++ ) - { - inst_cnt[i] = 0.0; - } - - - start_cnt = ops_cnt; - update_cnt++; -} - - -void print_wmops( void ) -{ - int i, label_len, max_label_len; - - char *sfmts = "%*s %8s %8s %7s %7s\n"; - char *dfmts = "%*s %8.2f %8.3f %7.3f %7.3f\n"; - char *sfmt = "%*s %8s %8s %7s %7s %7s %7s %7s\n"; - char *dfmt = "%*s %8.2f %8.3f %7.3f %7.3f %7.3f %7.3f %7.3f\n"; - -#if ENABLE_TREE - int j; - char *sfmtt = "%20s %4s %15s\n"; - char *dfmtt = "%20s %4d "; -#endif - - /* fprintf( stdout, "\nProgram Memory Analysis: %12.0f words\n", prom_cnt ); */ - /* fprintf (stdout, "\nInstruction Type Analysis (for worst case frame):\n\n"); */ - fprintf( stdout, "\nInstruction Type Analysis (for worst case frame number %d):\n\n", fnum_cnt_wc ); /* added -- JPA */ - for ( i = 0; i < NUM_INST; i++ ) - { - switch ( (enum instructions) i ) - { - case _ADD: - fprintf( stdout, "\tAdds: %12.1f\n", inst_cnt_wc[i] ); - break; - case _ABS: - fprintf( stdout, "\tAbsolutes: %12.1f\n", inst_cnt_wc[i] ); - break; - case _MULT: - fprintf( stdout, "\tMultiplies: %12.1f\n", inst_cnt_wc[i] ); - break; - case _MAC: - fprintf( stdout, "\tMACs: %12.1f\n", inst_cnt_wc[i] ); - break; - case _MOVE: - fprintf( stdout, "\tMoves: %12.1f\n", inst_cnt_wc[i] ); - break; - case _STORE: - fprintf( stdout, "\tStores: %12.1f\n", inst_cnt_wc[i] ); - break; - case _LOGIC: - fprintf( stdout, "\tLogicals: %12.1f\n", inst_cnt_wc[i] ); - break; - case _SHIFT: - fprintf( stdout, "\tShifts: %12.1f\n", inst_cnt_wc[i] ); - break; - case _BRANCH: - fprintf( stdout, "\tBranches: %12.1f\n", inst_cnt_wc[i] ); - break; - case _DIV: - fprintf( stdout, "\tDivisions: %12.1f\n", inst_cnt_wc[i] ); - break; - case _SQRT: - fprintf( stdout, "\tSquare Root: %12.1f\n", inst_cnt_wc[i] ); - break; - case _TRANS: - fprintf( stdout, "\tTrans: %12.1f\n", inst_cnt_wc[i] ); - break; - case _FUNC: - fprintf( stdout, "\tFunc Call: %12.1f\n", inst_cnt_wc[i] ); - break; - case _LOOP: - fprintf( stdout, "\tLoop Init: %12.1f\n", inst_cnt_wc[i] ); - break; - case _INDIRECT: - fprintf( stdout, "\tIndirect Addr: %12.1f\n", inst_cnt_wc[i] ); - break; - case _PTR_INIT: - fprintf( stdout, "\tPointer Init: %12.1f\n", inst_cnt_wc[i] ); - break; - case _TEST: - fprintf( stdout, "\tExtra condit.: %12.1f\n", inst_cnt_wc[i] ); - break; - case _POWER: - fprintf( stdout, "\tExponential: %12.1f\n", inst_cnt_wc[i] ); - break; - case _LOG: - fprintf( stdout, "\tLogarithm: %12.1f\n", inst_cnt_wc[i] ); - break; - case _MISC: - fprintf( stdout, "\tAll other op.: %12.1f\n", inst_cnt_wc[i] ); - break; - default: - fprintf( stdout, "\tERROR: Invalid instruction type: %d\n\n", i ); - } - } - - max_label_len = 0; - for ( i = 0; i < num_records; i++ ) - { - label_len = strlen( wmops[i].label ); - if ( label_len > max_label_len ) - { - max_label_len = label_len; - } - } - max_label_len += 4; - -#ifdef WMOPS_WC_FRAME_ANALYSIS - fprintf( stdout, "\n\nWeighted MOPS Analysis for worst case frame number %d ( WMOPS boost factor %4.2f ):\n", fnum_cnt_wc, WMOPS_BOOST_FAC ); - fprintf( stdout, "%*s %8s %10s %12s\n", max_label_len, " routine", " calls", " SELF", " CUMULATIVE" ); - fprintf( stdout, "%*s %8s %10s %10s\n", max_label_len, "---------------", "------", "------", "----------" ); - - for ( i = 0; i < num_records; i++ ) - { - fprintf( stdout, "%*s %8d %10.3f %12.3f\n", max_label_len, wmops[i].label, wmops[i].wc_call_number, FAC * wmops[i].wc_selfcnt, FAC * wmops[i].wc_cnt ); - } - -#endif - - fprintf( stdout, "\n\nWeighted MOPS Analysis ( WMOPS boost factor %4.2f ):\n", WMOPS_BOOST_FAC ); - fprintf( stdout, "%*s %34s %23s\n", max_label_len, "", "|------ SELF ------|", "|--- CUMULATIVE ---|" ); - fprintf( stdout, sfmt, max_label_len, " routine", " calls", " min ", " max ", " avg ", " min ", " max ", " avg " ); - fprintf( stdout, sfmt, max_label_len, "---------------", "------", "------", "------", "------", "------", "------", "------" ); - for ( i = 0; i < num_records; i++ ) - { - fprintf( stdout, dfmt, max_label_len, wmops[i].label, - update_cnt == 0 ? 0.0f : (float) wmops[i].call_number / update_cnt, - wmops[i].update_cnt == 0 ? 0.0f : FAC * wmops[i].min_selfcnt, FAC * wmops[i].max_selfcnt, - wmops[i].update_cnt == 0 ? 0.0f : FAC * wmops[i].tot_selfcnt / wmops[i].update_cnt, - wmops[i].update_cnt == 0 ? 0.0f : FAC * wmops[i].min_cnt, FAC * wmops[i].max_cnt, - wmops[i].update_cnt == 0 ? 0.0f : FAC * wmops[i].tot_cnt / wmops[i].update_cnt ); - } - fprintf( stdout, sfmts, max_label_len, "---------------", "------", "------", "------", "------" ); - fprintf( stdout, dfmts, max_label_len, "total", (float) update_cnt, FAC * min_cnt, FAC * max_cnt, FAC * ops_cnt / update_cnt ); - fprintf( stdout, "\n" ); - -#if ENABLE_TREE - - fprintf( stdout, "\nCall Tree:\n\n" ); - fprintf( stdout, sfmtt, " function", "num", "called by: " ); - fprintf( stdout, sfmtt, "---------------", "---", "--------------" ); - - for ( i = 0; i < num_records; i++ ) - { - fprintf( stdout, dfmtt, wmops[i].label, i ); - for ( j = 0; wmops[i].call_tree[j] != -1; j++ ) - { - if ( j != 0 ) - { - fprintf( stdout, ", " ); - } - fprintf( stdout, "%d", wmops[i].call_tree[j] ); - } - fprintf( stdout, "\n" ); - } - - fprintf( stdout, sfmtt, "---------------", "---", "--------------" ); - fprintf( stdout, "\n\n" ); - -#endif -} - -#endif /* WMOPS */ diff --git a/lib_dec/ACcontextMapping_dec.c b/lib_dec/ACcontextMapping_dec.c index 10fb36974167250244b60cb2f307bec755591a98..5139106d9fe8834d8fed53536ae2a244c34fd936 100644 --- a/lib_dec/ACcontextMapping_dec.c +++ b/lib_dec/ACcontextMapping_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "rom_com.h" #include "ivas_rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /* Range coder header file */ #include diff --git a/lib_dec/FEC.c b/lib_dec/FEC.c index 3267092e7e46cd769a74e26a7f1c2d569e887c47..8118e07748b79eaa83653e8089434b48c34d907d 100644 --- a/lib_dec/FEC.c +++ b/lib_dec/FEC.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "rom_dec.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes @@ -522,7 +522,7 @@ static void gain_dec_bfi( } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /*-------------------------------------------------------------------* * pulseRes_preCalc() * @@ -577,4 +577,4 @@ static void pulseRes_preCalc( return; } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP diff --git a/lib_dec/FEC_HQ_core.c b/lib_dec/FEC_HQ_core.c index 53eca7698212331738deee3dc31d6d0cc9628f68..988689b76d63f5af2b859298ad8dacbc110441b5 100644 --- a/lib_dec/FEC_HQ_core.c +++ b/lib_dec/FEC_HQ_core.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_dec.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local prototypes diff --git a/lib_dec/FEC_HQ_phase_ecu.c b/lib_dec/FEC_HQ_phase_ecu.c index fd71f5c41bf9e06ab8d8c26898417c88c484b085..96974b9f8e7d1b96d9a759ecb2c815222193dafc 100644 --- a/lib_dec/FEC_HQ_phase_ecu.c +++ b/lib_dec/FEC_HQ_phase_ecu.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_dec/FEC_adapt_codebook.c b/lib_dec/FEC_adapt_codebook.c index 5ffd9a1fdeba23808f2d4117c2f96bb1916c2745..961dfc6a5d19fa38401eb9c7bb396546b267329d 100644 --- a/lib_dec/FEC_adapt_codebook.c +++ b/lib_dec/FEC_adapt_codebook.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_dec.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- * FEC_synchro_exc() diff --git a/lib_dec/FEC_clas_estim.c b/lib_dec/FEC_clas_estim.c index 7a27532f17abd8981f7d0c170691a33211746ea7..4acd3dab9cef32fa47fafd57184f9edc2e52877a 100644 --- a/lib_dec/FEC_clas_estim.c +++ b/lib_dec/FEC_clas_estim.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "stat_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_dec/FEC_lsf_estim.c b/lib_dec/FEC_lsf_estim.c index f971ec4434de2943cb756fbe8dd9f28c6b8e178d..dce8b8351583c298dcd5ed8f41b0807d7ac32f0c 100644 --- a/lib_dec/FEC_lsf_estim.c +++ b/lib_dec/FEC_lsf_estim.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * FEC_lsf_estim() diff --git a/lib_dec/FEC_pitch_estim.c b/lib_dec/FEC_pitch_estim.c index e2f6491cc30072ce48e16ae042b80fe0b4a2d68e..3076f7bcaaccd78c0e92566c68669bc56eed653e 100644 --- a/lib_dec/FEC_pitch_estim.c +++ b/lib_dec/FEC_pitch_estim.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------* * FEC_pitch_estim() diff --git a/lib_dec/FEC_scale_syn.c b/lib_dec/FEC_scale_syn.c index 66fae0fc053108265fe3efad80bcc738515eb752..7d43ad3a9ae7840dd49894d6a796169878894861 100644 --- a/lib_dec/FEC_scale_syn.c +++ b/lib_dec/FEC_scale_syn.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #define SCLSYN_LAMBDA 0.3f diff --git a/lib_dec/LD_music_post_filter.c b/lib_dec/LD_music_post_filter.c index f19e7375952d6c150fd1e5e3d5c27751716fd188..87984e873a15af6bc744f1e32f4b3af1e409a8ea 100644 --- a/lib_dec/LD_music_post_filter.c +++ b/lib_dec/LD_music_post_filter.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_dec/TonalComponentDetection.c b/lib_dec/TonalComponentDetection.c index 230dfe408625b32ebc099a1bb82576dce3f7c122..fedfe0c2e6be69c18d76ad5576922432a2408f21 100644 --- a/lib_dec/TonalComponentDetection.c +++ b/lib_dec/TonalComponentDetection.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "prot.h" #include "cnst.h" #include "stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 4c52cdb811d19797371d861aa1c4e84f64eda123..7fcc65f6f76c205133836324497a888c918ac9ab 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -48,7 +48,7 @@ #ifdef LSF_RE_USE_SECONDARY_CHANNEL #include "ivas_rom_com.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * acelp_core_dec() @@ -131,7 +131,7 @@ ivas_error acelp_core_dec( return error; } - wmops_sub_start( "acelp_core_dec" ); + push_wmops( "acelp_core_dec" ); output_frame = (int16_t) ( st->output_Fs / FRAMES_PER_SEC ); @@ -179,7 +179,7 @@ ivas_error acelp_core_dec( set_f( synth, 0, output_frame ); /* They are however read in a few places which causes errors in the valgrind tests. Simplest solution from a code perspective was to set them to zero. */ /* CN generation done in DFT domain */ - wmops_sub_end(); + pop_wmops(); return error; } @@ -1432,6 +1432,6 @@ ivas_error acelp_core_dec( st->hTdCngDec->ho_16k_lsp[st->hTdCngDec->ho_circ_ptr] = ( st->L_frame == L_FRAME ? 0 : 1 ); } - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_dec/acelp_core_switch_dec.c b/lib_dec/acelp_core_switch_dec.c index be34a95e319ddfb93953c9700ce72c5791378231..6953551452220ee793e544469e2d4f379acb1228 100644 --- a/lib_dec/acelp_core_switch_dec.c +++ b/lib_dec/acelp_core_switch_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/amr_wb_dec.c b/lib_dec/amr_wb_dec.c index 29c4f939ed6adeb641e6b4edcd1223fd956bcd6a..5252b265647b1efd2581b816d7b72f2cad8a7f97 100644 --- a/lib_dec/amr_wb_dec.c +++ b/lib_dec/amr_wb_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * amr_wb_dec() diff --git a/lib_dec/ari_dec.c b/lib_dec/ari_dec.c index fe97e69a523f566978b2783e5f3caa4c0704e3e6..31df466f009d2106ae5d5356b9e2351c26af812f 100644 --- a/lib_dec/ari_dec.c +++ b/lib_dec/ari_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "prot.h" #include "stat_com.h" #include "basop_util.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- diff --git a/lib_dec/ari_hm_dec.c b/lib_dec/ari_hm_dec.c index 78f14e4a282b0b3e67a2c59733ba031dfa3fe6a3..3ba6a886fb4468278c9b4809bdcb585c2f50070f 100644 --- a/lib_dec/ari_hm_dec.c +++ b/lib_dec/ari_hm_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "basop_util.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * DecodeIndex() diff --git a/lib_dec/arith_coder_dec.c b/lib_dec/arith_coder_dec.c index 793edcef261e17f57bcea01bfcacc0932c9d1a67..09f1698133aabf410b5ff434b1b5a4cbffb8e4f6 100644 --- a/lib_dec/arith_coder_dec.c +++ b/lib_dec/arith_coder_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "rom_com.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------* * tcx_arith_decode() @@ -170,9 +170,9 @@ void tcx_arith_decode_envelope( gamma_w = 1.0f; gamma_uw = 1.0f / st->gamma; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP tcx_arith_render_envelope( A_ind, L_frame, L_spec, FL2WORD16( hTcxCfg->preemph_fac ), FL2WORD16( gamma_w ), FL2WORD16( 0.5f * gamma_uw ), env ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP if ( use_hm ) { diff --git a/lib_dec/avq_dec.c b/lib_dec/avq_dec.c index 99aabbb04c824fe9f1e796b8d6baae1ac6b137f6..ec74ea53896dbb1cc3939b47c83cfc10f68da315 100644 --- a/lib_dec/avq_dec.c +++ b/lib_dec/avq_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" #include /*-------------------------------------------------------------------* diff --git a/lib_dec/bass_psfilter.c b/lib_dec/bass_psfilter.c index 85c595460c21abd1d82c0bf4c2c6e76d5ad43594..0a0eabd1153824989e9f74fa00d17d5a670cf553 100644 --- a/lib_dec/bass_psfilter.c +++ b/lib_dec/bass_psfilter.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "debug.h" #endif #include -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_dec/cng_dec.c b/lib_dec/cng_dec.c index 415ac27b3a492d5686a52336433dadb1c3a93337..b780db062f4d416a2fbcf2bde7dbb15b79bd18c4 100644 --- a/lib_dec/cng_dec.c +++ b/lib_dec/cng_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/core_dec_init.c b/lib_dec/core_dec_init.c index 90827ca0eee8074fecdc20832be5a9e681e4f780..6787968270787e0301314f5eb564ed8e1f3d273f 100644 --- a/lib_dec/core_dec_init.c +++ b/lib_dec/core_dec_init.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * open_decoder_LPD() @@ -279,7 +279,11 @@ void open_decoder_LPD( st->last_core_bfi = ACELP_CORE; } +#ifdef FIX_301_PLC + if ( ( ( st->element_mode != IVAS_CPE_DFT ) || ( st->element_mode == IVAS_CPE_DFT && st->prev_bfi ) ) && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) +#else if ( st->element_mode != IVAS_CPE_DFT && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) +#endif { /* Switching from Mode 1 ACELP */ st->last_core_bfi = ACELP_CORE; @@ -670,6 +674,11 @@ void open_decoder_LPD( st->last_tns_active = 0; st->second_last_tns_active = 0; st->second_last_core = -1; + /* TODO: also apply for MCT modes, once issue #24 is solved */ + if ( st->hTcxCfg != NULL && !MCT_flag && st->element_mode != EVS_MONO ) + { + st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( is_init ? total_brate : st->bits_frame_nominal * FRAMES_PER_SEC, st->igf, st->element_mode, st->mct_chan_mode ); + } if ( hTcxDec != NULL ) { hTcxDec->tcxltp_second_last_pitch = st->old_fpitch; diff --git a/lib_dec/core_dec_reconf.c b/lib_dec/core_dec_reconf.c index 201ccc0cb3ac5c52573f38669013fdf9117c8b75..7734d131773c06eacedaae8cb2be72806e7e73a8 100644 --- a/lib_dec/core_dec_reconf.c +++ b/lib_dec/core_dec_reconf.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * reconfig_decoder_LPD() diff --git a/lib_dec/core_dec_switch.c b/lib_dec/core_dec_switch.c index c1f8e590fbde31b39ec3024729aeb425938dd8ee..a092255a38897557b1260d1cd9860907a810aa15 100644 --- a/lib_dec/core_dec_switch.c +++ b/lib_dec/core_dec_switch.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------* * mode_switch_decoder_LPD() diff --git a/lib_dec/core_switching_dec.c b/lib_dec/core_switching_dec.c index 8762f20ac3a774d07a96353ac59f8d9d36078c67..c2a3955afba78484d27ac1a564e75a6a9f4d6113 100644 --- a/lib_dec/core_switching_dec.c +++ b/lib_dec/core_switching_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "prot.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local prototypes @@ -70,6 +70,7 @@ ivas_error core_switching_pre_dec( { int16_t i, oldLenClasBuff, newLenClasBuff; ivas_error error; + float tmp; error = IVAS_ERR_OK; @@ -401,7 +402,7 @@ ivas_error core_switching_pre_dec( } } - if ( st->core == HQ_CORE && ( st->last_core == ACELP_CORE || st->last_core == AMR_WB_CORE ) ) + if ( st->core == HQ_CORE && ( st->last_core == ACELP_CORE || st->last_core == AMR_WB_CORE || ( ( st->element_mode != EVS_MONO ) && ( st->last_core != HQ_CORE ) ) ) ) { set_f( st->hHQ_core->prev_env, 0, SFM_N_WB ); set_f( st->hHQ_core->prev_normq, 0, SFM_N_WB ); @@ -418,8 +419,34 @@ ivas_error core_switching_pre_dec( set_f( st->hHQ_core->prev_coeff_out, 0, L_HQ_WB_BWE ); } - set_f( st->hHQ_core->old_out, 0, output_frame ); - set_f( st->hHQ_core->old_outLB, 0, L_FRAME16k ); + if ( st->element_mode != EVS_MONO ) + { + /* Estimate mem_env_delta to reinit env_stab */ + tmp = max( 0, ENV_STAB_EST1 + ( ENV_STAB_EST2 * st->stab_fac_smooth_lt ) + ( ENV_STAB_EST3 * st->log_energy_diff_lt ) ); + st->hHQ_core->mem_env_delta = (int16_t) min( MAX16B, (int32_t) ( tmp * ( 1 << 12 ) ) ); /* Convert to Q12 and handle saturation */ + + if ( st->last_core != TCX_20_CORE && st->last_core != TCX_10_CORE ) + { + set_f( st->hHQ_core->old_out, 0, output_frame ); + set_f( st->hHQ_core->old_outLB, 0, L_FRAME16k ); + } + + st->hHQ_core->no_att_hangover = 0; + st->hHQ_core->energy_lt = 300.0f; + + set_s( st->hHQ_core->old_is_transient, 0, 3 ); + set_f( st->hHQ_core->prev_noise_level, 0.0f, 2 ); + st->hHQ_core->prev_R = 0; + set_s( st->hHQ_core->mem_norm + 1, 39, SFM_N_ENV_STAB - 1 ); + st->hHQ_core->prev_hqswb_clas = HQ_NORMAL; + st->hHQ_core->prev_ni_ratio = 0.5f; + set_f( st->hHQ_core->prev_En_sb, 0.0f, NB_SWB_SUBBANDS ); + } + else + { + set_f( st->hHQ_core->old_out, 0, output_frame ); + set_f( st->hHQ_core->old_outLB, 0, L_FRAME16k ); + } } /* handle switching cases where preecho_sb was not called in the last frame (memory not up to date) */ @@ -1001,7 +1028,7 @@ void bandwidth_switching_detect( { st->bws_cnt1 = 0; } - else if ( st->total_brate > ACELP_9k60 && st->last_core_brate < ACELP_9k60 && st->bwidth == SWB && st->last_bwidth == WB ) + else if ( st->total_brate > ACELP_9k60 && st->last_core_brate < ACELP_9k60 && st->bwidth == SWB && st->last_bwidth == WB && st->last_low_rate_mode == 0 ) { st->bws_cnt1++; } diff --git a/lib_dec/d_gain2p.c b/lib_dec/d_gain2p.c index 7a0cd8ed4f4106dc34cdb71d564775f687308b63..246500d26ac95189ea7c34232e67ee59d1df3698 100644 --- a/lib_dec/d_gain2p.c +++ b/lib_dec/d_gain2p.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * Mode2_gain_dec_mless diff --git a/lib_dec/dec2t32.c b/lib_dec/dec2t32.c index 67981738fcb240c393388bd201156e471c2b1084..258e36da41e88431f002ec4ad80f67483ebc5113 100644 --- a/lib_dec/dec2t32.c +++ b/lib_dec/dec2t32.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------------------* * dec_acelp_2t32() diff --git a/lib_dec/dec4t64.c b/lib_dec/dec4t64.c index 3a0a6a7e50f18bd6e376a3ad288c082702db0171..9f2ab5d1c222f7185bc122d32fc115625c6adbca 100644 --- a/lib_dec/dec4t64.c +++ b/lib_dec/dec4t64.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/dec_LPD.c b/lib_dec/dec_LPD.c index c06bee28f91110d342afc10378e9ab8cc196fb8a..af6a937e11ee56cbe2abbb5ef47ba76ac50cd565 100644 --- a/lib_dec/dec_LPD.c +++ b/lib_dec/dec_LPD.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "cnst.h" #include "basop_proto_func.h" #include "stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_dec/dec_ace.c b/lib_dec/dec_ace.c index 24fbf3149fa49492a50507aedb2954edf750cc63..ee32d67146fdaeaf9719afad027018ca3d766609 100644 --- a/lib_dec/dec_ace.c +++ b/lib_dec/dec_ace.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * decoder_acelp() diff --git a/lib_dec/dec_acelp.c b/lib_dec/dec_acelp.c index 7ccdee8888958871d861e2fd7910ff5eca48cb49..ab2bebe69603aaeec160b277da744d45bb1a9e9b 100644 --- a/lib_dec/dec_acelp.c +++ b/lib_dec/dec_acelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "typedef.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/dec_acelp_tcx_main.c b/lib_dec/dec_acelp_tcx_main.c index b9d34815793e2fea27a9cf8c074261c6a8285f2d..1ab6b5265945b7f5d7c1b51350c7c0844858e56a 100644 --- a/lib_dec/dec_acelp_tcx_main.c +++ b/lib_dec/dec_acelp_tcx_main.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "debug.h" #endif #include "stat_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * decode_frame_type() @@ -295,7 +295,7 @@ void dec_acelp_tcx_frame( float old_bwe_exc[( PIT16k_MAX + ( L_FRAME16k + 1 ) + L_SUBFR16k ) * 2]; /* excitation buffer */ float *ptr_bwe_exc; /* pointer to BWE excitation signal in the current frame */ - wmops_sub_start( "dec_acelp_tcx_frame" ); + push_wmops( "dec_acelp_tcx_frame" ); start_bit_pos = st->next_bit_pos; if ( st->rf_flag == 1 ) @@ -479,6 +479,6 @@ void dec_acelp_tcx_frame( st->last_coder_type = INACTIVE; } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/dec_amr_wb.c b/lib_dec/dec_amr_wb.c index 79c9b8d951a19c161d98b342528529ae362ad77f..29fe0a253eb2d65ae1ab650a5efe4730181f7961 100644 --- a/lib_dec/dec_amr_wb.c +++ b/lib_dec/dec_amr_wb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * decod_amr_wb() diff --git a/lib_dec/dec_gen_voic.c b/lib_dec/dec_gen_voic.c index 0151abcbbadea0969723513e05fbf9dcc7422c01..c8220be8611da8f6014840912da1be0402ad74d5 100644 --- a/lib_dec/dec_gen_voic.c +++ b/lib_dec/dec_gen_voic.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * decod_gen_voic() @@ -285,8 +285,8 @@ ivas_error decod_gen_voic( } } - dynamic_free( PREVP ); - dynamic_free( CURRP ); + free( PREVP ); + free( CURRP ); } } diff --git a/lib_dec/dec_higher_acelp.c b/lib_dec/dec_higher_acelp.c index 32b5b705140898daff04d4f7e6da776cc3395f81..1990de936324fd044c1a0e27d1bb8de532a8560c 100644 --- a/lib_dec/dec_higher_acelp.c +++ b/lib_dec/dec_higher_acelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * transf_cdbk_dec() diff --git a/lib_dec/dec_nelp.c b/lib_dec/dec_nelp.c index 2cdcd126dbe9f6fce3fca8ba0aa92f3d103a9520..8516f4cfd1c7b4589342d13fd1e5395d625db340 100644 --- a/lib_dec/dec_nelp.c +++ b/lib_dec/dec_nelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * decod_nelp() diff --git a/lib_dec/dec_pit_exc.c b/lib_dec/dec_pit_exc.c index 547e321aaf3d420ce214927331f45ab82ece3521..2b67a6042f4a0f06042fa9da9cc21679230f9eb7 100644 --- a/lib_dec/dec_pit_exc.c +++ b/lib_dec/dec_pit_exc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * dec_pit_exc() diff --git a/lib_dec/dec_post.c b/lib_dec/dec_post.c index 9c90fcac62cda90e5df017d9a0d37a25d79489c4..6c5cd0423be8199e2cd6f4f5186fdd96a84046a7 100644 --- a/lib_dec/dec_post.c +++ b/lib_dec/dec_post.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_dec/dec_ppp.c b/lib_dec/dec_ppp.c index c6a274bef4f94fdb556139863e4dcf9fda554a18..b36f9190a1cbb2e2d3dbdb0783f007c08407fc8f 100644 --- a/lib_dec/dec_ppp.c +++ b/lib_dec/dec_ppp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * decod_ppp() diff --git a/lib_dec/dec_prm.c b/lib_dec/dec_prm.c index 4027b7f95b4b90e703eb4fdb24183d04d6bd3bde..d2e9aa26efb77b2a557d314e6de50096565940ff 100644 --- a/lib_dec/dec_prm.c +++ b/lib_dec/dec_prm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index 3316648d8e567495ff3fe97c7b1391d722277c25..9c8172589405790afab9bd795820260975bbb10b 100644 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include #include "stat_com.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_rom_com.h" #ifdef DEBUG_PLOT #include "deb_out.h" @@ -152,11 +152,7 @@ void decoder_tcx_post( if ( bfi && !st->use_partial_copy ) { /* run lpc gain compensation not for waveform adjustment */ -#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS if ( !st->enablePlcWaveadjust || ( st->hPlcInfo != NULL && st->hPlcInfo->concealment_method == TCX_TONAL ) ) -#else - if ( !st->enablePlcWaveadjust || st->hPlcInfo->concealment_method == TCX_TONAL ) -#endif { float gainHelperFB = hTcxDec->gainHelper; float stepCompensateFB = hTcxDec->stepCompensate * st->L_frame / hTcxDec->L_frameTCX; @@ -334,12 +330,10 @@ void IMDCT( /* number of zero for ALDO windows*/ nz = NS2SA( st->output_Fs, N_ZERO_MDCT_NS ) * L_frame / L_frameTCX; -#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS if ( st->element_mode != EVS_MONO && frame_cnt == 0 && !bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && !hTcxCfg->last_aldo ) { v_multc( old_syn_overl, hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, old_syn_overl, overlap ); } -#endif if ( ( L_frameTCX == hTcxDec->L_frameTCX >> 1 || st->mct_chan_mode == MCT_CHAN_MODE_LFE ) && ( st->tcxonly ) ) { diff --git a/lib_dec/dec_tran.c b/lib_dec/dec_tran.c index 7120211fb61a767b6937e68c833b873f3b7078ee..875ce5eabf3449bcd087dffd7b81e08556d4270b 100644 --- a/lib_dec/dec_tran.c +++ b/lib_dec/dec_tran.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * decod_tran() diff --git a/lib_dec/dec_uv.c b/lib_dec/dec_uv.c index 28395210910cc7cf83a9494d4c7edf0cac532fce..63c4b1d3bdcffbb529c280865e84b629e68a5399 100644 --- a/lib_dec/dec_uv.c +++ b/lib_dec/dec_uv.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * decod_unvoiced() diff --git a/lib_dec/decision_matrix_dec.c b/lib_dec/decision_matrix_dec.c index cb604dc5f7287807f75789dcaa1fc65e7feb8776..84e6e9573e20eb5f2df4788a644e6e4bc1903a45 100644 --- a/lib_dec/decision_matrix_dec.c +++ b/lib_dec/decision_matrix_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "stat_dec.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * decision_matrix_dec() diff --git a/lib_dec/dlpc_avq.c b/lib_dec/dlpc_avq.c index 2a89cdb35c2d791b11320db1ee2c73fddbc818f2..b4a95fd74d5369d449c1386a2fa889a9cf95d3a9 100644 --- a/lib_dec/dlpc_avq.c +++ b/lib_dec/dlpc_avq.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * dlpc_avq() diff --git a/lib_dec/dlpc_stoch.c b/lib_dec/dlpc_stoch.c index 21b1ab2d8d60077da5da767c434f7e50c1c6a76e..1bbba46b1b2c9c18fcddd5a3eaf0123d95318d18 100644 --- a/lib_dec/dlpc_stoch.c +++ b/lib_dec/dlpc_stoch.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_com.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * lpc_unquantize() diff --git a/lib_dec/er_dec_acelp.c b/lib_dec/er_dec_acelp.c index 4e0d5c9b482257ad4c6681a921320ad3b9301fb6..7024cfb3f848a0557fb1f826062091ec7ac7b805 100644 --- a/lib_dec/er_dec_acelp.c +++ b/lib_dec/er_dec_acelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * con_acelp() diff --git a/lib_dec/er_dec_tcx.c b/lib_dec/er_dec_tcx.c index 6710e2a6ff9c19774e1485ce7ddd417b5ba3dad7..1ce3bf2035f97aee410f014857fefa7da3b749d1 100644 --- a/lib_dec/er_dec_tcx.c +++ b/lib_dec/er_dec_tcx.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include #include "prot.h" #include "rom_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * con_tcx() diff --git a/lib_dec/er_scale_syn.c b/lib_dec/er_scale_syn.c index 1ae7f57104f8055bee742b70f74caaeb89410a51..d6d048b234a115a4ddf10b64725d5e6bd44ce045 100644 --- a/lib_dec/er_scale_syn.c +++ b/lib_dec/er_scale_syn.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------------------* diff --git a/lib_dec/er_sync_exc.c b/lib_dec/er_sync_exc.c index 3a66e8312992d048d707246b44133989c7d9726e..b28a172715875c93696b27547bbf4e2efd86bd6a 100644 --- a/lib_dec/er_sync_exc.c +++ b/lib_dec/er_sync_exc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_dec/er_util.c b/lib_dec/er_util.c index f907781c2906a66d3d754ea0871e38d76d23601e..809b0134d9653d91a028804f78eee5468a801782 100644 --- a/lib_dec/er_util.c +++ b/lib_dec/er_util.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "cnst.h" #include "stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_dec/evs_dec.c b/lib_dec/evs_dec.c index 299e6a31ce2ddaacbce758ccae17ec9e0b58e70f..23914302375ae1e39dd2cf8bccdc03c1a485d997 100644 --- a/lib_dec/evs_dec.c +++ b/lib_dec/evs_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif @@ -86,7 +86,7 @@ ivas_error evs_dec( error = IVAS_ERR_OK; - wmops_sub_start( "evs_dec" ); + push_wmops( "evs_dec" ); /*------------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ @@ -285,7 +285,7 @@ ivas_error evs_dec( /*---------------------------------------------------------------------* * Pre-processing for bandwidth switching *---------------------------------------------------------------------*/ - wmops_sub_start( "BWE_decoding" ); + push_wmops( "BWE_decoding" ); bw_switching_pre_proc( st, old_syn_12k8_16k, -1, 1 ); @@ -356,7 +356,7 @@ ivas_error evs_dec( swb_CNG_dec( st, synth, hb_synth, sid_bw ); } - wmops_sub_end(); + pop_wmops(); /*----------------------------------------------------------------* * Delay ACELP core synthesis to be synchronized with the components of bandwidth extension layers @@ -975,6 +975,6 @@ ivas_error evs_dec( } #endif - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_dec/fd_cng_dec.c b/lib_dec/fd_cng_dec.c index ce252929578daa1d21724c59636dd80d88bc7e72..cf55b4a619cc83cfd51bb79f89a60b156a9ce81a 100644 --- a/lib_dec/fd_cng_dec.c +++ b/lib_dec/fd_cng_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" #include "ivas_rom_dec.h" @@ -76,7 +76,7 @@ ivas_error createFdCngDec( *hFdCngDec = NULL; /* Allocate memory */ - hs = (HANDLE_FD_CNG_DEC) count_malloc( sizeof( FD_CNG_DEC ) ); + hs = (HANDLE_FD_CNG_DEC) malloc( sizeof( FD_CNG_DEC ) ); if ( hs == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for FD CNG DEC structure" ); @@ -352,7 +352,7 @@ void deleteFdCngDec( if ( hsDec != NULL ) { deleteFdCngCom( &( hsDec->hFdCngCom ) ); - count_free( hsDec ); + free( hsDec ); *hFdCngDec = NULL; } @@ -385,7 +385,7 @@ void ApplyFdCng( int16_t L_frame, last_L_frame; int32_t sr_core; - wmops_sub_start( "ApplyFdCng" ); + push_wmops( "ApplyFdCng" ); /* limit L_frame and core Fs values for MDCT-Stereo modes which can have higher core sampling than 16kHz, but use a downsampled buffer */ L_frame = min( st->L_frame, L_FRAME16k ); @@ -608,7 +608,7 @@ void ApplyFdCng( break; } - wmops_sub_end(); + pop_wmops(); return; } @@ -1771,7 +1771,7 @@ void generate_masking_noise_dirac( int16_t *seed = &( hFdCngCom->seed ); float scale; - wmops_sub_start( "fd_cng_dirac" ); + push_wmops( "fd_cng_dirac" ); /* Init */ scale = 0.f; @@ -1930,7 +1930,7 @@ void generate_masking_noise_dirac( } } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/gain_dec.c b/lib_dec/gain_dec.c index dd8a58637cee9e121e574d6eacd2b1abadba7c7d..99eecba56a4919f1790c0f3a022761b1328c65c3 100644 --- a/lib_dec/gain_dec.c +++ b/lib_dec/gain_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Es_pred_dec() diff --git a/lib_dec/gaus_dec.c b/lib_dec/gaus_dec.c index fed8ab60ac8c4cf6146308f3c8854ce399be7cde..a053597722528bb13536f2380e84c90c3d55f63d 100644 --- a/lib_dec/gaus_dec.c +++ b/lib_dec/gaus_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/gs_dec.c b/lib_dec/gs_dec.c index f1b4e997afeddd653701267d402df2b6c5cfafc1..e8112c6c4da76ee0a2eb5e970a749427acd9a494 100644 --- a/lib_dec/gs_dec.c +++ b/lib_dec/gs_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * decod_audio() diff --git a/lib_dec/gs_dec_amr_wb.c b/lib_dec/gs_dec_amr_wb.c index 956e065031ebb1fadb0763a50547789292336133..1d41f367f4ff2497d0b56e8ad624f681141a797f 100644 --- a/lib_dec/gs_dec_amr_wb.c +++ b/lib_dec/gs_dec_amr_wb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_dec/hdecnrm.c b/lib_dec/hdecnrm.c index f1a119a8678040c16e02a1775806fbb99a6b0542..1f247ef1f0e1a1e9e87a6d0a24d171d0e9ba54b4 100644 --- a/lib_dec/hdecnrm.c +++ b/lib_dec/hdecnrm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------*/ diff --git a/lib_dec/hf_synth.c b/lib_dec/hf_synth.c index 9c0f2c8463b3299fc3cc7f91d9b97b87cdc67213..a4d75b4e9af5118eef7c49a1cc5fecc4450b0e9e 100644 --- a/lib_dec/hf_synth.c +++ b/lib_dec/hf_synth.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/hq_classifier_dec.c b/lib_dec/hq_classifier_dec.c index 38a02300795dbc63606888a770654dace266e17c..10a1a783fcddeac2b0bf93a14e6306c98e24ca33 100644 --- a/lib_dec/hq_classifier_dec.c +++ b/lib_dec/hq_classifier_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hq_classifier_dec() diff --git a/lib_dec/hq_conf_fec.c b/lib_dec/hq_conf_fec.c index 5e0e6426f24d850467bab892482c518360bc1225..7d3c79fcf2367dc699d50eadd5faef31a689d998 100644 --- a/lib_dec/hq_conf_fec.c +++ b/lib_dec/hq_conf_fec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hq_configure_bfi() diff --git a/lib_dec/hq_core_dec.c b/lib_dec/hq_core_dec.c index 547354eddc51ca6d09c765befcaf1e158d88e8bb..cdb9601679549187e6e5dae354e0e8e2314e6f71 100644 --- a/lib_dec/hq_core_dec.c +++ b/lib_dec/hq_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" @@ -87,7 +87,7 @@ void hq_core_dec( int16_t mdctWindowLength; int16_t mdctWindowLengthFB; - wmops_sub_start( "hq_core_dec" ); + push_wmops( "hq_core_dec" ); /*-------------------------------------------------------------------------- * Initializations *--------------------------------------------------------------------------*/ @@ -249,7 +249,7 @@ void hq_core_dec( else { /* HQ high rate decoder */ - hq_hr_dec( st, t_audio_q, L_spec, num_bits, ynrm, &is_transient, &hqswb_clas, SWB_fenv ); + hq_hr_dec( st, t_audio_q, L_spec, num_bits, ynrm, &is_transient, &hqswb_clas, SWB_fenv, core_switching_flag ); } if ( st->element_mode == EVS_MONO || ( !core_switching_flag && !hq_recovery_flag ) ) @@ -495,7 +495,7 @@ void hq_core_dec( mvr2r( output, st->old_exc + L_EXC_MEM_DEC - st->L_frame, st->L_frame ); } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/hq_env_dec.c b/lib_dec/hq_env_dec.c index d4abecfc5d52410a91752a0412aea484500b9cf1..e584bfa8276c44c19fe394a3ad35557a9d83d5d9 100644 --- a/lib_dec/hq_env_dec.c +++ b/lib_dec/hq_env_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------* * decode_envelope_indices() diff --git a/lib_dec/hq_hr_dec.c b/lib_dec/hq_hr_dec.c index 3eb1108b24e1966d17934ffab447ede40e503eab..5153af07ead81341863f7c98377ac69a65d53609 100644 --- a/lib_dec/hq_hr_dec.c +++ b/lib_dec/hq_hr_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hq_pred_hb_bws() @@ -100,14 +100,15 @@ static void hq_pred_hb_bws( *--------------------------------------------------------------------------*/ void hq_hr_dec( - Decoder_State *st, /* i/o: decoder state structure */ - float *t_audio_q, /* o : transform-domain coefficients */ - const int16_t length, /* i : frame length */ - const int16_t num_bits, /* i : number of available bits */ - int16_t *ynrm, /* o : norm quantization index vector */ - int16_t *is_transient, /* o : transient flag */ - int16_t *hqswb_clas, /* o : HQ SWB class */ - float *SWB_fenv /* o : SWB frequency envelopes */ + Decoder_State *st, /* i/o: decoder state structure */ + float *t_audio_q, /* o : transform-domain coefficients */ + const int16_t length, /* i : frame length */ + const int16_t num_bits, /* i : number of available bits */ + int16_t *ynrm, /* o : norm quantization index vector */ + int16_t *is_transient, /* o : transient flag */ + int16_t *hqswb_clas, /* o : HQ SWB class */ + float *SWB_fenv, /* o : SWB frequency envelopes */ + const int16_t core_switching_flag /* i : Core switching flag */ ) { int16_t nb_sfm; @@ -193,9 +194,9 @@ void hq_hr_dec( { hHQ_core->mem_env_delta = 0; } - else if ( length == L_FRAME32k ) + else if ( length == L_FRAME32k || ( core_switching_flag && ( st->element_mode != EVS_MONO ) && length == L_SPEC32k_EXT ) ) { - env_stab = env_stability( ynrm, SFM_N_ENV_STAB, hHQ_core->mem_norm, &hHQ_core->mem_env_delta ); + env_stab = env_stability( ynrm, SFM_N_ENV_STAB, hHQ_core->mem_norm, &hHQ_core->mem_env_delta, core_switching_flag && ( st->element_mode != EVS_MONO ) ); } else { @@ -209,13 +210,13 @@ void hq_hr_dec( } else { - if ( length == L_FRAME32k ) + if ( length == L_FRAME32k || ( core_switching_flag && ( st->element_mode != EVS_MONO ) && length == L_SPEC32k_EXT ) ) { hHQ_core->env_stab = env_stab; /* calculated stability */ } else { - hHQ_core->env_stab = env_stability( ynrm, SFM_N_ENV_STAB_WB, hHQ_core->mem_norm_hqfec, &hHQ_core->mem_env_delta_hqfec ); + hHQ_core->env_stab = env_stability( ynrm, SFM_N_ENV_STAB_WB, hHQ_core->mem_norm_hqfec, &hHQ_core->mem_env_delta_hqfec, core_switching_flag && ( st->element_mode != EVS_MONO ) ); } } hHQ_core->env_stab_plc = env_stab_smo( min( hHQ_core->env_stab, 1.0f - stab_trans[L_STAB_TBL - 1] ), hHQ_core->env_stab_state_p, &hHQ_core->envstabplc_hocnt ); diff --git a/lib_dec/hq_lr_dec.c b/lib_dec/hq_lr_dec.c index 5e7584384d5522496fc508b53f9251cb3a2b0d1f..81f4c1b284460f451ce60e2b6b367250089a34a4 100644 --- a/lib_dec/hq_lr_dec.c +++ b/lib_dec/hq_lr_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "prot.h" #include "stl.h" #include "basop_util.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * Local function prototypes @@ -252,7 +252,7 @@ void hq_lr_dec( return; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* Estimate number of bits per sub-band */ Q_band_energy = SWB_BWE_LR_Qbe; FOR( i = 0; i < bands; i++ ) @@ -295,7 +295,7 @@ void hq_lr_dec( Ep_tmp_fx[i] = L_shr( L_tmp, sub( 15, exp2 ) ); /*Q13 */ Ep_tmp[i] = (float) ( Ep_tmp_fx[i] / pow( 2.0, 13 ) ); } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP if ( *is_transient == 0 && inner_frame == L_FRAME8k && st->core_brate <= ACELP_13k20 ) { @@ -306,7 +306,7 @@ void hq_lr_dec( last_bitalloc_max_band[i] = get_next_indice( st, 1 ); } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP lowband = 6; move16(); trans_bit = 2; @@ -567,7 +567,7 @@ void hq_lr_dec( #endif /* BASOP_NOGLOB */ } } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP for ( i = 0; i < bands; i++ ) { @@ -578,7 +578,7 @@ void hq_lr_dec( } else if ( *is_transient == 0 && inner_frame == L_FRAME16k ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP bit_budget = sub( bit_budget, 2 ); /* bits in high bands to indicate the last 2 subbands is allocated bits or not */ /* decode the last p2a_bands-1 subbands bit-allocation index of the previous frame */ for ( i = 0; i < 2; i++ ) @@ -839,7 +839,7 @@ void hq_lr_dec( L_band_energy_tmp[i] = L_shl( L_tmp, 1 ); /*Q_band_energy */ } } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP for ( i = 0; i < bands; i++ ) { @@ -1216,14 +1216,14 @@ static float band_energy_dequant( deng_bits += BITS_DE_CMODE; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* Get the reference energy */ exp_normd = norm_l( L_qint ); div_s( &rev_qint_fx, 0x4000, round_fx( L_shl( L_qint, exp_normd ) ) ); /* Q14-(29+exp_normd-16)+15 */ Qrev_qint = sub( 14 - ( 29 - 16 ) + 15, exp_normd ); bq0 = (int16_t) round_fx( L_shl( L_mult( eref_fx, rev_qint_fx ), sub( 5, Qrev_qint ) ) ); /* 16-(10+Qrev_qint+1) */ -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /* Reconstruct quantized spectrum */ bq1[0] = bq2[0] + bq0; @@ -1234,11 +1234,11 @@ static float band_energy_dequant( for ( k = 0; k < bands; k++ ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP L_band_energy[k] = L_mls( L_qint, bq1[k] ); move32(); /* 29+0-15 -> Qbe(Q14) */ band_energy[k] = (float) ( L_band_energy[k] / pow( 2.0f, SWB_BWE_LR_Qbe ) ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } if ( is_transient ) @@ -1309,7 +1309,7 @@ static void mdct_spectrum_fine_gain_dec( Word16 Qgt; Word16 temp_lo_fx, temp_hi_fx; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* Fine gain quantization on only the most significant energy bands */ /*delta = qint / gqlevs; */ exp_normn = norm_l( L_qint ); @@ -1334,7 +1334,7 @@ static void mdct_spectrum_fine_gain_dec( gain_table_fx[i] = shl( gain_table_fx[i], sub( 14, Qgt ) ); /* Qgt -> Q14 */ gain_table[i] = (float) ( gain_table_fx[i] / pow( 2.0f, 14 ) ); } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP for ( k = bands - Ngq; k < bands; k++ ) { diff --git a/lib_dec/igf_dec.c b/lib_dec/igf_dec.c index 2cded759289c48a02e4c4c646508ea48e834d7a6..a3eefd226ebe39c0baf910d806afaecef48c188d 100644 --- a/lib_dec/igf_dec.c +++ b/lib_dec/igf_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "cnst.h" #include "stat_dec.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -1590,10 +1590,19 @@ void init_igf_dec( return; } + +/*-----------------------------------------------------------------------* + * get_igf_startline() + * + * + *-----------------------------------------------------------------------*/ + +/*! r: IGF start line */ int16_t get_igf_startline( - Decoder_State *st, - int16_t L_frame, - int16_t L_frameTCX ) + Decoder_State *st, /* i : decoder state */ + const int16_t L_frame, /* i : length of the frame */ + const int16_t L_frameTCX /* i : full band frame length */ +) { int16_t igf_startline; diff --git a/lib_dec/igf_scf_dec.c b/lib_dec/igf_scf_dec.c index 29660271b3f6eda68d8dc0d0487c17716ba3b7e9..f152f637a0d83b6e78684766f44a215874793eb0 100644 --- a/lib_dec/igf_scf_dec.c +++ b/lib_dec/igf_scf_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "debug.h" #endif #include "stat_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_dec/init_dec.c b/lib_dec/init_dec.c index 4b74ccebb92a9bc0282d91c145f1da6bbd897144..a318d7e5604c2f79753ada3b1579fe2428eec3f1 100644 --- a/lib_dec/init_dec.c +++ b/lib_dec/init_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "ivas_cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------* * init_decoder() @@ -107,6 +107,7 @@ ivas_error init_decoder( st->last_good = UNVOICED_CLAS; st->clas_dec = UNVOICED_CLAS; st->low_rate_mode = 0; + st->last_low_rate_mode = 0; st->lp_gainp = 0.0f; st->lp_gainc = 0.0f; @@ -127,6 +128,9 @@ ivas_error init_decoder( st->stab_fac_smooth = 0.0f; set_f( st->agc_mem2, 0, 2 ); set_f( st->mem_syn3, 0, M ); + st->stab_fac_smooth_lt = 0.0f; + st->log_energy_diff_lt = 0.0f; + st->log_energy_old = 0.0f; mvr2r( GEWB_Ave, st->lsf_old, M ); lsf2lsp( st->lsf_old, st->lsp_old, M, INT_FS_12k8 ); @@ -193,7 +197,7 @@ ivas_error init_decoder( if ( ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == IVAS_CPE_TD ) { - if ( ( st->hGSCDec = (GSC_DEC_HANDLE) count_malloc( sizeof( GSC_DEC_DATA ) ) ) == NULL ) + if ( ( st->hGSCDec = (GSC_DEC_HANDLE) malloc( sizeof( GSC_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for GSC\n" ) ); } @@ -211,7 +215,7 @@ ivas_error init_decoder( if ( st->output_Fs == 16000 && st->element_mode == EVS_MONO ) { - if ( ( st->hWIDec = (WI_DEC_HANDLE) count_malloc( sizeof( WI_DEC_DATA ) ) ) == NULL ) + if ( ( st->hWIDec = (WI_DEC_HANDLE) malloc( sizeof( WI_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FEC WI\n" ) ); } @@ -230,7 +234,7 @@ ivas_error init_decoder( if ( ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == IVAS_CPE_TD ) { - if ( ( st->hPFstat = (PFSTAT_HANDLE) count_malloc( sizeof( PFSTAT ) ) ) == NULL ) + if ( ( st->hPFstat = (PFSTAT_HANDLE) malloc( sizeof( PFSTAT ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for NB/formant postflter\n" ) ); } @@ -250,7 +254,7 @@ ivas_error init_decoder( if ( ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == IVAS_CPE_TD ) { - if ( ( st->hBWE_zero = (ZERO_BWE_DEC_HANDLE) count_malloc( sizeof( ZERO_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_zero = (ZERO_BWE_DEC_HANDLE) malloc( sizeof( ZERO_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for zero BWE\n" ) ); } @@ -269,7 +273,7 @@ ivas_error init_decoder( if ( ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == IVAS_CPE_TD ) { - if ( ( st->hMusicPF = (MUSIC_POSTFILT_HANDLE) count_malloc( sizeof( MUSIC_POSTFILT_DATA ) ) ) == NULL ) + if ( ( st->hMusicPF = (MUSIC_POSTFILT_HANDLE) malloc( sizeof( MUSIC_POSTFILT_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LD music postflter\n" ) ); } @@ -295,7 +299,7 @@ ivas_error init_decoder( if ( idchan == 0 && ( st->element_mode == EVS_MONO || st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) ) { - if ( ( st->hTdCngDec = (TD_CNG_DEC_HANDLE) count_malloc( sizeof( TD_CNG_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTdCngDec = (TD_CNG_DEC_HANDLE) malloc( sizeof( TD_CNG_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX/TD CNG\n" ) ); } @@ -324,7 +328,7 @@ ivas_error init_decoder( if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT || st->element_mode == IVAS_SCE || st->element_mode == EVS_MONO ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - if ( ( st->hHQ_core = (HQ_DEC_HANDLE) count_malloc( sizeof( HQ_DEC_DATA ) ) ) == NULL ) + if ( ( st->hHQ_core = (HQ_DEC_HANDLE) malloc( sizeof( HQ_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HQ core\n" ) ); } @@ -335,7 +339,7 @@ ivas_error init_decoder( if ( st->element_mode == EVS_MONO ) { /* HQ NB FEC initialization */ - if ( ( st->hHQ_nbfec = (HQ_NBFEC_HANDLE) count_malloc( sizeof( HQ_NBFEC_DATA ) ) ) == NULL ) + if ( ( st->hHQ_nbfec = (HQ_NBFEC_HANDLE) malloc( sizeof( HQ_NBFEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HQ NB FEC\n" ) ); } @@ -359,7 +363,7 @@ ivas_error init_decoder( if ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) { - if ( ( st->hBWE_TD = (TD_BWE_DEC_HANDLE) count_malloc( sizeof( TD_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_TD = (TD_BWE_DEC_HANDLE) malloc( sizeof( TD_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD BWE\n" ) ); } @@ -380,7 +384,7 @@ ivas_error init_decoder( if ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) { - if ( ( st->hBWE_FD = (FD_BWE_DEC_HANDLE) count_malloc( sizeof( FD_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_FD = (FD_BWE_DEC_HANDLE) malloc( sizeof( FD_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FD BWE\n" ) ); } @@ -415,7 +419,7 @@ ivas_error init_decoder( if ( st->element_mode == EVS_MONO ) { - if ( ( st->hBWE_FD_HR = (HR_BWE_DEC_HANDLE) count_malloc( sizeof( HR_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_FD_HR = (HR_BWE_DEC_HANDLE) malloc( sizeof( HR_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HR BWE\n" ) ); } @@ -433,7 +437,7 @@ ivas_error init_decoder( if ( st->Opt_AMR_WB || st->element_mode == EVS_MONO ) { - if ( ( st->hAmrwb_IO = (AMRWB_IO_DEC_HANDLE) count_malloc( sizeof( AMRWB_IO_DEC_DATA ) ) ) == NULL ) + if ( ( st->hAmrwb_IO = (AMRWB_IO_DEC_HANDLE) malloc( sizeof( AMRWB_IO_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AMR-WB IO\n" ) ); } @@ -478,7 +482,7 @@ ivas_error init_decoder( if ( ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == IVAS_CPE_TD ) { - if ( ( st->hBPF = (BPF_DEC_HANDLE) count_malloc( sizeof( BPF_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBPF = (BPF_DEC_HANDLE) malloc( sizeof( BPF_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for BPF\n" ) ); } @@ -553,7 +557,7 @@ ivas_error init_decoder( if ( st->element_mode == EVS_MONO ) { - if ( ( st->hSC_VBR = (SC_VBR_DEC_HANDLE) count_malloc( sizeof( SC_VBR_DEC_DATA ) ) ) == NULL ) + if ( ( st->hSC_VBR = (SC_VBR_DEC_HANDLE) malloc( sizeof( SC_VBR_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SC-VBR\n" ) ); } @@ -583,7 +587,7 @@ ivas_error init_decoder( /* TCX-LTP */ if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - if ( ( st->hTcxLtpDec = (TCX_LTP_DEC_HANDLE) count_malloc( sizeof( TCX_LTP_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTcxLtpDec = (TCX_LTP_DEC_HANDLE) malloc( sizeof( TCX_LTP_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TCX-LTP handle\n" ) ); } @@ -597,7 +601,7 @@ ivas_error init_decoder( // VE: reduction possible for MCT_CHAN_MODE_LFE channel - see I1-172 if ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) { - if ( ( st->hTcxDec = (TCX_DEC_HANDLE) count_malloc( sizeof( TCX_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTcxDec = (TCX_DEC_HANDLE) malloc( sizeof( TCX_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxDec\n" ) ); } @@ -615,7 +619,7 @@ ivas_error init_decoder( /* TCX config. data structure */ if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) count_malloc( sizeof( TCX_config ) ) ) == NULL ) + if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) malloc( sizeof( TCX_config ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxCfg\n" ) ); } @@ -628,7 +632,7 @@ ivas_error init_decoder( /* Tonal MDCT concealment data structure */ if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - if ( ( st->hTonalMDCTConc = (TonalMDCTConcealPtr) count_malloc( sizeof( TonalMDCTConceal_INSTANCE ) ) ) == NULL ) + if ( ( st->hTonalMDCTConc = (TonalMDCTConcealPtr) malloc( sizeof( TonalMDCTConceal_INSTANCE ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TonalMDCTConcealment\n" ) ); } @@ -644,7 +648,7 @@ ivas_error init_decoder( if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - if ( ( st->hIGFDec = (IGF_DEC_INSTANCE_HANDLE) count_malloc( sizeof( IGFDEC_INSTANCE ) ) ) == NULL ) + if ( ( st->hIGFDec = (IGF_DEC_INSTANCE_HANDLE) malloc( sizeof( IGFDEC_INSTANCE ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for IGF\n" ) ); } @@ -661,13 +665,9 @@ ivas_error init_decoder( * Mode 2 initialization *-----------------------------------------------------------------*/ -#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS if ( st->element_mode == EVS_MONO ) -#else - if ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) -#endif { - if ( ( st->hPlcInfo = (T_PLCInfo_HANDLE) count_malloc( sizeof( T_PLCInfo ) ) ) == NULL ) + if ( ( st->hPlcInfo = (T_PLCInfo_HANDLE) malloc( sizeof( T_PLCInfo ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for PLC handle\n" ) ); } @@ -679,7 +679,7 @@ ivas_error init_decoder( if ( st->element_mode == EVS_MONO ) { - if ( ( st->hTECDec = (TEC_DEC_HANDLE) count_malloc( sizeof( TEC_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTECDec = (TEC_DEC_HANDLE) malloc( sizeof( TEC_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TEC\n" ) ); } @@ -689,9 +689,6 @@ ivas_error init_decoder( st->hTECDec = NULL; } -#ifndef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS // the initialziation is done in open_decoder_LPD() - st->enablePlcWaveadjust = 0; -#endif /* Init Core Decoder */ open_decoder_LPD( st, st->total_brate, st->last_total_brate, st->bwidth, 0, st->element_mode, 1 ); diff --git a/lib_dec/inov_dec.c b/lib_dec/inov_dec.c index ce3c2728bca15fd4b5e5d7c2b8b386b5f9c7389a..43c7eb2c7be0eac7303258db6eb26c51761f0a87 100644 --- a/lib_dec/inov_dec.c +++ b/lib_dec/inov_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------* * inov_decode() diff --git a/lib_dec/ivas_agc_dec.c b/lib_dec/ivas_agc_dec.c index 827915efc2b9262c3326d094b2ee098937ee967f..1397ce1111f4aadbcc1f3898e427cf742530bf95 100644 --- a/lib_dec/ivas_agc_dec.c +++ b/lib_dec/ivas_agc_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_AGC @@ -99,7 +99,7 @@ ivas_error ivas_spar_agc_dec_open( ivas_agc_dec_state_t *hAgc; int16_t output_frame, delay; - if ( ( hAgc = (ivas_agc_dec_state_t *) count_malloc( sizeof( ivas_agc_dec_state_t ) ) ) == NULL ) + if ( ( hAgc = (ivas_agc_dec_state_t *) malloc( sizeof( ivas_agc_dec_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AGC decoder" ); } @@ -107,17 +107,17 @@ ivas_error ivas_spar_agc_dec_open( output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); delay = NS2SA( output_Fs, ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) ); - if ( ( hAgc->agc_com.winFunc = (float *) count_malloc( sizeof( float ) * ( output_frame - delay ) ) ) == NULL ) + if ( ( hAgc->agc_com.winFunc = (float *) malloc( sizeof( float ) * ( output_frame - delay ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AGC decoder" ); } - if ( ( hAgc->gain_state = (ivas_agc_dec_chan_state_t *) count_malloc( sizeof( ivas_agc_dec_chan_state_t ) * FOA_CHANNELS ) ) == NULL ) + if ( ( hAgc->gain_state = (ivas_agc_dec_chan_state_t *) malloc( sizeof( ivas_agc_dec_chan_state_t ) * FOA_CHANNELS ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AGC decoder" ); } - if ( ( hAgc->gain_data = (ivas_agc_chan_data_t *) count_malloc( sizeof( ivas_agc_chan_data_t ) * FOA_CHANNELS ) ) == NULL ) + if ( ( hAgc->gain_data = (ivas_agc_chan_data_t *) malloc( sizeof( ivas_agc_chan_data_t ) * FOA_CHANNELS ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AGC decoder" ); } @@ -146,16 +146,16 @@ void ivas_spar_agc_dec_close( if ( hAgc != NULL ) { - count_free( hAgc->agc_com.winFunc ); + free( hAgc->agc_com.winFunc ); hAgc->agc_com.winFunc = NULL; - count_free( hAgc->gain_state ); + free( hAgc->gain_state ); hAgc->gain_state = NULL; - count_free( hAgc->gain_data ); + free( hAgc->gain_data ); hAgc->gain_data = NULL; - count_free( hAgc ); + free( hAgc ); *hAgcDec = NULL; } diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index 671c5c5050ea42ad5cbb25d8c1e8130566119a53..3fb50b5ca63096029c8c04be9f44869fe51e57be 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "ivas_prot.h" #include "ivas_rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif @@ -97,7 +97,7 @@ ivas_error ivas_core_dec( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_core_dec" ); + push_wmops( "ivas_core_dec" ); /*------------------------------------------------------------------* * General initialization @@ -181,34 +181,11 @@ ivas_error ivas_core_dec( st->flagGuidedAcelp = 0; } -#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS if ( !st->bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && st->hTcxDec != NULL ) { v_multc( st->hHQ_core->old_out, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_out, st->hTcxDec->L_frameTCX ); v_multc( st->hHQ_core->old_outLB, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_outLB, st->L_frame ); } -#else - /* PLC: [TCX: Fade-out-recovery] - overlapping part needs to be attenuated for first good frame */ - if ( !st->bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) ) - { - float gain; - - gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain - : 0.0f; - - if ( ( st->element_mode == IVAS_CPE_MDCT && hMCT == NULL ) || ( st->hPlcInfo != NULL ) ) - { - v_multc( st->hHQ_core->old_out, gain, st->hHQ_core->old_out, st->hTcxDec->L_frameTCX ); - v_multc( st->hHQ_core->old_outLB, gain, st->hHQ_core->old_outLB, st->L_frame ); - - if ( !st->hTcxCfg->last_aldo && st->hTcxDec != NULL ) - { - v_multc( st->hTcxDec->syn_OverlFB, gain, st->hTcxDec->syn_OverlFB, st->hTcxCfg->tcx_mdct_window_lengthFB ); - v_multc( st->hTcxDec->syn_Overl, gain, st->hTcxDec->syn_Overl, st->hTcxCfg->tcx_mdct_window_length ); - } - } - } -#endif set_f( voice_factors[n], 0.f, NB_SUBFR16k ); set_f( hb_synth[n], 0.0f, L_FRAME48k ); @@ -395,7 +372,7 @@ ivas_error ivas_core_dec( { if ( hMCT ) { - wmops_sub_end(); + pop_wmops(); return error; } @@ -767,7 +744,7 @@ ivas_error ivas_core_dec( output_debug_mode_info_dec( sts, n_channels, output_frame, pitch_buf ); #endif - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_dec/ivas_corecoder_dec_reconfig.c b/lib_dec/ivas_corecoder_dec_reconfig.c index b8d4e66cf4cb9ccdd09be64b1072a6d83a2b6f55..5bc68227355c5b348304ae811fe9312857b61de1 100644 --- a/lib_dec/ivas_corecoder_dec_reconfig.c +++ b/lib_dec/ivas_corecoder_dec_reconfig.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,26 +43,29 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * ivas_corecoder_dec_reconfig() * - * Allocate, initalize, and configure SCE/CPE/MCT handles in case of bitrate switching + * Allocate, initialize, and configure SCE/CPE/MCT handles in case of bitrate switching *-------------------------------------------------------------------*/ ivas_error ivas_corecoder_dec_reconfig( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - const int16_t nSCE_old, /* i : number of SCEs in previous frame */ - const int16_t nCPE_old, /* i : number of CPEs in previous frame */ - const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ - const int16_t sba_dirac_stereo_flag_old /* i : signal stereo output for SBA DirAC in previous frame */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t nSCE_old, /* i : number of SCEs in previous frame */ + int16_t nCPE_old, /* i : number of CPEs in previous frame */ + const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ + const int16_t sba_dirac_stereo_flag_old, /* i : signal stereo rendering using DFT upmix in previous frame */ + const int32_t brate_SCE, /* i : bitrate to be set for the SCEs */ + const int32_t brate_CPE /* i : bitrate to be set for the CPEs */ ) { int16_t n, sce_id, cpe_id, output_frame; int16_t nSCE_existing, nCPE_existing; int32_t ivas_total_brate; + MC_MODE last_mc_mode; DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; @@ -75,13 +78,21 @@ ivas_error ivas_corecoder_dec_reconfig( error = IVAS_ERR_OK; output_frame = (int16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); - + if ( st_ivas->ivas_format == MC_FORMAT ) + { + last_mc_mode = ivas_mc_mode_select( ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ), st_ivas->hDecoderConfig->last_ivas_total_brate ); /* NB: this assumes that LS config remains the same between frames */ + } + else + { + last_mc_mode = MC_MODE_NONE; + } /*-----------------------------------------------------------------* * Allocate, initalize, and configure SCE/CPE/MCT handles *-----------------------------------------------------------------*/ /* remove dummy CPE element for DFT stereo-like upmix */ - if ( st_ivas->ivas_format == SBA_FORMAT && sba_dirac_stereo_flag_old && !st_ivas->sba_dirac_stereo_flag ) + if ( ( st_ivas->ivas_format == SBA_FORMAT && sba_dirac_stereo_flag_old && !st_ivas->sba_dirac_stereo_flag ) || + ( st_ivas->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA && sba_dirac_stereo_flag_old && !st_ivas->sba_dirac_stereo_flag ) ) { st_ivas->hCPE[0]->hCoreCoder[0] = NULL; st_ivas->hCPE[0]->hCoreCoder[1] = NULL; @@ -90,26 +101,25 @@ ivas_error ivas_corecoder_dec_reconfig( if ( st_ivas->hSCE[0] != NULL ) { - count_free( st_ivas->hSCE[0]->save_synth ); + free( st_ivas->hSCE[0]->save_synth ); st_ivas->hSCE[0]->save_synth = NULL; - count_free( st_ivas->hSCE[0]->save_hb_synth ); + free( st_ivas->hSCE[0]->save_hb_synth ); st_ivas->hSCE[0]->save_hb_synth = NULL; } } - if ( st_ivas->nchan_transport == nchan_transport_old ) + if ( st_ivas->nchan_transport == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old ) { for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { - st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; + st_ivas->hSCE[sce_id]->element_brate = brate_SCE; st_ivas->hSCE[sce_id]->hCoreCoder[0]->total_brate = st_ivas->hSCE[sce_id]->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ } for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { - st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; - + st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { @@ -144,6 +154,17 @@ ivas_error ivas_corecoder_dec_reconfig( st_ivas->hCPE[cpe_id] = NULL; } + /* the CPE-internal settings depend from ivas_format and mc_mode, so clean-up when switching between mc_modes */ + if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != last_mc_mode && ( st_ivas->mc_mode == MC_MODE_MCMASA || last_mc_mode == MC_MODE_MCMASA ) ) + { + for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) + { + destroy_cpe_dec( st_ivas->hCPE[cpe_id] ); + st_ivas->hCPE[cpe_id] = NULL; + } + nCPE_old = 0; + nCPE_existing = min( nCPE_old, st_ivas->nCPE ); + } if ( st_ivas->nCPE <= 1 && st_ivas->hMCT != NULL ) { ivas_mct_dec_close( &st_ivas->hMCT ); @@ -152,18 +173,18 @@ ivas_error ivas_corecoder_dec_reconfig( /* special case, if we have MCT now and had a single CPE before, remove the MDCT Stereo handles from the first CPE*/ if ( st_ivas->nCPE > 1 && nCPE_old == 1 ) { - count_free( st_ivas->hCPE[0]->hStereoMdct ); + free( st_ivas->hCPE[0]->hStereoMdct ); st_ivas->hCPE[0]->hStereoMdct = NULL; } for ( sce_id = 0; sce_id < nSCE_existing; sce_id++ ) { - st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; + st_ivas->hSCE[sce_id]->element_brate = brate_SCE; st_ivas->hSCE[sce_id]->hCoreCoder[0]->total_brate = st_ivas->hSCE[sce_id]->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ } for ( ; sce_id < st_ivas->nSCE; sce_id++ ) { - if ( ( error = create_sce_dec( st_ivas, sce_id, ivas_total_brate / st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) + if ( ( error = create_sce_dec( st_ivas, sce_id, brate_SCE ) ) != IVAS_ERR_OK ) { return error; } @@ -171,8 +192,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { - st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; - + st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { @@ -181,7 +201,11 @@ ivas_error ivas_corecoder_dec_reconfig( } for ( ; cpe_id < st_ivas->nCPE; cpe_id++ ) { - if ( ( error = create_cpe_dec( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK ) + if ( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->hOutSetup.separateChannelEnabled ) + { + st_ivas->element_mode_init = IVAS_CPE_MDCT; + } + if ( ( error = create_cpe_dec( st_ivas, cpe_id, brate_CPE ) ) != IVAS_ERR_OK ) { return error; } @@ -216,7 +240,7 @@ ivas_error ivas_corecoder_dec_reconfig( /* special case, if we have a single CPE and had MCT before we need to init the MDCT stereo handles here */ if ( st_ivas->nCPE == 1 && nCPE_old > 1 ) { - if ( ( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) + if ( ( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -224,7 +248,15 @@ ivas_error ivas_corecoder_dec_reconfig( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->use_itd = 0; st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->reverse_dmx = 0; st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->smooth_ratio = 1.f; - +#ifdef SBA_BR_SWITCHING_RECONFIG + set_s( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->prev_ms_mask[0], 0, MAX_SFB ); + set_s( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->prev_ms_mask[1], 0, MAX_SFB ); + st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->lastCoh = 1.f; + st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->mdct_stereo_mode[0] = SMDCT_DUAL_MONO; + st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->mdct_stereo_mode[1] = SMDCT_DUAL_MONO; + st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->IGFStereoMode[0] = -1; + st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->IGFStereoMode[1] = -1; +#endif for ( n = 0; n < CPE_CHANNELS; n++ ) { /* reset mct_chan_mode */ @@ -234,7 +266,8 @@ ivas_error ivas_corecoder_dec_reconfig( } /* create dummy CPE element for DFT stereo-like upmix */ - if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_dirac_stereo_flag && !sba_dirac_stereo_flag_old ) + if ( ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_dirac_stereo_flag && !sba_dirac_stereo_flag_old ) || + ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->sba_dirac_stereo_flag && !sba_dirac_stereo_flag_old ) ) { if ( ( error = create_cpe_dec( st_ivas, 0, ivas_total_brate / ( st_ivas->nSCE + st_ivas->nCPE ) ) ) != IVAS_ERR_OK ) { @@ -249,7 +282,7 @@ ivas_error ivas_corecoder_dec_reconfig( if ( st_ivas->hSCE[0]->save_synth == NULL ) { - if ( ( st_ivas->hSCE[0]->save_synth = (float *) count_malloc( sizeof( float ) * output_frame ) ) == NULL ) + if ( ( st_ivas->hSCE[0]->save_synth = (float *) malloc( sizeof( float ) * output_frame ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for stereo output\n" ) ); } @@ -258,7 +291,7 @@ ivas_error ivas_corecoder_dec_reconfig( if ( st_ivas->hSCE[0]->save_hb_synth == NULL ) { - if ( ( st_ivas->hSCE[0]->save_hb_synth = (float *) count_malloc( sizeof( float ) * output_frame ) ) == NULL ) + if ( ( st_ivas->hSCE[0]->save_hb_synth = (float *) malloc( sizeof( float ) * output_frame ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate HB memory for stereo output\n" ) ); } @@ -345,7 +378,7 @@ ivas_error ivas_hp20_dec_reconfig( old_mem_hp20_out = st_ivas->mem_hp20_out; st_ivas->mem_hp20_out = NULL; - if ( ( st_ivas->mem_hp20_out = (float **) count_malloc( nchan_hp20 * sizeof( float * ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_out = (float **) malloc( nchan_hp20 * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -358,7 +391,7 @@ ivas_error ivas_hp20_dec_reconfig( /* create additional hp20 memories */ for ( ; i < nchan_hp20; i++ ) { - if ( ( st_ivas->mem_hp20_out[i] = (float *) count_malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_out[i] = (float *) malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -366,7 +399,7 @@ ivas_error ivas_hp20_dec_reconfig( set_f( st_ivas->mem_hp20_out[i], 0.0f, L_HP20_MEM ); } - count_free( old_mem_hp20_out ); + free( old_mem_hp20_out ); old_mem_hp20_out = NULL; } else if ( nchan_hp20 < nchan_hp20_old ) @@ -375,7 +408,7 @@ ivas_error ivas_hp20_dec_reconfig( old_mem_hp20_out = st_ivas->mem_hp20_out; st_ivas->mem_hp20_out = NULL; - if ( ( st_ivas->mem_hp20_out = (float **) count_malloc( nchan_hp20 * sizeof( float * ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_out = (float **) malloc( nchan_hp20 * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -388,11 +421,11 @@ ivas_error ivas_hp20_dec_reconfig( /* remove superfluous hp20 memories */ for ( ; i < nchan_hp20_old; i++ ) { - count_free( old_mem_hp20_out[i] ); + free( old_mem_hp20_out[i] ); old_mem_hp20_out[i] = NULL; } - count_free( old_mem_hp20_out ); + free( old_mem_hp20_out ); old_mem_hp20_out = NULL; } @@ -400,7 +433,6 @@ ivas_error ivas_hp20_dec_reconfig( } -#ifdef BRATE_SWITCHING_RENDERING /*-------------------------------------------------------------------* * ivas_cldfb_dec_reconfig() * @@ -483,7 +515,12 @@ ivas_error ivas_cldfb_dec_reconfig( } } } - +#ifdef SBA_BR_SWITCHING_RECONFIG + /* CLDFB Interpolation weights */ + if ( st_ivas->sba_mode == SBA_MODE_SPAR && ( numCldfbAnalyses_old != numCldfbAnalyses || numCldfbSyntheses_old != numCldfbSyntheses || nchan_transport_old != st_ivas->nchan_transport ) ) + { + ivas_spar_get_cldfb_gains( st_ivas->hSpar, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); + } +#endif return IVAS_ERR_OK; } -#endif diff --git a/lib_dec/ivas_cpe_dec.c b/lib_dec/ivas_cpe_dec.c index 311b015cd686a5e1642582181b735ac3409bf662..25e9dd019f40d1d48a8cf31e18a4625765f93c2d 100755 --- a/lib_dec/ivas_cpe_dec.c +++ b/lib_dec/ivas_cpe_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include @@ -80,7 +80,7 @@ ivas_error ivas_cpe_dec( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_cpe_dec" ); + push_wmops( "ivas_cpe_dec" ); ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; @@ -103,7 +103,7 @@ ivas_error ivas_cpe_dec( * dynamically allocate data structures depending on the actual stereo mode *----------------------------------------------------------------*/ - if ( ( error = stereo_memory_dec( ivas_total_brate, hCPE, nb_bits_metadata, st_ivas->hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) + if ( ( error = stereo_memory_dec( ivas_total_brate, hCPE, nb_bits_metadata, st_ivas->hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->mc_mode, st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) { return error; } @@ -373,7 +373,7 @@ ivas_error ivas_cpe_dec( if ( st_ivas->hMCT ) { - wmops_sub_end(); + pop_wmops(); return error; } @@ -453,12 +453,6 @@ ivas_error ivas_cpe_dec( } } } -#ifndef FIX_MDCT_AND_MC_MONO_ISSUES - else if ( hCPE->element_mode == IVAS_CPE_MDCT && hCPE->nchan_out == 1 && ( is_DTXrate( ivas_total_brate ) == 0 || ( is_DTXrate( ivas_total_brate ) == 1 && is_DTXrate( st_ivas->hDecoderConfig->last_ivas_total_brate ) == 0 ) ) ) - { - applyDmxMdctStereo( hCPE, output, output_frame ); - } -#endif /*----------------------------------------------------------------* * Update parameters for stereo CNA @@ -476,12 +470,10 @@ ivas_error ivas_cpe_dec( synchro_synthesis( ivas_total_brate, hCPE, output, output_frame, 0 ); } -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES if ( hCPE->element_mode == IVAS_CPE_MDCT && hCPE->nchan_out == 1 && ( is_DTXrate( ivas_total_brate ) == 0 || ( is_DTXrate( ivas_total_brate ) == 1 && is_DTXrate( st_ivas->hDecoderConfig->last_ivas_total_brate ) == 0 ) ) ) { applyDmxMdctStereo( hCPE, output, output_frame ); } -#endif #ifndef DEBUG_STEREO_DFT_OUTRESPRED /*----------------------------------------------------------------* @@ -543,7 +535,7 @@ ivas_error ivas_cpe_dec( } #endif - wmops_sub_end(); + pop_wmops(); return error; } @@ -572,7 +564,7 @@ ivas_error create_cpe_dec( * Allocate CPE handle *-----------------------------------------------------------------*/ - if ( ( hCPE = (CPE_DEC_HANDLE) count_malloc( sizeof( CPE_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE = (CPE_DEC_HANDLE) malloc( sizeof( CPE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CPE\n" ) ); } @@ -603,11 +595,7 @@ ivas_error create_cpe_dec( hCPE->lt_es_em = 0.0f; /* Note: nchan_out is considered to be related to the structure. This is nchan_out for CPE and for MASA_format is always 2. */ -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MC_FORMAT ) -#else - if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) -#endif { hCPE->nchan_out = CPE_CHANNELS; } @@ -636,13 +624,13 @@ ivas_error create_cpe_dec( if ( st_ivas->ivas_format == STEREO_FORMAT || st_ivas->ivas_format == MASA_FORMAT || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) || st_ivas->sba_dirac_stereo_flag ) { - if ( ( hCPE->input_mem[i] = (float *) count_malloc( sizeof( float ) * NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) ) ) == NULL ) + if ( ( hCPE->input_mem[i] = (float *) malloc( sizeof( float ) * NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT stereo memory\n" ) ); } set_zero( hCPE->input_mem[i], NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) ); - if ( ( hCPE->input_mem_LB[i] = (float *) count_malloc( sizeof( float ) * STEREO_DFT32MS_OVL_16k ) ) == NULL ) + if ( ( hCPE->input_mem_LB[i] = (float *) malloc( sizeof( float ) * STEREO_DFT32MS_OVL_16k ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT stereo memory\n" ) ); } @@ -650,14 +638,14 @@ ivas_error create_cpe_dec( if ( i == 0 ) { - if ( ( hCPE->input_mem_BPF[0] = (float *) count_malloc( sizeof( float ) * STEREO_DFT32MS_OVL_16k ) ) == NULL ) + if ( ( hCPE->input_mem_BPF[0] = (float *) malloc( sizeof( float ) * STEREO_DFT32MS_OVL_16k ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT stereo memory\n" ) ); } set_zero( hCPE->input_mem_BPF[0], STEREO_DFT32MS_OVL_16k ); } - if ( ( hCPE->output_mem[i] = (float *) count_malloc( sizeof( float ) * NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) ) ) == NULL ) + if ( ( hCPE->output_mem[i] = (float *) malloc( sizeof( float ) * NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT stereo memory\n" ) ); } @@ -665,7 +653,7 @@ ivas_error create_cpe_dec( if ( i < hCPE->nchan_out ) { - if ( ( hCPE->prev_synth_chs[i] = (float *) count_malloc( sizeof( float ) * NS2SA( output_Fs, FRAME_SIZE_NS ) ) ) == NULL ) + if ( ( hCPE->prev_synth_chs[i] = (float *) malloc( sizeof( float ) * NS2SA( output_Fs, FRAME_SIZE_NS ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT stereo memory\n" ) ); } @@ -705,7 +693,7 @@ ivas_error create_cpe_dec( break; } - if ( ( st = (DEC_CORE_HANDLE) count_malloc( sizeof( Decoder_State ) ) ) == NULL ) + if ( ( st = (DEC_CORE_HANDLE) malloc( sizeof( Decoder_State ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CoreCoder structure\n" ) ); } @@ -754,7 +742,7 @@ ivas_error create_cpe_dec( if ( hCPE->element_mode != IVAS_CPE_MDCT && hCPE->nchan_out == 1 ) { - if ( ( hCPE->hStereoDftDmx = (STEREO_DFT_DMX_DATA_HANDLE) count_malloc( sizeof( STEREO_DFT_DMX_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoDftDmx = (STEREO_DFT_DMX_DATA_HANDLE) malloc( sizeof( STEREO_DFT_DMX_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo DFT mono output\n" ) ); } @@ -768,7 +756,7 @@ ivas_error create_cpe_dec( if ( ( hCPE->element_mode != IVAS_CPE_MDCT || ( st_ivas->ivas_format == STEREO_FORMAT && hCPE->element_brate <= MAX_MDCT_ITD_BRATE ) ) && hCPE->nchan_out != 1 ) { - if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) count_malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo TCA\n" ) ); } @@ -782,7 +770,7 @@ ivas_error create_cpe_dec( if ( hCPE->element_mode != IVAS_CPE_MDCT && !( hCPE->element_mode == IVAS_CPE_DFT && hCPE->nchan_out == 1 ) ) { - if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) count_malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo ICBWE\n" ) ); } @@ -796,7 +784,7 @@ ivas_error create_cpe_dec( if ( hCPE->element_mode == IVAS_CPE_TD ) { - if ( ( hCPE->hStereoTD = (STEREO_TD_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_TD_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTD = (STEREO_TD_DEC_DATA_HANDLE) malloc( sizeof( STEREO_TD_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD Stereo\n" ) ); } @@ -810,7 +798,7 @@ ivas_error create_cpe_dec( if ( hCPE->element_mode == IVAS_CPE_MDCT && st_ivas->nCPE == 1 ) { - if ( ( hCPE->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo MDCT\n" ) ); } @@ -841,7 +829,7 @@ ivas_error create_cpe_dec( if ( hCPE->element_mode == IVAS_CPE_TD || hCPE->element_mode == IVAS_CPE_DFT ) { - if ( ( hCPE->hStereoCng = (STEREO_CNG_DEC_HANDLE) count_malloc( sizeof( STEREO_CNG_DEC ) ) ) == NULL ) + if ( ( hCPE->hStereoCng = (STEREO_CNG_DEC_HANDLE) malloc( sizeof( STEREO_CNG_DEC ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo CNG\n" ) ); } @@ -867,6 +855,12 @@ void destroy_cpe_dec( int16_t n; Decoder_State *st; + /* make sure we deallocate a potential distinct hTcxCfg for a MCT LFE channel (can only happen in rs) */ + if ( hCPE->hCoreCoder[1] != NULL && hCPE->hCoreCoder[1]->mct_chan_mode == MCT_CHAN_MODE_LFE && hCPE->hCoreCoder[1]->hTcxCfg != hCPE->hCoreCoder[0]->hTcxCfg ) + { + hCPE->hCoreCoder[1]->mct_chan_mode = MCT_CHAN_MODE_IGNORE; + } + for ( n = 0; n < CPE_CHANNELS; n++ ) { st = hCPE->hCoreCoder[n]; @@ -875,7 +869,7 @@ void destroy_cpe_dec( { destroy_core_dec( st ); - count_free( st ); + free( st ); st = NULL; } } @@ -888,31 +882,31 @@ void destroy_cpe_dec( if ( hCPE->hStereoDftDmx != NULL ) { - count_free( hCPE->hStereoDftDmx ); + free( hCPE->hStereoDftDmx ); hCPE->hStereoDftDmx = NULL; } if ( hCPE->hStereoTD != NULL ) { - count_free( hCPE->hStereoTD ); + free( hCPE->hStereoTD ); hCPE->hStereoTD = NULL; } if ( hCPE->hStereoMdct != NULL ) { - count_free( hCPE->hStereoMdct ); + free( hCPE->hStereoMdct ); hCPE->hStereoMdct = NULL; } if ( hCPE->hStereoTCA != NULL ) { - count_free( hCPE->hStereoTCA ); + free( hCPE->hStereoTCA ); hCPE->hStereoTCA = NULL; } if ( hCPE->hStereoICBWE != NULL ) { - count_free( hCPE->hStereoICBWE ); + free( hCPE->hStereoICBWE ); hCPE->hStereoICBWE = NULL; } @@ -920,29 +914,29 @@ void destroy_cpe_dec( { for ( n = 0; n < CPE_CHANNELS; n++ ) { - count_free( hCPE->input_mem_LB[n] ); + free( hCPE->input_mem_LB[n] ); hCPE->input_mem_LB[n] = NULL; - count_free( hCPE->input_mem[n] ); + free( hCPE->input_mem[n] ); hCPE->input_mem[n] = NULL; - count_free( hCPE->output_mem[n] ); + free( hCPE->output_mem[n] ); hCPE->output_mem[n] = NULL; if ( hCPE->prev_synth_chs[n] != NULL ) { - count_free( hCPE->prev_synth_chs[n] ); + free( hCPE->prev_synth_chs[n] ); hCPE->prev_synth_chs[n] = NULL; } } - count_free( hCPE->input_mem_BPF[0] ); + free( hCPE->input_mem_BPF[0] ); hCPE->input_mem_BPF[0] = NULL; } if ( hCPE->hStereoCng != NULL ) { - count_free( hCPE->hStereoCng ); + free( hCPE->hStereoCng ); hCPE->hStereoCng = NULL; } - count_free( hCPE ); + free( hCPE ); return; } diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 2286dc0b4bb0fbef87fdf79fc77bfb1d8e9388b2..6004d165e81f3e40d64338f47126104ba0228ff1 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* @@ -67,7 +67,7 @@ ivas_error ivas_dec( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_dec" ); + push_wmops( "ivas_dec" ); /*----------------------------------------------------------------* * IVAS decoder setup @@ -207,13 +207,30 @@ ivas_error ivas_dec( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, + IVAS_REND_AUDIO_CONFIG_7_1_4, + IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM, + NULL, + NULL, + NULL, + NULL, + output, + output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } +#else ivas_crend_process( st_ivas, output ); +#endif ivas_binaural_add_LFE( st_ivas, output_frame, output ); } +#ifdef DEBUGGING else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { ivas_binaural_cldfb( st_ivas, output ); } +#endif } } #ifdef DFT_STEREO_SPAR_MIXING @@ -374,7 +391,10 @@ ivas_error ivas_dec( /* LFE channel decoder */ if ( st_ivas->mc_mode == MC_MODE_MCT ) { - st_ivas->hCPE[1]->hCoreCoder[1]->hTcxCfg = st_ivas->hCPE[1]->hCoreCoder[0]->hTcxCfg; + if ( st_ivas->hCPE[1]->hCoreCoder[1]->hTcxCfg == NULL ) + { + st_ivas->hCPE[1]->hCoreCoder[1]->hTcxCfg = st_ivas->hCPE[1]->hCoreCoder[0]->hTcxCfg; + } ivas_lfe_dec( st_ivas->hLFE, st, output_frame, st_ivas->bfi, output_lfe_ch ); } @@ -404,14 +424,25 @@ ivas_error ivas_dec( /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, + getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->hOutSetup.output_config ), + st_ivas->hDecoderConfig, + st_ivas->hHeadTrackData, + &st_ivas->hIntSetup, + st_ivas->hEFAPdata, + output, + output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } +#else ivas_crend_process( st_ivas, output ); +#endif + ivas_binaural_add_LFE( st_ivas, output_frame, output ); } - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) - { - ivas_binaural_add_LFE( st_ivas, output_frame, output ); - ivas_binaural_cldfb( st_ivas, output ); - } else if ( st_ivas->renderer_type == RENDERER_MC ) { ivas_ls_setup_conversion( st_ivas, output_frame, output ); @@ -588,7 +619,7 @@ ivas_error ivas_dec( if ( !st_ivas->bfi ) /* do not update if first frame(s) are lost or NO_DATA */ { st_ivas->hDecoderConfig->last_ivas_total_brate = ivas_total_brate; -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING st_ivas->last_active_ivas_total_brate = ( ivas_total_brate <= IVAS_SID_5k2 ) ? st_ivas->last_active_ivas_total_brate : ivas_total_brate; #endif } @@ -612,6 +643,6 @@ ivas_error ivas_dec( } #endif - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_dec/ivas_decision_matrix_dec.c b/lib_dec/ivas_decision_matrix_dec.c index a62e1d29eb654222dd9bfaed659c30283b86401b..2a99953d23d441566b52f8058d4aaf3194202dce 100644 --- a/lib_dec/ivas_decision_matrix_dec.c +++ b/lib_dec/ivas_decision_matrix_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "ivas_prot.h" #include "prot.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * ivas_decision_matrix_dec() diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 03e0f5f6e034d918c5745375968fac6af872a483..557af7a49782c4bdc14cd7a5491c38a110e67fea 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -126,7 +126,7 @@ ivas_error ivas_dirac_dec_open( ivas_error ivas_dirac_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING const DIRAC_CONFIG_FLAG flag_config_inp /* i/ : Flag determining if we open or reconfigure the DirAC decoder */ #else const DIRAC_CONFIG_FLAG flag_config /* i/ : Flag determining if we open or reconfigure the DirAC decoder */ @@ -149,7 +149,7 @@ ivas_error ivas_dirac_dec_config( int32_t output_Fs, ivas_total_brate; ivas_error error; int16_t nchan_transport_orig; -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING DIRAC_CONFIG_FLAG flag_config; flag_config = ( flag_config_inp == DIRAC_RECONFIGURE_MODE ) ? DIRAC_RECONFIGURE : flag_config_inp; @@ -170,12 +170,12 @@ ivas_error ivas_dirac_dec_config( * prepare library opening *-----------------------------------------------------------------*/ - if ( ( hDirAC = (DIRAC_DEC_HANDLE) count_malloc( sizeof( DIRAC_DEC_DATA ) ) ) == NULL ) + if ( ( hDirAC = (DIRAC_DEC_HANDLE) malloc( sizeof( DIRAC_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); } - if ( ( hDirAC->hConfig = (DIRAC_CONFIG_DATA_HANDLE) count_malloc( sizeof( DIRAC_CONFIG_DATA ) ) ) == NULL ) + if ( ( hDirAC->hConfig = (DIRAC_CONFIG_DATA_HANDLE) malloc( sizeof( DIRAC_CONFIG_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC Config\n" ) ); } @@ -205,7 +205,11 @@ ivas_error ivas_dirac_dec_config( if ( flag_config == DIRAC_RECONFIGURE && st_ivas->ivas_format == SBA_FORMAT ) { int16_t tmp1, tmp2, tmp3; +#ifdef SBA_BR_SWITCHING_RECONFIG + ivas_sba_config( ivas_total_brate, st_ivas->sba_analysis_order, -1, &nchan_transport_old, st_ivas->sba_planar, &tmp1, &tmp2, &tmp3 ); +#else ivas_sba_config( st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->sba_analysis_order, -1, &nchan_transport_old, st_ivas->sba_planar, &tmp1, &tmp2, &tmp3 ); +#endif } /*-----------------------------------------------------------------* @@ -318,7 +322,7 @@ ivas_error ivas_dirac_dec_config( if ( flag_config == DIRAC_OPEN ) { hDirAC->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); - hDirAC->frequency_axis = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->frequency_axis = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->frequency_axis, 0.0f, hDirAC->num_freq_bands ); ivas_dirac_dec_get_frequency_axis( hDirAC->frequency_axis, output_Fs, hDirAC->num_freq_bands ); @@ -328,7 +332,7 @@ ivas_error ivas_dirac_dec_config( { if ( ( flag_config == DIRAC_RECONFIGURE && hDirAC->masa_stereo_type_detect == NULL ) || flag_config == DIRAC_OPEN ) { - hDirAC->masa_stereo_type_detect = (MASA_STEREO_TYPE_DETECT *) count_malloc( sizeof( MASA_STEREO_TYPE_DETECT ) ); + hDirAC->masa_stereo_type_detect = (MASA_STEREO_TYPE_DETECT *) malloc( sizeof( MASA_STEREO_TYPE_DETECT ) ); } ivas_masa_init_stereotype_detection( hDirAC->masa_stereo_type_detect ); } @@ -336,7 +340,7 @@ ivas_error ivas_dirac_dec_config( { if ( flag_config == DIRAC_RECONFIGURE && hDirAC->masa_stereo_type_detect != NULL ) { - count_free( hDirAC->masa_stereo_type_detect ); + free( hDirAC->masa_stereo_type_detect ); } hDirAC->masa_stereo_type_detect = NULL; } @@ -396,22 +400,22 @@ ivas_error ivas_dirac_dec_config( if ( flag_config == DIRAC_OPEN ) { num_outputs_dir_old = hDirAC->num_outputs_dir; - hDirAC->proto_index_dir = (int16_t *) count_malloc( sizeof( int16_t ) * hDirAC->num_outputs_dir ); + hDirAC->proto_index_dir = (int16_t *) malloc( sizeof( int16_t ) * hDirAC->num_outputs_dir ); num_outputs_diff_old = hDirAC->num_outputs_diff; - hDirAC->proto_index_diff = (int16_t *) count_malloc( sizeof( int16_t ) * hDirAC->num_outputs_diff ); + hDirAC->proto_index_diff = (int16_t *) malloc( sizeof( int16_t ) * hDirAC->num_outputs_diff ); } if ( hDirAC->num_outputs_dir != num_outputs_dir_old && flag_config == DIRAC_RECONFIGURE ) { - count_free( hDirAC->proto_index_dir ); - hDirAC->proto_index_dir = (int16_t *) count_malloc( sizeof( int16_t ) * hDirAC->num_outputs_dir ); + free( hDirAC->proto_index_dir ); + hDirAC->proto_index_dir = (int16_t *) malloc( sizeof( int16_t ) * hDirAC->num_outputs_dir ); } set_s( hDirAC->proto_index_dir, 0, hDirAC->num_outputs_dir ); if ( hDirAC->num_outputs_diff != num_outputs_diff_old && flag_config == DIRAC_RECONFIGURE ) { - count_free( hDirAC->proto_index_diff ); - hDirAC->proto_index_diff = (int16_t *) count_malloc( sizeof( int16_t ) * hDirAC->num_outputs_diff ); + free( hDirAC->proto_index_diff ); + hDirAC->proto_index_diff = (int16_t *) malloc( sizeof( int16_t ) * hDirAC->num_outputs_diff ); } set_s( hDirAC->proto_index_diff, 0, hDirAC->num_outputs_diff ); @@ -531,14 +535,14 @@ ivas_error ivas_dirac_dec_config( /* direct/diffuse responses */ if ( flag_config == DIRAC_OPEN ) { - hDirAC->diffuse_response_function = (float *) count_malloc( sizeof( float ) * hDirAC->num_outputs_dir ); + hDirAC->diffuse_response_function = (float *) malloc( sizeof( float ) * hDirAC->num_outputs_dir ); } /* reallocate static memory */ else if ( flag_config == DIRAC_RECONFIGURE && hDirAC->num_outputs_dir != num_outputs_dir_old ) { - count_free( hDirAC->diffuse_response_function ); + free( hDirAC->diffuse_response_function ); hDirAC->diffuse_response_function = NULL; - hDirAC->diffuse_response_function = (float *) count_malloc( sizeof( float ) * hDirAC->num_outputs_dir ); + hDirAC->diffuse_response_function = (float *) malloc( sizeof( float ) * hDirAC->num_outputs_dir ); } if ( ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_LS ) || ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) || ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_MONO ) ) @@ -556,13 +560,13 @@ ivas_error ivas_dirac_dec_config( { if ( flag_config == DIRAC_OPEN ) { - hDirAC->hoa_encoder = (float *) count_malloc( nchan_out_woLFE * hDirAC->num_outputs_diff * sizeof( float ) ); + hDirAC->hoa_encoder = (float *) malloc( nchan_out_woLFE * hDirAC->num_outputs_diff * sizeof( float ) ); } else if ( flag_config == DIRAC_RECONFIGURE && hDirAC->hoa_encoder && ( hDirAC->num_outputs_diff != num_outputs_diff_old ) ) { - count_free( hDirAC->hoa_encoder ); + free( hDirAC->hoa_encoder ); hDirAC->hoa_encoder = NULL; - hDirAC->hoa_encoder = (float *) count_malloc( nchan_out_woLFE * hDirAC->num_outputs_diff * sizeof( float ) ); + hDirAC->hoa_encoder = (float *) malloc( nchan_out_woLFE * hDirAC->num_outputs_diff * sizeof( float ) ); } set_f( hDirAC->hoa_encoder, 0.0f, nchan_out_woLFE * hDirAC->num_outputs_diff ); compute_hoa_encoder_mtx( ls_azimuth, ls_elevation, hDirAC->hoa_encoder, hDirAC->num_outputs_diff, hDirAC->hOutSetup.ambisonics_order ); @@ -571,7 +575,7 @@ ivas_error ivas_dirac_dec_config( { if ( flag_config == DIRAC_RECONFIGURE && hDirAC->hoa_encoder ) { - count_free( hDirAC->hoa_encoder ); + free( hDirAC->hoa_encoder ); } hDirAC->hoa_encoder = NULL; } @@ -616,7 +620,7 @@ ivas_error ivas_dirac_dec_config( { if ( st_ivas->hoa_dec_mtx != NULL ) { - count_free( st_ivas->hoa_dec_mtx ); + free( st_ivas->hoa_dec_mtx ); st_ivas->hoa_dec_mtx = NULL; } if ( ( error = ivas_sba_get_hoa_dec_matrix( hDirAC->hOutSetup, &st_ivas->hoa_dec_mtx, hDirAC->hOutSetup.ambisonics_order ) ) != IVAS_ERR_OK ) @@ -660,7 +664,7 @@ ivas_error ivas_dirac_dec_config( } else if ( flag_config == DIRAC_RECONFIGURE && hDirAC->proto_signal_decorr_on && proto_signal_decorr_on_old ) { -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING if ( nchan_transport != nchan_transport_old || hDirAC->num_outputs_diff != num_outputs_diff_old || flag_config_inp == DIRAC_RECONFIGURE_MODE ) #else if ( ( nchan_transport != nchan_transport_old ) || ( hDirAC->num_outputs_diff != num_outputs_diff_old ) ) @@ -707,7 +711,7 @@ ivas_error ivas_dirac_dec_config( { if ( flag_config == DIRAC_RECONFIGURE && hDirAC->proto_frame_f ) { - count_free( hDirAC->proto_frame_f ); + free( hDirAC->proto_frame_f ); } hDirAC->proto_frame_f = NULL; } @@ -715,13 +719,13 @@ ivas_error ivas_dirac_dec_config( { if ( flag_config == DIRAC_OPEN || ( flag_config == DIRAC_RECONFIGURE && hDirAC->proto_frame_f == NULL ) ) { - hDirAC->proto_frame_f = (float *) count_malloc( sizeof( float ) * 2 * hDirAC->num_protos_diff * hDirAC->num_freq_bands ); + hDirAC->proto_frame_f = (float *) malloc( sizeof( float ) * 2 * hDirAC->num_protos_diff * hDirAC->num_freq_bands ); } else if ( flag_config == DIRAC_RECONFIGURE && ( hDirAC->num_protos_diff != num_protos_diff_old ) ) { proto_frame_f_old = hDirAC->proto_frame_f; - count_free( proto_frame_f_old ); - hDirAC->proto_frame_f = (float *) count_malloc( sizeof( float ) * 2 * hDirAC->num_protos_diff * hDirAC->num_freq_bands ); + free( proto_frame_f_old ); + hDirAC->proto_frame_f = (float *) malloc( sizeof( float ) * 2 * hDirAC->num_protos_diff * hDirAC->num_freq_bands ); } } @@ -738,13 +742,13 @@ ivas_error ivas_dirac_dec_config( { for ( j = 0; j < DIRAC_NO_COL_AVG_DIFF; j++ ) { - hDirAC->buffer_intensity_real[i][j] = (float *) count_malloc( CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hDirAC->buffer_intensity_real[i][j] = (float *) malloc( CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); set_f( hDirAC->buffer_intensity_real[i][j], 0.0f, CLDFB_NO_CHANNELS_MAX ); } } if ( hDirAC->buffer_energy == NULL ) { - hDirAC->buffer_energy = (float *) count_malloc( DIRAC_NO_COL_AVG_DIFF * CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hDirAC->buffer_energy = (float *) malloc( DIRAC_NO_COL_AVG_DIFF * CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); } set_f( hDirAC->buffer_energy, 0.0f, DIRAC_NO_COL_AVG_DIFF * CLDFB_NO_CHANNELS_MAX ); } @@ -756,14 +760,14 @@ ivas_error ivas_dirac_dec_config( { if ( flag_config == DIRAC_RECONFIGURE && hDirAC->buffer_intensity_real[i][j] ) { - count_free( hDirAC->buffer_intensity_real[i][j] ); + free( hDirAC->buffer_intensity_real[i][j] ); } hDirAC->buffer_intensity_real[i][j] = NULL; } } if ( hDirAC->buffer_energy != NULL ) { - count_free( hDirAC->buffer_energy ); + free( hDirAC->buffer_energy ); hDirAC->buffer_energy = NULL; } } @@ -814,45 +818,45 @@ ivas_error ivas_dirac_dec_config( } } - hDirAC->azimuth = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->elevation = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->diffuseness_vector = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->energy_ratio1 = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->spreadCoherence = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->surroundingCoherence = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->azimuth = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->elevation = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->diffuseness_vector = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->energy_ratio1 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->spreadCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->surroundingCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - hDirAC->azimuth[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->azimuth[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->azimuth[i], 0, hDirAC->num_freq_bands ); - hDirAC->elevation[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->elevation[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->elevation[i], 0, hDirAC->num_freq_bands ); - hDirAC->diffuseness_vector[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->diffuseness_vector[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->diffuseness_vector[i], 1.0f, hDirAC->num_freq_bands ); - hDirAC->energy_ratio1[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->energy_ratio1[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->energy_ratio1[i], 0.0f, hDirAC->num_freq_bands ); - hDirAC->spreadCoherence[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->spreadCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->spreadCoherence[i], 0.0f, hDirAC->num_freq_bands ); - hDirAC->surroundingCoherence[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->surroundingCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->surroundingCoherence[i], 0.0f, hDirAC->num_freq_bands ); } if ( st_ivas->ivas_format == MASA_FORMAT ) { - hDirAC->azimuth2 = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->elevation2 = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->energy_ratio2 = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->spreadCoherence2 = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->azimuth2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->elevation2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->energy_ratio2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->spreadCoherence2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - hDirAC->azimuth2[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->azimuth2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->azimuth2[i], 0, hDirAC->num_freq_bands ); - hDirAC->elevation2[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->elevation2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->elevation2[i], 0, hDirAC->num_freq_bands ); - hDirAC->energy_ratio2[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->energy_ratio2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->energy_ratio2[i], 0.0f, hDirAC->num_freq_bands ); - hDirAC->spreadCoherence2[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->spreadCoherence2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->spreadCoherence2[i], 0.0f, hDirAC->num_freq_bands ); } } @@ -889,7 +893,7 @@ void ivas_dirac_dec_close( /* Config & CLDFB */ if ( hDirAC->hConfig != NULL ) { - count_free( hDirAC->hConfig ); + free( hDirAC->hConfig ); hDirAC->hConfig = NULL; } @@ -907,32 +911,32 @@ void ivas_dirac_dec_close( /* free frequency axis buffer */ if ( hDirAC->frequency_axis != NULL ) { - count_free( hDirAC->frequency_axis ); + free( hDirAC->frequency_axis ); hDirAC->frequency_axis = NULL; } if ( hDirAC->diffuse_response_function != NULL ) { - count_free( hDirAC->diffuse_response_function ); + free( hDirAC->diffuse_response_function ); hDirAC->diffuse_response_function = NULL; } if ( hDirAC->hoa_encoder != NULL ) { - count_free( hDirAC->hoa_encoder ); + free( hDirAC->hoa_encoder ); hDirAC->hoa_encoder = NULL; } /* prototype indexing */ if ( hDirAC->proto_index_dir != NULL ) { - count_free( hDirAC->proto_index_dir ); + free( hDirAC->proto_index_dir ); hDirAC->proto_index_dir = NULL; } if ( hDirAC->proto_index_diff != NULL ) { - count_free( hDirAC->proto_index_diff ); + free( hDirAC->proto_index_diff ); hDirAC->proto_index_dir = NULL; } @@ -942,7 +946,7 @@ void ivas_dirac_dec_close( /* free prototype signal buffers */ if ( hDirAC->proto_frame_f != NULL ) { - count_free( hDirAC->proto_frame_f ); + free( hDirAC->proto_frame_f ); hDirAC->proto_frame_f = NULL; } @@ -952,14 +956,14 @@ void ivas_dirac_dec_close( { if ( hDirAC->buffer_intensity_real[i][j] != NULL ) { - count_free( hDirAC->buffer_intensity_real[i][j] ); + free( hDirAC->buffer_intensity_real[i][j] ); hDirAC->buffer_intensity_real[i][j] = NULL; } } } if ( hDirAC->buffer_energy != NULL ) { - count_free( hDirAC->buffer_energy ); + free( hDirAC->buffer_energy ); hDirAC->buffer_energy = NULL; } @@ -967,34 +971,34 @@ void ivas_dirac_dec_close( { if ( hDirAC->azimuth[i] != NULL ) { - count_free( hDirAC->azimuth[i] ); + free( hDirAC->azimuth[i] ); hDirAC->azimuth[i] = NULL; } if ( hDirAC->elevation[i] != NULL ) { - count_free( hDirAC->elevation[i] ); + free( hDirAC->elevation[i] ); hDirAC->elevation[i] = NULL; } if ( hDirAC->diffuseness_vector[i] != NULL ) { - count_free( hDirAC->diffuseness_vector[i] ); + free( hDirAC->diffuseness_vector[i] ); hDirAC->diffuseness_vector[i] = NULL; } } if ( hDirAC->azimuth != NULL ) { - count_free( hDirAC->azimuth ); + free( hDirAC->azimuth ); hDirAC->azimuth = NULL; } if ( hDirAC->elevation != NULL ) { - count_free( hDirAC->elevation ); + free( hDirAC->elevation ); hDirAC->elevation = NULL; } if ( hDirAC->diffuseness_vector != NULL ) { - count_free( hDirAC->diffuseness_vector ); + free( hDirAC->diffuseness_vector ); hDirAC->diffuseness_vector = NULL; } @@ -1004,11 +1008,11 @@ void ivas_dirac_dec_close( { if ( hDirAC->azimuth2[i] != NULL ) { - count_free( hDirAC->azimuth2[i] ); + free( hDirAC->azimuth2[i] ); hDirAC->azimuth2[i] = NULL; } } - count_free( hDirAC->azimuth2 ); + free( hDirAC->azimuth2 ); hDirAC->azimuth2 = NULL; } @@ -1018,11 +1022,11 @@ void ivas_dirac_dec_close( { if ( hDirAC->elevation2[i] != NULL ) { - count_free( hDirAC->elevation2[i] ); + free( hDirAC->elevation2[i] ); hDirAC->elevation2[i] = NULL; } } - count_free( hDirAC->elevation2 ); + free( hDirAC->elevation2 ); hDirAC->elevation2 = NULL; } @@ -1032,11 +1036,11 @@ void ivas_dirac_dec_close( { if ( hDirAC->energy_ratio1[i] != NULL ) { - count_free( hDirAC->energy_ratio1[i] ); + free( hDirAC->energy_ratio1[i] ); hDirAC->energy_ratio1[i] = NULL; } } - count_free( hDirAC->energy_ratio1 ); + free( hDirAC->energy_ratio1 ); hDirAC->energy_ratio1 = NULL; } @@ -1046,11 +1050,11 @@ void ivas_dirac_dec_close( { if ( hDirAC->energy_ratio2[i] != NULL ) { - count_free( hDirAC->energy_ratio2[i] ); + free( hDirAC->energy_ratio2[i] ); hDirAC->energy_ratio2[i] = NULL; } } - count_free( hDirAC->energy_ratio2 ); + free( hDirAC->energy_ratio2 ); hDirAC->energy_ratio2 = NULL; } @@ -1060,11 +1064,11 @@ void ivas_dirac_dec_close( { if ( hDirAC->spreadCoherence[i] != NULL ) { - count_free( hDirAC->spreadCoherence[i] ); + free( hDirAC->spreadCoherence[i] ); hDirAC->spreadCoherence[i] = NULL; } } - count_free( hDirAC->spreadCoherence ); + free( hDirAC->spreadCoherence ); hDirAC->spreadCoherence = NULL; } @@ -1074,11 +1078,11 @@ void ivas_dirac_dec_close( { if ( hDirAC->spreadCoherence2[i] != NULL ) { - count_free( hDirAC->spreadCoherence2[i] ); + free( hDirAC->spreadCoherence2[i] ); hDirAC->spreadCoherence2[i] = NULL; } } - count_free( hDirAC->spreadCoherence2 ); + free( hDirAC->spreadCoherence2 ); hDirAC->spreadCoherence2 = NULL; } @@ -1088,23 +1092,23 @@ void ivas_dirac_dec_close( { if ( hDirAC->surroundingCoherence[i] != NULL ) { - count_free( hDirAC->surroundingCoherence[i] ); + free( hDirAC->surroundingCoherence[i] ); hDirAC->surroundingCoherence[i] = NULL; } } - count_free( hDirAC->surroundingCoherence ); + free( hDirAC->surroundingCoherence ); hDirAC->surroundingCoherence = NULL; } if ( hDirAC->masa_stereo_type_detect != NULL ) { - count_free( hDirAC->masa_stereo_type_detect ); + free( hDirAC->masa_stereo_type_detect ); hDirAC->masa_stereo_type_detect = NULL; } ivas_dirac_free_mem( &( hDirAC->stack_mem ) ); - count_free( hDirAC ); + free( hDirAC ); return; } @@ -1835,10 +1839,11 @@ void ivas_dirac_dec( float *reference_power, *reference_power_smooth; float *onset_filter, *onset_filter_subframe, *p_onset_filter = NULL; uint16_t coherence_flag; - wmops_sub_start( "ivas_dirac_dec" ); + push_wmops( "ivas_dirac_dec" ); /* Initialize aux buffers */ hDirAC = st_ivas->hDirAC; + DirAC_mem = st_ivas->hDirAC->stack_mem; reference_power = DirAC_mem.reference_power; @@ -1859,7 +1864,7 @@ void ivas_dirac_dec( { int16_t n, tmp[IVAS_SPAR_MAX_CH * L_FRAME48k]; char file_name[50] = { 0 }; - const int16_t output_frame = st_ivas->->hDecoderConfig->output_Fs / FRAMES_PER_SEC; + const int16_t output_frame = st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC; for ( n = 0; n < nchan_transport; n++ ) { @@ -2156,7 +2161,7 @@ void ivas_dirac_dec( hDirAC->dirac_estimator_idx = ( hDirAC->dirac_estimator_idx + 1 ) % hDirAC->dirac_md_buffer_length; } -#if DEBUG_MODE_DIRAC +#ifdef DEBUG_MODE_DIRAC { static FILE *fp_direction_vector = NULL, *fp_diffuseness = NULL, *fp_referencePower = NULL; @@ -2507,7 +2512,7 @@ void ivas_dirac_dec( } } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index ee02a1bfe1c2f87b66515ce1451d2311811b3a62..7cdd0cc12778250979c9d1075106d3ec02ac1d1d 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -86,9 +86,16 @@ static void matrixTransp2Mul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], f * Initialize parametric binaural renderer *------------------------------------------------------------------------*/ +#ifdef HRTF_BINARY_FILE ivas_error ivas_dirac_dec_init_binaural_data( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ ) +#else +ivas_error ivas_dirac_dec_init_binaural_data( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +) +#endif { DIRAC_DEC_BIN_HANDLE hBinaural; int16_t nBins; @@ -98,21 +105,17 @@ ivas_error ivas_dirac_dec_init_binaural_data( float binCenterFreq, tmpFloat; ivas_error error; -#ifdef BRATE_SWITCHING_RENDERING hBinaural = st_ivas->hDiracDecBin; if ( hBinaural == NULL ) -#endif { - if ( ( hBinaural = (DIRAC_DEC_BIN_HANDLE) count_malloc( sizeof( DIRAC_DEC_BIN_DATA ) ) ) == NULL ) + if ( ( hBinaural = (DIRAC_DEC_BIN_HANDLE) malloc( sizeof( DIRAC_DEC_BIN_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC binaural handle " ); } -#ifdef BRATE_SWITCHING_RENDERING hBinaural->hTdDecorr = NULL; hBinaural->hReverb = NULL; -#endif } nBins = st_ivas->hDirAC->num_freq_bands; @@ -199,9 +202,12 @@ ivas_error ivas_dirac_dec_init_binaural_data( } else if ( renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) /* Indication of binaural rendering with room effect */ { +#ifdef HRTF_BINARY_FILE + mvr2r( hHrtfParambin->parametricEarlyPartEneCorrection, hBinaural->earlyPartEneCorrection, nBins ); +#else mvr2r( parametricEarlyPartEneCorrection, hBinaural->earlyPartEneCorrection, nBins ); +#endif -#ifdef BRATE_SWITCHING_RENDERING /* reconfiguration needed when Reverb. parameters are changed -> close and open the handle again */ if ( hBinaural->hReverb != NULL && ( ( hBinaural->hReverb->numBins != nBins ) || ( hBinaural->useSubframeMode && hBinaural->hReverb->blockSize != CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ) || @@ -211,18 +217,40 @@ ivas_error ivas_dirac_dec_init_binaural_data( } if ( hBinaural->hReverb == NULL ) -#endif { if ( hBinaural->useSubframeMode ) { +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, + nBins, + CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, + st_ivas->hIntSetup.output_config, + output_Fs, + RENDERER_BINAURAL_PARAMETRIC_ROOM, + st_ivas->hHrtfFastConv, + st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) != IVAS_ERR_OK ) +#endif { return error; } } else { +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, + nBins, + CLDFB_NO_COL_MAX, + NULL, + st_ivas->hIntSetup.output_config, + output_Fs, + RENDERER_BINAURAL_PARAMETRIC_ROOM, + st_ivas->hHrtfFastConv, + st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -244,9 +272,7 @@ ivas_error ivas_dirac_dec_init_binaural_data( { if ( st_ivas->hDecoderConfig->ivas_total_brate >= IVAS_13k2 && st_ivas->ivas_format == SBA_FORMAT ) { -#ifdef BRATE_SWITCHING_RENDERING if ( hBinaural->hTdDecorr == NULL ) -#endif { ivas_spar_td_decorr_dec_open( &( hBinaural->hTdDecorr ), output_Fs, 3, 1 ); } @@ -267,11 +293,7 @@ ivas_error ivas_dirac_dec_init_binaural_data( } else { -#ifdef BRATE_SWITCHING_RENDERING ivas_spar_td_decorr_dec_close( &( hBinaural->hTdDecorr ) ); -#else - hBinaural->hTdDecorr = NULL; -#endif } st_ivas->hDiracDecBin = hBinaural; @@ -302,12 +324,59 @@ void ivas_dirac_dec_close_binaural_data( ivas_spar_td_decorr_dec_close( &( ( *hBinaural )->hTdDecorr ) ); - count_free( *hBinaural ); + free( *hBinaural ); *hBinaural = NULL; return; } +#ifdef HRTF_BINARY_FILE +/*------------------------------------------------------------------------- + * ivas_dirac_dec_binaural_copy_hrtfs() + * + * Temporary function for copying HRTF data from rom tables if no binary + * file was given. + *------------------------------------------------------------------------*/ + +ivas_error ivas_dirac_dec_binaural_copy_hrtfs( + HRTFS_PARAMBIN_HANDLE *hHrtfParambin /* i/o: HRTF structure for rendering */ +) +{ + int16_t i, j; + if ( hHrtfParambin != NULL && *hHrtfParambin != NULL ) + { + /* Tables already loaded from file */ + return IVAS_ERR_OK; + } + else + { + /* Initialise tables from ROM */ + HRTFS_PARAMBIN *hrtfParambin; + + if ( ( hrtfParambin = (HRTFS_PARAMBIN *) malloc( sizeof( HRTFS_PARAMBIN ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for parametric binauralizer HRTF tables" ); + } + + for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + mvr2r( hrtfShCoeffsRe[i][j], hrtfParambin->hrtfShCoeffsRe[i][j], HRTF_NUM_BINS ); + mvr2r( hrtfShCoeffsIm[i][j], hrtfParambin->hrtfShCoeffsIm[i][j], HRTF_NUM_BINS ); + } + } + + mvr2r( parametricReverberationTimes, hrtfParambin->parametricReverberationTimes, CLDFB_NO_CHANNELS_MAX ); + mvr2r( parametricReverberationEneCorrections, hrtfParambin->parametricReverberationEneCorrections, CLDFB_NO_CHANNELS_MAX ); + mvr2r( parametricEarlyPartEneCorrection, hrtfParambin->parametricEarlyPartEneCorrection, CLDFB_NO_CHANNELS_MAX ); + + *hHrtfParambin = hrtfParambin; + } + + return IVAS_ERR_OK; +} +#endif /*------------------------------------------------------------------------- * ivas_dirac_dec_binaural() @@ -599,7 +668,7 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric { uint8_t ch, slot, bin, subframe; uint8_t separateCenterChannelRendering; - int16_t nBins; + int16_t nBins, idx; float frameMeanDiffusenessEneWeight[CLDFB_NO_CHANNELS_MAX]; DIRAC_DEC_HANDLE hDirAC; DIRAC_DEC_BIN_HANDLE h; @@ -609,7 +678,6 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric uint8_t applyLowBitRateEQ; int16_t dirac_read_idx; - hDirAC = st_ivas->hDirAC; h = st_ivas->hDiracDecBin; separateCenterChannelRendering = st_ivas->hOutSetup.separateChannelEnabled; @@ -850,15 +918,16 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric if ( ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) { + idx = min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 ); + /* Apply the target spectrum to the eneCorrectionFactor */ if ( separateCenterChannelRendering ) /* spreadCoh mostly originates from phantom sources in separate channel rendering mode */ { - eneCorrectionFactor *= w1 * 1.0f + ( w2 + w3 ) * spreadCohEne1[min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 )]; + eneCorrectionFactor *= w1 * 1.0f + ( w2 + w3 ) * spreadCohEne1[idx]; } else { - eneCorrectionFactor *= w1 * 1.0f + w2 * spreadCohEne05[min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 )] + - w3 * spreadCohEne1[min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 )]; + eneCorrectionFactor *= w1 * 1.0f + w2 * spreadCohEne05[idx] + w3 * spreadCohEne1[idx]; } } @@ -891,8 +960,9 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric { if ( !h->renderStereoOutputInsteadOfBinaural ) { + idx = min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 ); /* Apply target spectrum that emphasizes low frequencies when the sound is surround coherent */ - diffEne *= ( 1.0f - surCoh ) + surCoh * surCohEne[min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 )]; + diffEne *= ( 1.0f - surCoh ) + surCoh * surCohEne[idx]; } } h->ChEneOut[0][bin] += diffEne; /* Diff ene part*/ diff --git a/lib_dec/ivas_dirac_decorr_dec.c b/lib_dec/ivas_dirac_decorr_dec.c index 437bdf8a647911cc20cd13b355e77dea657116b0..2d82bb0a3a6f334c13d22682272c7f653d138c1b 100644 --- a/lib_dec/ivas_dirac_decorr_dec.c +++ b/lib_dec/ivas_dirac_decorr_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -101,8 +101,8 @@ void ivas_dirac_dec_decorr_open( *-----------------------------------------------------------------*/ /* allocate structs */ - freq_domain_decorr_ap_params = (DIRAC_DECORR_PARAMS *) count_malloc( sizeof( DIRAC_DECORR_PARAMS ) ); - freq_domain_decorr_ap_state = (DIRAC_DECORR_STATE *) count_malloc( sizeof( DIRAC_DECORR_STATE ) ); + freq_domain_decorr_ap_params = (DIRAC_DECORR_PARAMS *) malloc( sizeof( DIRAC_DECORR_PARAMS ) ); + freq_domain_decorr_ap_state = (DIRAC_DECORR_STATE *) malloc( sizeof( DIRAC_DECORR_STATE ) ); /*-----------------------------------------------------------------* * check input parameters @@ -215,7 +215,7 @@ void ivas_dirac_dec_decorr_open( } } - freq_domain_decorr_ap_params->split_frequency_bands = (int16_t *) count_malloc( sizeof( int16_t ) * ( freq_domain_decorr_ap_params->num_split_frequency_bands + 1 ) ); + freq_domain_decorr_ap_params->split_frequency_bands = (int16_t *) malloc( sizeof( int16_t ) * ( freq_domain_decorr_ap_params->num_split_frequency_bands + 1 ) ); mvs2s( &split_frequencies_bands[0], freq_domain_decorr_ap_params->split_frequency_bands, freq_domain_decorr_ap_params->num_split_frequency_bands + 1 ); /* calc buffer size and allocate arrays */ @@ -232,18 +232,18 @@ void ivas_dirac_dec_decorr_open( if ( num_outputs_diff > 0 ) { buffer_size_decorr = ( ap_pre_delay[split_band_index_start] + ap_filter_length[split_band_index_start] ); - freq_domain_decorr_ap_state->decorr_buffer = (float *) count_malloc( sizeof( float ) * 2 * buffer_size_decorr * num_outputs_diff * freq_domain_decorr_ap_params->max_band_decorr ); + freq_domain_decorr_ap_state->decorr_buffer = (float *) malloc( sizeof( float ) * 2 * buffer_size_decorr * num_outputs_diff * freq_domain_decorr_ap_params->max_band_decorr ); set_f( freq_domain_decorr_ap_state->decorr_buffer, 0.0f, 2 * buffer_size_decorr * num_outputs_diff * freq_domain_decorr_ap_params->max_band_decorr ); - freq_domain_decorr_ap_params->filter_coeff_num_real = (float *) count_malloc( sizeof( float ) * ( ap_filter_length[split_band_index_start] + 1 ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); - freq_domain_decorr_ap_params->filter_coeff_den_real = (float *) count_malloc( sizeof( float ) * ( ap_filter_length[split_band_index_start] + 1 ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); - freq_domain_decorr_ap_params->phase_coeff_real = (float *) count_malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); - freq_domain_decorr_ap_params->phase_coeff_imag = (float *) count_malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); - freq_domain_decorr_ap_state->direct_energy_smooth = (float *) count_malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); - freq_domain_decorr_ap_state->reverb_energy_smooth = (float *) count_malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); + freq_domain_decorr_ap_params->filter_coeff_num_real = (float *) malloc( sizeof( float ) * ( ap_filter_length[split_band_index_start] + 1 ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); + freq_domain_decorr_ap_params->filter_coeff_den_real = (float *) malloc( sizeof( float ) * ( ap_filter_length[split_band_index_start] + 1 ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); + freq_domain_decorr_ap_params->phase_coeff_real = (float *) malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); + freq_domain_decorr_ap_params->phase_coeff_imag = (float *) malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); + freq_domain_decorr_ap_state->direct_energy_smooth = (float *) malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); + freq_domain_decorr_ap_state->reverb_energy_smooth = (float *) malloc( sizeof( float ) * freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); - freq_domain_decorr_ap_params->pre_delay = (int16_t *) count_malloc( sizeof( int16_t ) * freq_domain_decorr_ap_params->num_split_frequency_bands ); - freq_domain_decorr_ap_params->filter_length = (int16_t *) count_malloc( sizeof( int16_t ) * freq_domain_decorr_ap_params->num_split_frequency_bands ); + freq_domain_decorr_ap_params->pre_delay = (int16_t *) malloc( sizeof( int16_t ) * freq_domain_decorr_ap_params->num_split_frequency_bands ); + freq_domain_decorr_ap_params->filter_length = (int16_t *) malloc( sizeof( int16_t ) * freq_domain_decorr_ap_params->num_split_frequency_bands ); set_f( freq_domain_decorr_ap_state->direct_energy_smooth, 0.0f, freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); set_f( freq_domain_decorr_ap_state->reverb_energy_smooth, 0.0f, freq_domain_decorr_ap_params->max_band_decorr * num_outputs_diff ); @@ -315,7 +315,7 @@ void ivas_dirac_dec_decorr_process( float *filter_coeff_num_real, *filter_coeff_den_real, *decorr_buffer_start_ptr, *decorr_buffer_ptr; float input_real, input_imag, filter_frame_imag, filter_frame_real; - wmops_sub_start( "dirac_decorr_process" ); + push_wmops( "dirac_decorr_process" ); /* check handles */ if ( h_freq_domain_decorr_ap_params == NULL || h_freq_domain_decorr_ap_state == NULL ) @@ -571,7 +571,7 @@ void ivas_dirac_dec_decorr_process( } /*end of decorrelator*/ - wmops_sub_end(); + pop_wmops(); return; } @@ -617,13 +617,13 @@ void ivas_dirac_dec_decorr_close( if ( dirac_onset_detection_state->onset_detector_1 != NULL ) { - count_free( dirac_onset_detection_state->onset_detector_1 ); + free( dirac_onset_detection_state->onset_detector_1 ); dirac_onset_detection_state->onset_detector_1 = NULL; } if ( dirac_onset_detection_state->onset_detector_2 != NULL ) { - count_free( dirac_onset_detection_state->onset_detector_2 ); + free( dirac_onset_detection_state->onset_detector_2 ); dirac_onset_detection_state->onset_detector_2 = NULL; } @@ -634,78 +634,78 @@ void ivas_dirac_dec_decorr_close( /* free decorrelation buffer */ if ( ( *ph_freq_domain_decorr_ap_state )->decorr_buffer != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_state )->decorr_buffer ); + free( ( *ph_freq_domain_decorr_ap_state )->decorr_buffer ); ( *ph_freq_domain_decorr_ap_state )->decorr_buffer = NULL; } /* free ducker smoothed direct energy buffer */ if ( ( *ph_freq_domain_decorr_ap_state )->direct_energy_smooth != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_state )->direct_energy_smooth ); + free( ( *ph_freq_domain_decorr_ap_state )->direct_energy_smooth ); ( *ph_freq_domain_decorr_ap_state )->direct_energy_smooth = NULL; } /* free ducker smoothed reverb energy buffer */ if ( ( *ph_freq_domain_decorr_ap_state )->reverb_energy_smooth != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_state )->reverb_energy_smooth ); + free( ( *ph_freq_domain_decorr_ap_state )->reverb_energy_smooth ); ( *ph_freq_domain_decorr_ap_state )->reverb_energy_smooth = NULL; } /* free pre-delay param buffer */ if ( ( *ph_freq_domain_decorr_ap_params )->pre_delay != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_params )->pre_delay ); + free( ( *ph_freq_domain_decorr_ap_params )->pre_delay ); ( *ph_freq_domain_decorr_ap_params )->pre_delay = NULL; } /* free filter length param buffer */ if ( ( *ph_freq_domain_decorr_ap_params )->filter_length != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_params )->filter_length ); + free( ( *ph_freq_domain_decorr_ap_params )->filter_length ); ( *ph_freq_domain_decorr_ap_params )->filter_length = NULL; } /* free filter coeff param buffers */ if ( ( *ph_freq_domain_decorr_ap_params )->filter_coeff_num_real != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_params )->filter_coeff_num_real ); + free( ( *ph_freq_domain_decorr_ap_params )->filter_coeff_num_real ); ( *ph_freq_domain_decorr_ap_params )->filter_coeff_num_real = NULL; } /* free pre-delay param buffer */ if ( ( *ph_freq_domain_decorr_ap_params )->filter_coeff_den_real != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_params )->filter_coeff_den_real ); + free( ( *ph_freq_domain_decorr_ap_params )->filter_coeff_den_real ); ( *ph_freq_domain_decorr_ap_params )->filter_coeff_den_real = NULL; } /* free pre-delay param buffer */ if ( ( *ph_freq_domain_decorr_ap_params )->phase_coeff_imag != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_params )->phase_coeff_imag ); + free( ( *ph_freq_domain_decorr_ap_params )->phase_coeff_imag ); ( *ph_freq_domain_decorr_ap_params )->phase_coeff_imag = NULL; } /* free pre-delay param buffer */ if ( ( *ph_freq_domain_decorr_ap_params )->phase_coeff_real != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_params )->phase_coeff_real ); + free( ( *ph_freq_domain_decorr_ap_params )->phase_coeff_real ); ( *ph_freq_domain_decorr_ap_params )->phase_coeff_real = NULL; } /* free pre-delay param buffer */ if ( ( *ph_freq_domain_decorr_ap_params )->split_frequency_bands != NULL ) { - count_free( ( *ph_freq_domain_decorr_ap_params )->split_frequency_bands ); + free( ( *ph_freq_domain_decorr_ap_params )->split_frequency_bands ); ( *ph_freq_domain_decorr_ap_params )->split_frequency_bands = NULL; } /* free pointers to state and parameter structs */ - count_free( *ph_freq_domain_decorr_ap_params ); + free( *ph_freq_domain_decorr_ap_params ); *ph_freq_domain_decorr_ap_params = NULL; - count_free( *ph_freq_domain_decorr_ap_state ); + free( *ph_freq_domain_decorr_ap_state ); *ph_freq_domain_decorr_ap_state = NULL; return; diff --git a/lib_dec/ivas_dirac_onsets_dec.c b/lib_dec/ivas_dirac_onsets_dec.c index 67209cc052d0b20cce4d9bebf58f5343217b90b2..050ec5acddaf17a39a0492972f1b1b0d84106fb7 100644 --- a/lib_dec/ivas_dirac_onsets_dec.c +++ b/lib_dec/ivas_dirac_onsets_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -69,8 +69,8 @@ void ivas_dirac_dec_onset_detection_open( dirac_onset_detection_params->max_band_decorr = max_band_decorr; /* memory allocation */ - dirac_onset_detection_state->onset_detector_1 = (float *) count_malloc( sizeof( float ) * num_protos_diff * dirac_onset_detection_params->max_band_decorr ); - dirac_onset_detection_state->onset_detector_2 = (float *) count_malloc( sizeof( float ) * num_protos_diff * dirac_onset_detection_params->max_band_decorr ); + dirac_onset_detection_state->onset_detector_1 = (float *) malloc( sizeof( float ) * num_protos_diff * dirac_onset_detection_params->max_band_decorr ); + dirac_onset_detection_state->onset_detector_2 = (float *) malloc( sizeof( float ) * num_protos_diff * dirac_onset_detection_params->max_band_decorr ); /* init to zero */ set_zero( dirac_onset_detection_state->onset_detector_1, num_protos_diff * dirac_onset_detection_params->max_band_decorr ); diff --git a/lib_dec/ivas_dirac_output_synthesis_cov.c b/lib_dec/ivas_dirac_output_synthesis_cov.c index decca3445234054923af2446157b98cd9329c2fc..79560aae63f2ffd3ef2e0a7511ea0be63a025989 100644 --- a/lib_dec/ivas_dirac_output_synthesis_cov.c +++ b/lib_dec/ivas_dirac_output_synthesis_cov.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -48,7 +48,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "rom_dec.h" @@ -80,15 +80,15 @@ void ivas_dirac_dec_output_synthesis_cov_open( /* buffer length and interpolator */ h_dirac_output_synthesis_params->alpha_synthesis = NULL; - h_dirac_output_synthesis_params->proto_matrix = (float *) count_malloc( nchan_out * nchan_in * sizeof( float ) ); + h_dirac_output_synthesis_params->proto_matrix = (float *) malloc( nchan_out * nchan_in * sizeof( float ) ); /* cov buffers */ for ( idx = 0; idx < num_param_bands; idx++ ) { - h_dirac_output_synthesis_state->cx_old[idx] = (float *) count_malloc( nchan_in * nchan_in * sizeof( float ) ); - h_dirac_output_synthesis_state->cy_old[idx] = (float *) count_malloc( nchan_out * nchan_out * sizeof( float ) ); - h_dirac_output_synthesis_state->mixing_matrix_old[idx] = (float *) count_malloc( nchan_out * nchan_in * sizeof( float ) ); + h_dirac_output_synthesis_state->cx_old[idx] = (float *) malloc( nchan_in * nchan_in * sizeof( float ) ); + h_dirac_output_synthesis_state->cy_old[idx] = (float *) malloc( nchan_out * nchan_out * sizeof( float ) ); + h_dirac_output_synthesis_state->mixing_matrix_old[idx] = (float *) malloc( nchan_out * nchan_in * sizeof( float ) ); set_zero( h_dirac_output_synthesis_state->cx_old[idx], nchan_in * nchan_in ); set_zero( h_dirac_output_synthesis_state->cy_old[idx], nchan_out * nchan_out ); set_zero( h_dirac_output_synthesis_state->mixing_matrix_old[idx], nchan_out * nchan_in ); @@ -101,7 +101,7 @@ void ivas_dirac_dec_output_synthesis_cov_open( } for ( idx = 0; idx < num_param_bands_residual; idx++ ) { - h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] = (float *) count_malloc( nchan_out * nchan_out * sizeof( float ) ); + h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] = (float *) malloc( nchan_out * nchan_out * sizeof( float ) ); set_zero( h_dirac_output_synthesis_state->mixing_matrix_res_old[idx], nchan_out * nchan_out ); } for ( ; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) @@ -114,7 +114,7 @@ void ivas_dirac_dec_output_synthesis_cov_open( *-----------------------------------------------------------------*/ /* compute interpolator */ - h_dirac_output_synthesis_params->interpolator = (float *) count_malloc( interp_length * sizeof( float ) ); + h_dirac_output_synthesis_params->interpolator = (float *) malloc( interp_length * sizeof( float ) ); for ( idx = 1; idx <= interp_length; ++idx ) { h_dirac_output_synthesis_params->interpolator[idx - 1] = (float) idx / (float) interp_length; @@ -181,21 +181,21 @@ void ivas_dirac_dec_output_synthesis_cov_close( /* free interpolator */ if ( h_dirac_output_synthesis_params->interpolator != NULL ) { - count_free( h_dirac_output_synthesis_params->interpolator ); + free( h_dirac_output_synthesis_params->interpolator ); h_dirac_output_synthesis_params->interpolator = NULL; } /* free alpha */ if ( h_dirac_output_synthesis_params->alpha_synthesis != NULL ) { - count_free( h_dirac_output_synthesis_params->alpha_synthesis ); + free( h_dirac_output_synthesis_params->alpha_synthesis ); h_dirac_output_synthesis_params->alpha_synthesis = NULL; } /* free proto_matrix */ if ( h_dirac_output_synthesis_params->proto_matrix != NULL ) { - count_free( h_dirac_output_synthesis_params->proto_matrix ); + free( h_dirac_output_synthesis_params->proto_matrix ); h_dirac_output_synthesis_params->proto_matrix = NULL; } @@ -204,25 +204,25 @@ void ivas_dirac_dec_output_synthesis_cov_close( { if ( h_dirac_output_synthesis_state->cx_old[idx] != NULL ) { - count_free( h_dirac_output_synthesis_state->cx_old[idx] ); + free( h_dirac_output_synthesis_state->cx_old[idx] ); h_dirac_output_synthesis_state->cx_old[idx] = NULL; } if ( h_dirac_output_synthesis_state->cy_old[idx] != NULL ) { - count_free( h_dirac_output_synthesis_state->cy_old[idx] ); + free( h_dirac_output_synthesis_state->cy_old[idx] ); h_dirac_output_synthesis_state->cy_old[idx] = NULL; } if ( h_dirac_output_synthesis_state->mixing_matrix_old[idx] != NULL ) { - count_free( h_dirac_output_synthesis_state->mixing_matrix_old[idx] ); + free( h_dirac_output_synthesis_state->mixing_matrix_old[idx] ); h_dirac_output_synthesis_state->mixing_matrix_old[idx] = NULL; } if ( h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] != NULL ) { - count_free( h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] ); + free( h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] ); h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] = NULL; } } @@ -452,7 +452,7 @@ int16_t computeMixingMatrices( float mat_mult_buffer2[MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS]; float mat_mult_buffer3[MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS]; - wmops_sub_start( "dirac_cov_mix_mat" ); + push_wmops( "dirac_cov_mix_mat" ); set_zero( svd_s_buffer, MAX_OUTPUT_CHANNELS ); for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) @@ -665,7 +665,7 @@ int16_t computeMixingMatrices( mvr2r( mat_mult_buffer3, mixing_matrix, lengthCy * lengthCx ); } - wmops_sub_end(); + pop_wmops(); return out; } @@ -706,7 +706,7 @@ int16_t computeMixingMatricesResidual( float mat_mult_buffer2[MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS]; float mat_mult_buffer3[MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS]; - wmops_sub_start( "dirac_cov_mix_mat_r" ); + push_wmops( "dirac_cov_mix_mat_r" ); /*-----------------------------------------------------------------* * Decomposition of Cy @@ -864,7 +864,7 @@ int16_t computeMixingMatricesResidual( mvr2r( mat_mult_buffer3, mixing_matrix, lengthCy * lengthCx ); - wmops_sub_end(); + pop_wmops(); return out; } @@ -910,7 +910,7 @@ int16_t computeMixingMatricesISM( float mat_mult_buffer3[MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS]; int16_t nL, nC; - wmops_sub_start( "dirac_cov_mix_mat" ); + push_wmops( "dirac_cov_mix_mat" ); out = EXIT_SUCCESS; lengthCx = num_inputs; @@ -1047,7 +1047,7 @@ int16_t computeMixingMatricesISM( mvr2r( mat_mult_buffer3, mixing_matrix, lengthCy * lengthCx ); } - wmops_sub_end(); + pop_wmops(); return out; } diff --git a/lib_dec/ivas_dirac_output_synthesis_dec.c b/lib_dec/ivas_dirac_output_synthesis_dec.c index 79c04f824b6f86848acc0df1962ec1e35757d1fe..5cf1c8b2daa46594166905ef4d81e8a7a66cdfc7 100644 --- a/lib_dec/ivas_dirac_output_synthesis_dec.c +++ b/lib_dec/ivas_dirac_output_synthesis_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- * Local constants @@ -126,22 +126,22 @@ void ivas_dirac_dec_output_synthesis_open( dirac_output_synthesis_state->diffuse_responses_square = NULL; if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_MONO ) { - dirac_output_synthesis_state->diffuse_responses_square = (float *) count_malloc( 2 * sizeof( float ) ); + dirac_output_synthesis_state->diffuse_responses_square = (float *) malloc( 2 * sizeof( float ) ); } else if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) { - dirac_output_synthesis_state->diffuse_responses_square = (float *) count_malloc( hDirAC->hOutSetup.nchan_out_woLFE * sizeof( float ) ); + dirac_output_synthesis_state->diffuse_responses_square = (float *) malloc( hDirAC->hOutSetup.nchan_out_woLFE * sizeof( float ) ); } /* prototype power buffers */ dirac_output_synthesis_state->proto_power_smooth_prev = NULL; if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) { - dirac_output_synthesis_state->proto_power_smooth_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_protos_dir * sizeof( float ) ); + dirac_output_synthesis_state->proto_power_smooth_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_protos_dir * sizeof( float ) ); } if ( dirac_output_synthesis_params->max_band_decorr > 0 && ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_LS || hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) ) { - dirac_output_synthesis_state->proto_power_diff_smooth_prev = (float *) count_malloc( dirac_output_synthesis_params->max_band_decorr * hDirAC->hOutSetup.nchan_out_woLFE * sizeof( float ) ); + dirac_output_synthesis_state->proto_power_diff_smooth_prev = (float *) malloc( dirac_output_synthesis_params->max_band_decorr * hDirAC->hOutSetup.nchan_out_woLFE * sizeof( float ) ); } else { @@ -149,41 +149,41 @@ void ivas_dirac_dec_output_synthesis_open( } /* buffer length and interpolator */ - dirac_output_synthesis_params->interpolator = (float *) count_malloc( hDirAC->subframe_nbslots * sizeof( float ) ); + dirac_output_synthesis_params->interpolator = (float *) malloc( hDirAC->subframe_nbslots * sizeof( float ) ); /* target PSD buffers */ - dirac_output_synthesis_state->cy_cross_dir_smooth_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); + dirac_output_synthesis_state->cy_cross_dir_smooth_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { dirac_output_synthesis_state->cy_auto_dir_smooth_prev = NULL; - dirac_output_synthesis_state->cy_auto_diff_smooth_prev = (float *) count_malloc( dirac_output_synthesis_params->max_band_decorr * hDirAC->num_outputs_diff * sizeof( float ) ); + dirac_output_synthesis_state->cy_auto_diff_smooth_prev = (float *) malloc( dirac_output_synthesis_params->max_band_decorr * hDirAC->num_outputs_diff * sizeof( float ) ); } else { - dirac_output_synthesis_state->cy_auto_dir_smooth_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); + dirac_output_synthesis_state->cy_auto_dir_smooth_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) { - dirac_output_synthesis_state->cy_auto_diff_smooth_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); + dirac_output_synthesis_state->cy_auto_diff_smooth_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); } else { - dirac_output_synthesis_state->cy_auto_diff_smooth_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_diff * sizeof( float ) ); + dirac_output_synthesis_state->cy_auto_diff_smooth_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_diff * sizeof( float ) ); } } /* direct and diffuse gain buffers */ - dirac_output_synthesis_state->gains_dir_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); + dirac_output_synthesis_state->gains_dir_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { - dirac_output_synthesis_state->gains_diff_prev = (float *) count_malloc( dirac_output_synthesis_params->max_band_decorr * hDirAC->num_outputs_diff * sizeof( float ) ); + dirac_output_synthesis_state->gains_diff_prev = (float *) malloc( dirac_output_synthesis_params->max_band_decorr * hDirAC->num_outputs_diff * sizeof( float ) ); } else if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_PSD_SHD && hDirAC->synthesisConf != DIRAC_SYNTHESIS_MONO ) { - dirac_output_synthesis_state->gains_diff_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_diff * sizeof( float ) ); + dirac_output_synthesis_state->gains_diff_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_diff * sizeof( float ) ); } else { - dirac_output_synthesis_state->gains_diff_prev = (float *) count_malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); + dirac_output_synthesis_state->gains_diff_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ); } /*-----------------------------------------------------------------* @@ -194,15 +194,15 @@ void ivas_dirac_dec_output_synthesis_open( if ( !( renderer_type == RENDERER_BINAURAL_PARAMETRIC || renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) { computeAlphaSynthesis( temp_alpha_synthesis, DIRAC_AVG_LENGTH_SYNTH_MS, DIRAC_ALPHA_MAX, &dirac_output_synthesis_params->numAlphas, hDirAC->slot_size, hDirAC->num_freq_bands, hDirAC->frequency_axis, output_Fs ); - dirac_output_synthesis_params->alpha_synthesis = (float *) count_malloc( dirac_output_synthesis_params->numAlphas * sizeof( float ) ); + dirac_output_synthesis_params->alpha_synthesis = (float *) malloc( dirac_output_synthesis_params->numAlphas * sizeof( float ) ); mvr2r( temp_alpha_synthesis, dirac_output_synthesis_params->alpha_synthesis, dirac_output_synthesis_params->numAlphas ); computeAlphaSynthesis( temp_alpha_synthesis, DIRAC_AVG_LENGTH_SYNTH_MS_FAST, DIRAC_ALPHA_MAX_FAST, &dirac_output_synthesis_params->numAlphasFast, hDirAC->slot_size, hDirAC->num_freq_bands, hDirAC->frequency_axis, output_Fs ); - dirac_output_synthesis_params->alpha_synthesis_fast = (float *) count_malloc( dirac_output_synthesis_params->numAlphasFast * sizeof( float ) ); + dirac_output_synthesis_params->alpha_synthesis_fast = (float *) malloc( dirac_output_synthesis_params->numAlphasFast * sizeof( float ) ); mvr2r( temp_alpha_synthesis, dirac_output_synthesis_params->alpha_synthesis_fast, dirac_output_synthesis_params->numAlphasFast ); - dirac_output_synthesis_state->reference_power_smooth_prev = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); - dirac_output_synthesis_state->direction_smoothness_prev = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + dirac_output_synthesis_state->reference_power_smooth_prev = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); + dirac_output_synthesis_state->direction_smoothness_prev = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_zero( dirac_output_synthesis_state->reference_power_smooth_prev, hDirAC->num_freq_bands ); set_zero( dirac_output_synthesis_state->direction_smoothness_prev, hDirAC->num_freq_bands ); } @@ -367,79 +367,79 @@ void ivas_dirac_dec_output_synthesis_close( /* free interpolator */ if ( ( dirac_output_synthesis_params )->interpolator != NULL ) { - count_free( ( dirac_output_synthesis_params )->interpolator ); + free( ( dirac_output_synthesis_params )->interpolator ); ( dirac_output_synthesis_params )->interpolator = NULL; } /* free alpha */ if ( ( dirac_output_synthesis_params )->alpha_synthesis != NULL ) { - count_free( ( dirac_output_synthesis_params )->alpha_synthesis ); + free( ( dirac_output_synthesis_params )->alpha_synthesis ); ( dirac_output_synthesis_params )->alpha_synthesis = NULL; } if ( ( dirac_output_synthesis_params )->alpha_synthesis_fast != NULL ) { - count_free( ( dirac_output_synthesis_params )->alpha_synthesis_fast ); + free( ( dirac_output_synthesis_params )->alpha_synthesis_fast ); ( dirac_output_synthesis_params )->alpha_synthesis_fast = NULL; } if ( ( dirac_output_synthesis_state )->reference_power_smooth_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->reference_power_smooth_prev ); + free( ( dirac_output_synthesis_state )->reference_power_smooth_prev ); ( dirac_output_synthesis_state )->reference_power_smooth_prev = NULL; } if ( ( dirac_output_synthesis_state )->direction_smoothness_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->direction_smoothness_prev ); + free( ( dirac_output_synthesis_state )->direction_smoothness_prev ); ( dirac_output_synthesis_state )->direction_smoothness_prev = NULL; } if ( ( dirac_output_synthesis_state )->diffuse_responses_square != NULL ) { - count_free( ( dirac_output_synthesis_state )->diffuse_responses_square ); + free( ( dirac_output_synthesis_state )->diffuse_responses_square ); ( dirac_output_synthesis_state )->diffuse_responses_square = NULL; } /* free power buffers */ if ( ( dirac_output_synthesis_state )->proto_power_smooth_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->proto_power_smooth_prev ); + free( ( dirac_output_synthesis_state )->proto_power_smooth_prev ); ( dirac_output_synthesis_state )->proto_power_smooth_prev = NULL; } if ( ( dirac_output_synthesis_state )->proto_power_diff_smooth_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->proto_power_diff_smooth_prev ); + free( ( dirac_output_synthesis_state )->proto_power_diff_smooth_prev ); ( dirac_output_synthesis_state )->proto_power_diff_smooth_prev = NULL; } /* free target power buffers */ if ( ( dirac_output_synthesis_state )->cy_auto_dir_smooth_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->cy_auto_dir_smooth_prev ); + free( ( dirac_output_synthesis_state )->cy_auto_dir_smooth_prev ); ( dirac_output_synthesis_state )->cy_auto_dir_smooth_prev = NULL; } if ( ( dirac_output_synthesis_state )->cy_cross_dir_smooth_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->cy_cross_dir_smooth_prev ); + free( ( dirac_output_synthesis_state )->cy_cross_dir_smooth_prev ); ( dirac_output_synthesis_state )->cy_cross_dir_smooth_prev = NULL; } if ( ( dirac_output_synthesis_state )->cy_auto_diff_smooth_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->cy_auto_diff_smooth_prev ); + free( ( dirac_output_synthesis_state )->cy_auto_diff_smooth_prev ); ( dirac_output_synthesis_state )->cy_auto_diff_smooth_prev = NULL; } /* free gain buffers */ if ( ( dirac_output_synthesis_state )->gains_dir_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->gains_dir_prev ); + free( ( dirac_output_synthesis_state )->gains_dir_prev ); ( dirac_output_synthesis_state )->gains_dir_prev = NULL; } if ( ( dirac_output_synthesis_state )->gains_diff_prev != NULL ) { - count_free( ( dirac_output_synthesis_state )->gains_diff_prev ); + free( ( dirac_output_synthesis_state )->gains_diff_prev ); ( dirac_output_synthesis_state )->gains_diff_prev = NULL; } @@ -945,7 +945,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( int16_t alphaMaxBin; int16_t alphaMaxBinFast; - wmops_sub_start( "dirac_out_synth_sfr" ); + push_wmops( "dirac_out_synth_sfr" ); h_dirac_output_synthesis_params = &( hDirAC->h_output_synthesis_psd_params ); h_dirac_output_synthesis_state = &( hDirAC->h_output_synthesis_psd_state ); @@ -1248,7 +1248,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( set_zero( h_dirac_output_synthesis_state->cy_cross_dir_smooth, num_freq_bands * nchan_out_woLFE ); set_zero( h_dirac_output_synthesis_state->cy_auto_diff_smooth, num_freq_bands * nchan_out_woLFE ); - wmops_sub_end(); + pop_wmops(); return; } @@ -1277,7 +1277,7 @@ static void ivas_dirac_dec_get_response_split_order( float dv_0, dv_1, dv_2, dv_r_0, dv_r_1, dv_r_2; float w; - wmops_sub_start( "ivas_dirac_dec_get_response_split_order" ); + push_wmops( "ivas_dirac_dec_get_response_split_order" ); index_azimuth = ( azimuth + 180 ) % 360; index_elevation = elevation + 90; @@ -1411,7 +1411,7 @@ static void ivas_dirac_dec_get_response_split_order( response[b] = c; } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_entropy_decoder.c b/lib_dec/ivas_entropy_decoder.c index cc3fab86567c8fdc971b544e572e5ee51df479da..2f8e9bc3bf5d31c0742fd91cd9d9e5eff04062ff 100644 --- a/lib_dec/ivas_entropy_decoder.c +++ b/lib_dec/ivas_entropy_decoder.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #endif #include "ivas_rom_com.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 9a37cf7e71090fc2e3ff388570c9743fefadd56e..9ebb4a5d5a1e02fba33c8b02ae44f2707fb56e97 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -125,20 +125,16 @@ ivas_error ivas_dec_setup( st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); num_bits_read += SBA_ORDER_BITS; -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate && ivas_total_brate > IVAS_SID_5k2 ) #else if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate && ivas_total_brate > IVAS_SID_5k2 ) #endif { +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING -#ifndef SBA_BR_SWITCHING_2 - if ( get_sba_reinit_flag( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) -#else - int16_t sba_reinit_flag; - sba_reinit_flag = get_sba_reinit_flag( ivas_total_brate, st_ivas->last_active_ivas_total_brate, st_ivas->sba_order ); + int16_t sba_reinit_flag = get_sba_reinit_flag( ivas_total_brate, st_ivas->last_active_ivas_total_brate, st_ivas->sba_order ); if ( sba_reinit_flag ) -#endif { if ( ( error = ivas_sba_dec_reinit( st_ivas ) ) != IVAS_ERR_OK ) { @@ -147,13 +143,16 @@ ivas_error ivas_dec_setup( } else { +#endif #endif if ( ( error = ivas_sba_dec_reconfigure( st_ivas ) ) != IVAS_ERR_OK ) { return error; } +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING } +#endif #endif } else @@ -268,6 +267,37 @@ ivas_error ivas_dec_setup( st_ivas->element_mode_init = IVAS_CPE_MDCT; break; } +#ifdef SBA_BR_SWITCHING_RECONFIG + if ( ( st_ivas->ini_frame > 0 ) && ( st_ivas->ivas_format == SBA_FORMAT ) ) + { + int16_t nchan_transport_old, nchan_transport; + SBA_MODE sba_mode_old; + int32_t last_ivas_total_brate; + last_ivas_total_brate = st_ivas->last_active_ivas_total_brate; + sba_mode_old = ivas_sba_mode_select( last_ivas_total_brate ); + nchan_transport_old = st_ivas->nchan_transport; + nchan_transport = ( st_ivas->sid_format == SID_SBA_2TC ) ? 2 : 1; + + if ( ( nchan_transport_old != nchan_transport ) || ( sba_mode_old != st_ivas->sba_mode ) ) + { + /*Setting the default bitrate for the reconfig function*/ + if ( st_ivas->sid_format == SID_SBA_2TC ) + { + st_ivas->hDecoderConfig->ivas_total_brate = IVAS_48k; + } + else + { + st_ivas->hDecoderConfig->ivas_total_brate = ( st_ivas->sba_mode == SBA_MODE_SPAR ) ? IVAS_24k4 : IVAS_13k2; + } + if ( ( error = ivas_sba_dec_reconfigure( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + st_ivas->last_active_ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate; + } + } +#endif } /*-------------------------------------------------------------------* @@ -279,7 +309,7 @@ ivas_error ivas_dec_setup( { if ( ( error = doSanityChecks_IVAS( st_ivas ) ) != IVAS_ERR_OK ) { - return IVAS_ERROR( error, "Sanitiy checks failed" ); + return IVAS_ERROR( error, "Sanity checks failed" ); } if ( ( error = ivas_init_decoder( st_ivas ) ) != IVAS_ERR_OK ) @@ -584,6 +614,22 @@ ivas_error ivas_init_decoder_front( { return error; } +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_HRTF_CRend_binary_open( &( st_ivas->hSetOfHRTF ) ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ( error = ivas_HRTF_fastconv_binary_open( &st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ( error = ivas_HRTF_parambin_binary_open( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif } /*-------------------------------------------------------------------* @@ -619,9 +665,9 @@ ivas_error ivas_init_decoder( { int16_t i, k, n; int16_t sce_id, cpe_id; - int16_t numCldfbAnalyses; - int16_t numCldfbSyntheses; + int16_t numCldfbAnalyses, numCldfbSyntheses; int32_t output_Fs, ivas_total_brate; + int32_t binauralization_delay_ns; AUDIO_CONFIG output_config; DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; @@ -634,7 +680,7 @@ ivas_error ivas_init_decoder( ivas_total_brate = hDecoderConfig->ivas_total_brate; hDecoderConfig->last_ivas_total_brate = ivas_total_brate; -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING st_ivas->last_active_ivas_total_brate = ivas_total_brate; #endif @@ -699,7 +745,7 @@ ivas_error ivas_init_decoder( } /*-----------------------------------------------------------------* - * Allocate and initalize SCE/CPE and other handles + * Allocate and initialize SCE/CPE and other handles *-----------------------------------------------------------------*/ if ( st_ivas->ivas_format == MONO_FORMAT ) @@ -842,7 +888,7 @@ ivas_error ivas_init_decoder( st_ivas->sba_dirac_stereo_flag = ( output_config == AUDIO_CONFIG_STEREO ); #endif } - else + else /* SBA_MODE_DIRAC */ { if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_mode, -1 ) ) != IVAS_ERR_OK ) { @@ -850,28 +896,6 @@ ivas_error ivas_init_decoder( } st_ivas->sba_dirac_stereo_flag = ( st_ivas->nchan_transport == 1 && output_config == AUDIO_CONFIG_STEREO ); - - if ( ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) && st_ivas->hOutSetup.is_loudspeaker_setup ) - { - int16_t ambisonics_order; - - ambisonics_order = ivas_sba_get_order_transport( st_ivas->nchan_transport ); // VE: is it needed ? - - if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, ambisonics_order ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) && !st_ivas->hIntSetup.is_loudspeaker_setup ) - { - IVAS_OUTPUT_SETUP out_setup; - - ivas_output_init( &out_setup, AUDIO_CONFIG_7_1_4 ); - if ( ( error = ivas_sba_get_hoa_dec_matrix( out_setup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK ) - { - return error; - } - } } } @@ -1026,6 +1050,8 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { + int32_t brate_sce, brate_cpe; + ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( st_ivas->element_mode_init ), ivas_total_brate ); if ( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) @@ -1062,21 +1088,13 @@ ivas_error ivas_init_decoder( } } + ivas_mcmasa_split_brate( st_ivas->hOutSetup.separateChannelEnabled, ivas_total_brate, st_ivas->nSCE, st_ivas->nCPE, &brate_sce, &brate_cpe ); + for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { - if ( st_ivas->hOutSetup.separateChannelEnabled ) - { - if ( ( error = create_sce_dec( st_ivas, sce_id, ivas_mcmasa_mono_brate( ivas_total_brate ) ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else + if ( ( error = create_sce_dec( st_ivas, sce_id, brate_sce ) ) != IVAS_ERR_OK ) { - if ( ( error = create_sce_dec( st_ivas, sce_id, ivas_total_brate / ( st_ivas->nSCE + st_ivas->nCPE ) ) ) != IVAS_ERR_OK ) - { - return error; - } + return error; } reset_indices_dec( st_ivas->hSCE[sce_id]->hCoreCoder[0] ); @@ -1084,23 +1102,10 @@ ivas_error ivas_init_decoder( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { - if ( st_ivas->hOutSetup.separateChannelEnabled ) + st_ivas->element_mode_init = IVAS_CPE_MDCT; /* element_mode_init was IVAS_SCE for SCE initialization */ + if ( ( error = create_cpe_dec( st_ivas, cpe_id, brate_cpe ) ) != IVAS_ERR_OK ) { - st_ivas->element_mode_init = IVAS_CPE_MDCT; - - if ( ( error = create_cpe_dec( st_ivas, cpe_id, ivas_total_brate - st_ivas->hSCE[0]->element_brate ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else - { - st_ivas->element_mode_init = IVAS_CPE_MDCT; - - if ( ( error = create_cpe_dec( st_ivas, cpe_id, ivas_total_brate / ( st_ivas->nSCE + st_ivas->nCPE ) ) ) != IVAS_ERR_OK ) - { - return error; - } + return error; } for ( n = 0; n < CPE_CHANNELS; n++ ) @@ -1146,7 +1151,7 @@ ivas_error ivas_init_decoder( if ( n > 0 ) { - if ( ( st_ivas->mem_hp20_out = (float **) count_malloc( n * sizeof( float * ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_out = (float **) malloc( n * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -1158,7 +1163,7 @@ ivas_error ivas_init_decoder( for ( i = 0; i < n; i++ ) { - if ( ( st_ivas->mem_hp20_out[i] = (float *) count_malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_out[i] = (float *) malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -1180,10 +1185,25 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { +#ifdef HRTF_BINARY_FILE + if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + { + if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } +#else if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) { return error; } +#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { @@ -1194,9 +1214,17 @@ ivas_error ivas_init_decoder( if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) { - if ( ( st_ivas->hCrend = (CREND_HANDLE) count_malloc( sizeof( CREND_DATA ) ) ) == NULL ) +#ifdef FIX_197_CREND_INTERFACE + if ( ( st_ivas->hCrendWrapper = (CREND_WRAPPER_HANDLE) malloc( sizeof( CREND_WRAPPER ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend Wrapper\n" ); + } + if ( ( st_ivas->hCrendWrapper->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) +#else + if ( ( st_ivas->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) +#endif { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR Crend\n" ); + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend\n" ); } } } @@ -1216,10 +1244,38 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { +#ifdef FIX_197_CREND_INTERFACE + if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->ivas_format == MC_FORMAT && st_ivas->hDecoderConfig->Opt_Headrotation ) + { + if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), + st_ivas->hIntSetup.ls_azimuth, + st_ivas->hIntSetup.ls_elevation, + st_ivas->hIntSetup.nchan_out_woLFE, + EFAP_MODE_EFAP ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), + st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, +#ifdef HRTF_BINARY_FILE + st_ivas->hSetOfHRTF, +#endif + st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + + st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; +#else if ( ivas_crend_open( st_ivas ) != IVAS_ERR_OK ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "ivas_crend_open failed" ); } +#endif } if ( st_ivas->ivas_format == ISM_FORMAT && @@ -1242,7 +1298,21 @@ ivas_error ivas_init_decoder( if ( st_ivas->mc_mode == MC_MODE_MCT ) { - if ( ( error = ivas_create_lfe_dec( &st_ivas->hLFE, output_Fs, st_ivas->hHrtf != NULL ? st_ivas->hHrtf->latency_s : 0 ) ) != IVAS_ERR_OK ) + binauralization_delay_ns = st_ivas->binaural_latency_ns; + if ( st_ivas->hBinRenderer != NULL ) + { + if ( st_ivas->hBinRenderer->render_lfe ) + { + /* Account for filterbank delay */ + binauralization_delay_ns += IVAS_FB_DEC_DELAY_NS; + } + else + { + binauralization_delay_ns = 0; + } + } + + if ( ( error = ivas_create_lfe_dec( &st_ivas->hLFE, output_Fs, binauralization_delay_ns ) ) != IVAS_ERR_OK ) { return error; } @@ -1323,127 +1393,127 @@ void destroy_core_dec( if ( hCoreCoder->hGSCDec != NULL ) { - count_free( hCoreCoder->hGSCDec ); + free( hCoreCoder->hGSCDec ); hCoreCoder->hGSCDec = NULL; } if ( hCoreCoder->hPFstat != NULL ) { - count_free( hCoreCoder->hPFstat ); + free( hCoreCoder->hPFstat ); hCoreCoder->hPFstat = NULL; } if ( hCoreCoder->hMusicPF != NULL ) { - count_free( hCoreCoder->hMusicPF ); + free( hCoreCoder->hMusicPF ); hCoreCoder->hMusicPF = NULL; } if ( hCoreCoder->hBPF != NULL ) { - count_free( hCoreCoder->hBPF ); + free( hCoreCoder->hBPF ); hCoreCoder->hBPF = NULL; } if ( hCoreCoder->hBWE_zero != NULL ) { - count_free( hCoreCoder->hBWE_zero ); + free( hCoreCoder->hBWE_zero ); hCoreCoder->hBWE_zero = NULL; } if ( hCoreCoder->hTdCngDec != NULL ) { - count_free( hCoreCoder->hTdCngDec ); + free( hCoreCoder->hTdCngDec ); hCoreCoder->hTdCngDec = NULL; } if ( hCoreCoder->hSC_VBR != NULL ) { - count_free( hCoreCoder->hSC_VBR ); + free( hCoreCoder->hSC_VBR ); hCoreCoder->hSC_VBR = NULL; } if ( hCoreCoder->hAmrwb_IO != NULL ) { - count_free( hCoreCoder->hAmrwb_IO ); + free( hCoreCoder->hAmrwb_IO ); hCoreCoder->hAmrwb_IO = NULL; } if ( hCoreCoder->hBWE_TD != NULL ) { - count_free( hCoreCoder->hBWE_TD ); + free( hCoreCoder->hBWE_TD ); hCoreCoder->hBWE_TD = NULL; } if ( hCoreCoder->hBWE_FD != NULL ) { - count_free( hCoreCoder->hBWE_FD ); + free( hCoreCoder->hBWE_FD ); hCoreCoder->hBWE_FD = NULL; } if ( hCoreCoder->hBWE_FD_HR != NULL ) { - count_free( hCoreCoder->hBWE_FD_HR ); + free( hCoreCoder->hBWE_FD_HR ); hCoreCoder->hBWE_FD_HR = NULL; } if ( hCoreCoder->hWIDec != NULL ) { - count_free( hCoreCoder->hWIDec ); + free( hCoreCoder->hWIDec ); hCoreCoder->hWIDec = NULL; } if ( hCoreCoder->hTECDec != NULL ) { - count_free( hCoreCoder->hTECDec ); + free( hCoreCoder->hTECDec ); hCoreCoder->hTECDec = NULL; } if ( hCoreCoder->hTcxLtpDec != NULL ) { - count_free( hCoreCoder->hTcxLtpDec ); + free( hCoreCoder->hTcxLtpDec ); hCoreCoder->hTcxLtpDec = NULL; } if ( hCoreCoder->hTcxDec != NULL ) { - count_free( hCoreCoder->hTcxDec ); + free( hCoreCoder->hTcxDec ); hCoreCoder->hTcxDec = NULL; } if ( hCoreCoder->hTcxCfg != NULL && hCoreCoder->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - count_free( hCoreCoder->hTcxCfg ); + free( hCoreCoder->hTcxCfg ); hCoreCoder->hTcxCfg = NULL; } if ( hCoreCoder->hTonalMDCTConc != NULL ) { - count_free( hCoreCoder->hTonalMDCTConc ); + free( hCoreCoder->hTonalMDCTConc ); hCoreCoder->hTonalMDCTConc = NULL; } if ( hCoreCoder->hIGFDec != NULL ) { - count_free( hCoreCoder->hIGFDec ); + free( hCoreCoder->hIGFDec ); hCoreCoder->hIGFDec = NULL; } if ( hCoreCoder->hPlcInfo != NULL ) { - count_free( hCoreCoder->hPlcInfo ); + free( hCoreCoder->hPlcInfo ); hCoreCoder->hPlcInfo = NULL; } if ( hCoreCoder->hHQ_core != NULL ) { - count_free( hCoreCoder->hHQ_core ); + free( hCoreCoder->hHQ_core ); hCoreCoder->hHQ_core = NULL; } if ( hCoreCoder->hHQ_nbfec != NULL ) { - count_free( hCoreCoder->hHQ_nbfec ); + free( hCoreCoder->hHQ_nbfec ); hCoreCoder->hHQ_nbfec = NULL; } @@ -1513,8 +1583,17 @@ void ivas_initialize_handles_dec( st_ivas->hIsmRendererData = NULL; st_ivas->hBinRendererTd = NULL; st_ivas->hMonoDmxRenderer = NULL; +#ifdef FIX_197_CREND_INTERFACE + st_ivas->hCrendWrapper = NULL; +#else st_ivas->hCrend = NULL; st_ivas->hHrtf = NULL; +#endif +#ifdef HRTF_BINARY_FILE + st_ivas->hSetOfHRTF = NULL; + st_ivas->hHrtfFastConv = NULL; + st_ivas->hHrtfParambin = NULL; +#endif st_ivas->hoa_dec_mtx = NULL; st_ivas->hHeadTrackData = NULL; @@ -1599,10 +1678,10 @@ void ivas_destroy_dec( { for ( i = 0; i < getNumChanSynthesis( st_ivas ); i++ ) { - count_free( st_ivas->mem_hp20_out[i] ); + free( st_ivas->mem_hp20_out[i] ); st_ivas->mem_hp20_out[i] = NULL; } - count_free( st_ivas->mem_hp20_out ); + free( st_ivas->mem_hp20_out ); st_ivas->mem_hp20_out = NULL; } @@ -1611,7 +1690,7 @@ void ivas_destroy_dec( { if ( st_ivas->hIsmMetaData[n] != NULL ) { - count_free( st_ivas->hIsmMetaData[n] ); + free( st_ivas->hIsmMetaData[n] ); st_ivas->hIsmMetaData[n] = NULL; } } @@ -1619,7 +1698,7 @@ void ivas_destroy_dec( /* ISm renderer handle */ if ( st_ivas->hIsmRendererData != NULL ) { - count_free( st_ivas->hIsmRendererData ); + free( st_ivas->hIsmRendererData ); st_ivas->hIsmRendererData = NULL; } @@ -1647,7 +1726,7 @@ void ivas_destroy_dec( /* HOA decoder matrix */ if ( st_ivas->hoa_dec_mtx != NULL ) { - count_free( st_ivas->hoa_dec_mtx ); + free( st_ivas->hoa_dec_mtx ); st_ivas->hoa_dec_mtx = NULL; } @@ -1673,7 +1752,11 @@ void ivas_destroy_dec( ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); /* Crend handle */ +#ifdef FIX_197_CREND_INTERFACE + ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); +#else ivas_crend_close( st_ivas ); +#endif /* LS config converter handle */ ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); @@ -1681,7 +1764,7 @@ void ivas_destroy_dec( /* Custom LS configuration handle */ if ( st_ivas->hLsSetupCustom != NULL ) { - count_free( st_ivas->hLsSetupCustom ); + free( st_ivas->hLsSetupCustom ); st_ivas->hLsSetupCustom = NULL; } @@ -1695,14 +1778,14 @@ void ivas_destroy_dec( /* Downmix structure */ if ( st_ivas->hMonoDmxRenderer != NULL ) { - count_free( st_ivas->hMonoDmxRenderer ); + free( st_ivas->hMonoDmxRenderer ); st_ivas->hMonoDmxRenderer = NULL; } /* Head track data handle */ if ( st_ivas->hHeadTrackData != NULL ) { - count_free( st_ivas->hHeadTrackData ); + free( st_ivas->hHeadTrackData ); st_ivas->hHeadTrackData = NULL; } @@ -1713,17 +1796,32 @@ void ivas_destroy_dec( } else if ( st_ivas->hHrtfTD != NULL ) { - /* Case when HRTF filter is mistakenly specified but TD renderer was not active */ - if ( st_ivas->hHrtfTD->ModelParams.UseItdModel && !st_ivas->hHrtfTD->ModelParams.modelROM ) - { - BSplineModelEvalITDDealloc( &st_ivas->hHrtfTD->ModelParamsITD ); - } - BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval ); ivas_HRTF_binary_close( &st_ivas->hHrtfTD ); } +#ifdef HRTF_BINARY_FILE + /* CRend binaural renderer handle */ + if ( st_ivas->hSetOfHRTF != NULL ) + { + destroy_SetOfHRTF( st_ivas->hSetOfHRTF ); + ivas_HRTF_CRend_binary_close( &st_ivas->hSetOfHRTF ); + } + + /* Fastconv HRTF filters */ + if ( st_ivas->hHrtfFastConv != NULL ) + { + ivas_HRTF_fastconv_binary_close( &st_ivas->hHrtfFastConv ); + } + + /* Parametric binauralizer HRTF filters */ + if ( st_ivas->hHrtfParambin != NULL ) + { + ivas_HRTF_parambin_binary_close( &st_ivas->hHrtfParambin ); + } +#endif + /* Config. Renderer */ ivas_render_config_close( &( st_ivas->hRenderConfig ) ); @@ -1732,12 +1830,12 @@ void ivas_destroy_dec( if ( st_ivas->hDecoderConfig != NULL ) { - count_free( st_ivas->hDecoderConfig ); + free( st_ivas->hDecoderConfig ); st_ivas->hDecoderConfig = NULL; } /* main IVAS handle */ - count_free( st_ivas ); + free( st_ivas ); return; } @@ -2006,6 +2104,16 @@ static ivas_error doSanityChecks_IVAS( } #endif +#ifdef HRTF_BINARY_FILE +#ifdef DEBUGGING + if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration: Time Domain object renderer not supported in this configuration" ); + } +#endif + +#else + #ifdef DEBUGGING if ( ( st_ivas->hDecoderConfig->Opt_HRTF_binary || st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) #else @@ -2015,6 +2123,8 @@ static ivas_error doSanityChecks_IVAS( return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration: Time Domain object renderer not supported in this configuration" ); } +#endif + #ifdef DEBUGGING if ( ( st_ivas->hHrtfTD != NULL && st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) { diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index 6b9f8ec8ba52beb496a7d9f318476e8bfb48a426..75c8e6c6b78c9e09c044f2d3567401b8765f62e8 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------* @@ -76,7 +76,7 @@ ivas_error ivas_ism_metadata_dec( error = IVAS_ERR_OK; - wmops_sub_start( "ism_meta_dec" ); + push_wmops( "ism_meta_dec" ); if ( ism_total_brate == IVAS_SID_5k2 || ism_total_brate == FRAME_NO_DATA ) { @@ -97,7 +97,7 @@ ivas_error ivas_ism_metadata_dec( } #endif - wmops_sub_end(); + pop_wmops(); return error; } @@ -499,7 +499,7 @@ ivas_error ivas_ism_metadata_dec( hSCE[ch]->hCoreCoder[0]->bit_stream = hSCE[ch - 1]->hCoreCoder[0]->bit_stream + ( hSCE[ch - 1]->hCoreCoder[0]->total_brate / FRAMES_PER_SEC ); } - wmops_sub_end(); + pop_wmops(); return error; } @@ -522,7 +522,7 @@ ivas_error create_ism_metadata_dec( /* allocate ISm metadata handles */ for ( ch = 0; ch < MAX_NUM_OBJECTS; ch++ ) { - if ( ( st_ivas->hIsmMetaData[ch] = (ISM_METADATA_HANDLE) count_malloc( sizeof( ISM_METADATA_FRAME ) ) ) == NULL ) + if ( ( st_ivas->hIsmMetaData[ch] = (ISM_METADATA_HANDLE) malloc( sizeof( ISM_METADATA_FRAME ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISm MetaData\n" ) ); } diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 8ebf27afb5b31c8fe665286a4f716d39e6e39c44..2b6d0b687665f9404f4b7498dd04cd2232b16dd0 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -326,11 +326,11 @@ static ivas_error ivas_param_ism_rendering_init( } /* memory allocation for proto matrix and interpolator */ - if ( ( hParamIsmRendering->proto_matrix = (float *) count_malloc( hOutSetup.nchan_out_woLFE * nchan_transport * sizeof( float ) ) ) == NULL ) + if ( ( hParamIsmRendering->proto_matrix = (float *) malloc( hOutSetup.nchan_out_woLFE * nchan_transport * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for proto matrix\n" ) ); } - if ( ( hParamIsmRendering->interpolator = (float *) count_malloc( subframe_nbslots * sizeof( float ) ) ) == NULL ) + if ( ( hParamIsmRendering->interpolator = (float *) malloc( subframe_nbslots * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for interpolator\n" ) ); } @@ -398,24 +398,24 @@ ivas_error ivas_param_ism_dec_open( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_param_ism_dec_open" ); + push_wmops( "ivas_param_ism_dec_open" ); /*-----------------------------------------------------------------* * prepare library opening *-----------------------------------------------------------------*/ - if ( ( hDirAC = (DIRAC_DEC_HANDLE) count_malloc( sizeof( DIRAC_DEC_DATA ) ) ) == NULL ) + if ( ( hDirAC = (DIRAC_DEC_HANDLE) malloc( sizeof( DIRAC_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); } /* Assign memory to Param Object handle */ - if ( ( hDirAC->hParamIsm = (PARAM_ISM_CONFIG_HANDLE) count_malloc( sizeof( PARAM_ISM_CONFIG_DATA ) ) ) == NULL ) + if ( ( hDirAC->hParamIsm = (PARAM_ISM_CONFIG_HANDLE) malloc( sizeof( PARAM_ISM_CONFIG_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM\n" ) ); } - if ( ( hDirAC->hParamIsmRendering = (PARAM_ISM_RENDERING_HANDLE) count_malloc( sizeof( PARAM_ISM_RENDERING_DATA ) ) ) == NULL ) + if ( ( hDirAC->hParamIsmRendering = (PARAM_ISM_RENDERING_HANDLE) malloc( sizeof( PARAM_ISM_RENDERING_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); } @@ -500,41 +500,41 @@ ivas_error ivas_param_ism_dec_open( if ( ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM ) ) { hDirAC->dirac_md_buffer_length = MAX_PARAM_SPATIAL_SUBFRAMES; - hDirAC->azimuth = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->elevation = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->azimuth2 = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->elevation2 = (int16_t **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); - hDirAC->energy_ratio1 = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->spreadCoherence = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->energy_ratio2 = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->spreadCoherence2 = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); - hDirAC->surroundingCoherence = (float **) count_malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->azimuth = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->elevation = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->azimuth2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->elevation2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ); + hDirAC->energy_ratio1 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->spreadCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->energy_ratio2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->spreadCoherence2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); + hDirAC->surroundingCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ); for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - hDirAC->azimuth[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->azimuth[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->azimuth[i], 0, hDirAC->num_freq_bands ); - hDirAC->elevation[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->elevation[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->elevation[i], 0, hDirAC->num_freq_bands ); - hDirAC->azimuth2[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->azimuth2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->azimuth2[i], 0, hDirAC->num_freq_bands ); - hDirAC->elevation2[i] = (int16_t *) count_malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); + hDirAC->elevation2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ); set_s( hDirAC->elevation2[i], 0, hDirAC->num_freq_bands ); - hDirAC->energy_ratio1[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->energy_ratio1[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->energy_ratio1[i], 0.0f, hDirAC->num_freq_bands ); - hDirAC->spreadCoherence[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->spreadCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->spreadCoherence[i], 0.0f, hDirAC->num_freq_bands ); - hDirAC->energy_ratio2[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->energy_ratio2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->energy_ratio2[i], 0.0f, hDirAC->num_freq_bands ); - hDirAC->spreadCoherence2[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->spreadCoherence2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->spreadCoherence2[i], 0.0f, hDirAC->num_freq_bands ); - hDirAC->surroundingCoherence[i] = (float *) count_malloc( hDirAC->num_freq_bands * sizeof( float ) ); + hDirAC->surroundingCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ); set_f( hDirAC->surroundingCoherence[i], 0.0f, hDirAC->num_freq_bands ); } } st_ivas->hDirAC = hDirAC; - wmops_sub_end(); + pop_wmops(); return error; } @@ -555,7 +555,7 @@ void ivas_param_ism_dec_close( /* Config & CLDFB */ if ( hDirAC->hParamIsm != NULL ) { - count_free( hDirAC->hParamIsm ); + free( hDirAC->hParamIsm ); hDirAC->hParamIsm = NULL; } @@ -565,25 +565,25 @@ void ivas_param_ism_dec_close( { if ( hDirAC->azimuth[i] != NULL ) { - count_free( hDirAC->azimuth[i] ); + free( hDirAC->azimuth[i] ); hDirAC->azimuth[i] = NULL; } if ( hDirAC->elevation[i] != NULL ) { - count_free( hDirAC->elevation[i] ); + free( hDirAC->elevation[i] ); hDirAC->elevation[i] = NULL; } } if ( hDirAC->azimuth != NULL ) { - count_free( hDirAC->azimuth ); + free( hDirAC->azimuth ); hDirAC->azimuth = NULL; } if ( hDirAC->elevation != NULL ) { - count_free( hDirAC->elevation ); + free( hDirAC->elevation ); hDirAC->elevation = NULL; } @@ -593,11 +593,11 @@ void ivas_param_ism_dec_close( { if ( hDirAC->azimuth2[i] != NULL ) { - count_free( hDirAC->azimuth2[i] ); + free( hDirAC->azimuth2[i] ); hDirAC->azimuth2[i] = NULL; } } - count_free( hDirAC->azimuth2 ); + free( hDirAC->azimuth2 ); hDirAC->azimuth2 = NULL; } @@ -607,11 +607,11 @@ void ivas_param_ism_dec_close( { if ( hDirAC->elevation2[i] != NULL ) { - count_free( hDirAC->elevation2[i] ); + free( hDirAC->elevation2[i] ); hDirAC->elevation2[i] = NULL; } } - count_free( hDirAC->elevation2 ); + free( hDirAC->elevation2 ); hDirAC->elevation2 = NULL; } @@ -621,11 +621,11 @@ void ivas_param_ism_dec_close( { if ( hDirAC->energy_ratio1[i] != NULL ) { - count_free( hDirAC->energy_ratio1[i] ); + free( hDirAC->energy_ratio1[i] ); hDirAC->energy_ratio1[i] = NULL; } } - count_free( hDirAC->energy_ratio1 ); + free( hDirAC->energy_ratio1 ); hDirAC->energy_ratio1 = NULL; } @@ -635,11 +635,11 @@ void ivas_param_ism_dec_close( { if ( hDirAC->energy_ratio2[i] != NULL ) { - count_free( hDirAC->energy_ratio2[i] ); + free( hDirAC->energy_ratio2[i] ); hDirAC->energy_ratio2[i] = NULL; } } - count_free( hDirAC->energy_ratio2 ); + free( hDirAC->energy_ratio2 ); hDirAC->energy_ratio2 = NULL; } @@ -649,11 +649,11 @@ void ivas_param_ism_dec_close( { if ( hDirAC->spreadCoherence[i] != NULL ) { - count_free( hDirAC->spreadCoherence[i] ); + free( hDirAC->spreadCoherence[i] ); hDirAC->spreadCoherence[i] = NULL; } } - count_free( hDirAC->spreadCoherence ); + free( hDirAC->spreadCoherence ); hDirAC->spreadCoherence = NULL; } @@ -663,11 +663,11 @@ void ivas_param_ism_dec_close( { if ( hDirAC->spreadCoherence2[i] != NULL ) { - count_free( hDirAC->spreadCoherence2[i] ); + free( hDirAC->spreadCoherence2[i] ); hDirAC->spreadCoherence2[i] = NULL; } } - count_free( hDirAC->spreadCoherence2 ); + free( hDirAC->spreadCoherence2 ); hDirAC->spreadCoherence2 = NULL; } @@ -677,11 +677,11 @@ void ivas_param_ism_dec_close( { if ( hDirAC->surroundingCoherence[i] != NULL ) { - count_free( hDirAC->surroundingCoherence[i] ); + free( hDirAC->surroundingCoherence[i] ); hDirAC->surroundingCoherence[i] = NULL; } } - count_free( hDirAC->surroundingCoherence ); + free( hDirAC->surroundingCoherence ); hDirAC->surroundingCoherence = NULL; } } @@ -691,23 +691,23 @@ void ivas_param_ism_dec_close( /* Param ISM Rendering */ if ( hDirAC->hParamIsmRendering->interpolator != NULL ) { - count_free( hDirAC->hParamIsmRendering->interpolator ); + free( hDirAC->hParamIsmRendering->interpolator ); hDirAC->hParamIsmRendering->interpolator = NULL; } if ( hDirAC->hParamIsmRendering->proto_matrix != NULL ) { - count_free( hDirAC->hParamIsmRendering->proto_matrix ); + free( hDirAC->hParamIsmRendering->proto_matrix ); hDirAC->hParamIsmRendering->proto_matrix = NULL; } } if ( hDirAC->hParamIsmRendering != NULL ) { - count_free( hDirAC->hParamIsmRendering ); + free( hDirAC->hParamIsmRendering ); hDirAC->hParamIsmRendering = NULL; } - count_free( hDirAC ); + free( hDirAC ); return; } @@ -764,7 +764,7 @@ void ivas_param_ism_dec( hSetup = st_ivas->hIntSetup; - wmops_sub_start( "ivas_param_ism_dec" ); + push_wmops( "ivas_param_ism_dec" ); /* Frame-level Processing */ /* De-quantization */ @@ -915,7 +915,7 @@ void ivas_param_ism_dec( st_ivas->hIsmMetaData[ch]->elevation = st_ivas->hDirAC->elevation_values[ch]; } - wmops_sub_end(); + pop_wmops(); return; } @@ -1019,13 +1019,17 @@ static ivas_error ivas_ism_bitrate_switching( { ivas_error error; int32_t element_brate_tmp[MAX_NUM_OBJECTS]; + int16_t nSCE_old, nCPE_old; error = IVAS_ERR_OK; + nCPE_old = st_ivas->nCPE; + nSCE_old = st_ivas->nSCE; + ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, num_obj, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ); st_ivas->nSCE = st_ivas->nchan_transport; - ivas_corecoder_dec_reconfig( st_ivas, nchan_transport_old, 0, nchan_transport_old, 0 ); + ivas_corecoder_dec_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, 0, st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport, ( st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ); ivas_hp20_dec_reconfig( st_ivas, nchan_transport_old ); @@ -1069,7 +1073,7 @@ static ivas_error ivas_ism_bitrate_switching( /* close the ISM renderer and reinitialize */ if ( st_ivas->hIsmRendererData != NULL ) { - count_free( st_ivas->hIsmRendererData ); + free( st_ivas->hIsmRendererData ); st_ivas->hIsmRendererData = NULL; } ivas_ism_renderer_open( st_ivas ); @@ -1081,7 +1085,23 @@ static ivas_error ivas_ism_bitrate_switching( ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); /* Open Crend Binaural renderer */ +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->hOutSetup.output_config ), + st_ivas->hRenderConfig, + st_ivas->hDecoderConfig->Opt_Headrotation, +#ifdef HRTF_BINARY_FILE + st_ivas->hSetOfHRTF, +#endif + st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; +#else ivas_crend_open( st_ivas ); +#endif } } @@ -1095,7 +1115,12 @@ static ivas_error ivas_ism_bitrate_switching( if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL ) { /* open the parametric binaural renderer */ +#ifdef HRTF_BINARY_FILE + ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ); + ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ); +#else ivas_dirac_dec_init_binaural_data( st_ivas ); +#endif /* Close the TD Binaural renderer */ if ( st_ivas->hBinRendererTd != NULL ) @@ -1113,7 +1138,7 @@ static ivas_error ivas_ism_bitrate_switching( /* Close the ISM renderer */ if ( st_ivas->hIsmRendererData != NULL ) { - count_free( st_ivas->hIsmRendererData ); + free( st_ivas->hIsmRendererData ); st_ivas->hIsmRendererData = NULL; } } @@ -1121,15 +1146,24 @@ static ivas_error ivas_ism_bitrate_switching( if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM ) { /* open the parametric binaural renderer */ +#ifdef HRTF_BINARY_FILE + ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ); + ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ); +#else ivas_dirac_dec_init_binaural_data( st_ivas ); +#endif /* close the crend binaural renderer */ +#ifdef FIX_197_CREND_INTERFACE + ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); +#else ivas_crend_close( st_ivas ); if ( st_ivas->hHrtf != NULL ) { st_ivas->hHrtf = NULL; } +#endif } } diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index ca71e4035dcda40bd824a4eff1d02ef5335505b0..462fedfdc6d0e9320474c7489de8eca2323c3a7a 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------* @@ -61,7 +61,7 @@ ivas_error ivas_ism_renderer_open( error = IVAS_ERR_OK; - if ( ( st_ivas->hIsmRendererData = (ISM_RENDERER_HANDLE) count_malloc( sizeof( ISM_RENDERER_DATA ) ) ) == NULL ) + if ( ( st_ivas->hIsmRendererData = (ISM_RENDERER_HANDLE) malloc( sizeof( ISM_RENDERER_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISM renderer\n" ) ); } @@ -82,11 +82,7 @@ ivas_error ivas_ism_renderer_open( interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); for ( i = 0; i < interpolator_length; i++ ) { -#ifdef FIX_REND_ISM_XFADE st_ivas->hIsmRendererData->interpolator[i] = (float) i / ( (float) interpolator_length - 1 ); -#else - st_ivas->hIsmRendererData->interpolator[i] = (float) i / ( (float) interpolator_length ); -#endif } return error; @@ -144,43 +140,10 @@ void ivas_ism_render( { if ( st_ivas->intern_config == AUDIO_CONFIG_STEREO ) { -#ifdef FIX_REND_ISM_STEREO_PANNING ivas_ism_get_stereo_gains( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &gains[i][0], &gains[i][1] ); -#else - float aziRad, eleRad; - float y, mappedX, aziRadMapped, A, A2, A3; - const float LsAngleRad = 30.0f * PI_OVER_180; - - /* Convert azi and ele to an azi value of the cone of confusion */ - aziRad = st_ivas->hIsmMetaData[i]->azimuth * PI_OVER_180; - eleRad = st_ivas->hIsmMetaData[i]->elevation * PI_OVER_180; - y = ( sinf( aziRad ) * cosf( eleRad ) ); - mappedX = sqrtf( max( 0.0f, 1.0f - ( y * y ) ) ); - aziRadMapped = atan2f( y, mappedX ); - - /* Determine the amplitude panning gains */ - if ( aziRadMapped >= LsAngleRad ) - { /* Left side */ - gains[i][0] = 1.0f; - gains[i][1] = 0.0f; - } - else if ( aziRadMapped <= -LsAngleRad ) - { /* Right side */ - gains[i][0] = 0.0f; - gains[i][1] = 1.0f; - } - else /* Tangent panning law */ - { - A = tanf( aziRadMapped ) / tanf( LsAngleRad ); - A2 = ( A - 1.0f ) / max( 0.001f, A + 1.0f ); - A3 = 1.0f / ( A2 * A2 + 1.0f ); - gains[i][0] = sqrtf( A3 ); - gains[i][1] = sqrtf( 1.0f - A3 ); - } -#endif } else { @@ -191,14 +154,9 @@ void ivas_ism_render( } else { -#ifdef FIX_REND_ISM_POS_ROUNDING // TODO tmu review when #215 is resolved azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->azimuth + 0.5f ); elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->elevation + 0.5f ); -#else - azimuth = (int16_t) ( st_ivas->hIsmMetaData[i]->azimuth + 0.5f ); - elevation = (int16_t) ( st_ivas->hIsmMetaData[i]->elevation + 0.5f ); -#endif if ( st_ivas->hIntSetup.is_planar_setup ) { @@ -240,7 +198,6 @@ void ivas_ism_render( return; } -#ifdef FIX_REND_ISM_STEREO_PANNING void ivas_ism_get_stereo_gains( const float azimuth, /* i : object azimuth */ const float elevation, /* i : object elevation */ @@ -279,4 +236,3 @@ void ivas_ism_get_stereo_gains( *right_gain = sqrtf( 1.0f - A3 ); } } -#endif diff --git a/lib_dec/ivas_lfe_dec.c b/lib_dec/ivas_lfe_dec.c index a909801b8f939c1e9cfd3057144393257d4b9da3..1487a279718daee3f640816a2256d1e1a0109a0a 100644 --- a/lib_dec/ivas_lfe_dec.c +++ b/lib_dec/ivas_lfe_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include "math.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* @@ -350,9 +350,9 @@ void ivas_lfe_dec( *-------------------------------------------------------------------------*/ ivas_error ivas_create_lfe_dec( - LFE_DEC_HANDLE *hLFE_out, /* o : IVAS LFE decoder structure */ - const int32_t output_Fs, /* i : output sampling rate */ - const float add_delay_s /* i : additional LFE delay to sync with binaural filter */ + LFE_DEC_HANDLE *hLFE_out, /* o : IVAS LFE decoder structure */ + const int32_t output_Fs, /* i : output sampling rate */ + const int32_t binauralization_delay_ns /* i : additional LFE delay to sync with binaural renderer */ ) { float low_pass_delay_dec_out, block_offset_s; @@ -361,6 +361,7 @@ ivas_error ivas_create_lfe_dec( LFE_DEC_HANDLE hLFE; float lfe_addl_delay_s; int16_t i, j; + int16_t add_delay_sa; low_pass_delay_dec_out = 0; block_offset_s = 0; @@ -371,7 +372,7 @@ ivas_error ivas_create_lfe_dec( * Allocate LFE handle *-----------------------------------------------------------------*/ - if ( ( hLFE = (LFE_DEC_HANDLE) count_malloc( sizeof( LFE_DEC_DATA ) ) ) == NULL ) + if ( ( hLFE = (LFE_DEC_HANDLE) malloc( sizeof( LFE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE\n" ) ); } @@ -380,7 +381,7 @@ ivas_error ivas_create_lfe_dec( * LFE Window: allocate and initialize *-----------------------------------------------------------------*/ - if ( ( hLFE->pWindow_state = (LFE_WINDOW_HANDLE) count_malloc( sizeof( LFE_WINDOW_DATA ) ) ) == NULL ) + if ( ( hLFE->pWindow_state = (LFE_WINDOW_HANDLE) malloc( sizeof( LFE_WINDOW_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE window structure\n" ) ); } @@ -436,12 +437,17 @@ ivas_error ivas_create_lfe_dec( lfe_addl_delay_s = block_offset_s - hLFE->lfe_block_delay_s; lfe_addl_delay_s = max( 0.0f, lfe_addl_delay_s ); - hLFE->lfe_addl_delay = (int16_t) ( lfe_addl_delay_s * output_Fs ) + (int16_t) roundf( add_delay_s * output_Fs ); - hLFE->lfe_block_delay_s += lfe_addl_delay_s + add_delay_s; +#ifdef FIX_FIX_I59 + add_delay_sa = (int16_t) roundf( (float) binauralization_delay_ns * output_Fs / 1000000000.f ); +#else + add_delay_sa = NS2SA( output_Fs, binauralization_delay_ns + 0.5f ); +#endif + hLFE->lfe_addl_delay = (int16_t) ( lfe_addl_delay_s * output_Fs ) + add_delay_sa; + hLFE->lfe_block_delay_s += lfe_addl_delay_s + add_delay_sa / output_Fs; if ( hLFE->lfe_addl_delay > 0 ) { - if ( ( hLFE->lfe_delay_buf = (float *) count_malloc( hLFE->lfe_addl_delay * sizeof( float ) ) ) == NULL ) + if ( ( hLFE->lfe_delay_buf = (float *) malloc( hLFE->lfe_addl_delay * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE additional delay buffer\n" ) ); } @@ -478,16 +484,16 @@ void ivas_lfe_dec_close( LFE_DEC_HANDLE hLFE /* i/o: LFE decoder handle */ ) { - count_free( hLFE->pWindow_state ); + free( hLFE->pWindow_state ); hLFE->pWindow_state = NULL; if ( hLFE->lfe_delay_buf != NULL ) { - count_free( hLFE->lfe_delay_buf ); + free( hLFE->lfe_delay_buf ); hLFE->lfe_delay_buf = NULL; } - count_free( hLFE ); + free( hLFE ); return; } diff --git a/lib_dec/ivas_lfe_plc.c b/lib_dec/ivas_lfe_plc.c index 71d1aa7a5e4af09d66d0a0c325ad4404a8b03f85..7e63c2d539ad965107966cecc3e676a167e96c69 100644 --- a/lib_dec/ivas_lfe_plc.c +++ b/lib_dec/ivas_lfe_plc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* * Local constants diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 3df378440516783b997c7bed8d4dfaaafd806a74..18d42cb91073dbf59b862dd2f1e92aa54c2bb00a 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "debug.h" #endif #include -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * Local constants @@ -322,7 +322,7 @@ ivas_error ivas_masa_dec_open( { MASA_DECODER_HANDLE hMasa; - if ( ( hMasa = (MASA_DECODER_HANDLE) count_malloc( sizeof( MASA_DECODER ) ) ) == NULL ) + if ( ( hMasa = (MASA_DECODER_HANDLE) malloc( sizeof( MASA_DECODER ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MASA decoder\n" ) ); } @@ -337,7 +337,7 @@ ivas_error ivas_masa_dec_open( /* Create spherical grid only for external output */ if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) { - hMasa->data.sph_grid16 = (SPHERICAL_GRID_DATA *) count_malloc( sizeof( SPHERICAL_GRID_DATA ) ); + hMasa->data.sph_grid16 = (SPHERICAL_GRID_DATA *) malloc( sizeof( SPHERICAL_GRID_DATA ) ); generate_gridEq( hMasa->data.sph_grid16 ); } else @@ -373,7 +373,7 @@ void ivas_masa_dec_close( /* Free spherical grid memory if in use */ if ( hMasa->data.sph_grid16 != NULL ) { - count_free( hMasa->data.sph_grid16 ); + free( hMasa->data.sph_grid16 ); hMasa->data.sph_grid16 = NULL; } @@ -381,29 +381,29 @@ void ivas_masa_dec_close( { if ( hMasa->hMasaLfeSynth->lfeSynthRingBuffer != NULL ) { - count_free( hMasa->hMasaLfeSynth->lfeSynthRingBuffer ); + free( hMasa->hMasaLfeSynth->lfeSynthRingBuffer ); hMasa->hMasaLfeSynth->lfeSynthRingBuffer = NULL; } if ( hMasa->hMasaLfeSynth->lfeSynthRingBuffer2 != NULL ) { - count_free( hMasa->hMasaLfeSynth->lfeSynthRingBuffer2 ); + free( hMasa->hMasaLfeSynth->lfeSynthRingBuffer2 ); hMasa->hMasaLfeSynth->lfeSynthRingBuffer2 = NULL; } if ( hMasa->hMasaLfeSynth->delayBuffer_syncLp != NULL ) { - count_free( hMasa->hMasaLfeSynth->delayBuffer_syncLp ); + free( hMasa->hMasaLfeSynth->delayBuffer_syncLp ); hMasa->hMasaLfeSynth->delayBuffer_syncLp = NULL; } if ( hMasa->hMasaLfeSynth->delayBuffer_syncDirAC != NULL ) { - count_free( hMasa->hMasaLfeSynth->delayBuffer_syncDirAC ); + free( hMasa->hMasaLfeSynth->delayBuffer_syncDirAC ); hMasa->hMasaLfeSynth->delayBuffer_syncDirAC = NULL; } - count_free( hMasa->hMasaLfeSynth ); + free( hMasa->hMasaLfeSynth ); hMasa->hMasaLfeSynth = NULL; } - count_free( hMasa ); + free( hMasa ); hMasa = NULL; return; @@ -803,7 +803,7 @@ static void init_lfe_synth_data( output_Fs = st_ivas->hDecoderConfig->output_Fs; output_config = st_ivas->hDecoderConfig->output_config; - hMasa->hMasaLfeSynth = (MCMASA_LFE_SYNTH_DATA_HANDLE) count_malloc( sizeof( MCMASA_LFE_SYNTH_DATA ) ); + hMasa->hMasaLfeSynth = (MCMASA_LFE_SYNTH_DATA_HANDLE) malloc( sizeof( MCMASA_LFE_SYNTH_DATA ) ); hMasa->hMasaLfeSynth->transportEneSmooth = 0.0f; hMasa->hMasaLfeSynth->protoLfeEneSmooth = 0.0f; @@ -827,7 +827,7 @@ static void init_lfe_synth_data( /* Ring buffer for the filterbank of the LFE synthesis. * The filterbank is using moving average lowpass filter with the crossover of 120 Hz. */ bufferSize = (int16_t) ( ( output_Fs / FRAMES_PER_SEC ) / MAX_PARAM_SPATIAL_SUBFRAMES ); - hMasa->hMasaLfeSynth->lfeSynthRingBuffer = (float *) count_malloc( bufferSize * sizeof( float ) ); + hMasa->hMasaLfeSynth->lfeSynthRingBuffer = (float *) malloc( bufferSize * sizeof( float ) ); set_zero( hMasa->hMasaLfeSynth->lfeSynthRingBuffer, bufferSize ); hMasa->hMasaLfeSynth->ringBufferLoPointer = 0; hMasa->hMasaLfeSynth->ringBufferHiPointer = bufferSize / 2; @@ -837,7 +837,7 @@ static void init_lfe_synth_data( /* Ring buffer for additional lowpass filter for the LFE signal. * Moving average lowpass filter with the crossover of 240 Hz. */ bufferSize /= 2; - hMasa->hMasaLfeSynth->lfeSynthRingBuffer2 = (float *) count_malloc( bufferSize * sizeof( float ) ); + hMasa->hMasaLfeSynth->lfeSynthRingBuffer2 = (float *) malloc( bufferSize * sizeof( float ) ); set_zero( hMasa->hMasaLfeSynth->lfeSynthRingBuffer2, bufferSize ); hMasa->hMasaLfeSynth->ringBufferLoPointer2 = 0; hMasa->hMasaLfeSynth->lowpassSum2 = 0.0f; @@ -845,13 +845,13 @@ static void init_lfe_synth_data( /* Delay buffer for matching the delay of the lowpass filter */ bufferSize /= 2; /* The delay of the moving average lowpass filter is bufferSize / 2 */ - hMasa->hMasaLfeSynth->delayBuffer_syncLp = (float *) count_malloc( bufferSize * sizeof( float ) ); + hMasa->hMasaLfeSynth->delayBuffer_syncLp = (float *) malloc( bufferSize * sizeof( float ) ); set_zero( hMasa->hMasaLfeSynth->delayBuffer_syncLp, bufferSize ); hMasa->hMasaLfeSynth->delayBuffer_syncLp_size = bufferSize; /* Delay buffer for syncing with DirAC rendering */ bufferSize = NS2SA( output_Fs, IVAS_FB_DEC_DELAY_NS ) - hMasa->hMasaLfeSynth->ringBufferSize / 2 - hMasa->hMasaLfeSynth->ringBufferSize2 / 2; - hMasa->hMasaLfeSynth->delayBuffer_syncDirAC = (float *) count_malloc( bufferSize * sizeof( float ) ); + hMasa->hMasaLfeSynth->delayBuffer_syncDirAC = (float *) malloc( bufferSize * sizeof( float ) ); set_zero( hMasa->hMasaLfeSynth->delayBuffer_syncDirAC, bufferSize ); hMasa->hMasaLfeSynth->delayBuffer_syncDirAC_size = bufferSize; @@ -870,7 +870,7 @@ static void init_lfe_synth_data( /* Delay buffer for syncing with DirAC rendering */ bufferSize = NS2SA( output_Fs, IVAS_FB_DEC_DELAY_NS ); - hMasa->hMasaLfeSynth->delayBuffer_syncDirAC = (float *) count_malloc( bufferSize * sizeof( float ) ); + hMasa->hMasaLfeSynth->delayBuffer_syncDirAC = (float *) malloc( bufferSize * sizeof( float ) ); set_zero( hMasa->hMasaLfeSynth->delayBuffer_syncDirAC, bufferSize ); hMasa->hMasaLfeSynth->delayBuffer_syncDirAC_size = bufferSize; @@ -1031,7 +1031,7 @@ ivas_error ivas_masa_dec_reconfigure( last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; /*-----------------------------------------------------------------* - * Allocate and initalize SCE/CPE and other handles + * Allocate and initialize SCE/CPE and other handles *-----------------------------------------------------------------*/ bit_stream = st_ivas->hSCE[0] != NULL ? st_ivas->hSCE[0]->hCoreCoder[0]->bit_stream : st_ivas->hCPE[0]->hCoreCoder[0]->bit_stream; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 7557fed2140808452f4d97adc501d981ab833770..41ba3e53c7983fe7f5dae8b5d5d77abcdcd75730 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -32,6 +32,7 @@ #include #include "options.h" +#include #include "cnst.h" #include "rom_enc.h" #include "rom_com.h" @@ -47,7 +48,7 @@ #ifdef DEBUG_PLOT #include "deb_out.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "rom_dec.h" /*-----------------------------------------------------------------------* @@ -56,13 +57,24 @@ #define PARAM_MC_LOCAL_SZ_LFE_MAP 5 +/*-----------------------------------------------------------------------* + * Local typedefs + *-----------------------------------------------------------------------*/ + +typedef struct parameter_band_mapping_struct +{ + int16_t n_source_bands[20]; + int16_t source_band_idx[20][4]; + float source_band_factor[20][4]; + +} PARAM_MC_PARAMETER_BAND_MAPPING; + /*-----------------------------------------------------------------------* * Local function prototypes *-----------------------------------------------------------------------*/ static void ivas_param_mc_dec_init( PARAM_MC_DEC_HANDLE hParamMC, const int16_t nchan_in, const int16_t nchan_out ); - static void param_mc_protoSignalComputation( float RealBuffer[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], float ImagBuffer[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], float *proto_frame_f, const PARAM_MC_DIFF_PROTO_INFO *diff_proto_info, const int16_t slot_index, const int16_t num_freq_bands ); static void ivas_param_mc_dec_copy_diffuse_proto( PARAM_MC_DEC_HANDLE hParamMC, float Cldfb_buffer_real[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float Cldfb_buffer_imag[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nY, const int16_t slot_idx ); @@ -87,7 +99,9 @@ static void param_mc_get_diff_proto_info( const float *proto_mtx, const uint16_t static void ivas_param_mc_mc2sba_cldfb( IVAS_OUTPUT_SETUP hTransSetup, float *hoa_encoder, const int16_t slot_idx, float Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], const int16_t nBands, const float gain_lfe ); -void ivas_param_mc_bs_decode_parameter_values( uint16_t bit_buffer[], int16_t *bit_pos, const int16_t max_bits, int16_t *BER_detect, HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC, HANDLE_PARAM_MC_PARAMETER_CODING_INFO hParamCodingInfo, const int16_t map_size_wo_lfe, const int16_t map_size, const int16_t num_lfe_bands, const int16_t band_step, const int16_t num_param_bands, float *value_buffer ); +static void ivas_param_mc_get_param_band_mapping( const int16_t n_target_bands, const int16_t *target_band_grouping, const int16_t n_source_bands, const int16_t *source_band_grouping, PARAM_MC_PARAMETER_BAND_MAPPING *parameter_band_mapping ); + +static void ivas_param_mc_bs_decode_parameter_values( uint16_t bit_buffer[], int16_t *bit_pos, const int16_t max_bits, int16_t *BER_detect, HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC, HANDLE_PARAM_MC_PARAMETER_CODING_INFO hParamCodingInfo, const int16_t map_size_wo_lfe, const int16_t map_size, const int16_t num_lfe_bands, const int16_t band_step, const int16_t num_param_bands, float *value_buffer ); /*------------------------------------------------------------------------- * ivas_param_mc_dec_open() @@ -120,12 +134,12 @@ ivas_error ivas_param_mc_dec_open( * prepare library opening *-----------------------------------------------------------------*/ - if ( ( hParamMC = (PARAM_MC_DEC_HANDLE) count_malloc( sizeof( PARAM_MC_DEC_DATA ) ) ) == NULL ) + if ( ( hParamMC = (PARAM_MC_DEC_HANDLE) malloc( sizeof( PARAM_MC_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC\n" ) ); } - if ( ( hParamMC->hMetadataPMC = (HANDLE_IVAS_PARAM_MC_METADATA) count_malloc( sizeof( IVAS_PARAM_MC_METADATA ) ) ) == NULL ) + if ( ( hParamMC->hMetadataPMC = (HANDLE_IVAS_PARAM_MC_METADATA) malloc( sizeof( IVAS_PARAM_MC_METADATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC metadata \n" ) ); } @@ -216,8 +230,8 @@ ivas_error ivas_param_mc_dec_open( ivas_param_mc_metadata_open( mc_ls_setup, hTransportSetup.index_lfe[0], ivas_total_brate, hParamMC->hMetadataPMC ); /* init arrays for quantized parameters */ - hParamMC->icc_q = (float *) count_malloc( hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe * sizeof( float ) ); - hParamMC->icld_q = (float *) count_malloc( hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe * sizeof( float ) ); + hParamMC->icc_q = (float *) malloc( hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe * sizeof( float ) ); + hParamMC->icld_q = (float *) malloc( hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe * sizeof( float ) ); set_f( hParamMC->icld_q, PARAM_MC_DEFAULT_MIN_ILD, hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe ); set_f( hParamMC->icc_q, 0.0f, hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe ); @@ -266,7 +280,7 @@ ivas_error ivas_param_mc_dec_open( /* convert the ls conv dmx matrix into column order matrix format (nchan_out_cldfb x nchan_out) */ if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { - hParamMC->ls_conv_dmx_matrix = (float *) count_malloc( nchan_out_transport * nchan_out_cov * sizeof( float ) ); + hParamMC->ls_conv_dmx_matrix = (float *) malloc( nchan_out_transport * nchan_out_cov * sizeof( float ) ); for ( k = 0; k < nchan_out_transport; k++ ) { mvr2r( st_ivas->hLsSetUpConversion->dmxMtx[k], &hParamMC->ls_conv_dmx_matrix[k * nchan_out_cov], nchan_out_cov ); @@ -288,7 +302,7 @@ ivas_error ivas_param_mc_dec_open( } } - hParamMC->proto_matrix_int = (float *) count_malloc( nchan_out_transport * nchan_transport * sizeof( float ) ); + hParamMC->proto_matrix_int = (float *) malloc( nchan_out_transport * nchan_transport * sizeof( float ) ); mvr2r( ivas_param_mc_conf[config_index].dmx_fac, hParamMC->proto_matrix_int, nchan_transport * nchan_out_transport ); if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) @@ -333,7 +347,7 @@ ivas_error ivas_param_mc_dec_open( else { hParamMC->num_outputs_diff = nchan_out_cov; - hParamMC->diff_proto_info = (PARAM_MC_DIFF_PROTO_INFO *) count_malloc( sizeof( PARAM_MC_DIFF_PROTO_INFO ) ); + hParamMC->diff_proto_info = (PARAM_MC_DIFF_PROTO_INFO *) malloc( sizeof( PARAM_MC_DIFF_PROTO_INFO ) ); param_mc_get_diff_proto_info( proto_matrix, nchan_transport, nchan_out_cov, hParamMC->diff_proto_info ); @@ -384,7 +398,7 @@ ivas_error ivas_param_mc_dec_open( /* Head rotation */ if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && st_ivas->hDecoderConfig->Opt_Headrotation ) { - hParamMC->hoa_encoder = (float *) count_malloc( st_ivas->hTransSetup.nchan_out_woLFE * MAX_INTERN_CHANNELS * sizeof( float ) ); + hParamMC->hoa_encoder = (float *) malloc( st_ivas->hTransSetup.nchan_out_woLFE * MAX_INTERN_CHANNELS * sizeof( float ) ); compute_hoa_encoder_mtx( st_ivas->hTransSetup.ls_azimuth, st_ivas->hTransSetup.ls_elevation, hParamMC->hoa_encoder, st_ivas->hTransSetup.nchan_out_woLFE, HEAD_ROTATION_HOA_ORDER ); } @@ -394,8 +408,8 @@ ivas_error ivas_param_mc_dec_open( if ( hParamMC->max_band_decorr > 0 ) { - hParamMC->proto_frame_f = (float *) count_malloc( 2 * hParamMC->diff_proto_info->num_protos_diff * hParamMC->num_freq_bands * sizeof( float ) ); - hParamMC->proto_frame_dec_f = (float *) count_malloc( 2 * nchan_out_cov * hParamMC->num_freq_bands * sizeof( float ) ); + hParamMC->proto_frame_f = (float *) malloc( 2 * hParamMC->diff_proto_info->num_protos_diff * hParamMC->num_freq_bands * sizeof( float ) ); + hParamMC->proto_frame_dec_f = (float *) malloc( 2 * nchan_out_cov * hParamMC->num_freq_bands * sizeof( float ) ); } else { @@ -410,6 +424,488 @@ ivas_error ivas_param_mc_dec_open( return error; } + +/*------------------------------------------------------------------------- + * ivas_param_mc_get_param_band_mapping() + * + * + *-------------------------------------------------------------------------*/ + +static void ivas_param_mc_get_param_band_mapping( + const int16_t n_target_bands, + const int16_t *target_band_grouping, + const int16_t n_source_bands, + const int16_t *source_band_grouping, + PARAM_MC_PARAMETER_BAND_MAPPING *parameter_band_mapping ) +{ + int16_t target_band_idx; + int16_t source_band_idx = 0; + int16_t source_band_cnt_total; + + for ( target_band_idx = 0; target_band_idx < n_target_bands; target_band_idx++ ) + { + int16_t upper = target_band_grouping[target_band_idx + 1]; + int16_t lower = target_band_grouping[target_band_idx]; + int16_t source_band_in_target_band_cnt = 0; + float norm_fac = 1.0f; + source_band_cnt_total = 0; + for ( source_band_idx = 0; source_band_idx < n_source_bands; source_band_idx++ ) + { + /* find lowest corresponding source band*/ + if ( source_band_grouping[source_band_idx] <= lower && source_band_grouping[source_band_idx + 1] >= lower ) + { + do + { + int16_t source_bands_in_target_band = min( source_band_grouping[source_band_idx + 1], upper ) - max( source_band_grouping[source_band_idx], lower ); + if ( source_bands_in_target_band ) + { + source_band_cnt_total += source_bands_in_target_band; + parameter_band_mapping->source_band_idx[target_band_idx][source_band_in_target_band_cnt] = source_band_idx; + parameter_band_mapping->source_band_factor[target_band_idx][source_band_in_target_band_cnt++] = (float) source_bands_in_target_band; + } + source_band_idx++; + } while ( source_band_grouping[source_band_idx] <= upper && source_band_idx < n_source_bands ); + break; + } + } + norm_fac = 1.0f / ( (float) source_band_cnt_total ); + for ( source_band_idx = 0; source_band_idx < source_band_in_target_band_cnt; source_band_idx++ ) + { + + parameter_band_mapping->source_band_factor[target_band_idx][source_band_idx] *= norm_fac; + } + parameter_band_mapping->n_source_bands[target_band_idx] = source_band_in_target_band_cnt; + } + + return; +} + + +/*------------------------------------------------------------------------- + * ivas_param_mc_dec_reconfig() + * + * Reconfiguration of ParamMC decoder + *-------------------------------------------------------------------------*/ + +ivas_error ivas_param_mc_dec_reconfig( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +) +{ + int16_t k, nchan_transport; + PARAM_MC_DEC_HANDLE hParamMC; + IVAS_OUTPUT_SETUP hTransportSetup; + int16_t nchan_out_transport; + int16_t nchan_out_cov; + float proto_matrix[MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS]; + float proto_mtx_norm; + int16_t max_param_band_residual; + uint16_t config_index; + MC_LS_SETUP mc_ls_setup; + float frequency_axis[CLDFB_NO_CHANNELS_MAX]; + int32_t output_Fs, ivas_total_brate; + ivas_error error; + int16_t nchan_transport_old; + int16_t num_param_bands_old; + PARAM_MC_PARAMETER_BAND_MAPPING parameter_band_mapping; + int16_t band_grouping_old[20 + 1]; + + error = IVAS_ERR_OK; + hParamMC = st_ivas->hParamMC; + + /* save important config information from the previous state */ + nchan_transport_old = st_ivas->nchan_transport; + num_param_bands_old = hParamMC->hMetadataPMC->num_parameter_bands; + + /*-----------------------------------------------------------------* + * prepare library opening + *-----------------------------------------------------------------*/ + + output_Fs = st_ivas->hDecoderConfig->output_Fs; + ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + + hTransportSetup = st_ivas->hTransSetup; + mc_ls_setup = ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ); + nchan_out_transport = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; + hParamMC->hoa_encoder = NULL; + + if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + nchan_out_cov = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; + } + else + { + nchan_out_cov = nchan_out_transport; + } + + st_ivas->nchan_transport = ivas_param_mc_getNumTransportChannels( ivas_total_brate, mc_ls_setup ); + config_index = ivas_param_mc_get_configuration_index( mc_ls_setup, ivas_total_brate ); + nchan_transport = st_ivas->nchan_transport; + + switch ( nchan_transport ) + { + case 4: + case 3: + st_ivas->nCPE = 2; + st_ivas->nSCE = 0; + st_ivas->element_mode_init = IVAS_CPE_MDCT; + break; + case 2: + st_ivas->nCPE = 1; + st_ivas->nSCE = 0; + st_ivas->element_mode_init = IVAS_CPE_MDCT; + + break; +#ifdef DEBUGGING + default: + assert( 0 && "Number of TC not supported for Parametric MC!" ); +#endif + } + + /*-----------------------------------------------------------------* + * set input parameters + *-----------------------------------------------------------------*/ + + hParamMC->slot_size = (int16_t) ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX; + hParamMC->subframe_nbslots = CLDFB_NO_COL_MAX / PARAM_MC_NSUBFRAMES_DEC; + + hParamMC->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); + hParamMC->max_band_energy_compensation = hParamMC->num_freq_bands; + + /* deallocate the full icc map, gets newly allocated in the metadata open function */ + + for ( k = 0; k < 2; k++ ) + { +#ifdef DEBUGGING + assert( hParamMC->hMetadataPMC->icc_map_full[k] != NULL ); +#endif + if ( hParamMC->hMetadataPMC->icc_map_full[k] != NULL ) + { + free( hParamMC->hMetadataPMC->icc_map_full[k] ); + hParamMC->hMetadataPMC->icc_map_full[k] = NULL; + } + } + + mvs2s( hParamMC->band_grouping, band_grouping_old, hParamMC->hMetadataPMC->num_parameter_bands + 1 ); + + ivas_param_mc_metadata_open( mc_ls_setup, hTransportSetup.index_lfe[0], ivas_total_brate, hParamMC->hMetadataPMC ); + + /* Band Grouping */ + if ( hParamMC->hMetadataPMC->num_parameter_bands == 20 ) + { + mvs2s( param_mc_band_grouping_20, hParamMC->band_grouping, 20 + 1 ); + } + else if ( hParamMC->hMetadataPMC->num_parameter_bands == 14 ) + { + mvs2s( param_mc_band_grouping_14, hParamMC->band_grouping, 14 + 1 ); + } + else if ( hParamMC->hMetadataPMC->num_parameter_bands == 10 ) + { + mvs2s( param_mc_band_grouping_10, hParamMC->band_grouping, 10 + 1 ); + } + else + { + assert( 0 && "nbands must be 20, 14, or 10!" ); + } + + ivas_param_mc_get_param_band_mapping( hParamMC->hMetadataPMC->num_parameter_bands, hParamMC->band_grouping, num_param_bands_old, band_grouping_old, ¶meter_band_mapping ); + + if ( nchan_transport_old != nchan_transport || num_param_bands_old != hParamMC->hMetadataPMC->num_parameter_bands ) + { + float *ild_q_old = hParamMC->icld_q; + float *icc_q_old = hParamMC->icc_q; + + + /* init arrays for the quantized parameters */ + hParamMC->icc_q = (float *) malloc( hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe * sizeof( float ) ); + hParamMC->icld_q = (float *) malloc( hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe * sizeof( float ) ); + set_f( hParamMC->icld_q, PARAM_MC_DEFAULT_MIN_ILD, hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe ); + set_f( hParamMC->icc_q, 0.0f, hParamMC->hMetadataPMC->num_parameter_bands * hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe ); + + /* map old to new parameter banding, only for same number of TCs, needs some more thought for a changing number of TCs */ + if ( num_param_bands_old != hParamMC->hMetadataPMC->num_parameter_bands && nchan_transport_old == nchan_transport ) + { + int16_t new_param_band_idx, param_idx, source_param_idx; + int16_t num_param_lfe; + float *p_icc_new = hParamMC->icc_q; + float *p_ild_new = hParamMC->icld_q; + + /* ICC */ + num_param_lfe = hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe; + for ( new_param_band_idx = 0; new_param_band_idx < hParamMC->hMetadataPMC->num_parameter_bands; new_param_band_idx++ ) + { + for ( param_idx = 0; param_idx < num_param_lfe; param_idx++ ) + { + *p_icc_new = 0.0f; + for ( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) + { + *p_icc_new += icc_q_old[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx] * num_param_lfe + param_idx] * parameter_band_mapping.source_band_factor[new_param_band_idx][source_param_idx]; + } + p_icc_new++; + } + } + + /* ILD */ + num_param_lfe = hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe; + for ( new_param_band_idx = 0; new_param_band_idx < hParamMC->hMetadataPMC->num_parameter_bands; new_param_band_idx++ ) + { + for ( param_idx = 0; param_idx < num_param_lfe; param_idx++ ) + { + *p_ild_new = 0.0f; + for ( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) + { + *p_ild_new += powf( 10.0f, ild_q_old[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx] * num_param_lfe + param_idx] / 10.0f ) * parameter_band_mapping.source_band_factor[new_param_band_idx][source_param_idx]; + } + *p_ild_new = 10.0f * log10f( *p_ild_new ); + p_ild_new++; + } + } + } + free( ild_q_old ); + free( icc_q_old ); + } + + param_mc_set_num_synth_bands( output_Fs, hParamMC ); + + + /* set max parameter band for abs cov */ + k = 0; + while ( hParamMC->band_grouping[k] <= PARAM_MC_MAX_BAND_ABS_COV_DEC ) + { + hParamMC->max_param_band_abs_cov = ( k++ ); + } + + + /*-----------------------------------------------------------------* + * open sub-modules + *-----------------------------------------------------------------*/ + + /* prototype signal computation */ + + if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + if ( nchan_transport_old != nchan_transport ) + { + if ( st_ivas->hLsSetUpConversion != NULL ) + { + ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); + } + + if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* convert the ls conv dmx matrix into column order matrix format (nchan_out_cldfb x nchan_out) */ + free( hParamMC->ls_conv_dmx_matrix ); + hParamMC->ls_conv_dmx_matrix = (float *) malloc( nchan_out_transport * nchan_out_cov * sizeof( float ) ); + for ( k = 0; k < nchan_out_transport; k++ ) + { + mvr2r( st_ivas->hLsSetUpConversion->dmxMtx[k], &hParamMC->ls_conv_dmx_matrix[k * nchan_out_cov], nchan_out_cov ); + } + } + /* convert ParamMC parameter bands to SFB */ + + st_ivas->hLsSetUpConversion->sfbCnt = hParamMC->num_param_bands_synth; + for ( k = 0; k <= hParamMC->num_param_bands_synth; k++ ) + { + st_ivas->hLsSetUpConversion->sfbOffset[k] = PARAM_MC_BAND_TO_MDCT_BAND_RATIO * hParamMC->band_grouping[k]; + } + for ( ; k < MAX_SFB + 2; k++ ) + { + st_ivas->hLsSetUpConversion->sfbOffset[k] = 0; + } + } + + if ( nchan_transport_old != nchan_transport ) + { + free( hParamMC->proto_matrix_int ); + hParamMC->proto_matrix_int = (float *) malloc( nchan_out_transport * nchan_transport * sizeof( float ) ); + mvr2r( ivas_param_mc_conf[config_index].dmx_fac, hParamMC->proto_matrix_int, nchan_transport * nchan_out_transport ); + } + if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + matrix_product( hParamMC->ls_conv_dmx_matrix, nchan_out_cov, nchan_out_transport, 0, + ivas_param_mc_conf[config_index].dmx_fac, nchan_out_transport, nchan_transport, 0, + proto_matrix ); + + if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + proto_mtx_norm = 1.f; + for ( k = 0; k < nchan_transport * nchan_out_cov; k++ ) + { + proto_mtx_norm = max( fabsf( proto_mtx_norm ), fabsf( proto_matrix[k] ) ); + } + proto_mtx_norm = 1.f / proto_mtx_norm; + + /* transfer flattened proto_matrix to 2D in hLsSetupConversion->dmxMtx */ + for ( k = 0; k < nchan_transport; k++ ) + { + for ( int16_t i = 0; i < nchan_out_cov; i++ ) + { + st_ivas->hLsSetUpConversion->dmxMtx[k][i] = proto_matrix[k * nchan_out_cov + i] * proto_mtx_norm; + } + } + } + } + else + { + mvr2r( ivas_param_mc_conf[config_index].dmx_fac, proto_matrix, nchan_out_transport * nchan_transport ); + } + + if ( nchan_transport_old != nchan_transport && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) + { + int16_t i; + int16_t len; + + /* close decorrelator */ + ivas_dirac_dec_decorr_close( &hParamMC->h_freq_domain_decorr_ap_params, &hParamMC->h_freq_domain_decorr_ap_state ); + + /* deallocate diffuse prototype info */ + if ( hParamMC->diff_proto_info ) + { + for ( i = 0; i < hParamMC->diff_proto_info->num_protos_diff; i++ ) + { + free( hParamMC->diff_proto_info->source_chan_idx[i] ); + hParamMC->diff_proto_info->source_chan_idx[i] = NULL; + + free( hParamMC->diff_proto_info->proto_fac[i] ); + hParamMC->diff_proto_info->proto_fac[i] = NULL; + } + + free( hParamMC->diff_proto_info->source_chan_idx ); + hParamMC->diff_proto_info->source_chan_idx = NULL; + + free( hParamMC->diff_proto_info->proto_fac ); + hParamMC->diff_proto_info->proto_fac = NULL; + + free( hParamMC->diff_proto_info->proto_index_diff ); + hParamMC->diff_proto_info->proto_index_diff = NULL; + + free( hParamMC->diff_proto_info->num_source_chan_diff ); + hParamMC->diff_proto_info->num_source_chan_diff = NULL; + + free( hParamMC->diff_proto_info ); + hParamMC->diff_proto_info = NULL; + } + + hParamMC->num_outputs_diff = nchan_out_cov; + hParamMC->diff_proto_info = (PARAM_MC_DIFF_PROTO_INFO *) malloc( sizeof( PARAM_MC_DIFF_PROTO_INFO ) ); + + param_mc_get_diff_proto_info( proto_matrix, nchan_transport, nchan_out_cov, hParamMC->diff_proto_info ); + + /* decorrelation */ + hParamMC->h_freq_domain_decorr_ap_params = NULL; + hParamMC->h_freq_domain_decorr_ap_state = NULL; + + ivas_dirac_dec_get_frequency_axis( frequency_axis, output_Fs, hParamMC->num_freq_bands ); + + ivas_dirac_dec_decorr_open( &( hParamMC->h_freq_domain_decorr_ap_params ), + &( hParamMC->h_freq_domain_decorr_ap_state ), + hParamMC->num_freq_bands, + hParamMC->num_outputs_diff, + hParamMC->diff_proto_info->num_protos_diff, + DIRAC_SYNTHESIS_COV_MC_LS, + frequency_axis, + nchan_transport, + output_Fs ); + + hParamMC->h_output_synthesis_params.use_onset_filters = 0; + hParamMC->max_band_decorr = hParamMC->h_freq_domain_decorr_ap_params->max_band_decorr; + /* init decorrelation */ + if ( hParamMC->max_band_decorr > 0 ) + { + + len = hParamMC->diff_proto_info->num_protos_diff * hParamMC->h_freq_domain_decorr_ap_params->h_onset_detection_power_params.max_band_decorr; + + /* init onsetDetectionPower */ + set_zero( hParamMC->h_freq_domain_decorr_ap_state->h_onset_detection_power_state.onset_detector_1, len ); + set_zero( hParamMC->h_freq_domain_decorr_ap_state->h_onset_detection_power_state.onset_detector_2, len ); + } + } + hParamMC->max_band_energy_compensation = hParamMC->band_grouping[hParamMC->hMetadataPMC->nbands_coded]; + max_param_band_residual = 0; + + for ( k = hParamMC->hMetadataPMC->num_parameter_bands; k >= 0; k-- ) + { + if ( hParamMC->band_grouping[k] <= hParamMC->max_band_decorr ) + { + max_param_band_residual = k; + assert( hParamMC->band_grouping[k] == hParamMC->max_band_decorr ); + break; + } + } + + if ( nchan_transport_old != nchan_transport || num_param_bands_old != hParamMC->hMetadataPMC->num_parameter_bands ) + { + DIRAC_OUTPUT_SYNTHESIS_COV_STATE cov_state_old = hParamMC->h_output_synthesis_cov_state; + DIRAC_OUTPUT_SYNTHESIS_PARAMS params_old = hParamMC->h_output_synthesis_params; + float tmp_buf[MAX_CICP_CHANNELS * MAX_CICP_CHANNELS]; + + set_zero( tmp_buf, MAX_CICP_CHANNELS * MAX_CICP_CHANNELS ); + /* output synthesis */ + ivas_dirac_dec_output_synthesis_cov_open( &( hParamMC->h_output_synthesis_params ), + &( hParamMC->h_output_synthesis_cov_state ), + hParamMC->max_band_decorr, + PARAM_MC_MAX_NSLOTS, + hParamMC->hMetadataPMC->num_parameter_bands, + max_param_band_residual, + nchan_transport, + nchan_out_cov, + proto_matrix ); + + ivas_dirac_dec_output_synthesis_cov_init( &( hParamMC->h_output_synthesis_cov_state ), nchan_transport, nchan_out_cov, hParamMC->hMetadataPMC->num_parameter_bands, max_param_band_residual ); + + + /* map old to new parameter banding, only for same number of TCs, needs some more thought for changing number of TCs */ + if ( num_param_bands_old != hParamMC->hMetadataPMC->num_parameter_bands && nchan_transport_old == nchan_transport ) + { + int16_t new_param_band_idx, source_param_idx; + + + for ( new_param_band_idx = 0; new_param_band_idx < hParamMC->hMetadataPMC->num_parameter_bands; new_param_band_idx++ ) + { + for ( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) + { + /* Cx */ + v_multc( cov_state_old.cx_old[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx]], parameter_band_mapping.source_band_factor[new_param_band_idx][source_param_idx], tmp_buf, nchan_transport_old * nchan_transport_old ); + v_add( tmp_buf, hParamMC->h_output_synthesis_cov_state.cx_old[new_param_band_idx], hParamMC->h_output_synthesis_cov_state.cx_old[new_param_band_idx], nchan_transport_old * nchan_transport_old ); + /* Cy */ + v_multc( cov_state_old.cy_old[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx]], parameter_band_mapping.source_band_factor[new_param_band_idx][source_param_idx], tmp_buf, nchan_out_cov * nchan_out_cov ); + v_add( tmp_buf, hParamMC->h_output_synthesis_cov_state.cy_old[new_param_band_idx], hParamMC->h_output_synthesis_cov_state.cy_old[new_param_band_idx], nchan_out_cov * nchan_out_cov ); + /* mixing matrix*/ + v_multc( cov_state_old.mixing_matrix_old[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx]], parameter_band_mapping.source_band_factor[new_param_band_idx][source_param_idx], tmp_buf, nchan_transport_old * nchan_out_cov ); + v_add( tmp_buf, hParamMC->h_output_synthesis_cov_state.mixing_matrix_old[new_param_band_idx], hParamMC->h_output_synthesis_cov_state.mixing_matrix_old[new_param_band_idx], nchan_transport_old * nchan_out_cov ); + } + } + for ( new_param_band_idx = 0; new_param_band_idx < max_param_band_residual; new_param_band_idx++ ) + { + for ( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) + { + /* residual mixing matrix*/ + v_multc( cov_state_old.mixing_matrix_res_old[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx]], parameter_band_mapping.source_band_factor[new_param_band_idx][source_param_idx], tmp_buf, nchan_out_cov * nchan_out_cov ); + v_add( tmp_buf, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_old[new_param_band_idx], hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_old[new_param_band_idx], nchan_out_cov * nchan_out_cov ); + } + } + } + + ivas_dirac_dec_output_synthesis_cov_close( ¶ms_old, &cov_state_old ); + } + + + /*-----------------------------------------------------------------* + * memory allocation + *-----------------------------------------------------------------*/ + + if ( hParamMC->max_band_decorr > 0 && nchan_transport_old != nchan_transport ) + { + free( hParamMC->proto_frame_f ); + hParamMC->proto_frame_f = (float *) malloc( 2 * hParamMC->diff_proto_info->num_protos_diff * hParamMC->num_freq_bands * sizeof( float ) ); + set_zero( hParamMC->proto_frame_f, 2 * hParamMC->diff_proto_info->num_protos_diff * hParamMC->num_freq_bands ); + } + + return error; +} + /*------------------------------------------------------------------------- * param_mc_get_num_cldfb_syntheses() * @@ -487,19 +983,19 @@ void ivas_param_mc_dec_close( { ivas_param_mc_metadata_close( hParamMC->hMetadataPMC ); - count_free( hParamMC->hMetadataPMC ); + free( hParamMC->hMetadataPMC ); hParamMC->hMetadataPMC = NULL; } if ( hParamMC->icc_q != NULL ) { - count_free( hParamMC->icc_q ); + free( hParamMC->icc_q ); hParamMC->icc_q = NULL; } if ( hParamMC->icld_q != NULL ) { - count_free( hParamMC->icld_q ); + free( hParamMC->icld_q ); hParamMC->icld_q = NULL; } @@ -508,26 +1004,26 @@ void ivas_param_mc_dec_close( { for ( i = 0; i < hParamMC->diff_proto_info->num_protos_diff; i++ ) { - count_free( hParamMC->diff_proto_info->source_chan_idx[i] ); + free( hParamMC->diff_proto_info->source_chan_idx[i] ); hParamMC->diff_proto_info->source_chan_idx[i] = NULL; - count_free( hParamMC->diff_proto_info->proto_fac[i] ); + free( hParamMC->diff_proto_info->proto_fac[i] ); hParamMC->diff_proto_info->proto_fac[i] = NULL; } - count_free( hParamMC->diff_proto_info->source_chan_idx ); + free( hParamMC->diff_proto_info->source_chan_idx ); hParamMC->diff_proto_info->source_chan_idx = NULL; - count_free( hParamMC->diff_proto_info->proto_fac ); + free( hParamMC->diff_proto_info->proto_fac ); hParamMC->diff_proto_info->proto_fac = NULL; - count_free( hParamMC->diff_proto_info->proto_index_diff ); + free( hParamMC->diff_proto_info->proto_index_diff ); hParamMC->diff_proto_info->proto_index_diff = NULL; - count_free( hParamMC->diff_proto_info->num_source_chan_diff ); + free( hParamMC->diff_proto_info->num_source_chan_diff ); hParamMC->diff_proto_info->num_source_chan_diff = NULL; - count_free( hParamMC->diff_proto_info ); + free( hParamMC->diff_proto_info ); hParamMC->diff_proto_info = NULL; } @@ -536,35 +1032,35 @@ void ivas_param_mc_dec_close( /* free prototype signal buffers */ if ( hParamMC->proto_frame_f != NULL ) { - count_free( hParamMC->proto_frame_f ); + free( hParamMC->proto_frame_f ); hParamMC->proto_frame_f = NULL; } if ( hParamMC->proto_frame_dec_f != NULL ) { - count_free( hParamMC->proto_frame_dec_f ); + free( hParamMC->proto_frame_dec_f ); hParamMC->proto_frame_dec_f = NULL; } if ( hParamMC->ls_conv_dmx_matrix != NULL ) { - count_free( hParamMC->ls_conv_dmx_matrix ); + free( hParamMC->ls_conv_dmx_matrix ); hParamMC->ls_conv_dmx_matrix = NULL; } if ( hParamMC->proto_matrix_int != NULL ) { - count_free( hParamMC->proto_matrix_int ); + free( hParamMC->proto_matrix_int ); hParamMC->proto_matrix_int = NULL; } if ( hParamMC->hoa_encoder != NULL ) { - count_free( hParamMC->hoa_encoder ); + free( hParamMC->hoa_encoder ); hParamMC->hoa_encoder = NULL; } - count_free( hParamMC ); + free( hParamMC ); hParamMC = NULL; return; @@ -599,7 +1095,7 @@ void ivas_param_mc_dec_read_BS( int16_t ild_map_size_wo_lfe; HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC; - wmops_sub_start( "param_mc_read_bs" ); + push_wmops( "param_mc_read_bs" ); /* Inits */ *nb_bits = 0; @@ -771,7 +1267,7 @@ void ivas_param_mc_dec_read_BS( hMetadataPMC->attackIndex = 0; } - wmops_sub_end(); + pop_wmops(); return; } @@ -817,7 +1313,7 @@ void ivas_param_mc_dec( hParamMC = st_ivas->hParamMC; assert( hParamMC ); - wmops_sub_start( "param_mc_dec" ); + push_wmops( "param_mc_dec" ); set_s( channel_active, 0, MAX_CICP_CHANNELS ); nchan_transport = st_ivas->nchan_transport; @@ -1101,7 +1597,7 @@ void ivas_param_mc_dec( /* update */ hParamMC->hMetadataPMC->last_coded_bwidth = hParamMC->hMetadataPMC->coded_bwidth; param_mc_update_mixing_matrices( hParamMC, mixing_matrix, mixing_matrix_res, nchan_transport, nchan_out_cov ); - wmops_sub_end(); + pop_wmops(); return; } @@ -2090,9 +2586,9 @@ static void param_mc_get_diff_proto_info( /* Initializations */ max_num_src_chan = 0; set_zero( proto_fac, MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS ); - p_diff_proto_info->proto_index_diff = (int16_t *) count_malloc( nchan_out_cov * sizeof( int16_t ) ); + p_diff_proto_info->proto_index_diff = (int16_t *) malloc( nchan_out_cov * sizeof( int16_t ) ); set_s( p_diff_proto_info->proto_index_diff, 0, nchan_out_cov ); - p_diff_proto_info->num_source_chan_diff = (int16_t *) count_malloc( nchan_out_cov * sizeof( int16_t ) ); + p_diff_proto_info->num_source_chan_diff = (int16_t *) malloc( nchan_out_cov * sizeof( int16_t ) ); set_s( p_diff_proto_info->num_source_chan_diff, 0, nchan_out_cov ); /* we have at least one prototype, copy the first one */ @@ -2153,15 +2649,15 @@ static void param_mc_get_diff_proto_info( /* set up the prototype info struct */ - p_diff_proto_info->source_chan_idx = (int16_t **) count_malloc( p_diff_proto_info->num_protos_diff * sizeof( int16_t * ) ); - p_diff_proto_info->proto_fac = (float **) count_malloc( p_diff_proto_info->num_protos_diff * sizeof( float * ) ); + p_diff_proto_info->source_chan_idx = (int16_t **) malloc( p_diff_proto_info->num_protos_diff * sizeof( int16_t * ) ); + p_diff_proto_info->proto_fac = (float **) malloc( p_diff_proto_info->num_protos_diff * sizeof( float * ) ); for ( cur_diff_proto = 0; cur_diff_proto < p_diff_proto_info->num_protos_diff; cur_diff_proto++ ) { float *proto_fac_ptr; - p_diff_proto_info->source_chan_idx[cur_diff_proto] = (int16_t *) count_malloc( max_num_src_chan * sizeof( int16_t ) ); - p_diff_proto_info->proto_fac[cur_diff_proto] = (float *) count_malloc( max_num_src_chan * sizeof( float ) ); + p_diff_proto_info->source_chan_idx[cur_diff_proto] = (int16_t *) malloc( max_num_src_chan * sizeof( int16_t ) ); + p_diff_proto_info->proto_fac[cur_diff_proto] = (float *) malloc( max_num_src_chan * sizeof( float ) ); proto_fac_ptr = proto_fac + cur_diff_proto; for ( cur_transport_ch = 0; cur_transport_ch < nchan_transport; cur_transport_ch++ ) @@ -2263,7 +2759,7 @@ static void ivas_param_mc_mc2sba_cldfb( * reads and decodes a sequence of Parametric MC parameters from the bitstream *-------------------------------------------------------------------------*/ -void ivas_param_mc_bs_decode_parameter_values( +static void ivas_param_mc_bs_decode_parameter_values( uint16_t bit_buffer[], /* i : bitstream buffer */ int16_t *bit_pos, /* i/o: current bitstream buffer position */ const int16_t max_bits, /* i : maximum available bits in the buffer */ diff --git a/lib_dec/ivas_mcmasa_dec.c b/lib_dec/ivas_mcmasa_dec.c new file mode 100644 index 0000000000000000000000000000000000000000..3af2ea2c3b3558ccd3e7b2f32b6dc4a41c5b300a --- /dev/null +++ b/lib_dec/ivas_mcmasa_dec.c @@ -0,0 +1,156 @@ +/****************************************************************************************************** + +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +contributors to this repository. All Rights Reserved. + +This software is protected by copyright law and by international treaties. +The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +contributors to this repository retain full ownership rights in their respective contributions in +the software. This notice grants no license of any kind, including but not limited to patent +license, nor is any license granted by implication, estoppel or otherwise. + +Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +contributions. + +This software is provided "AS IS", without any express or implied warranties. The software is in the +development stage. It is intended exclusively for experts who have experience with such software and +solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +and fitness for a particular purpose are hereby disclaimed and excluded. + +Any dispute, controversy or claim arising under or in relation to providing this software shall be +submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +the United Nations Convention on Contracts on the International Sales of Goods. + +*******************************************************************************************************/ + +#include "options.h" +#include +#include "ivas_cnst.h" +#include "ivas_prot.h" +#include "prot.h" +#ifdef DEBUGGING +#include "debug.h" +#endif +#include "wmc_auto.h" + + +/*------------------------------------------------------------------------- + * ivas_mcmasa_dec_reconfig() + * + * Reconfigure McMASA decoder + *------------------------------------------------------------------------*/ + +ivas_error ivas_mcmasa_dec_reconfig( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +) +{ + ivas_error error; + int32_t ivas_total_brate; + + ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + + /* close the old MASA instance */ + if ( st_ivas->hMasa != NULL ) + { + ivas_masa_dec_close( st_ivas->hMasa ); + } + + /* get new McMASA settings */ + ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( st_ivas->element_mode_init ), ivas_total_brate ); + ivas_mcmasa_set_separate_channel_mode( &( st_ivas->hOutSetup.separateChannelEnabled ), &( st_ivas->hOutSetup.separateChannelIndex ), ivas_total_brate ); + /* transport channel settings may affect renderer */ + ivas_renderer_select( st_ivas ); + /* renderer change may affect internal config */ + ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); + ivas_mcmasa_set_separate_channel_mode( &( st_ivas->hIntSetup.separateChannelEnabled ), &( st_ivas->hIntSetup.separateChannelIndex ), ivas_total_brate ); + + if ( ( error = ivas_masa_dec_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + st_ivas->sba_dirac_stereo_flag = ( st_ivas->nchan_transport == 1 && st_ivas->hOutSetup.output_config == AUDIO_CONFIG_STEREO ); + + if ( st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_MCMASA_MONO_STEREO ) + { + if ( st_ivas->hDirAC == NULL ) + { + if ( ( error = ivas_dirac_dec_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_RECONFIGURE ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + + /*-------------------------------------------------------------------* + * Close binaural rendering handles and re-allocate proper ones + * in McMASA renderer_type can be only RENDERER_BINAURAL_PARAMETRIC, RENDERER_BINAURAL_PARAMETRIC_ROOM + *--------------------------------------------------------------------*/ + + if ( st_ivas->hBinRenderer != NULL ) + { + ivas_binRenderer_close( &st_ivas->hBinRenderer ); + } + + if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) + { + /* open parametric binaural renderer */ +#ifdef HRTF_BINARY_FILE + if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + { + if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } + } + else if ( st_ivas->hDiracDecBin != NULL ) + { + if ( st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM ) + { + /* close unneeded renderer */ + ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); + } + else + { + /* the decision for useTdDecorr is done in ivas_dirac_dec_init_binaural_data(). here, comparing against the same condition. */ + if ( st_ivas->hDiracDecBin->useTdDecorr != ( st_ivas->hDecoderConfig->ivas_total_brate < IVAS_48k && st_ivas->nchan_transport == 1 ) ) + { + /* st_ivas->hDiracDecBin->useTdDecorr will change => close and re-open. */ + ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } + } + } + } + + return error; +} diff --git a/lib_dec/ivas_mct_core_dec.c b/lib_dec/ivas_mct_core_dec.c index d7459efabdafac850c23e4340e28224bc430febb..7e11b23c9a91da28664cd07c259ea63e26b6e429 100644 --- a/lib_dec/ivas_mct_core_dec.c +++ b/lib_dec/ivas_mct_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "cnst.h" #include "basop_proto_func.h" #include "stat_com.h" @@ -183,7 +183,7 @@ void ivas_mct_core_dec( float nrg[MCT_MAX_CHANNELS]; #endif - wmops_sub_start( "mct_decoding" ); + push_wmops( "mct_decoding" ); /*--------------------------------------------------------------------------------* * Initializations @@ -269,7 +269,7 @@ void ivas_mct_core_dec( apply_MCT_dec( hMCT, sts, x ); } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 71b018a34943fffb497211a8404d39f33492a701..f05d5d1ec5845ad87f2186057d9544512589a7c6 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,11 +43,19 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif + +/*-----------------------------------------------------------------------* + * Local function prototypes + *-----------------------------------------------------------------------*/ + +static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas ); + + /*--------------------------------------------------------------------------* * ivas_mct_dec() * @@ -79,7 +87,7 @@ ivas_error ivas_mct_dec( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_mct_dec" ); + push_wmops( "ivas_mct_dec" ); nCPE = st_ivas->nCPE; hMCT = st_ivas->hMCT; @@ -295,7 +303,7 @@ ivas_error ivas_mct_dec( } #endif - wmops_sub_end(); + pop_wmops(); return error; } @@ -320,7 +328,7 @@ ivas_error create_mct_dec( * Allocate MCT handle *-----------------------------------------------------------------*/ - if ( ( hMCT = (MCT_DEC_HANDLE) count_malloc( sizeof( MCT_DEC_DATA ) ) ) == NULL ) + if ( ( hMCT = (MCT_DEC_HANDLE) malloc( sizeof( MCT_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CPE\n" ) ); } @@ -375,7 +383,7 @@ ivas_error create_mct_dec( for ( n = 0; n < max_blocks; n++ ) { - if ( ( hMCT->hBlockData[n] = (MCT_DEC_BLOCK_DATA_HANDLE) count_malloc( sizeof( MCT_DEC_BLOCK_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n] = (MCT_DEC_BLOCK_DATA_HANDLE) malloc( sizeof( MCT_DEC_BLOCK_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MCT block data structure\n" ) ); } @@ -388,7 +396,7 @@ ivas_error create_mct_dec( * MDCT stereo initialization *-----------------------------------------------------------------*/ - if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -490,6 +498,7 @@ ivas_error mct_dec_reconfigure( * run into a number of problems */ for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { + st_ivas->hCPE[cpe_id]->element_brate = cp_bitrate; for ( n = 0; n < CPE_CHANNELS; n++ ) { st = st_ivas->hCPE[cpe_id]->hCoreCoder[n]; @@ -517,7 +526,7 @@ ivas_error mct_dec_reconfigure( { if ( hMCT->hBlockData[n] == NULL ) { - if ( ( hMCT->hBlockData[n] = (MCT_DEC_BLOCK_DATA_HANDLE) count_malloc( sizeof( MCT_BLOCK_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n] = (MCT_DEC_BLOCK_DATA_HANDLE) malloc( sizeof( MCT_BLOCK_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MCT block data structure\n" ) ); } @@ -527,7 +536,7 @@ ivas_error mct_dec_reconfigure( hMCT->hBlockData[n]->ch2 = 0; /* MDCT stereo initialization */ - if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -544,11 +553,11 @@ ivas_error mct_dec_reconfigure( { if ( hMCT->hBlockData[n]->hStereoMdct != NULL ) { - count_free( hMCT->hBlockData[n]->hStereoMdct ); + free( hMCT->hBlockData[n]->hStereoMdct ); hMCT->hBlockData[n]->hStereoMdct = NULL; } - count_free( hMCT->hBlockData[n] ); + free( hMCT->hBlockData[n] ); hMCT->hBlockData[n] = NULL; } } @@ -597,16 +606,16 @@ void ivas_mct_dec_close( { if ( ( *hMCT )->hBlockData[n]->hStereoMdct != NULL ) { - count_free( ( *hMCT )->hBlockData[n]->hStereoMdct ); + free( ( *hMCT )->hBlockData[n]->hStereoMdct ); ( *hMCT )->hBlockData[n]->hStereoMdct = NULL; } - count_free( ( *hMCT )->hBlockData[n] ); + free( ( *hMCT )->hBlockData[n] ); ( *hMCT )->hBlockData[n] = NULL; } } - count_free( *hMCT ); + free( *hMCT ); *hMCT = NULL; return; @@ -654,8 +663,7 @@ ivas_error ivas_mc_dec_config( { if ( st_ivas->hDecoderConfig->last_ivas_total_brate != st_ivas->hDecoderConfig->ivas_total_brate || st_ivas->transport_config != signaled_config || last_mc_mode != st_ivas->mc_mode ) { - /*ivas_mc_dec_reconfigure( st_ivas );*/ - return IVAS_ERROR( IVAS_ERR_RECONFIGURE_NOT_SUPPORTED, "Error: MC format switching not supported yet!!!\n\n" ); + ivas_mc_dec_reconfig( st_ivas ); } } @@ -664,3 +672,543 @@ ivas_error ivas_mc_dec_config( return error; } + + +/*------------------------------------------------------------------------- + * ivas_mc_dec_reconfig() + * + * reconfigure the MC format decoder + *-------------------------------------------------------------------------*/ + +static ivas_error ivas_mc_dec_reconfig( + Decoder_Struct *st_ivas /* i/o: IVAS encoder structure */ +) +{ + int16_t nchan_transport_old, nSCE_old, nCPE_old, sba_dirac_stereo_flag_old, nchan_hp20_old; + int16_t numCldfbAnalyses_old, numCldfbSyntheses_old; + int32_t new_brate_SCE, new_brate_CPE, ivas_total_brate; + RENDERER_TYPE renderer_type_old; + ivas_error error; + MC_MODE mc_mode, last_mc_mode; + + error = IVAS_ERR_OK; + + ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + nchan_transport_old = st_ivas->nchan_transport; + + last_mc_mode = ivas_mc_mode_select( ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ), st_ivas->hDecoderConfig->last_ivas_total_brate ); /* NB: this assumes that LS config remains the same between frames */ + + /* we have to temporally set the current mc_mode back to the previous one to make sure the following call to + ivas_init_dec_get_num_cldfb_instances() returns the correct counts */ + mc_mode = st_ivas->mc_mode; + st_ivas->mc_mode = last_mc_mode; + ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); + st_ivas->mc_mode = mc_mode; + + nSCE_old = st_ivas->nSCE; + nCPE_old = st_ivas->nCPE; + sba_dirac_stereo_flag_old = st_ivas->sba_dirac_stereo_flag; + + /* special handling needed for the hp20 buffers for McMASA */ + if ( last_mc_mode == MC_MODE_MCMASA ) + { + nchan_hp20_old = getNumChanSynthesis( st_ivas ); + } + else + { + nchan_hp20_old = nchan_transport_old; + } + st_ivas->sba_dirac_stereo_flag = 0; /* needs to be after getNumChanSynthesis() */ + + /* renderer might have changed, reselect */ + renderer_type_old = st_ivas->renderer_type; + ivas_renderer_select( st_ivas ); + + /* side effect of the renderer selection can be a changed internal config */ + ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); + + if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + st_ivas->nchan_transport = ivas_mc_ls_setup_get_num_channels( ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ) ); + st_ivas->nSCE = 0; + st_ivas->nCPE = st_ivas->nchan_transport / 2; + + if ( last_mc_mode != MC_MODE_MCT ) + { + /*De-allocate handles for other MC modes*/ + if ( st_ivas->hParamMC != NULL ) + { + ivas_param_mc_dec_close( &st_ivas->hParamMC ); + st_ivas->hParamMC = NULL; + /* remove ls conversion if it was allocated by ParamMC */ + ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); + } + + /* De-allocate McMasa-related handles */ + if ( st_ivas->hMasa != NULL ) + { + ivas_masa_dec_close( st_ivas->hMasa ); + st_ivas->hMasa = NULL; + } + + if ( st_ivas->hQMetaData != NULL ) + { + ivas_qmetadata_close( &st_ivas->hQMetaData ); + st_ivas->hQMetaData = NULL; + } + + /* init LS conversion if the renderer type asks for it */ + if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hLsSetUpConversion == NULL ) + { + if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + } + else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + { + if ( last_mc_mode != MC_MODE_PARAMMC ) + { + /* remove old ls conversion for MCT if open, gets reopened correctly within ivas_param_mc_dec_open when needed */ + if ( renderer_type_old == RENDERER_MC && st_ivas->hLsSetUpConversion != NULL ) + { + ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); + } + + if ( ( error = ivas_param_mc_dec_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + ivas_param_mc_dec_reconfig( st_ivas ); + } + + /* De-allocate McMasa-related handles */ + if ( st_ivas->hMasa != NULL ) + { + ivas_masa_dec_close( st_ivas->hMasa ); + st_ivas->hMasa = NULL; + } + + if ( st_ivas->hQMetaData != NULL ) + { + ivas_qmetadata_close( &st_ivas->hQMetaData ); + st_ivas->hQMetaData = NULL; + } + + if ( last_mc_mode == MC_MODE_MCT ) + { + if ( st_ivas->hMCT != NULL && st_ivas->nchan_transport <= CPE_CHANNELS ) + { + ivas_mct_dec_close( &st_ivas->hMCT ); + st_ivas->hMCT = NULL; + } + + /* LFE handle */ + if ( st_ivas->hLFE != NULL ) + { + ivas_lfe_dec_close( st_ivas->hLFE ); + st_ivas->hLFE = NULL; + } + } + } + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( st_ivas->element_mode_init ), ivas_total_brate ); + + if ( last_mc_mode != MC_MODE_MCMASA ) + { + if ( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_mcmasa_dec_reconfig( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* ls conversion */ + if ( st_ivas->hLsSetUpConversion != NULL ) + { + ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); + } + + if ( st_ivas->hParamMC != NULL ) + { + ivas_param_mc_dec_close( &st_ivas->hParamMC ); + st_ivas->hParamMC = NULL; + } + + if ( last_mc_mode == MC_MODE_MCT ) + { + if ( st_ivas->hMCT != NULL ) + { + ivas_mct_dec_close( &st_ivas->hMCT ); + st_ivas->hMCT = NULL; + } + + /* LFE handle */ + if ( st_ivas->hLFE != NULL ) + { + ivas_lfe_dec_close( st_ivas->hLFE ); + st_ivas->hLFE = NULL; + } + } + } + + if ( st_ivas->mc_mode != MC_MODE_MCMASA ) + { + if ( st_ivas->nchan_transport == 1 ) + { + st_ivas->element_mode_init = IVAS_SCE; + } + else + { + st_ivas->element_mode_init = IVAS_CPE_MDCT; + } + } + + /*-----------------------------------------------------------------* + * Reconfigure core coder + *-----------------------------------------------------------------*/ + + /* special case: MCT->ParamMC with more than 2 TC, CPE 1 stays, but has the wrong mct_chan_mode in channel 1 + and might have IGF static memory not allocated and the bit stream index list not set, + set correct mct_chan_mode and init missing static mem (IGF, HQ) and some config (TNS) do it here since it is _very_ MC specific */ + if ( last_mc_mode == MC_MODE_MCT && st_ivas->mc_mode == MC_MODE_PARAMMC && st_ivas->nchan_transport > CPE_CHANNELS ) + { + Decoder_State *st = st_ivas->hCPE[1]->hCoreCoder[1]; + + if ( st_ivas->nchan_transport == 3 ) + { + st->mct_chan_mode = MCT_CHAN_MODE_IGNORE; + } + else + { + st->mct_chan_mode = MCT_CHAN_MODE_REGULAR; + } + + if ( st->hIGFDec == NULL ) + { + if ( ( st->hIGFDec = (IGF_DEC_INSTANCE_HANDLE) malloc( sizeof( IGFDEC_INSTANCE ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for IGF\n" ) ); + } + + st->igf = 0; + init_igf_dec( st->hIGFDec ); + } + + if ( st->hHQ_core == NULL ) + { + + if ( ( st->hHQ_core = (HQ_DEC_HANDLE) malloc( sizeof( HQ_DEC_DATA ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HQ core\n" ) ); + } + + /* HQ core initialization */ + HQ_core_dec_init( st->hHQ_core ); + } + + /* check if we have a doubly used hTxcCfg, if so, allocate a distint one for the old MCT LFE channel */ + if ( st->hTcxCfg == st_ivas->hCPE[1]->hCoreCoder[0]->hTcxCfg ) + { + if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) malloc( sizeof( TCX_config ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxCfg\n" ) ); + } + } + + st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( ivas_total_brate, st->igf, st->element_mode, st->mct_chan_mode ); + } + else if ( last_mc_mode == MC_MODE_PARAMMC && st_ivas->mc_mode == MC_MODE_MCT && nchan_transport_old > 2 ) + { +#ifdef DEBUGGING + assert( st_ivas->hCPE[1] != NULL ); +#endif + Decoder_State *st = st_ivas->hCPE[1]->hCoreCoder[1]; + st->mct_chan_mode = MCT_CHAN_MODE_LFE; + st->hTcxCfg->fIsTNSAllowed = 0; + } + + if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + uint8_t separateChannelEnabled; + int16_t separateChannelIndex; + ivas_mcmasa_set_separate_channel_mode( &separateChannelEnabled, &separateChannelIndex, ivas_total_brate ); + ivas_mcmasa_split_brate( separateChannelEnabled, ivas_total_brate, st_ivas->nSCE, st_ivas->nCPE, &new_brate_SCE, &new_brate_CPE ); + } + else if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + new_brate_SCE = 0; + new_brate_CPE = ( ivas_total_brate / ( st_ivas->nchan_transport - 1 ) ) * CPE_CHANNELS; + } + else + { + new_brate_SCE = 0; /* ivas_total_brate / st_ivas->nchan_transport;*/ + new_brate_CPE = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; + } + + if ( ( error = ivas_corecoder_dec_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, sba_dirac_stereo_flag_old, new_brate_SCE, new_brate_CPE ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( last_mc_mode == MC_MODE_MCT && st_ivas->mc_mode == MC_MODE_PARAMMC && st_ivas->nchan_transport > CPE_CHANNELS ) + { + Decoder_State *st = st_ivas->hCPE[1]->hCoreCoder[1]; + + /* TCX-LTP */ + if ( st->hTcxLtpDec == NULL ) + { + if ( ( st->hTcxLtpDec = (TCX_LTP_DEC_HANDLE) malloc( sizeof( TCX_LTP_DEC_DATA ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TCX-LTP handle\n" ) ); + } + tcxltp_dec_init( st->hTcxLtpDec, 0, st->last_codec_mode, st->element_mode, st->pit_max, st->sr_core ); + } + } + + /* re-configure hp20 memories */ + ivas_hp20_dec_reconfig( st_ivas, nchan_hp20_old ); + + /*-----------------------------------------------------------------* + * CLDFB instances + *-----------------------------------------------------------------*/ + + ivas_cldfb_dec_reconfig( st_ivas, nchan_transport_old, numCldfbAnalyses_old, numCldfbSyntheses_old ); + + + /*-----------------------------------------------------------------* + * Allocate the LFE handle that is coded seperately after the allocation of the core coders + *-----------------------------------------------------------------*/ + + if ( st_ivas->mc_mode == MC_MODE_MCT && st_ivas->hLFE == NULL ) + { + int32_t binauralization_delay_ns = st_ivas->binaural_latency_ns; + if ( st_ivas->hBinRenderer != NULL ) + { + if ( st_ivas->hBinRenderer->render_lfe ) + { + /* Account for filterbank delay */ + binauralization_delay_ns += IVAS_FB_DEC_DELAY_NS; + } + else + { + binauralization_delay_ns = 0; + } + } + + if ( ( error = ivas_create_lfe_dec( &st_ivas->hLFE, st_ivas->hDecoderConfig->output_Fs, binauralization_delay_ns ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* reuse core-coder buffers for LFE decoder */ + st_ivas->hLFE->prevsynth_buf = &st_ivas->hCPE[1]->hCoreCoder[1]->old_synth_sw[0]; + st_ivas->hLFE->prior_out_buffer = &st_ivas->hCPE[1]->hCoreCoder[1]->previoussynth[0]; + + set_zero( st_ivas->hLFE->prevsynth_buf, LFE_PLC_BUFLEN ); + set_zero( st_ivas->hLFE->prior_out_buffer, L_FRAME48k ); + } + + /*-----------------------------------------------------------------* + * Reconfigure renderers + *-----------------------------------------------------------------*/ + + if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + if ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_MCMASA_MONO_STEREO ) ) + { + if ( st_ivas->hDirAC != NULL ) + { + /* reconfigure existing DirAC dec */ + if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_RECONFIGURE ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + /* init a new DirAC dec */ + if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_OPEN ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + else if ( ( st_ivas->renderer_type == RENDERER_DISABLE ) && ( st_ivas->hDirAC != NULL ) ) + { + ivas_dirac_dec_close( st_ivas->hDirAC ); + st_ivas->hDirAC = NULL; + } + } + + if ( renderer_type_old != st_ivas->renderer_type ) + { + AUDIO_CONFIG output_config; + + output_config = st_ivas->hDecoderConfig->output_config; + + /* binaural renderers*/ + if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM ) + { + /* remove unneeded binaural renderers */ + if ( st_ivas->hBinRenderer != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) ) + { + ivas_binRenderer_close( &st_ivas->hBinRenderer ); + } + +#ifdef FIX_197_CREND_INTERFACE + if ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hCrend != NULL ) && ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD || st_ivas->hRenderConfig->roomAcoustics.late_reverb_on == 0 ) ) ) +#else + if ( st_ivas->hCrend != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD || st_ivas->hRenderConfig->roomAcoustics.late_reverb_on == 0 ) ) ) +#endif + { +#ifdef FIX_197_CREND_INTERFACE + ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); +#else + ivas_crend_close( st_ivas ); +#endif + } + + if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) ) + { + ivas_td_binaural_close( &st_ivas->hBinRendererTd ); + } + + if ( st_ivas->hDiracDecBin != NULL ) + { + if ( st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + { + ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); + } + else + { + /* useTdDecorr may change => close and re-open */ + ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); + +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } + } + } + + /* init necessary new renderers */ + if ( st_ivas->hBinRenderer == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) ) + { + if ( ( error = ivas_binRenderer_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) + { +#ifdef HRTF_BINARY_FILE + if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + { + if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } + } + else if ( st_ivas->hBinRendererTd == NULL && st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { + if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + +#ifdef FIX_197_CREND_INTERFACE + if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) + { + if ( ( st_ivas->hCrendWrapper = (CREND_WRAPPER_HANDLE) malloc( sizeof( CREND_WRAPPER ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend Wrapper\n" ); + } + if ( ( st_ivas->hCrendWrapper->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend\n" ); + } + } +#else + if ( st_ivas->hCrend == NULL && st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) + { + if ( ( st_ivas->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend\n" ); + } + } +#endif + } +#ifdef FIX_197_CREND_INTERFACE + else if ( st_ivas->hCrendWrapper == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) + { + if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), + st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, +#ifdef HRTF_BINARY_FILE + st_ivas->hSetOfHRTF, +#endif + st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; + } +#else + else if ( st_ivas->hCrend == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) + { + if ( ivas_crend_open( st_ivas ) != IVAS_ERR_OK ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "ivas_crend_open failed" ); + } + } +#endif + } + /* mono/stereo */ + else if ( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) + { + /* nothing should happen here... */ + } + /* LS */ + else if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 || output_config == AUDIO_CONFIG_7_1_4 || output_config == AUDIO_CONFIG_LS_CUSTOM ) + { +#ifdef DEBUGGING + assert( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_MC_PARAMMC || st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_DISABLE ); +#endif + } +#ifdef DEBUGGING + else if ( output_config == AUDIO_CONFIG_FOA || output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_HOA3 ) + { + /* FOA/HOA output */ + /* Nothing to do, renderer is always RENDERER_SBA_LINEAR_ENC */ + assert( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC && renderer_type_old == RENDERER_SBA_LINEAR_ENC ); + } +#endif + } + + return error; +} diff --git a/lib_dec/ivas_mct_dec_mct.c b/lib_dec/ivas_mct_dec_mct.c index 6b8f9b74fab3437b960e24438bb59b975fcf5e9c..7177785984335e307778d3166401851188d13e81 100644 --- a/lib_dec/ivas_mct_dec_mct.c +++ b/lib_dec/ivas_mct_dec_mct.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #include "ivas_cnst.h" #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include #include "stat_enc.h" diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index 3e186d61b8be5920ca39a0942985c8ccc2379ac5..8f62a186420d5748e423eff5e7f7d5fa1040b5ea 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "cnst.h" #include "basop_proto_func.h" #include "stat_com.h" @@ -404,7 +404,7 @@ void ivas_mdct_dec_side_bits_frame_channel( param_lpc[0][0] = get_next_indice( st0, 1 ) << 1; /* read low br mode flag (if it is possible to be non-zero) */ - if ( sts[0]->element_brate == IVAS_48k && !( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) ) + if ( sts[0]->element_brate == IVAS_48k && !( ( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) || sts[1]->mct_chan_mode == MCT_CHAN_MODE_LFE ) ) { sns_low_br_mode = get_next_indice( st0, 1 ); } @@ -474,7 +474,7 @@ void ivas_mdct_core_invQ( float concealment_noise[CPE_CHANNELS][L_FRAME48k]; TONALMDCTCONC_NOISE_GEN_MODE noise_gen_mode_bfi; - wmops_sub_start( "mdct_core_invQ" ); + push_wmops( "mdct_core_invQ" ); sts = hCPE->hCoreCoder; bfi = sts[0]->bfi; @@ -734,7 +734,7 @@ void ivas_mdct_core_invQ( } } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_mono_dmx_renderer.c b/lib_dec/ivas_mono_dmx_renderer.c index 20b677075eaa648d58268a44ace8c7859e665410..4932e71d51c32adca641a7d6c79c0f194d330f4f 100644 --- a/lib_dec/ivas_mono_dmx_renderer.c +++ b/lib_dec/ivas_mono_dmx_renderer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_cnst.h" #include "ivas_rom_com.h" #include "ivas_rom_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -63,7 +63,7 @@ ivas_error ivas_mono_dmx_renderer_open( { MONO_DOWNMIX_RENDERER_HANDLE hDownmix; - if ( ( hDownmix = (MONO_DOWNMIX_RENDERER_HANDLE) count_malloc( sizeof( MONO_DOWNMIX_RENDERER_STRUCT ) ) ) == NULL ) + if ( ( hDownmix = (MONO_DOWNMIX_RENDERER_HANDLE) malloc( sizeof( MONO_DOWNMIX_RENDERER_STRUCT ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for downmixing\n" ) ); } diff --git a/lib_dec/ivas_out_setup_conversion.c b/lib_dec/ivas_out_setup_conversion.c index 55f53bae73a1df246d0879d1dcc52053858f425f..0e553b4759945bb243e8f96029a497d11c286221 100644 --- a/lib_dec/ivas_out_setup_conversion.c +++ b/lib_dec/ivas_out_setup_conversion.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_rom_com.h" #include "ivas_rom_dec.h" @@ -317,7 +317,7 @@ ivas_error ivas_ls_setup_conversion_open( output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); /* Allocate memory to the handle */ - if ( ( hLsSetUpConversion = (LSSETUP_CONVERSION_HANDLE) count_malloc( sizeof( LSSETUP_CONVERSION_STRUCT ) ) ) == NULL ) + if ( ( hLsSetUpConversion = (LSSETUP_CONVERSION_HANDLE) malloc( sizeof( LSSETUP_CONVERSION_STRUCT ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LS configuration Conversion Handle \n" ) ); } @@ -331,8 +331,8 @@ ivas_error ivas_ls_setup_conversion_open( hLsSetUpConversion->sfbCnt = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); for ( chIdx = 0; chIdx < outChannels; chIdx++ ) { - hLsSetUpConversion->targetEnergyPrev[chIdx] = (float *) count_malloc( ( hLsSetUpConversion->sfbCnt ) * sizeof( float ) ); - hLsSetUpConversion->dmxEnergyPrev[chIdx] = (float *) count_malloc( ( hLsSetUpConversion->sfbCnt ) * sizeof( float ) ); + hLsSetUpConversion->targetEnergyPrev[chIdx] = (float *) malloc( ( hLsSetUpConversion->sfbCnt ) * sizeof( float ) ); + hLsSetUpConversion->dmxEnergyPrev[chIdx] = (float *) malloc( ( hLsSetUpConversion->sfbCnt ) * sizeof( float ) ); set_f( hLsSetUpConversion->targetEnergyPrev[chIdx], 0.0f, hLsSetUpConversion->sfbCnt ); set_f( hLsSetUpConversion->dmxEnergyPrev[chIdx], 0.0f, hLsSetUpConversion->sfbCnt ); } @@ -347,8 +347,8 @@ ivas_error ivas_ls_setup_conversion_open( inChannels = st_ivas->nchan_transport; /*Initialization of MDCT bands with TCX20 resolution */ ivas_lssetupconversion_mdct_init_bands( output_frame, TCX_20_CORE, &hLsSetUpConversion->sfbOffset[0], &hLsSetUpConversion->sfbCnt ); - hLsSetUpConversion->targetEnergyPrev[0] = (float *) count_malloc( ( MAX_SFB + 2 ) * sizeof( float ) ); - hLsSetUpConversion->dmxEnergyPrev[0] = (float *) count_malloc( ( MAX_SFB + 2 ) * sizeof( float ) ); + hLsSetUpConversion->targetEnergyPrev[0] = (float *) malloc( ( MAX_SFB + 2 ) * sizeof( float ) ); + hLsSetUpConversion->dmxEnergyPrev[0] = (float *) malloc( ( MAX_SFB + 2 ) * sizeof( float ) ); for ( chIdx = 1; chIdx < MAX_CICP_CHANNELS; chIdx++ ) { hLsSetUpConversion->targetEnergyPrev[chIdx] = NULL; @@ -363,7 +363,7 @@ ivas_error ivas_ls_setup_conversion_open( for ( chIdx = 0; chIdx < inChannels; chIdx++ ) { /* Allocate memory depending on the number of output channels */ - if ( ( hLsSetUpConversion->dmxMtx[chIdx] = (float *) count_malloc( outChannels * sizeof( float ) ) ) == NULL ) + if ( ( hLsSetUpConversion->dmxMtx[chIdx] = (float *) malloc( outChannels * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for temp dmx matrix \n" ) ); } @@ -418,24 +418,24 @@ void ivas_ls_setup_conversion_close( { if ( ( *hLsSetUpConversion )->dmxMtx[idx] != NULL ) { - count_free( ( *hLsSetUpConversion )->dmxMtx[idx] ); + free( ( *hLsSetUpConversion )->dmxMtx[idx] ); ( *hLsSetUpConversion )->dmxMtx[idx] = NULL; } if ( ( *hLsSetUpConversion )->targetEnergyPrev[idx] != NULL ) { - count_free( ( *hLsSetUpConversion )->targetEnergyPrev[idx] ); + free( ( *hLsSetUpConversion )->targetEnergyPrev[idx] ); ( *hLsSetUpConversion )->targetEnergyPrev[idx] = NULL; } if ( ( *hLsSetUpConversion )->dmxEnergyPrev[idx] != NULL ) { - count_free( ( *hLsSetUpConversion )->dmxEnergyPrev[idx] ); + free( ( *hLsSetUpConversion )->dmxEnergyPrev[idx] ); ( *hLsSetUpConversion )->dmxEnergyPrev[idx] = NULL; } } - count_free( *hLsSetUpConversion ); + free( *hLsSetUpConversion ); *hLsSetUpConversion = NULL; return; @@ -460,7 +460,7 @@ void ivas_ls_setup_conversion( float dmxCoeff, tmpVal; float output_tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; - wmops_sub_start( "LS_Renderer" ); + push_wmops( "LS_Renderer" ); hLsSetUpConversion = st_ivas->hLsSetUpConversion; @@ -499,7 +499,7 @@ void ivas_ls_setup_conversion( mvr2r( output_tmp[chOutIdx], output[chOutIdx], output_frame ); } - wmops_sub_end(); + pop_wmops(); return; } @@ -535,7 +535,7 @@ void ivas_ls_setup_conversion_process_mdct( LSSETUP_CONVERSION_HANDLE hLsSetUpConversion; CPE_DEC_HANDLE hCPE[MCT_MAX_BLOCKS]; - wmops_sub_start( "LS_Renderer_MDCT" ); + push_wmops( "LS_Renderer_MDCT" ); /* Assign all the declared variables */ inChannels = st_ivas->nchan_transport; @@ -736,7 +736,7 @@ void ivas_ls_setup_conversion_process_mdct( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -1096,7 +1096,7 @@ void ivas_lssetupconversion_process_param_mc( float Cldfb_ImagBuffer_tmp[MAX_CICP_CHANNELS][CLDFB_NO_CHANNELS_MAX]; LSSETUP_CONVERSION_HANDLE hLsSetUpConversion; - wmops_sub_start( "LS_Renderer_Process_Param_MC" ); + push_wmops( "LS_Renderer_Process_Param_MC" ); /* inits */ inChannels = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; @@ -1199,6 +1199,6 @@ void ivas_lssetupconversion_process_param_mc( } } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_pca_dec.c b/lib_dec/ivas_pca_dec.c index ef5694d6561ca775bba2f7b1b7ef914f3e833087..4444a73cee237441b406bcbce27b60ff7adff240 100644 --- a/lib_dec/ivas_pca_dec.c +++ b/lib_dec/ivas_pca_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #endif #include #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* diff --git a/lib_dec/ivas_post_proc.c b/lib_dec/ivas_post_proc.c index e77fdaa0468ab64c37f5411321815c22a11590bc..20624c5bd06604f0b70fe2c7bfea55331b2f4e05 100644 --- a/lib_dec/ivas_post_proc.c +++ b/lib_dec/ivas_post_proc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- * ivas_post_proc() diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index 059ba752e7a019e9956ea3eee35b3e1ab20cf2e9..9c6597fdcb881530b248d221ae0934ea93b22882 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include "ivas_rom_dec.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" /*-----------------------------------------------------------------------* @@ -3114,7 +3114,7 @@ int16_t read_surround_coherence( float error_ratio_surr; int16_t idx_ER[MASA_MAXIMUM_CODING_SUBBANDS]; int16_t bits_sur_coherence, bits_GR; - int16_t j, d, k; + int16_t j, d, k, idx; uint16_t byteBuffer; uint16_t idx_sur_coh[MASA_MAXIMUM_CODING_SUBBANDS]; IVAS_QDIRECTION *q_direction; @@ -3133,7 +3133,8 @@ int16_t read_surround_coherence( if ( hQMetaData->no_directions == 2 ) { d += hQMetaData->twoDirBands[j]; - error_ratio_surr = 1.0f - q_direction[0].band_data[j].energy_ratio[0] - q_direction[1].band_data[max( d - 1, 0 )].energy_ratio[0] * hQMetaData->twoDirBands[j]; + idx = max( d - 1, 0 ); + error_ratio_surr = 1.0f - q_direction[0].band_data[j].energy_ratio[0] - q_direction[1].band_data[idx].energy_ratio[0] * hQMetaData->twoDirBands[j]; } else { diff --git a/lib_dec/ivas_qspherical_dec.c b/lib_dec/ivas_qspherical_dec.c index c37d03e5a983c0f41312c90d693311c5678fb2f0..c56217326aac1c743585e35add5386c69977c4ba 100644 --- a/lib_dec/ivas_qspherical_dec.c +++ b/lib_dec/ivas_qspherical_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include "ivas_stat_dec.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" diff --git a/lib_dec/ivas_range_uni_dec.c b/lib_dec/ivas_range_uni_dec.c index de9b3a4559adf745e081a6f4d3030ed102adbf35..db0fbddeabd1d3f83ef2df5908f290383289bac9 100644 --- a/lib_dec/ivas_range_uni_dec.c +++ b/lib_dec/ivas_range_uni_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" #endif diff --git a/lib_dec/ivas_rom_dec.c b/lib_dec/ivas_rom_dec.c index 72b26319a029c25731ee27ad88ed13c0f7b716b0..e9e107e863b7a4cc1f65ed13dbd852e3a8021208 100644 --- a/lib_dec/ivas_rom_dec.c +++ b/lib_dec/ivas_rom_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "cnst.h" #include "ivas_cnst.h" #include -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_stat_dec.h" /* clang-format off */ diff --git a/lib_dec/ivas_rom_dec.h b/lib_dec/ivas_rom_dec.h index bc69159f83073252ae9d4ccfad824a65c0f1630c..0f40b07c2afe8c503b8dbb4f2d00f1abc8f6057a 100644 --- a/lib_dec/ivas_rom_dec.h +++ b/lib_dec/ivas_rom_dec.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 60aeb2286caae03ae784507c3f9b5cb8c8e91e3c..ec6ddf039fc8f39dc40c082270d790e9fd2d7910 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include "ivas_cnst.h" #include "prot.h" #include "ivas_prot.h" -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING #include "ivas_rom_com.h" #endif #include "ivas_rom_dec.h" @@ -45,9 +45,9 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" - +#include "wmc_auto.h" +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING /*-------------------------------------------------------------------* * ivas_sba_dec_reinit() @@ -70,15 +70,14 @@ ivas_error ivas_sba_dec_reinit( error = IVAS_ERR_OK; - output_Fs = st_ivas->hDecoderConfig->output_Fs; hDecoderConfig = st_ivas->hDecoderConfig; + output_Fs = hDecoderConfig->output_Fs; output_config = hDecoderConfig->output_config; ivas_total_brate = hDecoderConfig->ivas_total_brate; hDecoderConfig->last_ivas_total_brate = ivas_total_brate; -#ifdef SBA_BR_SWITCHING_2 st_ivas->last_active_ivas_total_brate = ivas_total_brate; -#endif + /*------------------------------------------------------------------------------------------* * Closing Decoder handles before Reinitialisation *------------------------------------------------------------------------------------------*/ @@ -90,7 +89,7 @@ ivas_error ivas_sba_dec_reinit( { if ( st_ivas->ivas_format == ISM_FORMAT ) { - ivas_param_ism_dec_close( st_ivas->hDirAC, st_ivas->hDecoderConfig->output_config ); + ivas_param_ism_dec_close( st_ivas->hDirAC, hDecoderConfig->output_config ); } else { @@ -102,7 +101,7 @@ ivas_error ivas_sba_dec_reinit( /* Spar handle */ if ( st_ivas->hSpar != NULL ) { - ivas_spar_dec_close( st_ivas->hSpar, st_ivas->hDecoderConfig->output_Fs ); + ivas_spar_dec_close( st_ivas->hSpar, hDecoderConfig->output_Fs ); st_ivas->hSpar = NULL; } @@ -140,17 +139,17 @@ ivas_error ivas_sba_dec_reinit( { for ( i = 0; i < getNumChanSynthesis( st_ivas ); i++ ) { - count_free( st_ivas->mem_hp20_out[i] ); + free( st_ivas->mem_hp20_out[i] ); st_ivas->mem_hp20_out[i] = NULL; } - count_free( st_ivas->mem_hp20_out ); + free( st_ivas->mem_hp20_out ); st_ivas->mem_hp20_out = NULL; } /* HOA decoder matrix */ if ( st_ivas->hoa_dec_mtx != NULL ) { - count_free( st_ivas->hoa_dec_mtx ); + free( st_ivas->hoa_dec_mtx ); st_ivas->hoa_dec_mtx = NULL; } @@ -170,7 +169,11 @@ ivas_error ivas_sba_dec_reinit( ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); /* Crend handle */ +#ifdef FIX_197_CREND_INTERFACE + ivas_rend_closeCrend( &st_ivas->hCrendWrapper ); +#else ivas_crend_close( st_ivas ); +#endif /* LS config converter handle */ ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); @@ -178,7 +181,7 @@ ivas_error ivas_sba_dec_reinit( /* Custom LS configuration handle */ if ( st_ivas->hLsSetupCustom != NULL ) { - count_free( st_ivas->hLsSetupCustom ); + free( st_ivas->hLsSetupCustom ); st_ivas->hLsSetupCustom = NULL; } @@ -192,14 +195,14 @@ ivas_error ivas_sba_dec_reinit( /* Downmix structure */ if ( st_ivas->hMonoDmxRenderer != NULL ) { - count_free( st_ivas->hMonoDmxRenderer ); + free( st_ivas->hMonoDmxRenderer ); st_ivas->hMonoDmxRenderer = NULL; } /* Head track data handle */ if ( st_ivas->hHeadTrackData != NULL ) { - count_free( st_ivas->hHeadTrackData ); + free( st_ivas->hHeadTrackData ); st_ivas->hHeadTrackData = NULL; } @@ -210,12 +213,6 @@ ivas_error ivas_sba_dec_reinit( } else if ( st_ivas->hHrtfTD != NULL ) { - /* Case when HRTF filter is mistakenly specified but TD renderer was not active */ - if ( st_ivas->hHrtfTD->ModelParams.UseItdModel && !st_ivas->hHrtfTD->ModelParams.modelROM ) - { - BSplineModelEvalITDDealloc( &st_ivas->hHrtfTD->ModelParamsITD ); - } - BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval ); ivas_HRTF_binary_close( &st_ivas->hHrtfTD ); @@ -247,7 +244,7 @@ ivas_error ivas_sba_dec_reinit( *------------------------------------------------------------------------------------------*/ /* Allocate and initialize Custom loudspeaker layout handle */ - if ( st_ivas->hDecoderConfig->Opt_LsCustom ) + if ( hDecoderConfig->Opt_LsCustom ) { if ( ( error = ivas_ls_custom_open( &( st_ivas->hLsSetupCustom ) ) ) != IVAS_ERR_OK ) { @@ -256,7 +253,7 @@ ivas_error ivas_sba_dec_reinit( } /* Allocate and initialize Head-Tracking handle */ - if ( st_ivas->hDecoderConfig->Opt_Headrotation ) + if ( hDecoderConfig->Opt_Headrotation ) { if ( ( error = ivas_headTrack_open( &( st_ivas->hHeadTrackData ) ) ) != IVAS_ERR_OK ) { @@ -265,7 +262,7 @@ ivas_error ivas_sba_dec_reinit( } /* Allocate HRTF binary handle */ - if ( st_ivas->hDecoderConfig->Opt_HRTF_binary ) + if ( hDecoderConfig->Opt_HRTF_binary ) { if ( ( error = ivas_HRTF_binary_open( &( st_ivas->hHrtfTD ) ) ) != IVAS_ERR_OK ) { @@ -321,7 +318,7 @@ ivas_error ivas_sba_dec_reinit( st_ivas->hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); - ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), + ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); } } @@ -333,28 +330,6 @@ ivas_error ivas_sba_dec_reinit( } st_ivas->sba_dirac_stereo_flag = ( st_ivas->nchan_transport == 1 && output_config == AUDIO_CONFIG_STEREO ); - - if ( ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) && st_ivas->hOutSetup.is_loudspeaker_setup ) - { - int16_t ambisonics_order; - - ambisonics_order = ivas_sba_get_order_transport( st_ivas->nchan_transport ); // VE: is it needed ? - - if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, ambisonics_order ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) && !st_ivas->hIntSetup.is_loudspeaker_setup ) - { - IVAS_OUTPUT_SETUP out_setup; - - ivas_output_init( &out_setup, AUDIO_CONFIG_7_1_4 ); - if ( ( error = ivas_sba_get_hoa_dec_matrix( out_setup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK ) - { - return error; - } - } } if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC && st_ivas->sba_mode != SBA_MODE_SPAR ) @@ -430,7 +405,7 @@ ivas_error ivas_sba_dec_reinit( if ( n > 0 ) { - if ( ( st_ivas->mem_hp20_out = (float **) count_malloc( n * sizeof( float * ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_out = (float **) malloc( n * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -442,20 +417,20 @@ ivas_error ivas_sba_dec_reinit( for ( i = 0; i < n; i++ ) { - if ( ( st_ivas->mem_hp20_out[i] = (float *) count_malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_out[i] = (float *) malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } set_f( st_ivas->mem_hp20_out[i], 0.0f, L_HP20_MEM ); } - if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM ) + if ( hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM ) { if ( ( error = ivas_render_config_open( &( st_ivas->hRenderConfig ) ) ) != IVAS_ERR_OK ) { return error; } - if ( ivas_render_config_init_from_rom( &st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM ) != IVAS_ERR_OK ) + if ( ivas_render_config_init_from_rom( &st_ivas->hRenderConfig, hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM ) != IVAS_ERR_OK ) { return IVAS_ERR_INTERNAL_FATAL; } @@ -469,10 +444,25 @@ ivas_error ivas_sba_dec_reinit( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { +#ifdef HRTF_BINARY_FILE + if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + { + if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } +#else if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) { return error; } +#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { @@ -483,9 +473,17 @@ ivas_error ivas_sba_dec_reinit( if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) { - if ( ( st_ivas->hCrend = (CREND_HANDLE) count_malloc( sizeof( CREND_DATA ) ) ) == NULL ) +#ifdef FIX_197_CREND_INTERFACE + if ( ( st_ivas->hCrendWrapper = (CREND_WRAPPER_HANDLE) malloc( sizeof( CREND_WRAPPER ) ) ) == NULL ) { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR Crend\n" ); + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CrendWrapper\n" ); + } + if ( ( st_ivas->hCrendWrapper->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) +#else + if ( ( st_ivas->hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) +#endif + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend\n" ); } } } @@ -505,10 +503,26 @@ ivas_error ivas_sba_dec_reinit( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_openCrend( &st_ivas->hCrendWrapper, + getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), + getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), + st_ivas->hRenderConfig, + t_ivas->hDecoderConfig->Opt_Headrotation, +#ifdef HRTF_BINARY_FILE + st_ivas->hSetOfHRTF, +#endif + st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; +#else if ( ivas_crend_open( st_ivas ) != IVAS_ERR_OK ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "ivas_crend_open failed" ); } +#endif } ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses, &numCldfbSyntheses ); @@ -544,7 +558,7 @@ ivas_error ivas_sba_dec_reinit( return error; } #endif - +#endif /*-------------------------------------------------------------------* * ivas_sba_dec_decoder() * @@ -555,22 +569,19 @@ ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { -#ifdef BRATE_SWITCHING_RENDERING int16_t nchan_transport_old, nSCE_old, nCPE_old, nchan_hp20_old; -#else - int16_t i, nchan_transport_old, nSCE_old, nCPE_old, nchan_hp20_old; -#endif AUDIO_CONFIG intern_config_old; -#ifdef BRATE_SWITCHING_RENDERING int16_t numCldfbAnalyses_old, numCldfbSyntheses_old; -#else - int16_t numCldfbAnalyses_old, numCldfbAnalyses, numCldfbSyntheses, numCldfbSyntheses_old; -#endif int16_t sba_dirac_stereo_flag_old; -#ifndef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING_RECONFIG + SBA_MODE sba_mode_old; + int32_t ivas_total_brate, last_ivas_total_brate; +#else +#ifndef SBA_BR_SWITCHING int32_t ivas_total_brate, last_ivas_total_brate; #else int32_t ivas_total_brate; +#endif #endif DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; @@ -579,8 +590,15 @@ ivas_error ivas_sba_dec_reconfigure( hDecoderConfig = st_ivas->hDecoderConfig; ivas_total_brate = hDecoderConfig->ivas_total_brate; -#ifndef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING_RECONFIG + last_ivas_total_brate = st_ivas->last_active_ivas_total_brate; + sba_mode_old = ivas_sba_mode_select( last_ivas_total_brate ); + + st_ivas->sba_mode = sba_mode_old; +#else +#ifndef SBA_BR_SWITCHING last_ivas_total_brate = hDecoderConfig->last_ivas_total_brate; +#endif #endif /*-----------------------------------------------------------------* * Set SBA high-level parameters @@ -588,9 +606,6 @@ ivas_error ivas_sba_dec_reconfigure( *-----------------------------------------------------------------*/ ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); -#ifndef BRATE_SWITCHING_RENDERING - numCldfbAnalyses = 0; -#endif nchan_hp20_old = getNumChanSynthesis( st_ivas ); @@ -600,8 +615,10 @@ ivas_error ivas_sba_dec_reconfigure( sba_dirac_stereo_flag_old = st_ivas->sba_dirac_stereo_flag; st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); - -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING_RECONFIG + st_ivas->sba_mode = ivas_sba_mode_select( ivas_total_brate ); +#endif +#ifdef SBA_BR_SWITCHING /*-----------------------------------------------------------------* * Allocate, initalize, and configure SBA handles *-----------------------------------------------------------------*/ @@ -620,18 +637,84 @@ ivas_error ivas_sba_dec_reconfigure( } else { +#ifdef SBA_BR_SWITCHING_RECONFIG + int16_t i, sba_order_internal, nchan_internal; +#else int16_t sba_order_internal; +#endif DIRAC_DEC_HANDLE hDirAC = st_ivas->hDirAC; SPAR_DEC_HANDLE hSpar = st_ivas->hSpar; sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); +#ifdef SBA_BR_SWITCHING_RECONFIG + nchan_internal = ivas_sba_get_nchan_metadata( sba_order_internal ); + if ( hSpar != NULL && nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) ) + { + + // VE: dirty patch -> reconfiguration of SPAR modules should be used instead !! + IVAS_FB_CFG *fb_cfg; + int16_t active_w_mixing; + + /* MD handle */ + ivas_spar_md_dec_close( &hSpar->hMdDec ); + + if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, nchan_internal, sba_order_internal, st_ivas->sid_format ) ) != IVAS_ERR_OK ) + { + return error; + } + hSpar->hMdDec->td_decorr_flag = 1; + hSpar->hMdDec->table_idx = -1; + + /* TD decorr. */ + ivas_spar_td_decorr_dec_close( &hSpar->hTdDecorr ); + + if ( ( error = ivas_spar_td_decorr_dec_open( &hSpar->hTdDecorr, hDecoderConfig->output_Fs, nchan_internal, 1 ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* FB mixer handle */ + ivas_FB_mixer_close( &hSpar->hFbMixer, hDecoderConfig->output_Fs ); + + /* set FB config. */ + active_w_mixing = -1; + if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, nchan_internal, nchan_internal, active_w_mixing, hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + fb_cfg->pcm_offset = NS2SA( hDecoderConfig->output_Fs, DELAY_FB_1_NS + IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ); + fb_cfg->remix_order = remix_order_set[hSpar->hMdDec->spar_md_cfg.remix_unmix_order]; + + /* FB mixer handle */ + if ( ( error = ivas_FB_mixer_open( &hSpar->hFbMixer, hDecoderConfig->output_Fs, fb_cfg ) ) != IVAS_ERR_OK ) + { + return error; + } + /* mixer_mat intitialization */ + for ( i = 0; i < nchan_internal; i++ ) + { + for ( int16_t j = 0; j < nchan_internal; j++ ) + { + for ( int16_t b = 0; b < IVAS_MAX_NUM_BANDS; b++ ) + { + hSpar->hMdDec->mixer_mat[i][j][b] = 0.0f; + for ( int16_t i_ts = 0; i_ts < ( MAX_PARAM_SPATIAL_SUBFRAMES + 1 ); i_ts++ ) + { + hSpar->hMdDec->mixer_mat_prev[i_ts][i][j][b] = 0.0f; + } + } + } + } + hSpar->i_subframe = 0; + } +#endif /* PCA handle */ if ( hSpar != NULL ) { - if ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 ) + if ( hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 ) { - if ( ( hSpar->hPCA = (PCA_DEC_STATE *) count_malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) + if ( ( hSpar->hPCA = (PCA_DEC_STATE *) malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for PCA decoder" ); } @@ -640,11 +723,21 @@ ivas_error ivas_sba_dec_reconfigure( } else if ( hSpar->hPCA != NULL ) { - count_free( st_ivas->hSpar->hPCA ); + free( st_ivas->hSpar->hPCA ); hSpar->hPCA = NULL; } } +#ifdef SBA_BR_SWITCHING_RECONFIG + if ( hSpar == NULL && st_ivas->sba_mode == SBA_MODE_SPAR ) + { + if ( ( error = ivas_spar_dec_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + hSpar = st_ivas->hSpar; + } +#endif st_ivas->sba_dirac_stereo_flag = 0; sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); @@ -659,21 +752,23 @@ ivas_error ivas_sba_dec_reconfigure( hDirAC = st_ivas->hDirAC; } - +#ifndef SBA_BR_SWITCHING_RECONFIG if ( hDirAC != NULL ) +#else + if ( ( hDirAC != NULL ) && ( sba_mode_old == st_ivas->sba_mode ) ) +#endif { ivas_dirac_dec_config( st_ivas, DIRAC_RECONFIGURE_MODE ); - +#ifndef SBA_BR_SWITCHING_RECONFIG mvs2s( hDirAC->dirac_to_spar_md_bands, hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); hSpar->enc_param_start_band = hDirAC->hConfig->enc_param_start_band; +#endif } - if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_mode, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK ) { return error; } } - if ( st_ivas->nchan_transport == 1 ) { st_ivas->element_mode_init = IVAS_SCE; @@ -691,7 +786,7 @@ ivas_error ivas_sba_dec_reconfigure( *-----------------------------------------------------------------*/ /* renderer might have changed */ intern_config_old = st_ivas->intern_config; -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING RENDERER_TYPE old_renderer_type; old_renderer_type = st_ivas->renderer_type; #endif @@ -703,7 +798,6 @@ ivas_error ivas_sba_dec_reconfigure( ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); } -#ifdef BRATE_SWITCHING_RENDERING /*-------------------------------------------------------------------* * Reallocate and initialize binaural rendering handles *--------------------------------------------------------------------*/ @@ -720,27 +814,62 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING if ( st_ivas->renderer_type != old_renderer_type ) { #endif if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { - /* open parametric binaural renderer */ - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) +#ifdef HRTF_BINARY_FILE + if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + { + if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) { return error; } +#else + /* open parametric binaural renderer */ + if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; } -#ifdef SBA_BR_SWITCHING_2 +#endif + } +#ifdef SBA_BR_SWITCHING } #endif else if ( st_ivas->hDiracDecBin != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) ) { ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); } -#endif -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING_RECONFIG + if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( sba_mode_old != st_ivas->sba_mode ) ) + { + DIRAC_CONFIG_FLAG flag_config; + + flag_config = DIRAC_OPEN; + if ( st_ivas->hDirAC != NULL ) + { + flag_config = DIRAC_RECONFIGURE; + if ( sba_mode_old != st_ivas->sba_mode && st_ivas->sba_mode != SBA_MODE_SPAR ) + { + flag_config = DIRAC_RECONFIGURE_MODE; + } + } + + if ( ( error = ivas_dirac_dec_config( st_ivas, flag_config ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#else +#ifdef SBA_BR_SWITCHING if ( ( st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) { if ( st_ivas->hDirAC != NULL ) @@ -758,6 +887,9 @@ ivas_error ivas_sba_dec_reconfigure( } } } +#endif +#endif +#ifdef SBA_BR_SWITCHING else if ( st_ivas->renderer_type == RENDERER_DISABLE || ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->sba_mode != SBA_MODE_SPAR ) ) { if ( st_ivas->hDirAC != NULL ) @@ -842,7 +974,7 @@ ivas_error ivas_sba_dec_reconfigure( * Allocate, initalize, and configure SCE/CPE/MCT handles *-----------------------------------------------------------------*/ - ivas_corecoder_dec_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, sba_dirac_stereo_flag_old ); + ivas_corecoder_dec_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, sba_dirac_stereo_flag_old, st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport, ( st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ); /*-----------------------------------------------------------------* * HP20 memories @@ -854,149 +986,8 @@ ivas_error ivas_sba_dec_reconfigure( * CLDFB instances *-----------------------------------------------------------------*/ -#ifdef BRATE_SWITCHING_RENDERING ivas_cldfb_dec_reconfig( st_ivas, nchan_transport_old, numCldfbAnalyses_old, numCldfbSyntheses_old ); -#else - ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses, &numCldfbSyntheses ); - - /* special case, if there was one transport channel in the previous frame and more than one in the current frame, - remove the second CLDFB here, it was for CNA/CNG */ - if ( nchan_transport_old == 1 && numCldfbAnalyses_old == 2 && st_ivas->nchan_transport > 1 ) - { - deleteCldfb( &( st_ivas->cldfbAnaDec[1] ) ); - st_ivas->cldfbAnaDec[1] = NULL; - numCldfbAnalyses_old--; - } - -#ifdef BRATE_SWITCHING_RENDERING - /* resample CLDFB analysis instances */ - for ( i = 0; i < min( numCldfbAnalyses, numCldfbAnalyses_old ); i++ ) - { - if ( ( st_ivas->cldfbAnaDec[i]->no_channels * st_ivas->cldfbAnaDec[i]->no_col ) != ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ) ) - { - resampleCldfb( st_ivas->cldfbAnaDec[i], hDecoderConfig->output_Fs ); - } - } -#endif - /* Analysis*/ - if ( numCldfbAnalyses_old > numCldfbAnalyses ) - { - /* delete superfluous CLDFB synthesis instances */ - for ( i = numCldfbAnalyses; i < numCldfbAnalyses_old; i++ ) - { - deleteCldfb( &( st_ivas->cldfbAnaDec[i] ) ); - st_ivas->cldfbAnaDec[i] = NULL; - } - } - else if ( numCldfbAnalyses_old < numCldfbAnalyses ) - { - /* create additional CLDFB synthesis instances */ - for ( i = numCldfbAnalyses_old; i < numCldfbAnalyses; i++ ) - { - if ( ( error = openCldfb( &( st_ivas->cldfbAnaDec[i] ), CLDFB_ANALYSIS, hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK ) - { - return error; - } - } - } - - /* Synthesis */ - if ( numCldfbSyntheses_old > numCldfbSyntheses ) - { - /* delete superfluous CLDFB synthesis instances */ - for ( i = numCldfbSyntheses; i < numCldfbSyntheses_old; i++ ) - { - deleteCldfb( &( st_ivas->cldfbSynDec[i] ) ); - st_ivas->cldfbSynDec[i] = NULL; - } - } - else if ( numCldfbSyntheses_old < numCldfbSyntheses ) - { - /* create additional CLDFB synthesis instances */ - for ( i = numCldfbSyntheses_old; i < numCldfbSyntheses; i++ ) - { - if ( ( error = openCldfb( &( st_ivas->cldfbSynDec[i] ), CLDFB_SYNTHESIS, hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK ) - { - return error; - } - } - } -#endif - -#ifndef BRATE_SWITCHING_RENDERING - /*-------------------------------------------------------------------* - * Reallocate and initialize binaural rendering handles - *--------------------------------------------------------------------*/ - - if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && st_ivas->hBinRenderer == NULL ) - { - /* open fastconv binaural renderer */ - if ( ( error = ivas_binRenderer_open( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else if ( st_ivas->hBinRenderer != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) ) - { - ivas_binRenderer_close( &st_ivas->hBinRenderer ); - } - - if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) - { - /* open parametric binaural renderer */ - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else if ( st_ivas->hDiracDecBin != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) ) - { - ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); - } -#endif return error; } - - -#ifdef DEBUG_MODE_DIRAC -/*-----------------------------------------------------------------------* - * Debugging function - *-----------------------------------------------------------------------*/ - -static void debug_mode_dirac( - float output[MAX_OUTPUT_CHANNELS][L_FRAME48k], - const int16_t nchan_transport, - const int16_t output_frame ) -{ - int16_t i, n; - int16_t tmp[L_FRAME48k]; - char file_name[50] = { 0 }; - -#ifdef DEBUG_MODE_DIRAC_NOCORE - for ( n = 0; n < nchan_transport; n++ ) - { - sprintf( file_name, "./res/ivas_dirac_enc_%d.%d.pcm", n, (int16_t) ( output_frame * 0.05 ) ); - dbgread( tmp, sizeof( int16_t ), output_frame, file_name ); - for ( i = 0; i < output_frame; i++ ) - { - output[n][i] = (float) ( tmp[i] ); - } - } -#else - for ( n = 0; n < nchan_transport; n++ ) - { - for ( i = 0; i < output_frame; i++ ) - { - tmp[i] = (int16_t) ( output[n][i] + 0.5f ); - } - - sprintf( file_name, "./res/ivas_dirac_dec_%d.%d.pcm", n, (int16_t) ( output_frame * 0.05 ) ); - dbgwrite( tmp, sizeof( int16_t ), output_frame, 1, file_name ); - } -#endif - - return; -} -#endif diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c index c4cff5abbd800cb70bac496cab2285ff5f359d5e..08087ca0bea0d484f533f5956704fddd25bf9dc2 100755 --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_dec/ivas_sce_dec.c b/lib_dec/ivas_sce_dec.c index 97ee2e83369b3a6c061237d40808e638f23bb288..67e32389509914097b56a40f28758c6c1aa0ca1f 100644 --- a/lib_dec/ivas_sce_dec.c +++ b/lib_dec/ivas_sce_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* @@ -67,7 +67,7 @@ ivas_error ivas_sce_dec( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_sce_dec" ); + push_wmops( "ivas_sce_dec" ); hSCE = st_ivas->hSCE[sce_id]; st = hSCE->hCoreCoder[0]; @@ -285,7 +285,7 @@ ivas_error ivas_sce_dec( #endif - wmops_sub_end(); + pop_wmops(); return error; } @@ -314,7 +314,7 @@ ivas_error create_sce_dec( * Allocate SCE handle *-----------------------------------------------------------------*/ - if ( ( hSCE = (SCE_DEC_HANDLE) count_malloc( sizeof( SCE_DEC_DATA ) ) ) == NULL ) + if ( ( hSCE = (SCE_DEC_HANDLE) malloc( sizeof( SCE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SCE\n" ) ); } @@ -332,7 +332,7 @@ ivas_error create_sce_dec( * Core Coder, 1 instance: allocate and initialize *-----------------------------------------------------------------*/ - if ( ( st = (DEC_CORE_HANDLE) count_malloc( sizeof( Decoder_State ) ) ) == NULL ) + if ( ( st = (DEC_CORE_HANDLE) malloc( sizeof( Decoder_State ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CoreCoder structure\n" ) ); } @@ -362,7 +362,7 @@ ivas_error create_sce_dec( /* allocate and initialize "hTdCngDec" - needed in DTX */ if ( sce_id == 0 && st->hTdCngDec == NULL ) { - if ( ( st->hTdCngDec = (TD_CNG_DEC_HANDLE) count_malloc( sizeof( TD_CNG_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTdCngDec = (TD_CNG_DEC_HANDLE) malloc( sizeof( TD_CNG_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX/TD CNG\n" ) ); } @@ -376,13 +376,13 @@ ivas_error create_sce_dec( if ( st_ivas->sba_dirac_stereo_flag ) { - if ( ( hSCE->save_synth = (float *) count_malloc( sizeof( float ) * output_frame ) ) == NULL ) + if ( ( hSCE->save_synth = (float *) malloc( sizeof( float ) * output_frame ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for stereo output\n" ) ); } set_zero( hSCE->save_synth, output_frame ); - if ( ( hSCE->save_hb_synth = (float *) count_malloc( sizeof( float ) * output_frame ) ) == NULL ) + if ( ( hSCE->save_hb_synth = (float *) malloc( sizeof( float ) * output_frame ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate HB memory for stereo output\n" ) ); } @@ -419,22 +419,22 @@ void destroy_sce_dec( { destroy_core_dec( st ); - count_free( st ); + free( st ); st = NULL; } if ( hSCE->save_synth != NULL ) { - count_free( hSCE->save_synth ); + free( hSCE->save_synth ); hSCE->save_synth = NULL; } if ( hSCE->save_hb_synth != NULL ) { - count_free( hSCE->save_hb_synth ); + free( hSCE->save_hb_synth ); hSCE->save_hb_synth = NULL; } - count_free( hSCE ); + free( hSCE ); return; } diff --git a/lib_dec/ivas_sns_dec.c b/lib_dec/ivas_sns_dec.c index 444a76cf803645eb9429c11e88db19cb13205ff8..7aecb898d139a033876c4916c8ec4aebadeaab30 100644 --- a/lib_dec/ivas_sns_dec.c +++ b/lib_dec/ivas_sns_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * sns_1st_dec() diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index ceed901c1ad0ef8b65c61a7adc1e785f21f8e3b0..035afdfd0ff1a069018833b09a4b6ed4df6b89cb 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "ivas_stat_com.h" #include #include -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -75,7 +75,7 @@ ivas_error ivas_spar_dec_open( num_channels_internal = ivas_sba_get_nchan_metadata( sba_order_internal ); /* SPAR decoder handle */ - if ( ( hSpar = (SPAR_DEC_HANDLE) count_malloc( sizeof( SPAR_DEC_DATA ) ) ) == NULL ) + if ( ( hSpar = (SPAR_DEC_HANDLE) malloc( sizeof( SPAR_DEC_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR decoder" ); } @@ -89,7 +89,11 @@ ivas_error ivas_spar_dec_open( } /* MD handle */ +#ifdef SBA_BR_SWITCHING_RECONFIG + if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal, sba_order_internal, st_ivas->sid_format ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal, sba_order_internal ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -121,7 +125,7 @@ ivas_error ivas_spar_dec_open( hSpar->hPCA = NULL; if ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 ) { - if ( ( hSpar->hPCA = (PCA_DEC_STATE *) count_malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) + if ( ( hSpar->hPCA = (PCA_DEC_STATE *) malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for PCA decoder" ); } @@ -201,11 +205,11 @@ void ivas_spar_dec_close( /* PCA */ if ( hSpar->hPCA != NULL ) { - count_free( hSpar->hPCA ); + free( hSpar->hPCA ); hSpar->hPCA = NULL; } - count_free( hSpar ); + free( hSpar ); hSpar = NULL; } @@ -231,7 +235,7 @@ ivas_error ivas_spar_dec( uint16_t bstr_meta[MAX_BITS_METADATA], *bit_stream_orig; ivas_error error; - wmops_sub_start( "ivas_spar_decode" ); + push_wmops( "ivas_spar_decode" ); error = IVAS_ERR_OK; hDecoderConfig = st_ivas->hDecoderConfig; @@ -273,7 +277,7 @@ ivas_error ivas_spar_dec( *nb_bits_read += zero_pad_bits; } - wmops_sub_end(); + pop_wmops(); return error; } @@ -626,7 +630,7 @@ static void ivas_spar_dec_MD( DECODER_CONFIG_HANDLE hDecoderConfig = st_ivas->hDecoderConfig; SPAR_DEC_HANDLE hSpar = st_ivas->hSpar; - wmops_sub_start( "ivas_spar_dec_MD" ); + push_wmops( "ivas_spar_dec_MD" ); /*---------------------------------------------------------------------* * Initialization @@ -711,7 +715,7 @@ static void ivas_spar_dec_MD( set_s( hSpar->hMdDec->valid_bands, 0, IVAS_MAX_NUM_BANDS ); } - wmops_sub_end(); + pop_wmops(); return; } @@ -905,7 +909,7 @@ void ivas_spar_dec_upmixer( DECODER_CONFIG_HANDLE hDecoderConfig; SPAR_DEC_HANDLE hSpar; - wmops_sub_start( "ivas_spar_dec_upmixer" ); + push_wmops( "ivas_spar_dec_upmixer" ); hSpar = st_ivas->hSpar; hDecoderConfig = st_ivas->hDecoderConfig; @@ -1223,7 +1227,7 @@ void ivas_spar_dec_upmixer( } } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index b0df83ef149cffc7b255a2ea402f8569f72f5e39..cd14d7e132fe92447b0da9d48347f914422e06e6 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_stat_dec.h" /*#define ENABLE_DITHER */ /* IVAS_fmToDo: development switch */ @@ -101,137 +101,137 @@ static ivas_error ivas_spar_md_dec_matrix_open( { int16_t i, j; - if ( ( hMdDec->spar_md.band_coeffs = (ivas_band_coeffs_t *) count_malloc( IVAS_MAX_NUM_BANDS * MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) + if ( ( hMdDec->spar_md.band_coeffs = (ivas_band_coeffs_t *) malloc( IVAS_MAX_NUM_BANDS * MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for band_coeffs in SPAR MD" ); } - if ( ( hMdDec->mixer_mat = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdDec->mixer_mat = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdDec->mixer_mat[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdDec->mixer_mat[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->mixer_mat[i][j] = (float *) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->mixer_mat[i][j] = (float *) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } } } - if ( ( hMdDec->spar_coeffs.C_re = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.C_re = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdDec->spar_coeffs.C_re[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.C_re[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs.C_re[i][j] = (float *) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.C_re[i][j] = (float *) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } } } - if ( ( hMdDec->spar_coeffs.P_re = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.P_re = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdDec->spar_coeffs.P_re[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.P_re[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs.P_re[i][j] = (float *) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.P_re[i][j] = (float *) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } } } - if ( ( hMdDec->spar_coeffs_prev.C_re = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_prev.C_re = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdDec->spar_coeffs_prev.C_re[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_prev.C_re[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs_prev.C_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_prev.C_re[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } } } - if ( ( hMdDec->spar_coeffs_prev.P_re = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_prev.P_re = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdDec->spar_coeffs_prev.P_re[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_prev.P_re[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs_prev.P_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_prev.P_re[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } } } - if ( ( hMdDec->spar_coeffs_tar.C_re = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_tar.C_re = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdDec->spar_coeffs_tar.C_re[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_tar.C_re[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs_tar.C_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_tar.C_re[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } } } - if ( ( hMdDec->spar_coeffs_tar.P_re = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_tar.P_re = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdDec->spar_coeffs_tar.P_re[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_tar.P_re[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs_tar.P_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs_tar.P_re[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } @@ -253,6 +253,10 @@ ivas_error ivas_spar_md_dec_open( const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t num_channels, /* i : number of internal channels */ const int16_t sba_order /* i : SBA order */ +#ifdef SBA_BR_SWITCHING_RECONFIG + , + const int16_t sid_format +#endif ) { ivas_spar_md_dec_state_t *hMdDec; @@ -260,7 +264,7 @@ ivas_error ivas_spar_md_dec_open( error = IVAS_ERR_OK; - if ( ( hMdDec = (ivas_spar_md_dec_state_t *) count_malloc( sizeof( ivas_spar_md_dec_state_t ) ) ) == NULL ) + if ( ( hMdDec = (ivas_spar_md_dec_state_t *) malloc( sizeof( ivas_spar_md_dec_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD decoder" ); } @@ -271,7 +275,12 @@ ivas_error ivas_spar_md_dec_open( } hMdDec->table_idx = 0; /* just to initialize state variables*/ - +#ifdef SBA_BR_SWITCHING_RECONFIG + if ( ( hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) && ( sid_format == SID_SBA_2TC ) ) + { + hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_48k, sba_order, SPAR_CONFIG_BW, NULL, NULL ); + } +#endif if ( ( error = ivas_spar_md_dec_init( hMdDec, hDecoderConfig, num_channels, sba_order ) ) != IVAS_ERR_OK ) { return error; @@ -298,7 +307,7 @@ static void ivas_spar_md_dec_matrix_close( if ( hMdDecoder->spar_md.band_coeffs != NULL ) { - count_free( hMdDecoder->spar_md.band_coeffs ); + free( hMdDecoder->spar_md.band_coeffs ); hMdDecoder->spar_md.band_coeffs = NULL; } if ( hMdDecoder->mixer_mat != NULL ) @@ -307,11 +316,11 @@ static void ivas_spar_md_dec_matrix_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdDecoder->mixer_mat[i][j] ); + free( hMdDecoder->mixer_mat[i][j] ); } - count_free( hMdDecoder->mixer_mat[i] ); + free( hMdDecoder->mixer_mat[i] ); } - count_free( hMdDecoder->mixer_mat ); + free( hMdDecoder->mixer_mat ); } if ( hMdDecoder->spar_coeffs.C_re != NULL ) @@ -320,11 +329,11 @@ static void ivas_spar_md_dec_matrix_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdDecoder->spar_coeffs.C_re[i][j] ); + free( hMdDecoder->spar_coeffs.C_re[i][j] ); } - count_free( hMdDecoder->spar_coeffs.C_re[i] ); + free( hMdDecoder->spar_coeffs.C_re[i] ); } - count_free( hMdDecoder->spar_coeffs.C_re ); + free( hMdDecoder->spar_coeffs.C_re ); } if ( hMdDecoder->spar_coeffs.P_re != NULL ) @@ -333,11 +342,11 @@ static void ivas_spar_md_dec_matrix_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdDecoder->spar_coeffs.P_re[i][j] ); + free( hMdDecoder->spar_coeffs.P_re[i][j] ); } - count_free( hMdDecoder->spar_coeffs.P_re[i] ); + free( hMdDecoder->spar_coeffs.P_re[i] ); } - count_free( hMdDecoder->spar_coeffs.P_re ); + free( hMdDecoder->spar_coeffs.P_re ); } if ( hMdDecoder->spar_coeffs_prev.C_re != NULL ) @@ -346,11 +355,11 @@ static void ivas_spar_md_dec_matrix_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdDecoder->spar_coeffs_prev.C_re[i][j] ); + free( hMdDecoder->spar_coeffs_prev.C_re[i][j] ); } - count_free( hMdDecoder->spar_coeffs_prev.C_re[i] ); + free( hMdDecoder->spar_coeffs_prev.C_re[i] ); } - count_free( hMdDecoder->spar_coeffs_prev.C_re ); + free( hMdDecoder->spar_coeffs_prev.C_re ); } if ( hMdDecoder->spar_coeffs_prev.P_re != NULL ) @@ -359,11 +368,11 @@ static void ivas_spar_md_dec_matrix_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdDecoder->spar_coeffs_prev.P_re[i][j] ); + free( hMdDecoder->spar_coeffs_prev.P_re[i][j] ); } - count_free( hMdDecoder->spar_coeffs_prev.P_re[i] ); + free( hMdDecoder->spar_coeffs_prev.P_re[i] ); } - count_free( hMdDecoder->spar_coeffs_prev.P_re ); + free( hMdDecoder->spar_coeffs_prev.P_re ); } if ( hMdDecoder->spar_coeffs_tar.C_re != NULL ) @@ -372,11 +381,11 @@ static void ivas_spar_md_dec_matrix_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdDecoder->spar_coeffs_tar.C_re[i][j] ); + free( hMdDecoder->spar_coeffs_tar.C_re[i][j] ); } - count_free( hMdDecoder->spar_coeffs_tar.C_re[i] ); + free( hMdDecoder->spar_coeffs_tar.C_re[i] ); } - count_free( hMdDecoder->spar_coeffs_tar.C_re ); + free( hMdDecoder->spar_coeffs_tar.C_re ); } if ( hMdDecoder->spar_coeffs_tar.P_re != NULL ) @@ -385,11 +394,11 @@ static void ivas_spar_md_dec_matrix_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdDecoder->spar_coeffs_tar.P_re[i][j] ); + free( hMdDecoder->spar_coeffs_tar.P_re[i][j] ); } - count_free( hMdDecoder->spar_coeffs_tar.P_re[i] ); + free( hMdDecoder->spar_coeffs_tar.P_re[i] ); } - count_free( hMdDecoder->spar_coeffs_tar.P_re ); + free( hMdDecoder->spar_coeffs_tar.P_re ); } return; @@ -416,7 +425,7 @@ void ivas_spar_md_dec_close( if ( *hMdDec != NULL ) { - count_free( *hMdDec ); + free( *hMdDec ); *hMdDec = NULL; } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 34ef96d17f4ddac4fe127c646fe0446f19ebbf0a..08a656230078fdb136228aa20347ce8b3010e9d4 100755 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,8 +40,11 @@ #include "ivas_cnst.h" #include "ivas_stat_com.h" #include "ivas_stat_rend.h" +#ifndef FIX_197_CREND_INTERFACE #include "common_api_types.h" // VE2AT: don't we want to avoid this include in the library? I admit that the rules hefre are not 100% clear to me but introducing it just for IVAS_QUATERNION is not necessry I think +#endif +#ifndef FIX_197_CREND_INTERFACE /*----------------------------------------------------------------------------------* * Output configuration for renderer (e.g. DirAC, MASA, Binaural Renderer...) @@ -66,7 +69,7 @@ typedef struct ivas_output_setup_structure } IVAS_OUTPUT_SETUP, *IVAS_OUTPUT_SETUP_HANDLE; - +#endif /*----------------------------------------------------------------------------------* * DFT Stereo decoder structure *----------------------------------------------------------------------------------*/ @@ -145,7 +148,6 @@ typedef struct stereo_dft_dec_data_struct float itd[STEREO_DFT_DEC_DFT_NB]; -#ifdef FIX_ITD_CNG float itd_xfade_step; float itd_xfade_target; int16_t itd_xfade_counter; @@ -155,7 +157,6 @@ typedef struct stereo_dft_dec_data_struct float ipd_xfade_step; int16_t ipd_xfade_counter; float ipd_xfade_prev; -#endif /*residual prediction*/ int16_t res_pred_mode[STEREO_DFT_DEC_DFT_NB]; /* residual prediction mode: 0(off), 1(stereo filling only), 2(enhanced stereo filling) */ @@ -713,7 +714,6 @@ typedef struct ivas_dirac_dec_data_structure float *proto_frame_dec_f; DIRAC_DEC_STACK_MEM stack_mem; - MASA_STEREO_TYPE_DETECT *masa_stereo_type_detect; int16_t num_ele_spk_no_diffuse_rendering; @@ -828,6 +828,7 @@ typedef struct ivas_spar_md_dec_state_t int16_t spar_hoa_md_flag; } ivas_spar_md_dec_state_t; +#ifndef FIX_197_CREND_INTERFACE /* AGC structure */ typedef struct ivas_agc_dec_chan_state_t @@ -867,6 +868,8 @@ typedef struct ivas_td_decorr_state_t } ivas_td_decorr_state_t; +#endif + /* PCA structure */ typedef struct { @@ -998,6 +1001,7 @@ typedef struct mct_dec_data_structure } MCT_DEC_DATA, *MCT_DEC_HANDLE; +#ifndef FIX_197_CREND_INTERFACE /*----------------------------------------------------------------------------------* * EFAP structures @@ -1131,7 +1135,7 @@ typedef struct renderer_struct } ISM_RENDERER_DATA, *ISM_RENDERER_HANDLE; - +#endif /*----------------------------------------------------------------------------------* * MASA decoder structures *----------------------------------------------------------------------------------*/ @@ -1186,6 +1190,7 @@ typedef struct ivas_masa_decoder_struct } MASA_DECODER, *MASA_DECODER_HANDLE; +#ifndef FIX_197_CREND_INTERFACE /*----------------------------------------------------------------------------------* * Binaural Rendering structure @@ -1282,6 +1287,47 @@ typedef struct ivas_binaural_rendering_conv_module_struct } BINRENDERER_CONV_MODULE, *BINRENDERER_CONV_MODULE_HANDLE; /* Fastconv binaural data structure */ + +#ifdef HRTF_BINARY_FILE +typedef struct ivas_hrtfs_fastconv_struct +{ + float FASTCONV_HRIR_latency_s; + float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + + float FASTCONV_HOA3_latency_s; + float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + + float FASTCONV_BRIR_latency_s; + float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + + float fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX]; + float fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; +} HRTFS_FASTCONV, *HRTFS_FASTCONV_HANDLE; + +#endif + +#ifdef HRTF_BINARY_FILE +typedef struct ivas_hrtfs_parambin_struct +{ + float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; + float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; + + float parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX]; + float parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; + float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; +} HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE; + +#endif + typedef struct ivas_binaural_rendering_struct { /* Common variables for all modules */ @@ -1331,71 +1377,6 @@ typedef struct ivas_binaural_head_track_struct * TD ISm Object Renderer structure *----------------------------------------------------------------------------------*/ -#ifndef FIX_ITD -// VE2AT: move to ivas_rom_rend.h ? -typedef struct -{ - SFX_OpMode_t OpMode; /* Operating mode. This effect can only be TRANSIENT or OFF. */ - int16_t TurningOffEffect; /* Flag showing if the effect is being turned off. */ - int16_t TurningOnEffect; /* Flag showing if the effect is being turned on. */ - int16_t InitializeParams; /* Flag showing if parameters should be initialized the next SetParam call. */ - int16_t FirstUpdate; /* Flag showing if it SetParams has only been called once (TRUE) or more (FALSE). */ - - int32_t TotNoOfOutputSamples; /* The total number of output samples produced since last SetParam call. */ - int32_t MaxTargetTime; /* The maximum allowed target time. Also used for turning the effect on or off. */ - int32_t MaxBlockLength; /* The maximum block length */ - - int16_t TargetTime; /* Time left until the parameters should have reached the new parameters values. */ - float ItdIncrForResampling; /* Resampling factor for adjusting the ITD. */ - float *LeftOldBuffer; /* Buffer with old samples for the Resampling function */ - int16_t NoOfLeftOldBufferSamples; /* Number of samples in LeftOldBuffer */ - float Left_Tf; /* The left fractional delay. */ - float *RightOldBuffer; /* Buffer with old samples for the Resampling function */ - int16_t NoOfRightOldBufferSamples; /* Number of samples in RightOldBuffer */ - float ResampledBufferLeft[SFX_SPAT_BIN_MAX_NO_OF_OUTPUT_SAMPLES + SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; /* Buffers getting the resampled output and having the old samples used for HR-filtering */ - float ResampledBufferRight[SFX_SPAT_BIN_MAX_NO_OF_OUTPUT_SAMPLES + SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; - int16_t TransientTime; /* Transient time when turning off the effect */ - - int16_t FilterLength; /* HR-filter length */ - - /* HR-filters */ - float *LeftFilter_p; /* Pointer to left filter */ - float *LeftFilterIncr_p; /* Left filter adjustment step */ - float *RightFilter_p; /* Pointer to right filter */ - float *RightFilterIncr_p; /* Right filter adjustment step */ - -#ifdef TDREND_HRTF_TABLE_METHODS - int16_t HrFilterInterpOn; /* Indicates whether to interpolate filter from previous frame */ - float LeftFilterStored[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; /* Stored previous filter for interpolation */ - float RightFilterStored[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; /* Stored previous filter for interpolation */ -#endif - -} SFX_SpatBin_t; - -/* Container struct for setting new parameters in SFX_SpatBin */ -typedef struct -{ - int16_t TurnOn; - int16_t Reset; - /* Rendering parameters */ - float Itd; - int16_t FilterLength; - float *LeftFilter_p; - float *RightFilter_p; - float LeftVolume; - float RightVolume; - -} SFX_SpatBin_Params_t; - -typedef struct TDREND_LIST_Item_s -{ - int16_t Ind; /* Index number of item */ - void *Data_p; /* Pointer to the item data struct */ - struct TDREND_LIST_Item_s *Prev_p; /* Pointer to the prev item */ - struct TDREND_LIST_Item_s *Next_p; /* Pointer to the next item */ - -} TDREND_LIST_Item_t; -#endif typedef struct { @@ -1534,12 +1515,6 @@ typedef struct TDREND_HRFILT_FiltSet_struct float *ItdSetNominal_p; float *LeftFiltSet_p; float *RightFiltSet_p; -#ifdef TDREND_HRTF_TABLE_METHODS - int16_t *AzimStartIdx_p; - int16_t *NumAzim_p; - float *ElevFull_p; - float ElevIncr; -#endif ModelParams_t ModelParams; ModelEval_t ModelEval; ModelParamsITD_t ModelParamsITD; @@ -1588,10 +1563,6 @@ typedef struct TDREND_SRC_REND_s float SrcGainMax_p[SPAT_BIN_MAX_INPUT_CHANNELS]; float DirGain_p[SPAT_BIN_MAX_INPUT_CHANNELS]; float DistGain_p[SPAT_BIN_MAX_INPUT_CHANNELS]; -#ifndef FIX_ITD - /* HR filtering parameters */ - SFX_SpatBin_t *SfxSpatBin_p; -#endif } TDREND_SRC_REND_t; @@ -1614,19 +1585,17 @@ typedef struct float *InputFrame_p; /* Input frame pointer */ TDREND_SRC_SPATIAL_t *SrcSpatial_p; TDREND_SRC_REND_t *SrcRend_p; -#ifdef FIX_ITD int16_t itd; int16_t previtd; int16_t filterlength; float mem_itd[ITD_MEM_LEN]; - float hrf_left_prev[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; /* Todo: Should we allocate these buffers with count_malloc instead of the maximum length? */ + float hrf_left_prev[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; /* Todo: Should we allocate these buffers with malloc() instead of the maximum length? */ float hrf_right_prev[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; float azim_prev; float elev_prev; float mem_hrf_left[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; float mem_hrf_right[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; float Gain; -#endif } TDREND_SRC_t; /* Top level TD binaural renderer handle */ @@ -1827,6 +1796,37 @@ typedef struct ivas_crend_state_t } CREND_DATA, *CREND_HANDLE; +#ifdef HRTF_BINARY_FILE + +/* htrfs from binary files. */ + +typedef struct ivas_hrtfs_crend_structure +{ + HRTFS_DATA *hHRTF_hrir_combined; + HRTFS_DATA *hHRTF_hrir_hoa3; + HRTFS_DATA *hHRTF_brir_combined; + +} HRTFS_CREND, *HRTFS_CREND_HANDLE; + +typedef struct ivas_hrtfs_header_t +{ + int32_t rend_type; + int32_t input_cfg; + int32_t frequency; + uint32_t data_size; + +} ivas_hrtfs_header_t; + +typedef struct ivas_hrtfs_file_header_t +{ + char identifier[8]; + int32_t file_size; + int16_t nb_hrtf; + int32_t max_data_size; + +} ivas_hrtfs_file_header_t; + +#endif /*----------------------------------------------------------------------------------* * LFE decoder structure @@ -1897,7 +1897,7 @@ typedef struct decoder_config_structure } DECODER_CONFIG, *DECODER_CONFIG_HANDLE; - +#endif /*----------------------------------------------------------------------------------* * * Main IVAS decoder structure @@ -1971,18 +1971,27 @@ typedef struct Decoder_Struct EFAP_HANDLE hEFAPdata; /* EFAP structure */ VBAP_HANDLE hVBAPdata; /* VBAP structure */ MONO_DOWNMIX_RENDERER_HANDLE hMonoDmxRenderer; /* Mono downmix structure */ +#ifdef FIX_197_CREND_INTERFACE + CREND_WRAPPER_HANDLE hCrendWrapper; +#else CREND_HANDLE hCrend; /* Convolution mixer renderer structure */ HRTFS_HANDLE hHrtf; /* HRTFs handle */ +#endif +#ifdef HRTF_BINARY_FILE + HRTFS_CREND_HANDLE hSetOfHRTF; /* Set of HRTFs handle (CRend) */ + HRTFS_FASTCONV_HANDLE hHrtfFastConv; /* FASTCONV HRTF tables for binaural rendering */ + HRTFS_PARAMBIN_HANDLE hHrtfParambin; /* HRTF tables for parametric binauralizer */ +#endif LSSETUP_CUSTOM_HANDLE hLsSetupCustom; /* Custom LS configuration handle */ float *hoa_dec_mtx; /* Pointer to decoder matrix for SBA */ HEAD_TRACK_DATA_HANDLE hHeadTrackData; /* Head tracking data structure */ RENDER_CONFIG_DATA *hRenderConfig; /* Renderer config pointer */ - int32_t binaural_latency_ns; /* HRTF binauralization latency in ns */ + int32_t binaural_latency_ns; /* Binauralization latency in ns */ #ifdef DEBUGGING int32_t noClipping; /* number of clipped samples */ #endif -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING int32_t last_active_ivas_total_brate; #endif } Decoder_Struct; diff --git a/lib_dec/ivas_stereo_adapt_GR_dec.c b/lib_dec/ivas_stereo_adapt_GR_dec.c index ec84df98310be274e43335b55e6d0e899e70161b..7e698f6169b94aeb6dc749d1173a614f9456ae27 100644 --- a/lib_dec/ivas_stereo_adapt_GR_dec.c +++ b/lib_dec/ivas_stereo_adapt_GR_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" #include "ivas_rom_com.h" #include "rom_dec.h" diff --git a/lib_dec/ivas_stereo_cng_dec.c b/lib_dec/ivas_stereo_cng_dec.c index ac7f942b2a7bfcaa8a09624b7e0e1b4b74c64d18..b55cf4cfbdbda5037c08726630424a19321bfd20 100644 --- a/lib_dec/ivas_stereo_cng_dec.c +++ b/lib_dec/ivas_stereo_cng_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * Local constants @@ -175,6 +175,7 @@ void stereo_dft_dec_sid_coh( } dtx_read_padding_bits( st, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC ); + return; } @@ -225,7 +226,7 @@ static void stereo_dft_generate_comfort_noise( hFdCngCom = st->hFdCngDec->hFdCngCom; - wmops_sub_start( "DFT_CNG" ); + push_wmops( "DFT_CNG" ); set_f( dmpf, 0.0f, M + 2 ); set_f( Atmp, 0.0f, M + 2 ); @@ -625,7 +626,7 @@ static void stereo_dft_generate_comfort_noise( st->hFdCngDec->ms_last_inactive_bwidth = st->bwidth; } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_stereo_dft_dec.c b/lib_dec/ivas_stereo_dft_dec.c index f82c5c3cab4e8d5c20eadf078b0197f6a856cc48..5919d99c711155238a0291f5004b5252cbf5848f 100755 --- a/lib_dec/ivas_stereo_dft_dec.c +++ b/lib_dec/ivas_stereo_dft_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -271,22 +271,22 @@ ivas_error stereo_dft_dec_create( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: DFT Stereo memory already allocated\n" ); } - if ( ( hStereoDft_loc = (STEREO_DFT_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_DFT_DEC_DATA ) ) ) == NULL ) + if ( ( hStereoDft_loc = (STEREO_DFT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_DFT_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT Stereo\n" ) ); } - if ( ( hStereoDft_loc->hConfig = (STEREO_DFT_CONFIG_DATA_HANDLE) count_malloc( sizeof( STEREO_DFT_CONFIG_DATA ) ) ) == NULL ) + if ( ( hStereoDft_loc->hConfig = (STEREO_DFT_CONFIG_DATA_HANDLE) malloc( sizeof( STEREO_DFT_CONFIG_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT Stereo Config\n" ) ); } - if ( ( hStereoDft_loc->hBpf = (BPF_DEC_HANDLE) count_malloc( sizeof( BPF_DEC_DATA ) ) ) == NULL ) + if ( ( hStereoDft_loc->hBpf = (BPF_DEC_HANDLE) malloc( sizeof( BPF_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for BPF handle\n" ) ); } - if ( ( hStereoDft_loc->hTcxLtpDec = (TCX_LTP_DEC_HANDLE) count_malloc( sizeof( TCX_LTP_DEC_DATA ) ) ) == NULL ) + if ( ( hStereoDft_loc->hTcxLtpDec = (TCX_LTP_DEC_HANDLE) malloc( sizeof( TCX_LTP_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TCX-LTP handle\n" ) ); } @@ -514,7 +514,6 @@ void stereo_dft_dec_reset( set_zero( hStereoDft->smooth_fac[0], SBA_DIRAC_STEREO_NUM_BANDS ); set_zero( hStereoDft->smooth_fac[1], SBA_DIRAC_STEREO_NUM_BANDS ); -#ifdef FIX_ITD_CNG hStereoDft->itd_xfade_target = 0.0f; hStereoDft->itd_xfade_step = 0.0f; hStereoDft->itd_xfade_counter = 0; @@ -524,7 +523,6 @@ void stereo_dft_dec_reset( hStereoDft->ipd_xfade_step = 0.0f; hStereoDft->ipd_xfade_counter = 0; hStereoDft->ipd_xfade_prev = 0.0f; -#endif #ifdef DFT_STEREO_SPAR_MIXING for ( b = 0; b < hStereoDft->nbands; b++ ) @@ -643,23 +641,23 @@ void stereo_dft_dec_destroy( if ( hStereoDft->hConfig != NULL ) { - count_free( hStereoDft->hConfig ); + free( hStereoDft->hConfig ); hStereoDft->hConfig = NULL; } if ( hStereoDft->hBpf != NULL ) { - count_free( hStereoDft->hBpf ); + free( hStereoDft->hBpf ); hStereoDft->hBpf = NULL; } if ( hStereoDft->hTcxLtpDec != NULL ) { - count_free( hStereoDft->hTcxLtpDec ); + free( hStereoDft->hTcxLtpDec ); hStereoDft->hTcxLtpDec = NULL; } - count_free( hStereoDft ); + free( hStereoDft ); hStereoDft = NULL; return; @@ -703,7 +701,7 @@ void stereo_dft_dec_analyze( int16_t mem_size; int16_t ovl2; - wmops_sub_start( "DFT_analysis" ); + push_wmops( "DFT_analysis" ); hStereoDft = hCPE->hStereoDft; @@ -825,7 +823,7 @@ void stereo_dft_dec_analyze( if ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) { - wmops_sub_end(); + pop_wmops(); return; } @@ -976,7 +974,7 @@ void stereo_dft_dec_analyze( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -1006,7 +1004,7 @@ void stereo_dft_dec_synthesize( int16_t ovl2, flat_portion_end; float ola_buff[STEREO_DFT32MS_OVL2_MAX]; int16_t moffset; - wmops_sub_start( "DFT_synthesis" ); + push_wmops( "DFT_synthesis" ); /*-----------------------------------------------------------------* * Initialization @@ -1132,7 +1130,7 @@ void stereo_dft_dec_synthesize( } #endif - wmops_sub_end(); + pop_wmops(); return; } @@ -1246,11 +1244,7 @@ void stereo_dft_dec( } else { -#ifdef FIX_ITD_CNG stereo_dft_dec_smooth_parameters( hStereoDft, hStereoCng->prev_sid_nodata, hStereoCng->active_frame_counter, st0->element_brate ); -#else - stereo_dft_dec_smooth_parameters( hStereoDft, hStereoCng->prev_sid_nodata ); -#endif } } @@ -2048,9 +2042,7 @@ void stereo_dft_dec_read_BS( * Initialization *-----------------------------------------------------------------*/ -#ifdef FIX_ITD_CNG k_offset = STEREO_DFT_OFFSET; -#endif if ( ivas_total_brate == IVAS_SID_5k2 ) { @@ -2076,10 +2068,8 @@ void stereo_dft_dec_read_BS( hStereoDft->frame_sid = 0; *nb_bits = 0; *total_brate = 0; -#ifdef FIX_ITD_CNG hStereoDft->itd[k = hStereoDft->prm_res[k_offset] - 1 + k_offset] = hStereoDft->itd_xfade_target; hStereoDft->gipd[hStereoDft->prm_res[k_offset] - 1 + k_offset] = hStereoDft->ipd_xfade_target; -#endif return; } @@ -2110,9 +2100,6 @@ void stereo_dft_dec_read_BS( /*init*/ max_bits = *nb_bits; *nb_bits = 0; -#ifndef FIX_ITD_CNG - k_offset = STEREO_DFT_OFFSET; -#endif N_div = STEREO_DFT_NBDIV; if ( ivas_total_brate > IVAS_SID_5k2 ) @@ -2524,7 +2511,7 @@ void stereo_dft_dec_read_BS( fprintf( pF, "\nGain: %d ", I ); #endif - wmops_sub_start( "residual_decode" ); + push_wmops( "residual_decode" ); if ( I != ECSQ_GLOBAL_GAIN_INDEX_ALL_ZERO ) { ECSQ_init_instance( &ecsq_inst, 0 /*dummy index*/, &range_uni_dec_state ); @@ -2556,7 +2543,7 @@ void stereo_dft_dec_read_BS( } ( *nb_bits ) += n_bits; - wmops_sub_end(); + pop_wmops(); #ifdef DEBUG_MODE_DFT fprintf( pF, "%d (max: %d)", n_bits + STEREO_DFT_RES_GLOBAL_GAIN_BITS, max_bits ); @@ -2713,7 +2700,7 @@ void stereo_dft_generate_res_pred( float g2; int16_t nbands_respred; - wmops_sub_start( "gen_respred" ); + push_wmops( "gen_respred" ); /* smoothing and limiting parameters */ alpha = hStereoDft->wasTransient ? 0 : 0.2f; /* no smoothing after transients */ @@ -3045,7 +3032,7 @@ void stereo_dft_generate_res_pred( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -3059,12 +3046,9 @@ void stereo_dft_generate_res_pred( void stereo_dft_dec_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle */ - const int16_t prev_sid_nodata /* i : Previous SID/No data indicator */ -#ifdef FIX_ITD_CNG - , - const int16_t active_frame_counter, /* i : Active frame counter */ - const int32_t element_brate /* i : Element bitrate */ -#endif + const int16_t prev_sid_nodata, /* i : Previous SID/No data indicator */ + const int16_t active_frame_counter, /* i : Active frame counter */ + const int32_t element_brate /* i : Element bitrate */ ) { int16_t k_offset, k, k2, b, N_div; @@ -3086,7 +3070,6 @@ void stereo_dft_dec_smooth_parameters( *( hStereoDft->side_gain + ( ( k + k_offset ) - 1 ) * STEREO_DFT_BAND_MAX + b ) = *( hStereoDft->side_gain + ( k + k_offset ) * STEREO_DFT_BAND_MAX + b ); } -#ifdef FIX_ITD_CNG if ( hStereoDft->frame_sid_nodata ) { /* set new xfade target if new itd received */ @@ -3127,14 +3110,12 @@ void stereo_dft_dec_smooth_parameters( hStereoDft->ipd_xfade_counter = 0; } } -#endif for ( k2 = 1; k2 < hStereoDft->prm_res[k + k_offset]; k2++ ) { hStereoDft->gipd[( k + k_offset ) - k2] = hStereoDft->gipd[k + k_offset]; } -#ifdef FIX_ITD_CNG if ( hStereoDft->frame_sid_nodata ) { /* set new xfade target if new itd received */ @@ -3164,7 +3145,6 @@ void stereo_dft_dec_smooth_parameters( hStereoDft->last_active_element_brate = element_brate; } -#endif for ( k2 = 1; k2 < hStereoDft->prm_res[k + k_offset]; k2++ ) { hStereoDft->itd[( k + k_offset ) - k2] = hStereoDft->itd[k + k_offset]; @@ -3173,7 +3153,6 @@ void stereo_dft_dec_smooth_parameters( return; } -#ifdef FIX_ITD_CNG /* Active frame, "reset" everything "reset" everything if long enough active encoding */ if ( active_frame_counter > STEREO_DFT_ITD_CNG_XFADE_RESET ) { @@ -3184,11 +3163,8 @@ void stereo_dft_dec_smooth_parameters( hStereoDft->ipd_xfade_target = hStereoDft->gipd[STEREO_DFT_NBDIV - 1]; hStereoDft->ipd_xfade_prev = hStereoDft->gipd[STEREO_DFT_NBDIV - 1]; } -#endif -#ifdef FIX_ITD_CNG hStereoDft->last_active_element_brate = element_brate; -#endif for ( k = hStereoDft->prm_res[k_offset] - 1; k < N_div; k += hStereoDft->prm_res[k + k_offset] ) { diff --git a/lib_dec/ivas_stereo_dft_dec_dmx.c b/lib_dec/ivas_stereo_dft_dec_dmx.c index f58b6ddca44bdeaed3cba81f7aeeb43bb907fa84..561f9d016b1c6a69173f92b13500eaa75024a5af 100644 --- a/lib_dec/ivas_stereo_dft_dec_dmx.c +++ b/lib_dec/ivas_stereo_dft_dec_dmx.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -130,11 +130,7 @@ void stereo_dft_unify_dmx( ( st0->core == TCX_20_CORE && ( ( st0->hTcxCfg->tcx_last_overlap_mode == MIN_OVERLAP ) || ( st0->hTcxCfg->tcx_last_overlap_mode == HALF_OVERLAP ) ) ) || ( st0->core == TCX_10_CORE ); /* Smoothing for the current frame */ -#ifdef FIX_ITD_CNG stereo_dft_dec_smooth_parameters( hStereoDft, prev_sid_nodata, st0->hFdCngDec->hFdCngCom->active_frame_counter, st0->element_brate ); -#else - stereo_dft_dec_smooth_parameters( hStereoDft, prev_sid_nodata ); -#endif for ( k = 0; k < N_div; k++ ) { diff --git a/lib_dec/ivas_stereo_dft_plc.c b/lib_dec/ivas_stereo_dft_plc.c index 34eaa2013c12cb3d400c3bfc5e7833575b5807e6..4c026dfb79cf800282b05f8c3deeb8edfa678aa0 100644 --- a/lib_dec/ivas_stereo_dft_plc.c +++ b/lib_dec/ivas_stereo_dft_plc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- * Local constants diff --git a/lib_dec/ivas_stereo_eclvq_dec.c b/lib_dec/ivas_stereo_eclvq_dec.c index 41ed8924d1e25186b0c900cb4cd63edb0b6085e8..b47c3d219ca768a924ae5590e48882da1a802219 100644 --- a/lib_dec/ivas_stereo_eclvq_dec.c +++ b/lib_dec/ivas_stereo_eclvq_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "ivas_rom_dec.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- diff --git a/lib_dec/ivas_stereo_esf_dec.c b/lib_dec/ivas_stereo_esf_dec.c index 0ab8bcdb499912d41bbae9e98fe3803883baf3c4..ff7e810e88e9993e2c374fb4237cd2f4b06878fb 100644 --- a/lib_dec/ivas_stereo_esf_dec.c +++ b/lib_dec/ivas_stereo_esf_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * init_basic_allpass() diff --git a/lib_dec/ivas_stereo_ica_dec.c b/lib_dec/ivas_stereo_ica_dec.c index 122f739dbab18da6fffa409f908bdffe9f2884ae..b62857a8697ee25bec66d502791c6b3702f29bcc 100644 --- a/lib_dec/ivas_stereo_ica_dec.c +++ b/lib_dec/ivas_stereo_ica_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "rom_com.h" #include "ivas_rom_com.h" diff --git a/lib_dec/ivas_stereo_icbwe_dec.c b/lib_dec/ivas_stereo_icbwe_dec.c index 6c3fef9eae7642edcbb106364121c02d996d04d6..78196eaaa8522dbbb31c96757d5ea3104efbb0c9 100644 --- a/lib_dec/ivas_stereo_icbwe_dec.c +++ b/lib_dec/ivas_stereo_icbwe_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "ivas_cnst.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "rom_com.h" #include "ivas_rom_com.h" #ifdef DEBUGGING diff --git a/lib_dec/ivas_stereo_mdct_core_dec.c b/lib_dec/ivas_stereo_mdct_core_dec.c index d0d05f1fa0d66b593f6126fa67dafa95a417953d..a5955aa0983717a727934c8360b4d165f5a70ca1 100644 --- a/lib_dec/ivas_stereo_mdct_core_dec.c +++ b/lib_dec/ivas_stereo_mdct_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -181,7 +181,7 @@ void stereo_mdct_core_dec( float signal_out_tmp[CPE_CHANNELS][L_FRAME_PLUS]; - wmops_sub_start( "stereo_mdct_core_dec" ); + push_wmops( "stereo_mdct_core_dec" ); /*--------------------------------------------------------------------------------* * Initializations @@ -365,7 +365,7 @@ void stereo_mdct_core_dec( mvr2r( signal_outFB_tmp[0], signal_outFB[0], hCPE->hCoreCoder[0]->hTcxDec->L_frameTCX ); mvr2r( signal_outFB_tmp[1], signal_outFB[1], hCPE->hCoreCoder[1]->hTcxDec->L_frameTCX ); - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec.c b/lib_dec/ivas_stereo_mdct_stereo_dec.c old mode 100755 new mode 100644 index 480466ec18b53ade4862704638fb11026bc5cb93..82cab39d4b21625e690da6bc177a48e2b9985c32 --- a/lib_dec/ivas_stereo_mdct_stereo_dec.c +++ b/lib_dec/ivas_stereo_mdct_stereo_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include "ivas_cnst.h" #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -327,11 +327,11 @@ void stereo_decoder_tcx( hStereoMdct->reverse_dmx = 0; } - if ( ( nrgRatio > 1.0f ) && ( k < ( ( core_r == TCX_20_CORE ) ? 1 : NB_DIV ) ) ) + if ( ( nrgRatio > 1.0f ) && ( k < ( ( core_r == TCX_10_CORE ) ? NB_DIV : 1 ) ) ) { v_multc( spec_r[k], nrgRatio, spec_r[k], L_frameTCX_r ); } - else if ( ( nrgRatio < 1.0f ) && ( k < ( ( core_l == TCX_20_CORE ) ? 1 : NB_DIV ) ) ) + else if ( ( nrgRatio < 1.0f ) && ( k < ( ( core_l == TCX_10_CORE ) ? NB_DIV : 1 ) ) ) { v_multc( spec_l[k], 1.0f / nrgRatio, spec_l[k], L_frameTCX_l ); } @@ -655,11 +655,7 @@ void applyDmxMdctStereo( fade = 0.f; dmx_len = crossfade_len; } -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES else if ( hCPE->last_element_mode == IVAS_CPE_DFT && hCPE->last_element_brate <= IVAS_32k ) -#else - else if ( hCPE->last_element_mode == IVAS_CPE_DFT && hCPE->last_element_brate <= IVAS_24k4 ) -#endif { crossfade_len = NS2SA( hCPE->hCoreCoder[0]->output_Fs, DELAY_CLDFB_NS ); step /= crossfade_len; diff --git a/lib_dec/ivas_stereo_switching_dec.c b/lib_dec/ivas_stereo_switching_dec.c old mode 100755 new mode 100644 index ce200c5633774e74edc7e38e4202e6a4f14ff867..67980fab3e705bb1853fdb601775f6b1b9b301b8 --- a/lib_dec/ivas_stereo_switching_dec.c +++ b/lib_dec/ivas_stereo_switching_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,8 @@ #include "prot.h" #include "ivas_prot.h" #include "ivas_rom_com.h" -#include "wmops.h" +#include "assert.h" +#include "wmc_auto.h" #include @@ -56,7 +57,7 @@ static ivas_error allocate_CoreCoder_TCX( { if ( st->hTcxDec == NULL ) { - if ( ( st->hTcxDec = (TCX_DEC_HANDLE) count_malloc( sizeof( TCX_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTcxDec = (TCX_DEC_HANDLE) malloc( sizeof( TCX_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for hTcxDec" ) ); } @@ -70,7 +71,7 @@ static ivas_error allocate_CoreCoder_TCX( if ( st->hTcxCfg == NULL ) { - if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) count_malloc( sizeof( TCX_config ) ) ) == NULL ) + if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) malloc( sizeof( TCX_config ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for hTcxCfg" ) ); } @@ -79,7 +80,7 @@ static ivas_error allocate_CoreCoder_TCX( /* allocated TCX-LTP structure for second channel */ if ( st->hTcxLtpDec == NULL ) { - if ( ( st->hTcxLtpDec = (TCX_LTP_DEC_HANDLE) count_malloc( sizeof( TCX_LTP_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTcxLtpDec = (TCX_LTP_DEC_HANDLE) malloc( sizeof( TCX_LTP_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for TCX-LTP handle\n" ) ); } @@ -90,7 +91,7 @@ static ivas_error allocate_CoreCoder_TCX( /* allocate HQ structure */ if ( st->hHQ_core == NULL ) { - if ( ( st->hHQ_core = (HQ_DEC_HANDLE) count_malloc( sizeof( HQ_DEC_DATA ) ) ) == NULL ) + if ( ( st->hHQ_core = (HQ_DEC_HANDLE) malloc( sizeof( HQ_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for HQ core\n" ) ); } @@ -100,7 +101,7 @@ static ivas_error allocate_CoreCoder_TCX( if ( st->hIGFDec == NULL ) { - if ( ( st->hIGFDec = (IGF_DEC_INSTANCE_HANDLE) count_malloc( sizeof( IGFDEC_INSTANCE ) ) ) == NULL ) + if ( ( st->hIGFDec = (IGF_DEC_INSTANCE_HANDLE) malloc( sizeof( IGFDEC_INSTANCE ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IGF\n" ) ); } @@ -111,7 +112,7 @@ static ivas_error allocate_CoreCoder_TCX( if ( st->hTonalMDCTConc == NULL ) { - if ( ( st->hTonalMDCTConc = (TonalMDCTConcealPtr) count_malloc( sizeof( TonalMDCTConceal_INSTANCE ) ) ) == NULL ) + if ( ( st->hTonalMDCTConc = (TonalMDCTConcealPtr) malloc( sizeof( TonalMDCTConceal_INSTANCE ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for TonalMDCTConcealment\n" ) ); } @@ -140,7 +141,7 @@ static ivas_error allocate_CoreCoder( if ( st->hGSCDec == NULL ) { - if ( ( st->hGSCDec = (GSC_DEC_HANDLE) count_malloc( sizeof( GSC_DEC_DATA ) ) ) == NULL ) + if ( ( st->hGSCDec = (GSC_DEC_HANDLE) malloc( sizeof( GSC_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for GSC\n" ) ); } @@ -150,7 +151,7 @@ static ivas_error allocate_CoreCoder( if ( st->hPFstat == NULL ) { - if ( ( st->hPFstat = (PFSTAT_HANDLE) count_malloc( sizeof( PFSTAT ) ) ) == NULL ) + if ( ( st->hPFstat = (PFSTAT_HANDLE) malloc( sizeof( PFSTAT ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for NB/formant postflter\n" ) ); } @@ -161,7 +162,7 @@ static ivas_error allocate_CoreCoder( if ( st->hMusicPF == NULL ) { - if ( ( st->hMusicPF = (MUSIC_POSTFILT_HANDLE) count_malloc( sizeof( MUSIC_POSTFILT_DATA ) ) ) == NULL ) + if ( ( st->hMusicPF = (MUSIC_POSTFILT_HANDLE) malloc( sizeof( MUSIC_POSTFILT_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LD music postflter\n" ) ); } @@ -171,7 +172,7 @@ static ivas_error allocate_CoreCoder( if ( st->hBPF == NULL ) { - if ( ( st->hBPF = (BPF_DEC_HANDLE) count_malloc( sizeof( BPF_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBPF = (BPF_DEC_HANDLE) malloc( sizeof( BPF_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for BPF\n" ) ); } @@ -181,7 +182,7 @@ static ivas_error allocate_CoreCoder( if ( st->hBWE_zero == NULL ) { - if ( ( st->hBWE_zero = (ZERO_BWE_DEC_HANDLE) count_malloc( sizeof( ZERO_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_zero = (ZERO_BWE_DEC_HANDLE) malloc( sizeof( ZERO_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for zero BWE\n" ) ); } @@ -223,25 +224,25 @@ static void deallocate_CoreCoder_TCX( { if ( st->hTcxDec != NULL ) { - count_free( st->hTcxDec ); + free( st->hTcxDec ); st->hTcxDec = NULL; } if ( st->hTcxCfg != NULL ) { - count_free( st->hTcxCfg ); + free( st->hTcxCfg ); st->hTcxCfg = NULL; } if ( st->hIGFDec != NULL ) { - count_free( st->hIGFDec ); + free( st->hIGFDec ); st->hIGFDec = NULL; } if ( st->hTonalMDCTConc != NULL ) { - count_free( st->hTonalMDCTConc ); + free( st->hTonalMDCTConc ); st->hTonalMDCTConc = NULL; } @@ -261,31 +262,31 @@ static void deallocate_CoreCoder( { if ( st->hGSCDec != NULL ) { - count_free( st->hGSCDec ); + free( st->hGSCDec ); st->hGSCDec = NULL; } if ( st->hPFstat != NULL ) { - count_free( st->hPFstat ); + free( st->hPFstat ); st->hPFstat = NULL; } if ( st->hMusicPF != NULL ) { - count_free( st->hMusicPF ); + free( st->hMusicPF ); st->hMusicPF = NULL; } if ( st->hBPF != NULL ) { - count_free( st->hBPF ); + free( st->hBPF ); st->hBPF = NULL; } if ( st->hBWE_zero != NULL ) { - count_free( st->hBWE_zero ); + free( st->hBWE_zero ); st->hBWE_zero = NULL; } @@ -342,6 +343,7 @@ ivas_error stereo_memory_dec( const int16_t nb_bits_metadata, /* i : number of metadata bits */ const int32_t output_Fs, /* i : output sampling rate */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const MC_MODE mc_mode, /* i : MC mode */ const int16_t nchan_transport /* i : number of transport channels*/ ) { @@ -351,6 +353,9 @@ ivas_error stereo_memory_dec( error = IVAS_ERR_OK; + assert( hCPE->last_element_mode >= IVAS_CPE_DFT && "Switching from SCE to CPE is not a valid configuration!" ); + + hCPE->hCoreCoder[0]->element_mode = hCPE->element_mode; hCPE->hCoreCoder[1]->element_mode = hCPE->element_mode; @@ -402,13 +407,13 @@ ivas_error stereo_memory_dec( /* deallocate data structure of the previous CPE mode */ if ( hCPE->hStereoTD != NULL ) { - count_free( hCPE->hStereoTD ); + free( hCPE->hStereoTD ); hCPE->hStereoTD = NULL; } if ( hCPE->hStereoMdct != NULL ) { - count_free( hCPE->hStereoMdct ); + free( hCPE->hStereoMdct ); hCPE->hStereoMdct = NULL; } @@ -438,7 +443,7 @@ ivas_error stereo_memory_dec( /* allocate ICBWE structure */ if ( hCPE->hStereoICBWE == NULL ) { - if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) count_malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo ICBWE \n" ) ); } @@ -450,7 +455,7 @@ ivas_error stereo_memory_dec( st = hCPE->hCoreCoder[0]; if ( st->hHQ_core == NULL ) { - if ( ( st->hHQ_core = (HQ_DEC_HANDLE) count_malloc( sizeof( HQ_DEC_DATA ) ) ) == NULL ) + if ( ( st->hHQ_core = (HQ_DEC_HANDLE) malloc( sizeof( HQ_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HQ core\n" ) ); } @@ -461,7 +466,7 @@ ivas_error stereo_memory_dec( /* allocate TD CNG handle */ if ( st->idchan == 0 && st->hTdCngDec == NULL ) { - if ( ( st->hTdCngDec = (TD_CNG_DEC_HANDLE) count_malloc( sizeof( TD_CNG_DEC_DATA ) ) ) == NULL ) + if ( ( st->hTdCngDec = (TD_CNG_DEC_HANDLE) malloc( sizeof( TD_CNG_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX/TD CNG\n" ) ); } @@ -485,7 +490,7 @@ ivas_error stereo_memory_dec( if ( hCPE->hStereoMdct != NULL ) { - count_free( hCPE->hStereoMdct ); + free( hCPE->hStereoMdct ); hCPE->hStereoMdct = NULL; } @@ -503,7 +508,7 @@ ivas_error stereo_memory_dec( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: TD Stereo memory already allocated\n" ); } - if ( ( hCPE->hStereoTD = (STEREO_TD_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_TD_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTD = (STEREO_TD_DEC_DATA_HANDLE) malloc( sizeof( STEREO_TD_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD Stereo\n" ) ); } @@ -527,7 +532,7 @@ ivas_error stereo_memory_dec( st = hCPE->hCoreCoder[1]; if ( st->hTcxLtpDec != 0 ) { - count_free( st->hTcxLtpDec ); + free( st->hTcxLtpDec ); st->hTcxLtpDec = NULL; } @@ -543,14 +548,14 @@ ivas_error stereo_memory_dec( /* deallocated HQ-core for second channel */ if ( st->hHQ_core != 0 ) { - count_free( st->hHQ_core ); + free( st->hHQ_core ); st->hHQ_core = NULL; } /* allocate DFT stereo mono DMX data structure */ if ( hCPE->nchan_out == 1 && hCPE->hStereoDftDmx == NULL ) { - if ( ( hCPE->hStereoDftDmx = (STEREO_DFT_DMX_DATA_HANDLE) count_malloc( sizeof( STEREO_DFT_DMX_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoDftDmx = (STEREO_DFT_DMX_DATA_HANDLE) malloc( sizeof( STEREO_DFT_DMX_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo DFT mono output\n" ) ); } @@ -560,7 +565,7 @@ ivas_error stereo_memory_dec( /* allocate TCA data structure */ if ( hCPE->nchan_out != 1 && hCPE->hStereoTCA == NULL ) { - if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) count_malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo TCA\n" ) ); } @@ -579,14 +584,14 @@ ivas_error stereo_memory_dec( /* allocate BWEs for primary channel */ if ( st->hBWE_TD == NULL ) { - if ( ( st->hBWE_TD = (TD_BWE_DEC_HANDLE) count_malloc( sizeof( TD_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_TD = (TD_BWE_DEC_HANDLE) malloc( sizeof( TD_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD BWE\n" ) ); } td_bwe_dec_init( st->hBWE_TD, -1, st->output_Fs ); - if ( ( st->hBWE_FD = (FD_BWE_DEC_HANDLE) count_malloc( sizeof( FD_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_FD = (FD_BWE_DEC_HANDLE) malloc( sizeof( FD_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FD BWE\n" ) ); } @@ -609,7 +614,7 @@ ivas_error stereo_memory_dec( /* allocate stereo CNG structure */ if ( hCPE->hStereoCng == NULL ) { - if ( ( hCPE->hStereoCng = (STEREO_CNG_DEC_HANDLE) count_malloc( sizeof( STEREO_CNG_DEC ) ) ) == NULL ) + if ( ( hCPE->hStereoCng = (STEREO_CNG_DEC_HANDLE) malloc( sizeof( STEREO_CNG_DEC ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo CNG\n" ) ); } @@ -645,26 +650,26 @@ ivas_error stereo_memory_dec( if ( hCPE->hStereoTD != NULL ) { - count_free( hCPE->hStereoTD ); + free( hCPE->hStereoTD ); hCPE->hStereoTD = NULL; } if ( hCPE->hStereoDftDmx != NULL ) { - count_free( hCPE->hStereoDftDmx ); + free( hCPE->hStereoDftDmx ); hCPE->hStereoDftDmx = NULL; } if ( hCPE->hStereoICBWE != NULL ) { - count_free( hCPE->hStereoICBWE ); + free( hCPE->hStereoICBWE ); hCPE->hStereoICBWE = NULL; } /* de-allocate stereo CNG structure */ if ( hCPE->hStereoCng != NULL ) { - count_free( hCPE->hStereoCng ); + free( hCPE->hStereoCng ); hCPE->hStereoCng = NULL; } @@ -721,7 +726,6 @@ ivas_error stereo_memory_dec( if ( hCPE->last_element_mode == IVAS_CPE_DFT ) { -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES if ( hCPE->nchan_out == 1 ) { cpy_tcx_ltp_data( hCPE->hCoreCoder[0]->hTcxLtpDec, hCPE->hCoreCoder[1]->hTcxLtpDec, output_Fs ); @@ -730,9 +734,6 @@ ivas_error stereo_memory_dec( { cpy_tcx_ltp_data( &tcxLtpTmp, hCPE->hCoreCoder[1]->hTcxLtpDec, output_Fs ); } -#else - cpy_tcx_ltp_data( &tcxLtpTmp, hCPE->hCoreCoder[1]->hTcxLtpDec, output_Fs ); -#endif } if ( hCPE->last_element_mode == IVAS_CPE_TD ) @@ -745,7 +746,7 @@ ivas_error stereo_memory_dec( st->hTcxDec->prev_good_synth = st->hTcxDec->old_synthFB + NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ); /* allocate and initialize MDCT stereo structure */ - if ( ( hCPE->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -778,21 +779,21 @@ ivas_error stereo_memory_dec( /* deallocate ICBWE structure */ if ( hCPE->hStereoICBWE != NULL ) { - count_free( hCPE->hStereoICBWE ); + free( hCPE->hStereoICBWE ); hCPE->hStereoICBWE = NULL; } /* allocate BWEs for secondary channel */ if ( st->hBWE_TD == NULL ) { - if ( ( st->hBWE_TD = (TD_BWE_DEC_HANDLE) count_malloc( sizeof( TD_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_TD = (TD_BWE_DEC_HANDLE) malloc( sizeof( TD_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD BWE\n" ) ); } td_bwe_dec_init( st->hBWE_TD, -1, st->output_Fs ); - if ( ( st->hBWE_FD = (FD_BWE_DEC_HANDLE) count_malloc( sizeof( FD_BWE_DEC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_FD = (FD_BWE_DEC_HANDLE) malloc( sizeof( FD_BWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FD BWE\n" ) ); } @@ -807,13 +808,13 @@ ivas_error stereo_memory_dec( { if ( st->hBWE_TD != NULL ) { - count_free( st->hBWE_TD ); + free( st->hBWE_TD ); st->hBWE_TD = NULL; } if ( st->hBWE_FD != NULL ) { - count_free( st->hBWE_FD ); + free( st->hBWE_FD ); st->hBWE_FD = NULL; } } @@ -821,7 +822,7 @@ ivas_error stereo_memory_dec( /* allocate ICBWE structure */ if ( hCPE->hStereoICBWE == NULL ) { - if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) count_malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo ICBWE \n" ) ); } @@ -845,7 +846,7 @@ ivas_error stereo_memory_dec( if ( hCPE->hStereoTCA == NULL ) { /* allocate TCA data structure */ - if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) count_malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo TCA\n" ) ); } @@ -860,7 +861,7 @@ ivas_error stereo_memory_dec( /* de-allocate TCA data structure */ if ( hCPE->hStereoMdct->use_itd == 1 && ivas_total_brate > IVAS_SID_5k2 && hCPE->hStereoTCA != NULL ) { - count_free( hCPE->hStereoTCA ); + free( hCPE->hStereoTCA ); hCPE->hStereoTCA = NULL; hCPE->hStereoMdct->use_itd = 0; } @@ -885,7 +886,7 @@ ivas_error stereo_memory_dec( { if ( hCPE->hStereoDftDmx == NULL ) { - if ( ( hCPE->hStereoDftDmx = (STEREO_DFT_DMX_DATA_HANDLE) count_malloc( sizeof( STEREO_DFT_DMX_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoDftDmx = (STEREO_DFT_DMX_DATA_HANDLE) malloc( sizeof( STEREO_DFT_DMX_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo DFT mono output\n" ) ); } @@ -894,13 +895,13 @@ ivas_error stereo_memory_dec( if ( hCPE->prev_synth_chs[1] != NULL ) { - count_free( hCPE->prev_synth_chs[1] ); + free( hCPE->prev_synth_chs[1] ); hCPE->prev_synth_chs[1] = NULL; } if ( hCPE->hStereoTCA != NULL ) { - count_free( hCPE->hStereoTCA ); + free( hCPE->hStereoTCA ); hCPE->hStereoTCA = NULL; } } @@ -908,14 +909,14 @@ ivas_error stereo_memory_dec( { if ( hCPE->hStereoDftDmx != NULL ) { - count_free( hCPE->hStereoDftDmx ); + free( hCPE->hStereoDftDmx ); hCPE->hStereoDftDmx = NULL; } if ( hCPE->prev_synth_chs[1] == NULL ) { st = hCPE->hCoreCoder[1]; - if ( ( hCPE->prev_synth_chs[1] = (float *) count_malloc( sizeof( float ) * NS2SA( st->output_Fs, FRAME_SIZE_NS ) ) ) == NULL ) + if ( ( hCPE->prev_synth_chs[1] = (float *) malloc( sizeof( float ) * NS2SA( st->output_Fs, FRAME_SIZE_NS ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT stereo memory\n" ) ); } @@ -924,7 +925,7 @@ ivas_error stereo_memory_dec( if ( hCPE->hStereoICBWE == NULL && hCPE->element_mode == IVAS_CPE_DFT ) { - if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) count_malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_DEC_HANDLE) malloc( sizeof( STEREO_ICBWE_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo ICBWE \n" ) ); } @@ -934,7 +935,7 @@ ivas_error stereo_memory_dec( if ( hCPE->hStereoTCA == NULL && ( hCPE->element_mode == IVAS_CPE_DFT || hCPE->element_mode == IVAS_CPE_TD ) ) { - if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) count_malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTCA = (STEREO_TCA_DEC_HANDLE) malloc( sizeof( STEREO_TCA_DEC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo TCA\n" ) ); } @@ -947,19 +948,64 @@ ivas_error stereo_memory_dec( if ( hCPE->hStereoTCA != NULL ) { /* note: in MASA, hCPE->hStereoMdct->itd = 0 */ - count_free( hCPE->hStereoTCA ); + free( hCPE->hStereoTCA ); hCPE->hStereoTCA = NULL; } if ( hCPE->hStereoICBWE != NULL ) { - count_free( hCPE->hStereoICBWE ); + free( hCPE->hStereoICBWE ); hCPE->hStereoICBWE = NULL; } } } } + /*--------------------------------------------------------------* + * Bitrate switching in MASA format + *---------------------------------------------------------------*/ + + if ( ivas_format == MC_FORMAT && hCPE->element_mode == IVAS_CPE_MDCT ) + { + if ( mc_mode == MC_MODE_MCT ) + { + /* deallocate the FdCNG handle */ + for ( i = 0; i < CPE_CHANNELS; ++i ) + { + deleteFdCngDec( &hCPE->hCoreCoder[i]->hFdCngDec ); + + /* deallocate CLDFB synthesis for LFE channel */ + if ( hCPE->hCoreCoder[i]->mct_chan_mode == MCT_CHAN_MODE_LFE ) + { + deleteCldfb( &hCPE->hCoreCoder[i]->cldfbSyn ); + } + } + } + else + { + /* allocate the FdCNG handle (for noise estimation for TCX PLC fadeout)*/ + for ( i = 0; i < CPE_CHANNELS; ++i ) + { + if ( hCPE->hCoreCoder[i]->cldfbSyn == NULL ) /* could be NULL when we had the MCT LFE channel */ + { + if ( ( error = openCldfb( &hCPE->hCoreCoder[i]->cldfbSyn, CLDFB_SYNTHESIS, hCPE->hCoreCoder[i]->output_Fs, CLDFB_PROTOTYPE_1_25MS ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( hCPE->hCoreCoder[i]->hFdCngDec == NULL ) + { + if ( ( error = createFdCngDec( &hCPE->hCoreCoder[i]->hFdCngDec ) ) != IVAS_ERR_OK ) + { + return error; + } + initFdCngDec( hCPE->hCoreCoder[i] ); + } + } + } + } + return error; } @@ -991,9 +1037,7 @@ void synchro_synthesis( int16_t dft_mono_brate_switch; int16_t delay_diff; float tmpF; -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES int16_t nChannels; -#endif sts = hCPE->hCoreCoder; output_Fs = sts[0]->output_Fs; @@ -1063,13 +1107,11 @@ void synchro_synthesis( } } -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES if ( hCPE->nchan_out == 1 && hCPE->last_element_mode == IVAS_CPE_MDCT ) { v_add( sts[0]->prev_synth_buffer, sts[1]->prev_synth_buffer, sts[0]->prev_synth_buffer, delay_comp_DFT ); v_multc( sts[0]->prev_synth_buffer, INV_SQRT_2, sts[0]->prev_synth_buffer, delay_comp_DFT ); } -#endif if ( use_cldfb_for_last_dft ) { @@ -1175,7 +1217,6 @@ void synchro_synthesis( } } -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES /* if previous frame had only one channel copy buffers to other channel */ if ( hCPE->nchan_out == 1 && hCPE->element_mode == IVAS_CPE_MDCT && hCPE->last_element_mode == IVAS_CPE_DFT ) { @@ -1183,7 +1224,6 @@ void synchro_synthesis( mvr2r( tmp_out[0], tmp_out[1], delay_cldfb ); mvr2r( p_output_mem[0], p_output_mem[1], delay_diff ); } -#endif /*----------------------------------------------------------------* * update DFT synthesis overlap memory @output_Fs; needed for TD->DFT stereo switching @@ -1268,12 +1308,8 @@ void synchro_synthesis( } } -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES nChannels = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? 2 : hCPE->nchan_out; for ( n = 0; n < nChannels; n++ ) -#else - for ( n = 0; n < hCPE->nchan_out; n++ ) -#endif { if ( hCPE->element_mode == IVAS_CPE_MDCT ) { @@ -1306,11 +1342,7 @@ void synchro_synthesis( } /* cross-fading between DFT OLA memory and TD output */ -#ifdef FIX_MDCT_AND_MC_MONO_ISSUES for ( n = 0; n < nChannels; n++ ) -#else - for ( n = 0; n < hCPE->nchan_out; n++ ) -#endif { if ( hCPE->element_mode == IVAS_CPE_MDCT ) { diff --git a/lib_dec/ivas_stereo_td_dec.c b/lib_dec/ivas_stereo_td_dec.c index f3bd292a8b19abe248537f0e7ce0368c1141c341..605d5ad388ca0f2bf6853c8deb59ac9cd881762d 100644 --- a/lib_dec/ivas_stereo_td_dec.c +++ b/lib_dec/ivas_stereo_td_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * stereo_td_init_dec() diff --git a/lib_dec/ivas_svd_dec.c b/lib_dec/ivas_svd_dec.c index ff9852d1df647b90b7177bdd954556aacc715c35..785a9067804c9b252fb08d1922d4354d675ab801 100644 --- a/lib_dec/ivas_svd_dec.c +++ b/lib_dec/ivas_svd_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -196,7 +196,7 @@ int16_t svd( float secDiag[MAX_OUTPUT_CHANNELS]; float eps_x = 0.0f, temp; - wmops_sub_start( "svd" ); + push_wmops( "svd" ); set_zero( secDiag, MAX_OUTPUT_CHANNELS ); @@ -252,7 +252,7 @@ int16_t svd( } } while ( condition == 1 ); - wmops_sub_end(); + pop_wmops(); return ( errorMessage ); } diff --git a/lib_dec/ivas_tcx_core_dec.c b/lib_dec/ivas_tcx_core_dec.c index 3ca3033cb4a5c420faeb9175ae6e1fca9dd6e67e..785e74cc7351e17aaecc31d4401cc47940b3e694 100644 --- a/lib_dec/ivas_tcx_core_dec.c +++ b/lib_dec/ivas_tcx_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "prot.h" #include "rom_com.h" #include "stat_dec.h" -#include "wmops.h" +#include "wmc_auto.h" #include "basop_proto_func.h" #include "stat_com.h" #include "ivas_prot.h" @@ -96,6 +96,11 @@ void stereo_tcx_init_dec( st->hTcxCfg->resq = getResq( st->bits_frame_nominal * FRAMES_PER_SEC ); hTcxDec->tcx_lpc_shaped_ari = getTcxLpcShapedAri( st->bits_frame_nominal * FRAMES_PER_SEC, st->rf_flag, st->element_mode ); st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_flag, st->mct_chan_mode ); + /* TODO: also apply for MCT modes, once issue #24 is solved */ + if ( !MCT_flag && st->element_mode != EVS_MONO ) + { + st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( st->bits_frame_nominal * FRAMES_PER_SEC, st->igf, st->element_mode, st->mct_chan_mode ); + } if ( hTcxLtpDec != NULL ) { hTcxLtpDec->tcxltp = getTcxLtp( st->sr_core ); @@ -191,7 +196,7 @@ void stereo_tcx_core_dec( TCX_LTP_DEC_HANDLE hTcxLtpDec = st->hTcxLtpDec; TCX_DEC_HANDLE hTcxDec = st->hTcxDec; - wmops_sub_start( "stereo_tcx_core_dec" ); + push_wmops( "stereo_tcx_core_dec" ); /*Sanity check*/ assert( !( st->total_brate == FRAME_NO_DATA || st->total_brate == SID_2k40 ) ); /*Active frame*/ @@ -773,7 +778,7 @@ void stereo_tcx_core_dec( #endif - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_dec/ivas_td_decorr.c b/lib_dec/ivas_td_decorr.c index 29b748e4c704dc0f352e0a813e3835db7306f3ce..34f88aeb03f6dba603f86456f311ead88788f8f3 100644 --- a/lib_dec/ivas_td_decorr.c +++ b/lib_dec/ivas_td_decorr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #endif #include "math.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* @@ -117,12 +117,12 @@ ivas_error ivas_spar_td_decorr_dec_open( error = IVAS_ERR_OK; - if ( ( hCovState = (ivas_td_decorr_state_t *) count_malloc( sizeof( ivas_td_decorr_state_t ) ) ) == NULL ) + if ( ( hCovState = (ivas_td_decorr_state_t *) malloc( sizeof( ivas_td_decorr_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); } - if ( ( hCovState->look_ahead_buf = (float *) count_malloc( sizeof( float ) * (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ) ) ) == NULL ) + if ( ( hCovState->look_ahead_buf = (float *) malloc( sizeof( float ) * (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); } @@ -136,7 +136,7 @@ ivas_error ivas_spar_td_decorr_dec_open( { len = hCovState->APD_filt_state[0].order[i]; - if ( ( hCovState->APD_filt_state[j].state[i] = (float *) count_malloc( sizeof( float ) * len ) ) == NULL ) + if ( ( hCovState->APD_filt_state[j].state[i] = (float *) malloc( sizeof( float ) * len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); } @@ -182,14 +182,14 @@ void ivas_spar_td_decorr_dec_close( return; } - count_free( ( *hTdDecorr )->look_ahead_buf ); + free( ( *hTdDecorr )->look_ahead_buf ); ( *hTdDecorr )->look_ahead_buf = NULL; for ( j = 0; j < ( *hTdDecorr )->num_apd_outputs; j++ ) { for ( i = 0; i < ( *hTdDecorr )->num_apd_sections; i++ ) { - count_free( ( *hTdDecorr )->APD_filt_state[j].state[i] ); + free( ( *hTdDecorr )->APD_filt_state[j].state[i] ); ( *hTdDecorr )->APD_filt_state[j].state[i] = NULL; } } @@ -199,7 +199,7 @@ void ivas_spar_td_decorr_dec_close( ivas_spar_transient_det_close( &( *hTdDecorr )->pTrans_det ); } - count_free( ( *hTdDecorr ) ); + free( ( *hTdDecorr ) ); ( *hTdDecorr ) = NULL; return; diff --git a/lib_dec/ivas_td_low_rate_dec.c b/lib_dec/ivas_td_low_rate_dec.c index e610fcf0f38ec7aacd4788436b5fe75371d56c17..8ab266345a45fd3a95ff2820122502f6c87ddaac 100644 --- a/lib_dec/ivas_td_low_rate_dec.c +++ b/lib_dec/ivas_td_low_rate_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "ivas_cnst.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * tdm_low_rate_dec() diff --git a/lib_dec/ivas_vbap.c b/lib_dec/ivas_vbap.c index f0960bd1271a1472c20cb34721270416a359b7d7..e0deb652dc6a0625fcb4367423cac58fce789b9b 100644 --- a/lib_dec/ivas_vbap.c +++ b/lib_dec/ivas_vbap.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * Local constants @@ -154,13 +154,13 @@ ivas_error vbap_init_data( VBAP_SPEAKER_NODE speaker_node_data[VBAP_MAX_NUM_SPEAKER_NODES]; VBAP_DATA *vbap; - wmops_sub_start( "vbap_init" ); + push_wmops( "vbap_init" ); /* Basic init checks */ if ( num_speaker_nodes > VBAP_MAX_NUM_SPEAKER_NODES || num_speaker_nodes < 3 ) { hVBAPdata = NULL; - wmops_sub_end(); + pop_wmops(); /* TODO: are these two paths correct behaviour or should and error be returned ? */ return IVAS_ERR_OK; } @@ -171,7 +171,7 @@ ivas_error vbap_init_data( } /* Allocate VBAP structure */ - if ( ( vbap = (VBAP_HANDLE) count_malloc( sizeof( VBAP_DATA ) ) ) == NULL ) + if ( ( vbap = (VBAP_HANDLE) malloc( sizeof( VBAP_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for VBAP data\n" ) ); } @@ -200,7 +200,8 @@ ivas_error vbap_init_data( if ( is_success && virtual_bottom_type != NO_VIRTUAL_SPEAKER_NODE ) { - vbap->bottom_virtual_speaker_node_division_gains = (float *) count_calloc( num_speaker_nodes, sizeof( float ) ); + vbap->bottom_virtual_speaker_node_division_gains = (float *) malloc( num_speaker_nodes * sizeof( float ) ); + set_zero( vbap->bottom_virtual_speaker_node_division_gains, num_speaker_nodes ); is_success &= vbap->bottom_virtual_speaker_node_division_gains != NULL; speaker_node_azi_deg_internal[vbap->bottom_virtual_speaker_node_index] = 0.0f; speaker_node_ele_deg_internal[vbap->bottom_virtual_speaker_node_index] = -90.0f; @@ -208,7 +209,8 @@ ivas_error vbap_init_data( if ( is_success && virtual_top_type != NO_VIRTUAL_SPEAKER_NODE ) { - vbap->top_virtual_speaker_node_division_gains = (float *) count_calloc( num_speaker_nodes, sizeof( float ) ); + vbap->top_virtual_speaker_node_division_gains = (float *) malloc( num_speaker_nodes * sizeof( float ) ); + set_zero( vbap->top_virtual_speaker_node_division_gains, num_speaker_nodes ); is_success &= vbap->top_virtual_speaker_node_division_gains != NULL; speaker_node_azi_deg_internal[vbap->top_virtual_speaker_node_index] = 0.0f; speaker_node_ele_deg_internal[vbap->top_virtual_speaker_node_index] = 90.0f; @@ -216,7 +218,8 @@ ivas_error vbap_init_data( if ( is_success && virtual_back_type != NO_VIRTUAL_SPEAKER_NODE ) { - vbap->back_virtual_speaker_node_division_gains = (float *) count_calloc( num_speaker_nodes, sizeof( float ) ); + vbap->back_virtual_speaker_node_division_gains = (float *) malloc( num_speaker_nodes * sizeof( float ) ); + set_zero( vbap->back_virtual_speaker_node_division_gains, num_speaker_nodes ); is_success &= vbap->back_virtual_speaker_node_division_gains != NULL; speaker_node_azi_deg_internal[vbap->back_virtual_speaker_node_index] = 180.0f; speaker_node_ele_deg_internal[vbap->back_virtual_speaker_node_index] = 0.0f; @@ -263,12 +266,12 @@ ivas_error vbap_init_data( break; } } - vbap->search_struct[0].triplets = (VBAP_VS_TRIPLET *) count_malloc( ( ( speaker_nodes_group1_internal - 2 ) * 2 - ( max( 0, ( speaker_nodes_horiz_internal - 2 ) ) ) ) * sizeof( VBAP_VS_TRIPLET ) ); + vbap->search_struct[0].triplets = (VBAP_VS_TRIPLET *) malloc( ( ( speaker_nodes_group1_internal - 2 ) * 2 - ( max( 0, ( speaker_nodes_horiz_internal - 2 ) ) ) ) * sizeof( VBAP_VS_TRIPLET ) ); is_success &= vbap->search_struct[0].triplets != NULL; if ( speaker_nodes_group2_internal > 0 ) { vbap->num_search_structs = 2; - vbap->search_struct[1].triplets = (VBAP_VS_TRIPLET *) count_malloc( ( ( speaker_nodes_group2_internal - 2 ) * 2 - ( max( 0, ( speaker_nodes_horiz_internal - 2 ) ) ) ) * sizeof( VBAP_VS_TRIPLET ) ); + vbap->search_struct[1].triplets = (VBAP_VS_TRIPLET *) malloc( ( ( speaker_nodes_group2_internal - 2 ) * 2 - ( max( 0, ( speaker_nodes_horiz_internal - 2 ) ) ) ) * sizeof( VBAP_VS_TRIPLET ) ); is_success &= vbap->search_struct[1].triplets != NULL; } else @@ -303,7 +306,7 @@ ivas_error vbap_init_data( determine_virtual_speaker_node_division_gains( vbap->back_virtual_speaker_node_index, vbap->back_virtual_speaker_node_division_gains, connections, virtual_back_type, max_num_connections, num_speaker_nodes ); } - wmops_sub_end(); + pop_wmops(); if ( is_success ) { @@ -335,26 +338,26 @@ void vbap_free_data( if ( ( *hVBAPdata )->bottom_virtual_speaker_node_division_gains != NULL ) { - count_free( ( *hVBAPdata )->bottom_virtual_speaker_node_division_gains ); + free( ( *hVBAPdata )->bottom_virtual_speaker_node_division_gains ); } if ( ( *hVBAPdata )->top_virtual_speaker_node_division_gains != NULL ) { - count_free( ( *hVBAPdata )->top_virtual_speaker_node_division_gains ); + free( ( *hVBAPdata )->top_virtual_speaker_node_division_gains ); } if ( ( *hVBAPdata )->back_virtual_speaker_node_division_gains != NULL ) { - count_free( ( *hVBAPdata )->back_virtual_speaker_node_division_gains ); + free( ( *hVBAPdata )->back_virtual_speaker_node_division_gains ); } if ( ( *hVBAPdata )->search_struct[0].triplets != NULL ) { - count_free( ( *hVBAPdata )->search_struct[0].triplets ); + free( ( *hVBAPdata )->search_struct[0].triplets ); } if ( ( *hVBAPdata )->num_search_structs == 2 && ( *hVBAPdata )->search_struct[1].triplets != NULL ) { - count_free( ( *hVBAPdata )->search_struct[1].triplets ); + free( ( *hVBAPdata )->search_struct[1].triplets ); } - count_free( *hVBAPdata ); + free( *hVBAPdata ); *hVBAPdata = NULL; return; @@ -400,7 +403,7 @@ void vbap_determine_gains( assert( gains != NULL && "VBAP gain determination requires reserved memory for gain output." ); #endif - wmops_sub_start( "vbap_gains" ); + push_wmops( "vbap_gains" ); num_speaker_nodes = hVBAPdata->num_speaker_nodes; bottom_virtual_speaker_node_index = hVBAPdata->bottom_virtual_speaker_node_index; top_virtual_speaker_node_index = hVBAPdata->top_virtual_speaker_node_index; @@ -484,7 +487,7 @@ void vbap_determine_gains( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -662,8 +665,7 @@ static void determine_virtual_speaker_node_division_gains( are distributed to all neighboring real speaker nodes. An amplitude-division instead of energy division is utilized just in case to avoid excessive emphasis on the coherent distributed sound. */ - int16_t c; - int16_t ch; + int16_t c, ch; float sum_val; if ( type == VIRTUAL_SPEAKER_NODE_DISTRIBUTE_ENERGY ) @@ -715,7 +717,7 @@ static void determine_virtual_speaker_node_division_gains( /*! r: virtual speaker node type */ static enum VirtualSpeakerNodeType check_need_of_virtual_speaker_node( VBAP_HANDLE hVBAPdata, /* i/o: VBAP structure */ - const float *speaker_node_azi_deg, /* i : vector of speaker node azimuths */ + const float *speaker_node_azi_deg, /* i : vector of speaker node azimuths */ const float *speaker_node_ele_deg, /* i : vector of speaker node elevations */ enum SpeakerNodeGroup group /* i : group of speaker nodes where this belongs */ ) @@ -945,9 +947,9 @@ static void matrix_inverse_3x3( *-------------------------------------------------------------------------*/ static int16_t check_and_store_triplet( - int16_t chA, /* i : first channel index that forms the loudspeaker triplet */ - int16_t chB, /* i : second channel index that forms the loudspeaker triplet */ - int16_t chC, /* i : third channel index that forms the loudspeaker triplet */ + const int16_t chA, /* i : first channel index that forms the loudspeaker triplet */ + const int16_t chB, /* i : second channel index that forms the loudspeaker triplet */ + const int16_t chC, /* i : third channel index that forms the loudspeaker triplet */ const int16_t num_speaker_nodes, /* i : number of speaker nodes */ const VBAP_SPEAKER_NODE *speaker_node_data, /* i : speaker node data structure */ VBAP_VS_TRIPLET *triplets, /* o : vector of virtual surface triplets */ @@ -1450,7 +1452,7 @@ static void get_half_sphere_connection_options( } /* Init memory for connection options */ - c_options = (ConnectionOption *) count_malloc( sizeof( ConnectionOption ) * max_num_connection_options ); + c_options = (ConnectionOption *) malloc( sizeof( ConnectionOption ) * max_num_connection_options ); for ( c = 0; c < max_num_connection_options; c++ ) { c_options[c].chA = -1; @@ -1505,7 +1507,7 @@ static void get_half_sphere_connection_options( /* Init memory for reordered connection options and order by arc_weighted, * which informs of the preference order of the connections in case they cross */ - c_options_reorder = (ConnectionOption *) count_malloc( sizeof( ConnectionOption ) * ( *num_connection_options ) ); + c_options_reorder = (ConnectionOption *) malloc( sizeof( ConnectionOption ) * ( *num_connection_options ) ); for ( c = 0; c < *num_connection_options; c++ ) { float min_arc_weighted; @@ -1530,7 +1532,7 @@ static void get_half_sphere_connection_options( /* Set reordered connections as output and free temporary data */ *connection_options_pr = c_options_reorder; - count_free( c_options ); + free( c_options ); return; } @@ -1676,7 +1678,7 @@ static void formulate_half_sphere_connections( } c_opt++; } - count_free( connection_options ); + free( connection_options ); return; } diff --git a/lib_dec/jbm_jb4_circularbuffer.c b/lib_dec/jbm_jb4_circularbuffer.c index a9da400a3604ba00cee41e5d4986740a6268ff06..e272e21aa1cf0f265afea91511a2d324a8421d83 100644 --- a/lib_dec/jbm_jb4_circularbuffer.c +++ b/lib_dec/jbm_jb4_circularbuffer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /* local includes */ #include "jbm_jb4_circularbuffer.h" @@ -72,7 +72,7 @@ struct JB4_CIRCULARBUFFER /* Creates a circular buffer (FIFO) */ int16_t JB4_CIRCULARBUFFER_Create( JB4_CIRCULARBUFFER_HANDLE *ph ) { - JB4_CIRCULARBUFFER_HANDLE h = count_malloc( sizeof( struct JB4_CIRCULARBUFFER ) ); + JB4_CIRCULARBUFFER_HANDLE h = malloc( sizeof( struct JB4_CIRCULARBUFFER ) ); h->data = NULL; h->capacity = 0; @@ -103,9 +103,9 @@ void JB4_CIRCULARBUFFER_Destroy( if ( h->data ) { - count_free( h->data ); + free( h->data ); } - count_free( h ); + free( h ); *ph = NULL; return; @@ -119,7 +119,7 @@ int16_t JB4_CIRCULARBUFFER_Init( { /* keep one element free to be able to decide between full/empty buffer */ ++capacity; - h->data = count_malloc( capacity * sizeof( JB4_CIRCULARBUFFER_ELEMENT ) ); + h->data = malloc( capacity * sizeof( JB4_CIRCULARBUFFER_ELEMENT ) ); h->capacity = capacity; h->writePos = 0; diff --git a/lib_dec/jbm_jb4_circularbuffer.h b/lib_dec/jbm_jb4_circularbuffer.h index 2e5a035dab0fa0fad72c5293edecc168ee370ab4..0891cdfd116126e4d5a54ec2dce378806e2964f3 100644 --- a/lib_dec/jbm_jb4_circularbuffer.h +++ b/lib_dec/jbm_jb4_circularbuffer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_dec/jbm_jb4_inputbuffer.c b/lib_dec/jbm_jb4_inputbuffer.c index 8eaf547838282229205a249c29fe2b7dd48176cb..8cec3bdf6120bcc58d027da44f89c4a1c8e84be2 100644 --- a/lib_dec/jbm_jb4_inputbuffer.c +++ b/lib_dec/jbm_jb4_inputbuffer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,11 +33,9 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ /** \file jbm_jb4_inputbuffer.c RTP input buffer with fixed capacity. */ -/* system includes */ #include #include #include "options.h" @@ -46,8 +44,10 @@ #ifdef DEBUGGING #include "debug.h" #endif -/* local includes */ #include "jbm_jb4_inputbuffer.h" +#include "wmc_auto.h" + +#define WMC_TOOL_SKIP /** input buffer with fixed capacity */ @@ -70,7 +70,7 @@ struct JB4_INPUTBUFFER int16_t JB4_INPUTBUFFER_Create( JB4_INPUTBUFFER_HANDLE *ph ) { - JB4_INPUTBUFFER_HANDLE h = count_malloc( sizeof( struct JB4_INPUTBUFFER ) ); + JB4_INPUTBUFFER_HANDLE h = malloc( sizeof( struct JB4_INPUTBUFFER ) ); h->data = NULL; h->capacity = 0; @@ -100,8 +100,8 @@ void JB4_INPUTBUFFER_Destroy( return; } if ( h->data ) - count_free( h->data ); - count_free( h ); + free( h->data ); + free( h ); *ph = NULL; return; @@ -117,7 +117,7 @@ int16_t JB4_INPUTBUFFER_Init( /* keep one element free to be able to decide between full/empty buffer */ ++capacity; - h->data = count_malloc( capacity * sizeof( JB4_INPUTBUFFER_ELEMENT ) ); + h->data = malloc( capacity * sizeof( JB4_INPUTBUFFER_ELEMENT ) ); h->capacity = capacity; h->writePos = 0; h->readPos = 0; @@ -359,3 +359,5 @@ uint16_t JB4_INPUTBUFFER_Size( return ret; } + +#undef WMC_TOOL_SKIP diff --git a/lib_dec/jbm_jb4_inputbuffer.h b/lib_dec/jbm_jb4_inputbuffer.h index 7ab80864702dcdd96da2c567b1c25b160f2a936f..7af58a31d309f6dc09644bb3021861730386f17d 100644 --- a/lib_dec/jbm_jb4_inputbuffer.h +++ b/lib_dec/jbm_jb4_inputbuffer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_dec/jbm_jb4_jmf.c b/lib_dec/jbm_jb4_jmf.c index 7b0dd2f188ce44df863d1b1b252c9b4752d31cdf..8ec24046f03c8b3e9d3254f23d9e13014bc22a74 100644 --- a/lib_dec/jbm_jb4_jmf.c +++ b/lib_dec/jbm_jb4_jmf.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /* local includes */ #include "jbm_jb4_jmf.h" @@ -92,7 +92,7 @@ static void JB4_JMF_popFront( JB4_JMF_HANDLE h ); int16_t JB4_JMF_Create( JB4_JMF_HANDLE *ph ) { - JB4_JMF_HANDLE h = count_malloc( sizeof( struct JB4_JMF ) ); + JB4_JMF_HANDLE h = malloc( sizeof( struct JB4_JMF ) ); JB4_CIRCULARBUFFER_Create( &h->fifo ); JB4_CIRCULARBUFFER_Create( &h->offsetFifo ); @@ -131,7 +131,7 @@ void JB4_JMF_Destroy( JB4_CIRCULARBUFFER_Destroy( &h->offsetFifo ); JB4_CIRCULARBUFFER_Destroy( &h->timeStampFifo ); - count_free( h ); + free( h ); *ph = NULL; return; diff --git a/lib_dec/jbm_jb4_jmf.h b/lib_dec/jbm_jb4_jmf.h index b945c318846af76f8b32076eeb93d24a9840d2ac..745d61ce92f3d2916ec7d6022a7c162efc5a0e8b 100644 --- a/lib_dec/jbm_jb4_jmf.h +++ b/lib_dec/jbm_jb4_jmf.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_dec/jbm_jb4sb.c b/lib_dec/jbm_jb4sb.c index 28dfd43e61538b692837738829867074463ad503..07d6acce9371459da0ef00ec09423bbfe72f4f5a 100644 --- a/lib_dec/jbm_jb4sb.c +++ b/lib_dec/jbm_jb4sb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,6 @@ /*==================================================================================== EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0 ====================================================================================*/ -/* WMC_TOOL_SKIP_FILE (basic ops file) */ /*! \file jbm_jb4sb.c EVS Jitter Buffer Management Interface */ @@ -46,7 +45,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /* local headers */ #include "jbm_jb4_circularbuffer.h" #include "jbm_jb4_inputbuffer.h" @@ -54,6 +53,7 @@ #include "jbm_jb4sb.h" #include "prot.h" +#define WMC_TOOL_SKIP #define JB4_MIN( a, b ) ( ( a ) > ( b ) ? ( b ) : ( a ) ) #define JB4_MAX( a, b ) ( ( a ) > ( b ) ? ( a ) : ( b ) ) @@ -208,7 +208,7 @@ ivas_error JB4_Create( int16_t iter; JB4_HANDLE h; - if ( ( h = count_malloc( sizeof( struct JB4 ) ) ) == NULL ) + if ( ( h = malloc( sizeof( struct JB4 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JB4 structure\n" ) ); } @@ -270,7 +270,7 @@ ivas_error JB4_Create( /* allocate memory for data units */ for ( iter = 0; iter < MAX_JBM_SLOTS; ++iter ) { - h->memorySlots[iter].data = count_malloc( MAX_AU_SIZE ); + h->memorySlots[iter].data = malloc( MAX_AU_SIZE ); h->freeMemorySlots[iter] = &h->memorySlots[iter]; } h->nFreeMemorySlots = MAX_JBM_SLOTS; @@ -304,10 +304,10 @@ void JB4_Destroy( for ( i = 0; i < MAX_JBM_SLOTS; ++i ) { - count_free( h->memorySlots[i].data ); + free( h->memorySlots[i].data ); } - count_free( h ); + free( h ); *ph = NULL; return; @@ -1508,3 +1508,5 @@ static int16_t JB4_inputBufferCompareFunction( return result; } + +#undef WMC_TOOL_SKIP diff --git a/lib_dec/jbm_jb4sb.h b/lib_dec/jbm_jb4sb.h index bc70413689b087cba0bf8053743804407fa31fcf..6b31111670cc7c7a185d8284a710263e54131d98 100644 --- a/lib_dec/jbm_jb4sb.h +++ b/lib_dec/jbm_jb4sb.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -63,9 +63,6 @@ struct JB4_DATAUNIT uint32_t rcvTime; /** true, if the data unit contains only silence */ bool silenceIndicator; - Word16 isAMRWB_IOmode; - /** for EVS payload */ - Word16 frameTypeIndex; /** Q bit for AMR-WB IO */ Word16 qBit; diff --git a/lib_dec/jbm_pcmdsp_apa.c b/lib_dec/jbm_pcmdsp_apa.c index 3968e38974dba01378f418e4d059f28b74e07a00..c09a21e790ea624e198d1fb0d1a756e13f92b728 100644 --- a/lib_dec/jbm_pcmdsp_apa.c +++ b/lib_dec/jbm_pcmdsp_apa.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -47,7 +47,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /* local headers */ #include "jbm_pcmdsp_apa.h" #include "jbm_pcmdsp_similarityestimation.h" @@ -66,11 +66,12 @@ struct apa_state_t { /* output buffer */ - int16_t buf_out[APA_BUF]; + int16_t *buf_out; + uint16_t buf_out_capacity; uint16_t l_buf_out; /* Hann window */ - float win[APA_BUF]; + float win[APA_BUF_PER_CHANNEL]; uint16_t l_halfwin; /* sampling rate [Hz] */ @@ -99,8 +100,8 @@ struct apa_state_t /* search length [samples] */ uint16_t l_search; - uint16_t wss; /* waveform subsampling */ - uint16_t css; /* correlation subsampling */ + uint16_t wss; /* waveform subsampling per channel */ + uint16_t css; /* correlation subsampling per channel */ float targetQuality; uint16_t qualityred; /* quality reduction threshold */ @@ -139,7 +140,8 @@ static bool extend_frm( apa_state_t *ps, const int16_t frm_in[], int16_t frm_out /* Allocates memory for state struct and initializes elements. */ uint8_t apa_init( - apa_state_t **pps ) + apa_state_t **pps, + int32_t num_channels ) { apa_state_t *ps = NULL; @@ -150,11 +152,18 @@ uint8_t apa_init( } /* allocate state struct */ - ps = (apa_state_t *) count_malloc( sizeof( apa_state_t ) ); + ps = (apa_state_t *) malloc( sizeof( apa_state_t ) ); if ( !ps ) { return 2; } + ps->num_channels = (uint16_t) num_channels; + ps->buf_out_capacity = (uint16_t) ( APA_BUF_PER_CHANNEL * num_channels ); + ps->buf_out = malloc( sizeof( float ) * ps->buf_out_capacity ); + if ( !ps->buf_out ) + { + return 2; + } apa_reset( ps ); *pps = ps; @@ -186,7 +195,6 @@ void apa_reset( ps->last_pitch = 0; ps->bad_frame_count = 0; ps->good_frame_count = 0; - ps->num_channels = 0; return; } @@ -195,8 +203,7 @@ void apa_reset( /* Sets the audio configuration. */ bool apa_set_rate( apa_state_t *ps, - const int32_t output_Fs, - const int16_t num_channels ) + const int32_t output_Fs ) { /* make sure pointer is valid */ if ( ps == NULL ) @@ -216,8 +223,10 @@ bool apa_set_rate( /* copy rate to state struct */ ps->rate = (uint16_t) output_Fs; - /* set number of channels */ - ps->num_channels = num_channels; + if ( ps->num_channels > APA_MAX_NUM_CHANNELS ) + { + return 1; + } /* * several other parameters depend on the sampling rate @@ -235,8 +244,7 @@ bool apa_set_rate( ps->l_seg = ( ps->rate / 100 ) * ps->num_channels; /* init Hann window */ - /* Note: l_win < APA_BUF is required, which is assured */ - /* because APA_MAX_RATE/100 = l_win = 441 < 2048 = APA_BUF */ + /* Note: l_win < APA_BUF_PER_CHANNEL is required */ /* Length of Hann window should be independent of * number of channels - same window applied to all channels */ ps->l_halfwin = ps->rate / 100; @@ -401,8 +409,11 @@ bool apa_exit( return 0; } + /* deallocate state struct members */ + free( ( *pps )->buf_out ); + /* deallocate state struct */ - count_free( *pps ); + free( *pps ); /* set pointer to NULL */ *pps = NULL; @@ -452,7 +463,7 @@ uint8_t apa_exec( ) { uint16_t i; - int16_t frm_in[APA_BUF]; + int16_t frm_in[APA_BUF]; /* TODO(mcjbm): this buffer could be smaller - always allocates space for 16 channels */ uint16_t l_frm_out; int16_t l_rem; int32_t dl_scaled, dl_copied, l_frm_out_target; @@ -462,6 +473,9 @@ uint8_t apa_exec( statsResetThreshold = 1637; statsResetShift = 2; + /* Convert max_scaling from "per channel" to total */ + maxScaling *= ps->num_channels; + /* make sure no invalid output is used */ *l_out = 0; l_frm_out = 0; @@ -565,7 +579,7 @@ uint8_t apa_exec( /* copy output to internal buffer */ /* avoid buffer overflow: */ /* discard old samples; always keep at least most recent l_frm samples */ - if ( ( ps->l_buf_out + l_frm_out ) > APA_BUF ) + if ( ( ps->l_buf_out + l_frm_out ) > ps->buf_out_capacity ) { int16_t *buf_out_ptr1 = ps->buf_out; int16_t *buf_out_ptr2; @@ -583,7 +597,7 @@ uint8_t apa_exec( ps->l_buf_out = l_rem; } /* append new output samples */ - if ( ( ps->l_buf_out + l_frm_out ) > APA_BUF ) + if ( ( ps->l_buf_out + l_frm_out ) > ps->buf_out_capacity ) { return 5; } @@ -818,7 +832,7 @@ static bool logarithmic_search( do { coeff_max = -FLT_MAX; /* will always be overwritten with result of first correlation */ - for ( i = s_start; i < s_start + inlen; i += css ) + for ( i = s_start; i < s_start + inlen; i += css * ps->num_channels ) { if ( ( wss == 1 ) && ( ps->num_channels == 1 ) ) { @@ -929,7 +943,7 @@ static bool find_synch( /* pass last pitch to search function as prediction value */ *synch_pos = ps->last_pitch; - logarithmic_search( ps, in, s_start, s_len, offset, fixed_pos, corr_len, ps->wss, ps->css * ps->num_channels, synch_pos ); + logarithmic_search( ps, in, s_start, s_len, offset, fixed_pos, corr_len, ps->wss, ps->css, synch_pos ); /* assert synch_pos is cleanly divisible by number of channels */ assert( *synch_pos % ps->num_channels == 0 ); diff --git a/lib_dec/jbm_pcmdsp_apa.h b/lib_dec/jbm_pcmdsp_apa.h index 5cf4e7d8b6d4dc97f4694bdae5ac18241fa5411c..2f0da13e9941abd012b4ac35db520d8e9d3c5eb4 100644 --- a/lib_dec/jbm_pcmdsp_apa.h +++ b/lib_dec/jbm_pcmdsp_apa.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -50,7 +50,9 @@ */ /* size of IO buffers (a_in[], a_out[]) for apa_exec() */ -#define APA_BUF 4096 * 3 +#define APA_BUF_PER_CHANNEL ( 960 * 3 ) +#define APA_MAX_NUM_CHANNELS 16 +#define APA_BUF ( APA_BUF_PER_CHANNEL * APA_MAX_NUM_CHANNELS ) /* min/max sampling rate [Hz] */ #define APA_MIN_RATE 1000 @@ -89,7 +91,8 @@ typedef struct apa_state_t *PCMDSP_APA_HANDLE; /*! Allocates memory for state struct and initializes elements. * @return 0 on success, 1 on failure */ -uint8_t apa_init( apa_state_t **s ); +uint8_t apa_init( apa_state_t **s, + int32_t num_channels ); /*! Sets state variables to initial value. */ void apa_reset( apa_state_t *s ); @@ -103,7 +106,7 @@ void apa_reset( apa_state_t *s ); * @param[in] output_Fs sample rate [Hz] * @param[in] num_channels number of channels * @return 0 on success, 1 on failure */ -bool apa_set_rate( apa_state_t *ps, const int32_t output_Fs, const int16_t num_channels ); +bool apa_set_rate( apa_state_t *ps, const int32_t output_Fs ); /*! Set scaling. * The scale is given in % and will be valid until changed again. diff --git a/lib_dec/jbm_pcmdsp_fifo.c b/lib_dec/jbm_pcmdsp_fifo.c index 86990618fd0d5122cbdaef3d0e7fafd673213191..522da30dde0ef79caeb137be4003b1a831bb6711 100644 --- a/lib_dec/jbm_pcmdsp_fifo.c +++ b/lib_dec/jbm_pcmdsp_fifo.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "jbm_pcmdsp_fifo.h" @@ -51,7 +51,7 @@ int16_t pcmdsp_fifo_create( PCMDSP_FIFO_HANDLE *ph ) { - PCMDSP_FIFO_HANDLE h = count_malloc( sizeof( struct PCMDSP_FIFO ) ); + PCMDSP_FIFO_HANDLE h = malloc( sizeof( struct PCMDSP_FIFO ) ); h->size = 0; h->capacity = 0; @@ -85,10 +85,10 @@ void pcmdsp_fifo_destroy( if ( h->dataBegin ) { - count_free( h->dataBegin ); + free( h->dataBegin ); } - count_free( h ); + free( h ); *ph = NULL; return; @@ -97,16 +97,16 @@ void pcmdsp_fifo_destroy( /* Initializes the FIFO with a fixed maximum allowed number audio samples. */ int16_t pcmdsp_fifo_init( PCMDSP_FIFO_HANDLE h, - uint16_t nSamples, + uint16_t nSamplesPerChannel, uint16_t nChannels, uint16_t nBytesPerSample ) { - uint16_t nDataBytes; + uint32_t nDataBytes; /* Must be 32-bit, otherwise overflows for multichannel */ - h->capacity = nSamples; + h->capacity = nSamplesPerChannel; h->nBytesPerSampleSet = nChannels * nBytesPerSample; - nDataBytes = nSamples * h->nBytesPerSampleSet; - h->dataBegin = count_malloc( nDataBytes ); + nDataBytes = nSamplesPerChannel * h->nBytesPerSampleSet; + h->dataBegin = malloc( nDataBytes ); h->dataEnd = h->dataBegin + nDataBytes; h->dataWriteIterator = h->dataBegin; h->dataReadIterator = h->dataBegin; @@ -201,7 +201,7 @@ int16_t pcmdsp_fifo_read( /* Returns the number of samples per channel that can be read (number of currently stored samples). */ -uint16_t pcmdsp_fifo_nReadableSamples( +uint16_t pcmdsp_fifo_nReadableSamplesPerChannel( const PCMDSP_FIFO_HANDLE h ) { return h->size; diff --git a/lib_dec/jbm_pcmdsp_fifo.h b/lib_dec/jbm_pcmdsp_fifo.h index bdd186702e1be2b78e5bcf4816ecc643628fc012..faa482e69538ca0b7ccfb0406b5e36b85bbedc05 100644 --- a/lib_dec/jbm_pcmdsp_fifo.h +++ b/lib_dec/jbm_pcmdsp_fifo.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -70,12 +70,12 @@ int16_t pcmdsp_fifo_create( PCMDSP_FIFO_HANDLE *ph ); void pcmdsp_fifo_destroy( PCMDSP_FIFO_HANDLE *ph ); -int16_t pcmdsp_fifo_init( PCMDSP_FIFO_HANDLE h, uint16_t nSamples, uint16_t nChannels, uint16_t nBytesPerSample ); +int16_t pcmdsp_fifo_init( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChannel, uint16_t nChannels, uint16_t nBytesPerSample ); int16_t pcmdsp_fifo_write( PCMDSP_FIFO_HANDLE h, const uint8_t *samples, uint16_t nSamplesPerChannel ); int16_t pcmdsp_fifo_read( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChannel, uint8_t *samples ); -uint16_t pcmdsp_fifo_nReadableSamples( const PCMDSP_FIFO_HANDLE h ); +uint16_t pcmdsp_fifo_nReadableSamplesPerChannel( const PCMDSP_FIFO_HANDLE h ); #endif /* JBM_PCMDSP_FIFO_H */ diff --git a/lib_dec/jbm_pcmdsp_similarityestimation.c b/lib_dec/jbm_pcmdsp_similarityestimation.c index 3016fab5e1dac6f1652469379679250bc44c09e7..f575acc7ad337f77ac81495ec36340ce1ce2ef49 100644 --- a/lib_dec/jbm_pcmdsp_similarityestimation.c +++ b/lib_dec/jbm_pcmdsp_similarityestimation.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /* local headers */ #include "jbm_pcmdsp_similarityestimation.h" diff --git a/lib_dec/jbm_pcmdsp_similarityestimation.h b/lib_dec/jbm_pcmdsp_similarityestimation.h index 36f64d7297b5ea6f469844bd355bac5b4320b311..4dc92f27b7cff9320280124d17733c6d6f7feabc 100644 --- a/lib_dec/jbm_pcmdsp_similarityestimation.h +++ b/lib_dec/jbm_pcmdsp_similarityestimation.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_dec/jbm_pcmdsp_window.c b/lib_dec/jbm_pcmdsp_window.c index 94182e5ad67ff603ba4157178d44a6bda9429277..f9f71ac802093d4a0b8dbfcab05d43895dae989d 100644 --- a/lib_dec/jbm_pcmdsp_window.c +++ b/lib_dec/jbm_pcmdsp_window.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #endif #include "jbm_pcmdsp_window.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * hannWindow() diff --git a/lib_dec/jbm_pcmdsp_window.h b/lib_dec/jbm_pcmdsp_window.h index cf697b6b9c6f6886f7518c2039c883c3bc3b4dea..67759e97384d759c2666f260eb2fd0754afe1326 100644 --- a/lib_dec/jbm_pcmdsp_window.h +++ b/lib_dec/jbm_pcmdsp_window.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_dec/lead_deindexing.c b/lib_dec/lead_deindexing.c index 246e0df391e41d8c7649683295a8d22f0e9a5c37..830daa81207796655b42c6f8125b61e450f42d39 100644 --- a/lib_dec/lead_deindexing.c +++ b/lib_dec/lead_deindexing.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_dec.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index d45527b740d6a8faa80fddabf11d9d5688203bea..038385033a08aeda287e805abad0b3572e62dfc1 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,9 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#ifdef WMOPS -#include "wmops.h" -#endif +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local structs @@ -52,11 +50,14 @@ struct IVAS_DEC_VOIP { - uint16_t nSamplesFrame; + uint16_t nSamplesFrame; /* Total number of samples in a frame (includes number of channels) */ JB4_HANDLE hJBM; PCMDSP_APA_HANDLE hTimeScaler; PCMDSP_FIFO_HANDLE hFifoAfterTimeScaler; uint16_t lastDecodedWasActive; + int16_t *apaExecBuffer; /* Buffer for APA scaling */ + JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ + uint16_t *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ #ifdef SUPPORT_JBM_TRACEFILE IVAS_JBM_TRACE_DATA JbmTraceData; #endif @@ -121,7 +122,7 @@ ivas_error IVAS_DEC_Open( * Allocate and initialize IVAS application decoder handle *-----------------------------------------------------------------*/ - if ( ( *phIvasDec = (IVAS_DEC_HANDLE) count_malloc( sizeof( struct IVAS_DEC ) ) ) == NULL ) + if ( ( *phIvasDec = (IVAS_DEC_HANDLE) malloc( sizeof( struct IVAS_DEC ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS decoder handle" ); } @@ -143,12 +144,12 @@ ivas_error IVAS_DEC_Open( * Initialize IVAS-codec decoder state *-----------------------------------------------------------------*/ - if ( ( hIvasDec->st_ivas = (Decoder_Struct *) count_malloc( sizeof( Decoder_Struct ) ) ) == NULL ) + if ( ( hIvasDec->st_ivas = (Decoder_Struct *) malloc( sizeof( Decoder_Struct ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS decoder structure" ); } - if ( ( hIvasDec->st_ivas->hDecoderConfig = (DECODER_CONFIG_HANDLE) count_malloc( sizeof( DECODER_CONFIG ) ) ) == NULL ) + if ( ( hIvasDec->st_ivas->hDecoderConfig = (DECODER_CONFIG_HANDLE) malloc( sizeof( DECODER_CONFIG ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for Decoder config structure" ); } @@ -259,7 +260,7 @@ void IVAS_DEC_Close( ( *phIvasDec )->st_ivas = NULL; } - count_free( *phIvasDec ); + free( *phIvasDec ); *phIvasDec = NULL; phIvasDec = NULL; @@ -486,36 +487,44 @@ ivas_error IVAS_DEC_EnableVoIP( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - if ( !hIvasDec->isInitialized ) - { - if ( ( error = ivas_init_decoder( hIvasDec->st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } - - hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; - hIvasDec->isInitialized = true; - } hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; hIvasDec->Opt_VOIP = 1; - hIvasDec->st_ivas->hSCE[0]->hCoreCoder[0]->codec_mode = 0; - hDecoderConfig->nchan_out = 1; /* VoIP only supported in mono */ + + hDecoderConfig->nchan_out = audioCfg2channels( hDecoderConfig->output_config ); + assert( hDecoderConfig->nchan_out > 0 && "EXT output not yet supported in VoIP mode" ); + if ( ( error = input_format_API_to_internal( inputFormat, &hIvasDec->bitstreamformat, &hIvasDec->sdp_hf_only, true ) ) != IVAS_ERR_OK ) { return error; } - hIvasDec->hVoIP = count_malloc( sizeof( IVAS_DEC_VOIP ) ); + hIvasDec->hVoIP = malloc( sizeof( IVAS_DEC_VOIP ) ); + if ( hIvasDec->hVoIP == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + hIvasDec->hVoIP->lastDecodedWasActive = 0; - hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + hIvasDec->hVoIP->hCurrentDataUnit = NULL; + hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs * hDecoderConfig->nchan_out / FRAMES_PER_SEC ); - /* Copy updated configuration to core coder */ + hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( int16_t ) * APA_BUF_PER_CHANNEL * hDecoderConfig->nchan_out ); + if ( hIvasDec->hVoIP->apaExecBuffer == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } - if ( hIvasDec->hVoIP == NULL ) +#define WMC_TOOL_SKIP + /* Bitstream conversion is not counted towards complexity and memory usage */ + hIvasDec->hVoIP->bs_conversion_buf = malloc( sizeof( uint16_t ) * ( MAX_BITS_PER_FRAME + 4 * 8 ) ); +#undef WMC_TOOL_SKIP + + if ( hIvasDec->hVoIP->bs_conversion_buf == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } + /* initialize JBM */ if ( ( error = JB4_Create( &hIvasDec->hVoIP->hJBM ) != IVAS_ERR_OK ) != IVAS_ERR_OK ) { @@ -551,8 +560,9 @@ ivas_error IVAS_DEC_EnableVoIP( return IVAS_ERR_INIT_ERROR; } - if ( apa_init( &hIvasDec->hVoIP->hTimeScaler ) != 0 || - apa_set_rate( hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->output_Fs, hDecoderConfig->nchan_out ) != 0 || + if ( apa_init( &hIvasDec->hVoIP->hTimeScaler, + hDecoderConfig->nchan_out ) != 0 || + apa_set_rate( hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || apa_set_complexity_options( hIvasDec->hVoIP->hTimeScaler, wss, css ) != 0 || apa_set_quality( hIvasDec->hVoIP->hTimeScaler, 1, 4, 4 ) != 0 || pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoAfterTimeScaler ) != 0 || @@ -575,7 +585,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ uint16_t *serial, /* i : buffer containing serial input bitstream. Each bit should be stored as a single uint16_t value */ const uint16_t num_bits, /* i : number of bits in input bitstream */ - const int16_t bfi /* i : bad frame indicator flag */ + int16_t bfi /* i : bad frame indicator flag */ ) { ivas_error error; @@ -593,19 +603,61 @@ ivas_error IVAS_DEC_FeedFrame_Serial( return error; } - hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; + if ( hIvasDec->hVoIP != NULL && hIvasDec->hVoIP->hCurrentDataUnit != NULL ) + { + DEC_CORE_HANDLE st = hIvasDec->st_ivas->hSCE[0]->hCoreCoder[0]; + st->ini_frame = 0; + st->prev_use_partial_copy = 0; + hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = hIvasDec->hVoIP->hCurrentDataUnit->dataSize * FRAMES_PER_SEC; + } + else + { + hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; + } } hIvasDec->isInitialized = true; } - if ( !bfi ) + if ( !bfi ) /* TODO(mcjbm): Is this ok for bfi == 2 (partial frame)? Is there enough info to fully configure decoder? */ { hIvasDec->hasBeenFedFirstGoodFrame = true; } + /* Update redundant frame information in EVS (pre- read indices) */ + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS && hIvasDec->hVoIP != NULL && hIvasDec->hVoIP->hCurrentDataUnit != NULL ) + { + DEC_CORE_HANDLE st = hIvasDec->st_ivas->hSCE[0]->hCoreCoder[0]; + st->bit_stream = serial; + + if ( hIvasDec->hVoIP->hCurrentDataUnit->partial_frame || st->prev_use_partial_copy ) + { + st->next_coder_type = hIvasDec->hVoIP->hCurrentDataUnit->nextCoderType; + } + else + { + st->next_coder_type = INACTIVE; + } + + if ( hIvasDec->hVoIP->hCurrentDataUnit->partial_frame == 1 && bfi != 1 ) + { + bfi = 2; + } + } + error = read_indices( hIvasDec->st_ivas, serial, num_bits, &hIvasDec->prev_ft_speech, &hIvasDec->CNG, bfi ); + /* Update redundant frame information in EVS (post- read indices) */ + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS && + hIvasDec->hVoIP != NULL && + hIvasDec->hVoIP->hCurrentDataUnit != NULL && + hIvasDec->hVoIP->hCurrentDataUnit->partial_frame != 0 ) + { + DEC_CORE_HANDLE st = hIvasDec->st_ivas->hSCE[0]->hCoreCoder[0]; + st->codec_mode = MODE2; + st->use_partial_copy = 1; + } + return error; } @@ -619,7 +671,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial( ivas_error IVAS_DEC_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - int16_t *nOutSamples /* o : number of samples written to output buffer */ + int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ ) { Decoder_Struct *st_ivas; @@ -940,6 +992,73 @@ ivas_error IVAS_DEC_GetHrtfHandle( } +#ifdef HRTF_BINARY_FILE +/*---------------------------------------------------------------------* + * IVAS_DEC_GetHrtfCRendHandle( ) + * + * + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_GetHrtfCRendHandle( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* o : Set of HRTF handle */ +) +{ + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hSetOfHRTF == NULL ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + *hSetOfHRTF = hIvasDec->st_ivas->hSetOfHRTF; + + return IVAS_ERR_OK; +} +#endif + +#ifdef HRTF_BINARY_FILE +/*---------------------------------------------------------------------* + * IVAS_DEC_GetHrtfFastConvHandle( ) + * + * + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_GetHrtfFastConvHandle( + IVAS_DEC_HANDLE hIvasDec, /* i/oL IVAS decoder handle */ + IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv /* o : FASTCONV HRTF handle */ +) +{ + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHrtfFastConv == NULL ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + *hHrtfFastConv = hIvasDec->st_ivas->hHrtfFastConv; + + return IVAS_ERR_OK; +} + +/*---------------------------------------------------------------------* + * IVAS_DEC_GetHrtfParamBinHandle( ) + * + * + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_GetHrtfParamBinHandle( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* o : Parametric binauralizer HRTF handle */ +) +{ + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHrtfParambin == NULL ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + *hHrtfParambin = hIvasDec->st_ivas->hHrtfParambin; + + return IVAS_ERR_OK; +} +#endif + /*---------------------------------------------------------------------* * IVAS_DEC_GetRenderConfig( ) * @@ -1052,10 +1171,16 @@ ivas_error IVAS_DEC_GetDelay( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + if ( !hIvasDec->hasDecodedFirstGoodFrame ) + { + /* Delay depends on IVAS format, which is unknown until first frame has been decoded */ + return IVAS_ERR_WAITING_FOR_BITSTREAM; + } + st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; - *nSamples = NS2SA( hDecoderConfig->output_Fs, get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], st_ivas->renderer_type, st_ivas->binaural_latency_ns ) ); + *nSamples = (int16_t) roundf( (float) get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], st_ivas->binaural_latency_ns ) * hDecoderConfig->output_Fs / 1000000000.f ); *timeScale = hDecoderConfig->output_Fs; @@ -1139,11 +1264,39 @@ static bool isSidFrame( return false; } +static void bsCompactToSerial( const uint8_t *compact, uint16_t *serial, uint16_t num_bits ) +{ +/* Bitstream conversion is not counted towards complexity and memory usage */ +#define WMC_TOOL_SKIP + uint32_t i; + uint8_t byte = 0; + const uint8_t mask = 0x80; + + for ( i = 0; i < num_bits; ++i ) + { + if ( i % 8 == 0 ) + { + byte = compact[i / 8]; + } + + serial[i] = ( byte & mask ) >> 7; + + byte <<= 1; + } + + /* Add 4 padding bytes required by core coder */ + for ( i = 0; i < 4 * 8; ++i ) + { + serial[num_bits + i] = 0; + } +#undef WMC_TOOL_SKIP +} + /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_FeedFrame( ) * - * + * Feed RTP packet into internal jitter buffer *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_VoIP_FeedFrame( @@ -1153,8 +1306,6 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( const uint16_t rtpSequenceNumber, /* i : RTP sequence number (16 bits) */ const uint32_t rtpTimeStamp, /* i : RTP timestamp (32 bits) */ const uint32_t rcvTime_ms, /* i : receive time of the RTP packet in milliseconds */ - const bool isAMRWB_IOmode, /* i : AMRWB flag */ - const uint16_t frameTypeIndex, /* i : core mode for frame */ const bool qBit /* i : Q bit for AMR-WB IO */ ) { @@ -1186,8 +1337,6 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( dataUnit->timeStamp = rtpTimeStamp; dataUnit->partial_frame = 0; dataUnit->partialCopyOffset = partialCopyOffset; - dataUnit->isAMRWB_IOmode = isAMRWB_IOmode; - dataUnit->frameTypeIndex = frameTypeIndex; dataUnit->qBit = qBit; /* add the frame to the JBM */ @@ -1211,8 +1360,6 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( dataUnit->timeStamp = rtpTimeStamp - partialCopyOffset * dataUnit->duration; dataUnit->partial_frame = 1; dataUnit->partialCopyOffset = partialCopyOffset; - dataUnit->isAMRWB_IOmode = isAMRWB_IOmode; - dataUnit->frameTypeIndex = frameTypeIndex; dataUnit->qBit = qBit; /* add the frame to the JBM */ @@ -1235,22 +1382,23 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - int16_t *nOutSamples, /* o : number of samples written to output buffer */ + uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - const uint32_t pcmBufSize, /* i : size of the PCM output buffer */ const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#ifdef SUPPORT_JBM_TRACEFILE + , + JbmTraceFileWriterFn jbmWriterFn, + void *jbmWriter +#endif ) { Decoder_Struct *st_ivas; DECODER_CONFIG_HANDLE hDecoderConfig; - Decoder_State *st; IVAS_DEC_VOIP *hVoIP; uint32_t extBufferedTime_ms, scale, maxScaling; uint16_t nTimeScalerOutSamples; JB4_DATAUNIT_HANDLE dataUnit; - uint16_t bit_stream[MAX_BITS_PER_FRAME + 4 * 8]; int16_t nOutSamplesElse; - uint16_t soundCardFrameSize; uint16_t extBufferedSamples; int16_t timeScalingDone; int16_t result; @@ -1260,20 +1408,19 @@ ivas_error IVAS_DEC_VoIP_GetSamples( st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; - st = st_ivas->hSCE[0]->hCoreCoder[0]; hVoIP = hIvasDec->hVoIP; - soundCardFrameSize = hVoIP->nSamplesFrame; timeScalingDone = 0; - assert( hVoIP->nSamplesFrame <= pcmBufSize ); - assert( hVoIP->nSamplesFrame <= APA_BUF ); - - st_ivas->hSCE[0]->hCoreCoder[0]->bit_stream = bit_stream; + /* TODO(mcjbm): ringbuffer capacity should be configurable by user */ + if ( nSamplesPerChannel > hVoIP->hFifoAfterTimeScaler->capacity || nSamplesPerChannel == 0 ) + { + return IVAS_ERR_WRONG_PARAMS; + } /* make sure that the FIFO after decoder/scaler contains at least one sound card frame (i.e. 20ms) */ - while ( pcmdsp_fifo_nReadableSamples( hVoIP->hFifoAfterTimeScaler ) < soundCardFrameSize ) + while ( pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ) < nSamplesPerChannel ) { - extBufferedSamples = pcmdsp_fifo_nReadableSamples( hVoIP->hFifoAfterTimeScaler ); + extBufferedSamples = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; dataUnit = NULL; /* pop one access unit from the jitter buffer */ @@ -1300,52 +1447,27 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* copy bitstream into decoder state */ if ( dataUnit ) { - if ( st->codec_mode != 0 ) - { - read_indices_from_djb( st, dataUnit->data, &hIvasDec->CNG, dataUnit->dataSize, - dataUnit->isAMRWB_IOmode, dataUnit->frameTypeIndex, dataUnit->qBit, hIvasDec->bitstreamformat, hIvasDec->amrwb_rfc4867_flag, - ( dataUnit->partial_frame == TRUE ) ? 1 : 0, dataUnit->nextCoderType ); + hIvasDec->hVoIP->hCurrentDataUnit = dataUnit; - if ( dataUnit->partial_frame != 0 ) - { - st->codec_mode = MODE2; - st->use_partial_copy = 1; - } - } - else /* initialize decoder with first received frame */ - { - /* initialize, since this is needed within read_indices_from_djb, to correctly set st->last_codec_mode */ - st->ini_frame = 0; - st->prev_use_partial_copy = 0; - st_ivas->hDecoderConfig->ivas_total_brate = dataUnit->dataSize * FRAMES_PER_SEC; - - read_indices_from_djb( st, dataUnit->data, &hIvasDec->CNG, dataUnit->dataSize, - dataUnit->isAMRWB_IOmode, dataUnit->frameTypeIndex, dataUnit->qBit, hIvasDec->bitstreamformat, hIvasDec->amrwb_rfc4867_flag, - 0, 0 ); - } + bsCompactToSerial( dataUnit->data, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize ); + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize, 0 ); } - else if ( st->codec_mode != 0 ) + else if ( hIvasDec->hasDecodedFirstGoodFrame ) { - read_indices_from_djb( st, NULL, &hIvasDec->CNG, 0, - 0, 0, 0, hIvasDec->bitstreamformat, 0, - 0, 0 ); + /* Decoder has been initialized with first good frame - do PLC */ + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, 0, 1 ); } /* decode */ - if ( st->codec_mode == 0 ) + if ( !hIvasDec->hasBeenFedFirstGoodFrame ) { - /* codec mode to use not known yet */ - set_s( pcmBuf, 0, hVoIP->nSamplesFrame ); + /* codec mode to use not known yet - simply output silence */ + set_s( hVoIP->apaExecBuffer, 0, hVoIP->nSamplesFrame ); /* TODO(mcjbm): Could be optimized: just write directly to output buffer */ } else { - if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) - { - /* Update total bitrate after reading indices */ - hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = st->total_brate; - } - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamplesElse ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, hVoIP->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) { return error; } @@ -1380,29 +1502,36 @@ ivas_error IVAS_DEC_VoIP_GetSamples( { return IVAS_ERR_UNKNOWN; } - result = apa_exec( hVoIP->hTimeScaler, pcmBuf, (uint16_t) ( hVoIP->nSamplesFrame * hDecoderConfig->nchan_out ), (uint16_t) maxScaling, pcmBuf, &nTimeScalerOutSamples ); + result = apa_exec( hVoIP->hTimeScaler, hVoIP->apaExecBuffer, hVoIP->nSamplesFrame, (uint16_t) maxScaling, hVoIP->apaExecBuffer, &nTimeScalerOutSamples ); if ( result != 0 ) { return IVAS_ERR_UNKNOWN; } - assert( nTimeScalerOutSamples <= pcmBufSize ); assert( nTimeScalerOutSamples <= APA_BUF ); /* append scaled samples to FIFO */ - if ( pcmdsp_fifo_write( hVoIP->hFifoAfterTimeScaler, (uint8_t *) pcmBuf, (uint16_t) ( nTimeScalerOutSamples / hDecoderConfig->nchan_out ) ) != 0 ) + if ( pcmdsp_fifo_write( hVoIP->hFifoAfterTimeScaler, (uint8_t *) hVoIP->apaExecBuffer, (uint16_t) ( nTimeScalerOutSamples / hDecoderConfig->nchan_out ) ) != 0 ) { return IVAS_ERR_UNKNOWN; } #ifdef SUPPORT_JBM_TRACEFILE - /* store JBM trace data entry */ - store_JbmData( hVoIP, dataUnit, systemTimestamp_ms, extBufferedSamples, hDecoderConfig->output_Fs ); + /* jbmWriterFn and jbmWriter may be NULL if tracefile writing was not requested on CLI */ + if ( jbmWriterFn != NULL && jbmWriter != NULL ) + { + /* write JBM trace data entry */ + store_JbmData( hVoIP, dataUnit, systemTimestamp_ms, extBufferedSamples, hDecoderConfig->output_Fs ); + if ( ( jbmWriterFn( &hVoIP->JbmTraceData, jbmWriter ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing JBM Trace data to file\n" ); + return IVAS_ERR_UNKNOWN; + } + } #endif } - /* fetch one frame for the sound card from FIFO */ - *nOutSamples = (int16_t) soundCardFrameSize; - if ( pcmdsp_fifo_read( hVoIP->hFifoAfterTimeScaler, *nOutSamples, (uint8_t *) pcmBuf ) != 0 ) + /* fetch a user-specified number of samples from FIFO */ + if ( pcmdsp_fifo_read( hVoIP->hFifoAfterTimeScaler, nSamplesPerChannel, (uint8_t *) pcmBuf ) != 0 ) { return IVAS_ERR_UNKNOWN; } @@ -1464,7 +1593,20 @@ static void IVAS_DEC_Close_VoIP( pcmdsp_fifo_destroy( &hVoIP->hFifoAfterTimeScaler ); - count_free( hVoIP ); + if ( hVoIP->apaExecBuffer != NULL ) + { + free( hVoIP->apaExecBuffer ); + } + + if ( hVoIP->bs_conversion_buf != NULL ) + { +#define WMC_TOOL_SKIP + /* Bitstream conversion is not counted towards complexity and memory usage */ + free( hVoIP->bs_conversion_buf ); +#undef WMC_TOOL_SKIP + } + + free( hVoIP ); return; } @@ -1493,31 +1635,18 @@ static void store_JbmData( JbmTraceData = &hVoIP->JbmTraceData; - /* the first sample of the decoded/concealed frame will be played after the samples in the ring buffer */ - JbmTraceData->playTime = systemTimestamp_ms + extBufferedSamples * 1000.0 / output_Fs; - - /* rtpSeqNo;rtpTs;rcvTime;playTime;active\n */ - if ( dataUnit ) + JbmTraceData->systemTimestamp_ms = systemTimestamp_ms; + JbmTraceData->extBufferedSamples = extBufferedSamples; + JbmTraceData->lastDecodedWasActive = hVoIP->lastDecodedWasActive; + JbmTraceData->output_Fs = output_Fs; + JbmTraceData->dataUnit_flag = dataUnit != NULL; + if ( dataUnit != NULL ) { JbmTraceData->sequenceNumber = dataUnit->sequenceNumber; - JbmTraceData->partialCopyOffset = dataUnit->partialCopyOffset; JbmTraceData->timeStamp = dataUnit->timeStamp; JbmTraceData->rcvTime = dataUnit->rcvTime; - JbmTraceData->lastDecodedWasActive = hVoIP->lastDecodedWasActive; - - JbmTraceData->dataUnit_flag = 1; - if ( dataUnit->partial_frame == 1 ) - { - JbmTraceData->partial_frame_flag = 1; - } - else - { - JbmTraceData->partial_frame_flag = 0; - } - } - else - { - JbmTraceData->dataUnit_flag = 0; + JbmTraceData->partial_frame = dataUnit->partial_frame; + JbmTraceData->partialCopyOffset = dataUnit->partialCopyOffset; } return; @@ -1794,7 +1923,6 @@ static ivas_error printConfigInfo_dec( return IVAS_ERR_OK; } - /*---------------------------------------------------------------------* * IVAS_DEC_PrintConfig( ) * @@ -1813,6 +1941,7 @@ void IVAS_DEC_PrintConfig( #ifdef DEBUGGING +#define WMC_TOOL_SKIP void IVAS_DEC_PrintConfigWithBitstream( IVAS_DEC_HANDLE hIvasDec, const bool quietModeEnabled, @@ -1824,7 +1953,7 @@ void IVAS_DEC_PrintConfigWithBitstream( /* Create a copy of decoder struct that will be modified by preview_indices(), * leaving the original decoder struct unchanged. The additional memory used here * should not be counted towards memory footprint of the decoder. */ - st_ivas = dynamic_malloc( sizeof( Decoder_Struct ) ); + st_ivas = malloc( sizeof( Decoder_Struct ) ); memcpy( st_ivas, hIvasDec->st_ivas, sizeof( Decoder_Struct ) ); preview_indices( st_ivas, bit_stream, num_bits ); @@ -1832,10 +1961,37 @@ void IVAS_DEC_PrintConfigWithBitstream( /* Print config from modified decoder struct */ printConfigInfo_dec( st_ivas, hIvasDec->bitstreamformat, hIvasDec->Opt_VOIP, quietModeEnabled ); - dynamic_free( st_ivas ); + free( st_ivas ); + + return; +} + +void IVAS_DEC_PrintConfigWithVoipBitstream( + IVAS_DEC_HANDLE hIvasDec, + const bool quietModeEnabled, + uint8_t *au, + const uint16_t auSizeBits ) +{ + Decoder_Struct *st_ivas; + uint16_t bit_stream[MAX_BITS_PER_FRAME + 4 * 8]; + + /* Create a copy of decoder struct that will be modified by preview_indices(), + * leaving the original decoder struct unchanged. The additional memory used here + * should not be counted towards memory footprint of the decoder. */ + st_ivas = malloc( sizeof( Decoder_Struct ) ); + memcpy( st_ivas, hIvasDec->st_ivas, sizeof( Decoder_Struct ) ); + + bsCompactToSerial( au, bit_stream, auSizeBits ); + preview_indices( st_ivas, bit_stream, auSizeBits ); + + /* Print config from modified decoder struct */ + printConfigInfo_dec( st_ivas, hIvasDec->bitstreamformat, hIvasDec->Opt_VOIP, quietModeEnabled ); + + free( st_ivas ); return; } +#undef WMC_TOOL_SKIP #endif diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index f43034c885ad422fe62e26bc78302ebef5a47c54..6761ebe6285e4cf2185f0820e536908e3d0d2559 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -103,6 +103,11 @@ typedef enum _IVAS_DEC_BS_FORMAT typedef struct IVAS_DEC *IVAS_DEC_HANDLE; +#ifdef SUPPORT_JBM_TRACEFILE +/* Callback function for JBM tracefile writing */ +typedef ivas_error ( *JbmTraceFileWriterFn )( const void *data, void *writer ); +#endif + /* clang-format off */ /*---------------------------------------------------------------------* @@ -145,14 +150,14 @@ ivas_error IVAS_DEC_FeedFrame_Serial( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ uint16_t *serial, /* i : buffer containing serial input bitstream. Each bit should be stored as a single uint16_t value */ const uint16_t num_bits, /* i : number of bits in input bitstream */ - const int16_t bfi /* i : bad frame indicator flag */ + int16_t bfi /* i : bad frame indicator flag */ ); /*! r: decoder error code */ ivas_error IVAS_DEC_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - int16_t *nOutSamples /* o : number of samples written to output buffer */ + int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ ); /*! r: error code */ @@ -183,18 +188,19 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( const uint16_t rtpSequenceNumber, /* i : RTP sequence number (16 bits) */ const uint32_t rtpTimeStamp, /* i : RTP timestamp (32 bits) */ const uint32_t rcvTime_ms, /* i : receive time of the RTP packet in milliseconds */ - const bool isAMRWB_IOmode, /* i : AMRWB flag */ - const uint16_t frameTypeIndex, /* i : core mode for frame */ const bool qBit /* i : Q bit for AMR-WB IO */ ); /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - int16_t *nOutSamples, /* o : number of samples written to output buffer */ + uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - const uint32_t pcmBufSize, /* i : size of the PCM output buffer */ const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#ifdef SUPPORT_JBM_TRACEFILE + , JbmTraceFileWriterFn jbmWriterFn, + void* jbmWriter +#endif ); /* Setter functions - apply changes to decoder configuration */ @@ -278,6 +284,24 @@ ivas_error IVAS_DEC_GetHrtfHandle( IVAS_DEC_HRTF_HANDLE *hHrtfTD /* o : HRTF handle */ ); +#ifdef HRTF_BINARY_FILE +/*! r: error code */ +ivas_error IVAS_DEC_GetHrtfCRendHandle( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* o : Set of HRTF handle */ +); + +ivas_error IVAS_DEC_GetHrtfFastConvHandle( + IVAS_DEC_HANDLE hIvasDec, /* i/oL IVAS decoder handle */ + IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv /* o : FASTCONV HRTF handle */ +); + +ivas_error IVAS_DEC_GetHrtfParamBinHandle( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* o : Parametric binauralizer HRTF handle */ +); +#endif + /*! r: error code*/ ivas_error IVAS_DEC_GetRenderConfig( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ @@ -334,7 +358,6 @@ const char *IVAS_DEC_GetErrorMessage( ivas_error error /* i : decoder error code enum */ ); - void IVAS_DEC_PrintConfig( const IVAS_DEC_HANDLE hIvasDec, /* i : IVAS decoder handle */ const bool quietModeEnabled, /* i : quiet mode flag: if true, reduces the amount of config info printed */ @@ -348,6 +371,13 @@ void IVAS_DEC_PrintConfigWithBitstream( uint16_t bit_stream[], /* i : bitstream buffer */ const int16_t num_bits /* i : number of bits in bitstream */ ); + +void IVAS_DEC_PrintConfigWithVoipBitstream( + IVAS_DEC_HANDLE hIvasDec, /* i : IVAS decoder handle */ + const bool quietModeEnabled, /* i : quiet mode flag: if true, reduces the amount of config info printed */ + uint8_t *au, /* i : buffer containing input access unit */ + const uint16_t auSizeBits /* i : size of the access unit in bits */ +); #endif void IVAS_DEC_PrintDisclaimer( diff --git a/lib_dec/lp_exc_d.c b/lib_dec/lp_exc_d.c index 046523105fa6aa510cc5f7b29e9bc294245df699..c436edcf133f5f4b6232c69700c350fc30d9f1f4 100644 --- a/lib_dec/lp_exc_d.c +++ b/lib_dec/lp_exc_d.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * lp_filt_exc_dec() diff --git a/lib_dec/lsf_dec.c b/lib_dec/lsf_dec.c index ffa5e91e2c6fdd8c0a50ad5cece67b3e848ae8e3..e29cc480a22433b3e5b480d5eeb4e661f2728734 100644 --- a/lib_dec/lsf_dec.c +++ b/lib_dec/lsf_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -47,7 +47,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_dec/lsf_msvq_ma_dec.c b/lib_dec/lsf_msvq_ma_dec.c index 1fe895b70617b90d5eccf6fd6e81a5a5fff3ff26..2fa1f3573b0a432fe062ffce9c45b8358e721b77 100644 --- a/lib_dec/lsf_msvq_ma_dec.c +++ b/lib_dec/lsf_msvq_ma_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_com.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * lsf_msvq_ma_decprm() diff --git a/lib_dec/nelp_dec.c b/lib_dec/nelp_dec.c index 1814031fb2d2c4dbac88c63acc8958beba2f7f57..67d8fb5f8bda758ff4a2a213768eefb6704aae18 100644 --- a/lib_dec/nelp_dec.c +++ b/lib_dec/nelp_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * nelp_decoder() diff --git a/lib_dec/peak_vq_dec.c b/lib_dec/peak_vq_dec.c index 45897b77b30b2d0c8c8d3cd70a6b8a6b3881ac12..df238a057f24507e98dffe81769b8914e2468f41 100644 --- a/lib_dec/peak_vq_dec.c +++ b/lib_dec/peak_vq_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------* diff --git a/lib_dec/pit_dec.c b/lib_dec/pit_dec.c index 9f2ba3bcad25f0b150532749a6a4fabc65b4408e..c569e6609780edd126e0baf65619cbafb54c2ace 100644 --- a/lib_dec/pit_dec.c +++ b/lib_dec/pit_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------* * pit_decode() diff --git a/lib_dec/pitch_extr.c b/lib_dec/pitch_extr.c index d90f06af7a729af64630943e0c7baa33a4fd4bab..a0370946bde5b9b0c429e73adff6115da5ced67d 100644 --- a/lib_dec/pitch_extr.c +++ b/lib_dec/pitch_extr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "cnst.h" #include "prot.h" #include "basop_util.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* @@ -151,7 +151,7 @@ void pitch_pred_linear_fit( ml_fx[i] = (int32_t) ( ml[i] / pow( 2.f, -31 + 15 ) ); /* Q16 */ } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP FOR( i = 0; i < lcor; i++ ) { pg_fx[i] = mult( mult( pg_fx[i], pg_fx[i] ), timeWeight[i] ); /*Q12 'til pg[lcor-1], Q14 'til pg[8]*/ @@ -286,7 +286,7 @@ void pitch_pred_linear_fit( pita = L_shl( L_deposit_l( a1 ), add( add( sum0_q, 16 - 10 + 1 ), sub( tmpa, a_e ) ) ) /*Q16*/; pitb = L_shl_r( L_mult( b1 /*Q15*/, add( no_subfr_pred, nb_subfr ) /*Q0*/ ), add( add( sum0_q, 16 - 12 ), sub( tmpb, b_e ) ) ); pit = L_add( pita, pitb ); /*Q16*/ -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /* convert pitch back to float precision */ T0 = (float) ( pit * pow( 2.f, -31 + 15 ) ); diff --git a/lib_dec/post_dec.c b/lib_dec/post_dec.c index 0d7bd7e7c7b284efa521f5c42686d4917e3abd4d..5bc31d56eeb2165396b3a01d02beb9a6528b686c 100644 --- a/lib_dec/post_dec.c +++ b/lib_dec/post_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Function prototypes diff --git a/lib_dec/ppp_dec.c b/lib_dec/ppp_dec.c index 3de25cf680f9c710c892cfb5e0420814fddd08c3..f9e97edcaaa35fb7a10eec86aab93eb0f4b569bf 100644 --- a/lib_dec/ppp_dec.c +++ b/lib_dec/ppp_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -177,7 +177,7 @@ ivas_error ppp_quarter_decoder( tmp = (float) get_next_indice( st, 3 ); DTFS_phaseShift( CURRCW_Q_DTFS, (float) ( PI2 * ( tmp - 3 ) / CURRCW_Q_DTFS->lag ) ); - dynamic_free( PREVDTFS ); + free( PREVDTFS ); return error; } diff --git a/lib_dec/pvq_core_dec.c b/lib_dec/pvq_core_dec.c index 0ef00c6ae342e1345c541f2c888899b63afe5ea1..115d53ac5786b18c662c94de338ae237b605b8ec 100644 --- a/lib_dec/pvq_core_dec.c +++ b/lib_dec/pvq_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "prot.h" #include "stl.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local prototypes @@ -403,7 +403,7 @@ static void densitySymbolIndexDecode( *index_phi = -1; return; } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP angle = atan2_fx( SQRT_DIM_fx[r_dim], SQRT_DIM_fx[l_dim] ); #ifndef BASOP_NOGLOB angle = shl( angle, 1 ); @@ -412,7 +412,7 @@ static void densitySymbolIndexDecode( #endif /* BASOP_NOGLOB */ angle = mult_r( angle, 20861 ); c = mult_r( res, angle ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP res_c = res - c; if ( c == 0 ) diff --git a/lib_dec/pvq_decode.c b/lib_dec/pvq_decode.c index c9a2bf41ab97c5a4ba7827c2aa0f5de1f4f3fbc5..a0da5f09ea6d015f42f9e1ef3b0fff5c04a5275a 100644 --- a/lib_dec/pvq_decode.c +++ b/lib_dec/pvq_decode.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Function pvq_decode() * diff --git a/lib_dec/range_dec.c b/lib_dec/range_dec.c index 55010e0b36088a36ca8e6263a441048a9021e8b7..25cfdb2155c48c3f5e4a5542996bcc456e590d7d 100644 --- a/lib_dec/range_dec.c +++ b/lib_dec/range_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local prototypes diff --git a/lib_dec/re8_dec.c b/lib_dec/re8_dec.c index 22a0a538a27ee7f235f89d8774131ae05611342f..d9a7c750dc8abb12c4d983cec25690b867f0d80d 100644 --- a/lib_dec/re8_dec.c +++ b/lib_dec/re8_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- diff --git a/lib_dec/rom_dec.c b/lib_dec/rom_dec.c index a79803ea5cccae9a227ee19deefd6e8a6a42aeb7..beba87c3dab82627e2d7182eac0a38746e59471f 100644 --- a/lib_dec/rom_dec.c +++ b/lib_dec/rom_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /* clang-format off */ diff --git a/lib_dec/rom_dec.h b/lib_dec/rom_dec.h index de17c9025159dabbdad0ce740eebb2ab2e1fa4d6..751a2e4da0c52c6f92ae2cea45ca9428c6a1cf19 100644 --- a/lib_dec/rom_dec.h +++ b/lib_dec/rom_dec.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_dec/rst_dec.c b/lib_dec/rst_dec.c index 6b8683767d87824a10083f2c84fcaf7852273df1..f3fbd32165e1130df70da4f48b896bf100e1f79e 100644 --- a/lib_dec/rst_dec.c +++ b/lib_dec/rst_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------------------* * CNG_reset_dec() diff --git a/lib_dec/stat_dec.h b/lib_dec/stat_dec.h index d86cd42b720b5b737f58e8f093b9ae6d21c9888a..68bbd4e9ca8acdf63054777ad087779f3461ee87 100644 --- a/lib_dec/stat_dec.h +++ b/lib_dec/stat_dec.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -934,6 +934,7 @@ typedef struct Decoder_State int16_t ini_frame; /* initialization frames counter */ int16_t prev_coder_type; /* coding type of last frame */ int16_t low_rate_mode; /* low-rate mode flag */ + int16_t last_low_rate_mode; /* previous frame low-rate mode flag */ /*----------------------------------------------------------------------------------* * ACELP core parameters @@ -955,6 +956,9 @@ typedef struct Decoder_State float agc_mem2[2]; /* memory of AGC for saturation control */ int16_t mid_lsf_int; int16_t safety_net; + float stab_fac_smooth_lt; + float log_energy_old; + float log_energy_diff_lt; int16_t GSC_noisy_speech; /* AC mode (GSC) - flag to indicate GSC on SWB noisy speech */ int16_t GSC_IVAS_mode; /* AC mode (GSC) - GSC IVAS mode */ diff --git a/lib_dec/stat_noise_uv_dec.c b/lib_dec/stat_noise_uv_dec.c index f9e8ec4f7878814d8e0ec84154bddc8fb03baeaf..2fa711814b4b290092e703bed04190a11bc0984f 100644 --- a/lib_dec/stat_noise_uv_dec.c +++ b/lib_dec/stat_noise_uv_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------* * stat_noise_uv_dec() diff --git a/lib_dec/swb_bwe_dec.c b/lib_dec/swb_bwe_dec.c index fca9267bd03b1ba62eba96be824b326a5ef5c446..e7eda534ae5817eaeaf22c5051753828f1ec478d 100644 --- a/lib_dec/swb_bwe_dec.c +++ b/lib_dec/swb_bwe_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "rom_com.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * para_pred_bws() diff --git a/lib_dec/swb_bwe_dec_hr.c b/lib_dec/swb_bwe_dec_hr.c index edfaaf67be4ef92c4fbdce0702a3d7b0b3658964..1c4d5c7f6ebb483b5091ce8b691e9db97ee9168b 100644 --- a/lib_dec/swb_bwe_dec_hr.c +++ b/lib_dec/swb_bwe_dec_hr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * swb_bwe_dec_hr() diff --git a/lib_dec/swb_bwe_dec_lr.c b/lib_dec/swb_bwe_dec_lr.c index d10be17f5f75ca758ea59e917785cf1219220793..4f29becf248e298f1aa223816d64366b30f82a88 100644 --- a/lib_dec/swb_bwe_dec_lr.c +++ b/lib_dec/swb_bwe_dec_lr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_dec/swb_tbe_dec.c b/lib_dec/swb_tbe_dec.c index 5b602bbfd68b2058d275a03c8df248d25449e972..5a75a8774f350736ccf4dc3921f6f724e34638fe 100644 --- a/lib_dec/swb_tbe_dec.c +++ b/lib_dec/swb_tbe_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_dec.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /*-----------------------------------------------------------------* diff --git a/lib_dec/syn_outp.c b/lib_dec/syn_outp.c index cff7d72374ee94ea281256018ab3772617b3997a..c28666d1effccac38eb83f50b369cac9ca0e706f 100644 --- a/lib_dec/syn_outp.c +++ b/lib_dec/syn_outp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * syn_output() diff --git a/lib_dec/tcq_core_dec.c b/lib_dec/tcq_core_dec.c index a7050f9de0e21cddd11a4437280794a98eb46f89..8b0a6f2d40dbac5e01b5bb3dadadfdffb5b0b88a 100644 --- a/lib_dec/tcq_core_dec.c +++ b/lib_dec/tcq_core_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * tcq_core_LR_enc() @@ -148,7 +148,7 @@ void tcq_core_LR_dec( } } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP bsub_fx = L_shl( L_add( tcq_arbits, lsbtcq_bits ), 16 ); IF( bsub_fx > 0 ) { @@ -173,7 +173,7 @@ void tcq_core_LR_dec( } srt_vec_ind_fx( Rk_fx, Rk_sort_fx, k_sort, BANDS ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /*read the bits*/ nb_bytes = bit_budget >> 3; @@ -248,10 +248,10 @@ void tcq_core_LR_dec( } if ( surplus_fx != 0 ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP surplus_fx = L_add( Rk_fx[k_sort[k]], surplus_fx ); surplus_fx = L_add( delta_fx, surplus_fx ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } } else @@ -283,10 +283,10 @@ void tcq_core_LR_dec( } if ( surplus_fx != 0 ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP surplus_fx = L_add( Rk_fx[k_sort[k]], surplus_fx ); surplus_fx = L_add( delta_fx, surplus_fx ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } } else @@ -315,7 +315,7 @@ void tcq_core_LR_dec( if ( Rk_fx[k_sort[k]] > 0 && surplus_fx < 0 ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP IF( nzbands <= 1 ) { divider = 0; @@ -335,7 +335,7 @@ void tcq_core_LR_dec( delta_fx = 0; } surplus_fx = L_sub( surplus_fx, delta_fx ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } else { @@ -344,13 +344,13 @@ void tcq_core_LR_dec( } } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP if ( ( L_sub( surplus_fx, 524288 ) > 0 && sub( input_frame, L_FRAME8k ) == 0 ) || ( L_sub( surplus_fx, 786432 ) > 0 && sub( input_frame, L_FRAME16k ) == 0 ) ) { bit_surplus_fx[0] = Mult_32_16( surplus_fx, 24576 ); /* Q16 */ bit_surplus_fx[1] = Mult_32_16( surplus_fx, 8192 ); /* Q16 */ } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP else { bit_surplus_fx[0] = surplus_fx; @@ -363,9 +363,9 @@ void tcq_core_LR_dec( { if ( k == k_num[j] ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP Rk_fx[k_sort[k]] = L_add( Rk_fx[k_sort[k]], bit_surplus_fx[j] ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP if ( Rk_fx[k_sort[k]] > 0 && USQ_TCQ[k_sort[k]] == 0 ) { /* get number of pulses */ @@ -412,9 +412,9 @@ void tcq_core_LR_dec( decode_magnitude_usq_fx( pardec, band_width[k_sort[k]], pulsesnum, nz, &positions[band_start[k_sort[k]]], &inp_vector[band_start[k_sort[k]]] ); decode_signs_fx( pardec, band_width[k_sort[k]], &inp_vector[band_start[k_sort[k]]] ); -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP nzbands = sub( nzbands, 1 ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } else { diff --git a/lib_dec/tcx_utils_dec.c b/lib_dec/tcx_utils_dec.c index f817c61e03a8473759493ebd5c9a2132e3b0a8ac..5db8a20b082a433efae7170f55c868401f4c22d5 100644 --- a/lib_dec/tcx_utils_dec.c +++ b/lib_dec/tcx_utils_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- * tcx_decoder_memory_update() diff --git a/lib_dec/tns_base_dec.c b/lib_dec/tns_base_dec.c index b7d977c84fe4f117b951a36581ca27655f3ebb07..444c465042ed8232f18414ca6b69a8355b0a9b8c 100644 --- a/lib_dec/tns_base_dec.c +++ b/lib_dec/tns_base_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "rom_com.h" #include "prot.h" #include "stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_dec/tonalMDCTconcealment.c b/lib_dec/tonalMDCTconcealment.c index a16638da512bc5d980a5ed19c37d4c917e8d8aaa..cb27b57ebf852b74e91c4da7657f08a1be5c9cb4 100644 --- a/lib_dec/tonalMDCTconcealment.c +++ b/lib_dec/tonalMDCTconcealment.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*******************************************************/ @@ -502,7 +502,7 @@ void TonalMDCTConceal_InsertNoise( float g, nrgNoiseInLastFrame, nrgWhiteNoise, tiltFactor, tilt; float last_block_nrg_correct; - wmops_sub_start( "InsertNoise" ); + push_wmops( "InsertNoise" ); g = 1.0f - crossfadeGain; if ( !hTonalMDCTConc->lastBlockData.blockIsConcealed ) @@ -860,7 +860,7 @@ void TonalMDCTConceal_InsertNoise( *pSeed = rnd; - wmops_sub_end(); + pop_wmops(); return; } @@ -987,7 +987,7 @@ void TonalMdctConceal_create_concealment_noise( float *cngNoiseLevelPtr; float last_scf; - wmops_sub_start( "create_conc_noise" ); + push_wmops( "create_conc_noise" ); hStereoMdct = hCPE->hStereoMdct; st = hCPE->hCoreCoder[idchan]; @@ -1039,7 +1039,7 @@ void TonalMdctConceal_create_concealment_noise( concealment_noise[i] = *rnd; } - wmops_sub_end(); + pop_wmops(); return; } @@ -1118,7 +1118,7 @@ void TonalMdctConceal_create_concealment_noise( st->seed_tcx_plc = *rnd; - wmops_sub_end(); + pop_wmops(); return; } @@ -1135,7 +1135,7 @@ void TonalMdctConceal_whiten_noise_shape( float scfs_int[FDNS_NPTS]; const PsychoacousticParameters *psychParams; - wmops_sub_start( "apply_sns_on_noise_shape" ); + push_wmops( "apply_sns_on_noise_shape" ); scfs_bg = &st->hTonalMDCTConc->scaleFactorsBackground[0]; psychParams = st->hTonalMDCTConc->psychParams; @@ -1176,5 +1176,5 @@ void TonalMdctConceal_whiten_noise_shape( set_zero( hFdCngCom->cngNoiseLevel, stop_idx - start_idx ); } - wmops_sub_end(); + pop_wmops(); } diff --git a/lib_dec/transition_dec.c b/lib_dec/transition_dec.c index 9bcecf40b87d70a5ca7b492b76fd03dd8f11607a..05c7887f4babdbef97dae6bf2a0644a4ae1bb675 100644 --- a/lib_dec/transition_dec.c +++ b/lib_dec/transition_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------* * Local function prototypes diff --git a/lib_dec/updt_dec.c b/lib_dec/updt_dec.c index 2c3eed80e3235028584a5c40503498e3bd7e8d4e..81f4027221fa6fefcc08ee46997f33fbda9179bf 100644 --- a/lib_dec/updt_dec.c +++ b/lib_dec/updt_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,8 @@ #include "prot.h" #include "rom_com.h" #include "cnst.h" -#include "wmops.h" +#include +#include "wmc_auto.h" /*-------------------------------------------------------------------* * updt_dec() @@ -413,6 +414,8 @@ void updt_dec_common( ) { int16_t i; + float log_energy, log_energy_diff; + int16_t output_frame; st->last_codec_mode = st->codec_mode; st->last_extl = st->extl; @@ -502,6 +505,22 @@ void updt_dec_common( mvr2r( synth + NS2SA( st->output_Fs, ACELP_LOOK_NS + DELAY_BWE_TOTAL_NS ), st->old_synth_sw, NS2SA( st->output_Fs, FRAME_SIZE_NS - ACELP_LOOK_NS - DELAY_BWE_TOTAL_NS ) ); } + /* Store long-term estimates of stab_fac and log energy diff to estimate env_stab in case of core switch ACELP/TCX->HQ */ + if ( st->element_mode != EVS_MONO ) + { + output_frame = NS2SA( st->output_Fs, FRAME_SIZE_NS ); + log_energy = log2f( ( sum2_f( synth, output_frame ) / output_frame ) + 1.0f ); + log_energy_diff = fabsf( st->log_energy_old - log_energy ); + st->log_energy_old = log_energy; + st->log_energy_diff_lt = ENV_SMOOTH_FAC * log_energy_diff + ( 1.0f - ENV_SMOOTH_FAC ) * st->log_energy_diff_lt; + if ( st->core == HQ_CORE ) + { + st->stab_fac = min( 1, ( STAB_FAC_EST1 + ( STAB_FAC_EST2 * st->hHQ_core->mem_env_delta ) + ( STAB_FAC_EST3 * st->log_energy_diff_lt ) ) ); + st->stab_fac = max( 0, st->stab_fac ); + } + st->stab_fac_smooth_lt = ENV_SMOOTH_FAC * st->stab_fac + ( 1.0f - ENV_SMOOTH_FAC ) * st->stab_fac_smooth_lt; + } + if ( ( st->core_brate <= SID_2k40 && st->cng_type == FD_CNG ) || ( st->tcxonly && st->codec_mode == MODE2 ) ) { /* reset LP memories */ @@ -622,6 +641,8 @@ void updt_dec_common( st->last_bits_frame_nominal = st->bits_frame_nominal; } + st->last_low_rate_mode = st->low_rate_mode; + /*-----------------------------------------------------------------* * Increase the counter of initialization frames * Limit the max number of init. frames diff --git a/lib_dec/vlpc_1st_dec.c b/lib_dec/vlpc_1st_dec.c index 1aa1ab72f21febd0970da62363b2cd19f0c2cb07..cc7b33bc9a5754ffb867eb9ba2a35d4e51e0262e 100644 --- a/lib_dec/vlpc_1st_dec.c +++ b/lib_dec/vlpc_1st_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "options.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * vlpc_1st_dec() diff --git a/lib_dec/vlpc_2st_dec.c b/lib_dec/vlpc_2st_dec.c index 83163cda78a2afc6c9b2bbd4f47916f0739a7066..8ac23141b83c681149148297be8f2fafbf1ed2f8 100644 --- a/lib_dec/vlpc_2st_dec.c +++ b/lib_dec/vlpc_2st_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * vlpc_2st_dec() diff --git a/lib_dec/voiced_dec.c b/lib_dec/voiced_dec.c index cda7120103a7b8cfc7af14c0ce154c6527837cac..5c2bcc1f15e6de19b2d7924b112b886d51696e90 100644 --- a/lib_dec/voiced_dec.c +++ b/lib_dec/voiced_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * ppp_voiced_decoder() @@ -233,9 +233,9 @@ ivas_error ppp_voiced_decoder( mvr2r( dtfs_temp->a, hSC_VBR->dtfs_dec_a, MAXLAG_WI ); mvr2r( dtfs_temp->b, hSC_VBR->dtfs_dec_b, MAXLAG_WI ); - dynamic_free( TMPDTFS ); - dynamic_free( CURRP_Q_D ); - dynamic_free( dtfs_temp ); + free( TMPDTFS ); + free( CURRP_Q_D ); + free( dtfs_temp ); return error; } diff --git a/lib_dec/waveadjust_fec_dec.c b/lib_dec/waveadjust_fec_dec.c index 222fb66599b49e84059c6c48bb2743c97ab08d27..99a10e886c77a2326a1feefb81756b084c5a3acd 100644 --- a/lib_dec/waveadjust_fec_dec.c +++ b/lib_dec/waveadjust_fec_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/ACcontextMapping_enc.c b/lib_enc/ACcontextMapping_enc.c index 62ab9e7552c227cf1040737a7f71b70f16e989d5..a608db5ea2d160df5e64f5a470337dddfcdc720b 100644 --- a/lib_enc/ACcontextMapping_enc.c +++ b/lib_enc/ACcontextMapping_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/FEC_enc.c b/lib_enc/FEC_enc.c index 89868e6729551a8df58a69eb0e37e210b93db1a3..5bf8d1f1f40ad22daf5caf15e6570cfaf9a00d74 100644 --- a/lib_enc/FEC_enc.c +++ b/lib_enc/FEC_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * FEC_encode() diff --git a/lib_enc/SNR_calc.c b/lib_enc/SNR_calc.c index 1ccaad6e0fbfe5317655b1e1963dc173d3d32c35..6078062ea35c5a15155853f81e25650a0f93f4e0 100644 --- a/lib_enc/SNR_calc.c +++ b/lib_enc/SNR_calc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "prot.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/acelp_core_enc.c b/lib_enc/acelp_core_enc.c index 857099ed927bdd9976caa750bfdb3c407f0fb15d..29682d5e73269a943cc91046042785c6d9b1c38d 100644 --- a/lib_enc/acelp_core_enc.c +++ b/lib_enc/acelp_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -50,7 +50,7 @@ #ifdef LSF_RE_USE_SECONDARY_CHANNEL #include "ivas_rom_com.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * acelp_core_enc() @@ -131,7 +131,7 @@ ivas_error acelp_core_enc( return error; } - wmops_sub_start( "acelp_core_enc" ); + push_wmops( "acelp_core_enc" ); /*------------------------------------------------------------------* * Initialization *------------------------------------------------------------------*/ @@ -757,7 +757,7 @@ ivas_error acelp_core_enc( } } - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/acelp_core_switch_enc.c b/lib_enc/acelp_core_switch_enc.c index efabd35882de2da245307f8d97fb67eff1502175..291c2128a19a6423946c78e27b1dc0bff58e44f2 100644 --- a/lib_enc/acelp_core_switch_enc.c +++ b/lib_enc/acelp_core_switch_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/acelp_enc_util.c b/lib_enc/acelp_enc_util.c index 003dadb026122b366b91acff392189eea7ba3919..24673928a4b96e9acee9cc8e1da00d1e887aac67 100644 --- a/lib_enc/acelp_enc_util.c +++ b/lib_enc/acelp_enc_util.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * E_ACELP_toeplitz_mul() diff --git a/lib_enc/amr_wb_enc.c b/lib_enc/amr_wb_enc.c index c73e5a89497070d4515a4f12dc70288fc96bb842..80520d4c38d37b99a347b7262506eee0c39eb7ed 100644 --- a/lib_enc/amr_wb_enc.c +++ b/lib_enc/amr_wb_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_MODE_INFO extern float snr_[2][320]; @@ -292,12 +292,7 @@ void amr_wb_enc( } /* apply DTX hangover for CNG analysis */ - vad_flag_dtx = dtx_hangover_addition( st, st->vad_flag, st->lp_speech - st->lp_noise, 0, &vad_hover_flag, NULL, NULL -#ifdef FIX_ITD_CNG - , - NULL -#endif - ); + vad_flag_dtx = dtx_hangover_addition( st, st->vad_flag, st->lp_speech - st->lp_noise, 0, &vad_hover_flag, NULL, NULL, NULL ); /*-----------------------------------------------------------------* * Select SID or FRAME_NO_DATA frame if DTX enabled @@ -315,9 +310,7 @@ void amr_wb_enc( { st->fd_cng_reset_flag = 0; } - dtx( st, -1, vad_flag_dtx, inp ); - /*----------------------------------------------------------------* * Noise energy down-ward update and total noise energy estimation * Long-term energies and relative frame energy updates @@ -536,7 +529,8 @@ void amr_wb_enc( updt_enc( st, old_exc, pitch_buf, 0, Aq, isf_new, isp_new, dummy_buf ); /* update main codec paramaters */ - updt_enc_common( st, Etot ); + updt_enc_common( st ); + #ifdef DEBUG_MODE_INFO dbgwrite( &st->codec_mode, sizeof( int16_t ), 1, input_frame, "res/codec" ); diff --git a/lib_enc/analy_lp.c b/lib_enc/analy_lp.c index b4b990634e401716793e511eeacc14fa1c8bd272..c0541e78fd6eae201ecbea101d63e7079bb63392 100644 --- a/lib_enc/analy_lp.c +++ b/lib_enc/analy_lp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * analy_lp() diff --git a/lib_enc/analy_sp.c b/lib_enc/analy_sp.c index 5828e72483509a2db1a0f0b4e0baa111678047d6..4a4bcb357dbee5cea73b8d7e8ef9c8d2ee026674 100644 --- a/lib_enc/analy_sp.c +++ b/lib_enc/analy_sp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include #include "ivas_cnst.h" diff --git a/lib_enc/ari_enc.c b/lib_enc/ari_enc.c index 3c6df474f873c408d6d7feaf6ea626aaf70cb9c6..405b3a8994a0a0973f7b90289695e837c14736de 100644 --- a/lib_enc/ari_enc.c +++ b/lib_enc/ari_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------- diff --git a/lib_enc/ari_hm_enc.c b/lib_enc/ari_hm_enc.c index c88ac3812a4b4d137fa3d751ac0ffe0140b30773..46a093369b1e057027af064ed29322e02c694845 100644 --- a/lib_enc/ari_hm_enc.c +++ b/lib_enc/ari_hm_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "basop_util.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * EncodeIndex() diff --git a/lib_enc/arith_coder_enc.c b/lib_enc/arith_coder_enc.c index 553721377c396bc79b2a8593a8f068e7028a6afd..546e7f07ab8715eab463dcaeb22893a923a8cfc4 100644 --- a/lib_enc/arith_coder_enc.c +++ b/lib_enc/arith_coder_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "rom_com.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants @@ -611,9 +611,9 @@ void tcx_arith_encode_envelope( gamma_w = 1.0f; gamma_uw = 1.0f / st->gamma; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP tcx_arith_render_envelope( A_ind, L_frame, L_spec, FL2WORD16( hTcxCfg->preemph_fac ), FL2WORD16( gamma_w ), FL2WORD16( 0.5f * gamma_uw ), env ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP for ( k = 0; k < L_spec; ++k ) { @@ -649,13 +649,13 @@ void tcx_arith_encode_envelope( envelope = (Word16 *) env; tcx_arith_scale_envelope( L_spec, L_spec_core, env, target_bits, low_complexity, envelope, &envelope_e ); -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP tmp = sub( envelope_e, 1 ); FOR( k = 0; k < L_spec; k++ ) { exponents[k] = expfp( negate( envelope[k] ), tmp ); } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP scale = tcx_arith_rateloop( spectrum, L_spec, envelope, envelope_e, exponents, target_bits, deadzone, deadzone_flags, &( hTcxEnc->tcx_target_bits_fac ) ); /* Final quantization */ diff --git a/lib_enc/avq_cod.c b/lib_enc/avq_cod.c index 601138ccd0803fe6cfc17a19cce8581afbbff4b3..78900b554cc8c5e1999657ddc66ec81921fd2cdd 100644 --- a/lib_enc/avq_cod.c +++ b/lib_enc/avq_cod.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local prototypes diff --git a/lib_enc/bass_psfilter_enc.c b/lib_enc/bass_psfilter_enc.c index 3d9a390945d4e8b42fa3d7a0e0ab73e1fda8e001..582ed3f22e59f51af0cd40a6311c6ebdd5efa89b 100644 --- a/lib_enc/bass_psfilter_enc.c +++ b/lib_enc/bass_psfilter_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_enc/bw_detect.c b/lib_enc/bw_detect.c index a69913eb4a6786196f01915cdb2cafe0de35c012..5f46910c57076190a267f7e8f8785b2460431e5b 100644 --- a/lib_enc/bw_detect.c +++ b/lib_enc/bw_detect.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "rom_com.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/cng_enc.c b/lib_enc/cng_enc.c index 20787dd3f714f2af221046f5bfb148fea734104d..04d9e4116621c977f0ae6a60f4c4adc90d259576 100644 --- a/lib_enc/cng_enc.c +++ b/lib_enc/cng_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_enc/cod2t32.c b/lib_enc/cod2t32.c index 1efef884d48a2d1c235ea7965ac6a26ceb312b47..0d5e548bef1df7cf005da2677c37f1eab951dc06 100644 --- a/lib_enc/cod2t32.c +++ b/lib_enc/cod2t32.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_enc/cod4t64.c b/lib_enc/cod4t64.c index 2c9ad01e21ce27e3ca0adf8877b75b7e541afba8..79d1814f5cced5c37f656129cf1a968f6d2211bc 100644 --- a/lib_enc/cod4t64.c +++ b/lib_enc/cod4t64.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_enc.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/cod4t64_fast.c b/lib_enc/cod4t64_fast.c index b67248ebe2bc65967e8cfb956a373a61228fb87f..9c16758d477e454ea61e6d0953491903a106fbbf 100644 --- a/lib_enc/cod4t64_fast.c +++ b/lib_enc/cod4t64_fast.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/cod_ace.c b/lib_enc/cod_ace.c index 091146298af6849bc4e6cf43fa9421819c7d043e..7a5c605d9ac852710e955c2f328869392bb19140 100644 --- a/lib_enc/cod_ace.c +++ b/lib_enc/cod_ace.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "debug.h" #endif #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * coder_acelp() diff --git a/lib_enc/cod_tcx.c b/lib_enc/cod_tcx.c index f60ac1a3143e796a7c613cfc3a0e9c5e7b8d5fc9..8c647be38a0c3b96ea33b77f2c66f6e2c743ba9a 100644 --- a/lib_enc/cod_tcx.c +++ b/lib_enc/cod_tcx.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" #include "ivas_rom_com.h" #ifdef DEBUGGING @@ -2181,9 +2181,10 @@ void coder_tcx( *-------------------------------------------------------------------*/ void coder_tcx_post( - Encoder_State *st, - float *A, - const float *Ai ) + Encoder_State *st, /* i/o: encoder memory state */ + float *A, /* o : Quantized LPC coefficients */ + const float *Ai /* i : Unquantized (interpolated) LPC coefficients */ +) { float xn_buf[L_FRAME_MAX]; diff --git a/lib_enc/cod_uv.c b/lib_enc/cod_uv.c index 166a9685dc407bf585694b3cbb3ec9292d8a9770..2c22ed41888c8eff36115f44e10960347de4636b 100644 --- a/lib_enc/cod_uv.c +++ b/lib_enc/cod_uv.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * gauss_L2: diff --git a/lib_enc/comvad_decision.c b/lib_enc/comvad_decision.c index 4ccd0e41423097f0a0adce4702f212fe9b832b64..240f1754ba362a86053983f2b56b3e74249b35d7 100644 --- a/lib_enc/comvad_decision.c +++ b/lib_enc/comvad_decision.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include "prot.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/cor_shif.c b/lib_enc/cor_shif.c index d27b097a43b325ff8965c5f6bc343a41732c1f19..67c11d4b9030aa32b52e9d4a14da4bd87bf5bb6c 100644 --- a/lib_enc/cor_shif.c +++ b/lib_enc/cor_shif.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Correlation_shift diff --git a/lib_enc/core_enc_2div.c b/lib_enc/core_enc_2div.c index 65a5c786501be955f31e2f6ea15c0026cb5c40cd..faa7af35878234b35a4b3376964cf2453105d2e7 100644 --- a/lib_enc/core_enc_2div.c +++ b/lib_enc/core_enc_2div.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * core_encode_twodiv() diff --git a/lib_enc/core_enc_init.c b/lib_enc/core_enc_init.c index 009185cc8807b985760728344db59893e6457a19..a87bfefb874d890f08f4f4258c3a964755a08753 100644 --- a/lib_enc/core_enc_init.c +++ b/lib_enc/core_enc_init.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/core_enc_ol.c b/lib_enc/core_enc_ol.c index a76189365379329928a29a3901710e82cad6a508..e83fd598b49d8fefef3ea02b4602d357a8f57c8f 100644 --- a/lib_enc/core_enc_ol.c +++ b/lib_enc/core_enc_ol.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/core_enc_reconf.c b/lib_enc/core_enc_reconf.c index 0489d210bc0bf40aa8a49eee0b391682e62bddb2..9dffda02072d3b831cdaa35a5e45063a34efe09b 100644 --- a/lib_enc/core_enc_reconf.c +++ b/lib_enc/core_enc_reconf.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Funtion core_coder_reconfig * diff --git a/lib_enc/core_enc_switch.c b/lib_enc/core_enc_switch.c index f96d0eed570cf1f4c9c0b74ec32747d53727be27..14fcac389443b9e5fd358353b5101959384e4292 100644 --- a/lib_enc/core_enc_switch.c +++ b/lib_enc/core_enc_switch.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * core_coder_mode_switch() diff --git a/lib_enc/core_enc_updt.c b/lib_enc/core_enc_updt.c index 987910bcb54990322220cf2790aa9103a0f653f2..3d5476a894150c389f3c55107218e9d8b18ea72f 100644 --- a/lib_enc/core_enc_updt.c +++ b/lib_enc/core_enc_updt.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "rom_com.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * core_encode_update() diff --git a/lib_enc/core_switching_enc.c b/lib_enc/core_switching_enc.c index 6102bd5f6755e9bbd2a7e0e5d6b0bddd13afba4a..ad52e197b940c5a39fcbd2e3f434a0f7982e07eb 100644 --- a/lib_enc/core_switching_enc.c +++ b/lib_enc/core_switching_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * core_switching_pre_enc() @@ -401,18 +401,8 @@ void core_switching_post_enc( ( st->last_core == HQ_CORE || st->L_frame != st->last_L_frame || ( st->last_extl != SWB_TBE && st->last_extl != FB_TBE && st->last_core != TCX_20_CORE && st->last_core != TCX_10_CORE ) ) ) { set_f( st->hBWE_TD->state_ana_filt_shb, 0.0f, ( 2 * ALLPASSSECTIONS_STEEP + 1 ) ); - set_f( st->hBWE_TD->old_speech_shb, 0.0f, L_LOOK_16k + L_SUBFR16k ); - set_f( st->hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); - set_f( st->hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); - st->hBWE_TD->old_mean_EnvSHBres = 0.0f; - st->hBWE_TD->prev_enr_EnvSHBres = 1.0f; - st->hBWE_TD->prev_shb_env_tilt = 0.0f; - st->hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; - st->hBWE_TD->prev_mix_factor = 1.0f; - st->hBWE_TD->prev_Env_error = 0.0f; - + InitSWBencBufferStates( st->hBWE_TD, NULL ); swb_tbe_reset( st->hBWE_TD->mem_csfilt, st->hBWE_TD->mem_genSHBexc_filt_down_shb, st->hBWE_TD->state_lpc_syn, st->hBWE_TD->syn_overlap, st->hBWE_TD->state_syn_shbexc, &( st->hBWE_TD->tbe_demph ), &( st->hBWE_TD->tbe_premph ), st->hBWE_TD->mem_stp_swb, &( st->hBWE_TD->gain_prec_swb ) ); - set_f( st->hBWE_TD->dec_2_over_3_mem, 0.0f, L_FILT_2OVER3 ); set_f( st->hBWE_TD->dec_2_over_3_mem_lp, 0.0f, L_FILT_2OVER3_LP ); } diff --git a/lib_enc/corr_xh.c b/lib_enc/corr_xh.c index bf4d473bdaa2259b1522fbd7d7200e3609ff5437..c317878e176ed0201c62e570eec19b115e82fd2a 100644 --- a/lib_enc/corr_xh.c +++ b/lib_enc/corr_xh.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * corr_xh() diff --git a/lib_enc/decision_matrix_enc.c b/lib_enc/decision_matrix_enc.c index 3433bdf1b461f61fff42a3674f06c97d1ee8851d..9fc2bd17c9840e8671d5a472a6615596298023e5 100644 --- a/lib_enc/decision_matrix_enc.c +++ b/lib_enc/decision_matrix_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "stat_enc.h" #include "stat_dec.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* diff --git a/lib_enc/detect_transient.c b/lib_enc/detect_transient.c index 3eaddbc073a3bb9d81b029eb0182448436c06f38..0b73a12e680ad0e469d78579a0302ef418b7c37a 100644 --- a/lib_enc/detect_transient.c +++ b/lib_enc/detect_transient.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * hp_filter() diff --git a/lib_enc/diffcod.c b/lib_enc/diffcod.c index 3d0c47ca627f79cc02dcfc224540b779917f3572..fd6646c48abc263f7b7e4094798576f2b183b5b4 100644 --- a/lib_enc/diffcod.c +++ b/lib_enc/diffcod.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------*/ /* Function diffcod() */ diff --git a/lib_enc/dtx.c b/lib_enc/dtx.c index 4d05245dbaa316da99e22809328701f0d7ad467a..c99a8faf286fdd9f87c0acfd9ecb2a66dcee6162 100644 --- a/lib_enc/dtx.c +++ b/lib_enc/dtx.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants @@ -90,7 +90,6 @@ void dtx( DTX_ENC_HANDLE hDtxEnc = st->hDtxEnc; int16_t last_br_cng_flag, last_br_flag, br_dtx_flag; - if ( st->dtx_sce_sba != 0 ) { last_br_cng_flag = 1; diff --git a/lib_enc/enc_acelp.c b/lib_enc/enc_acelp.c index 07d63fe25b653dbdca0c2c7aaa89cb399d674353..321656850ccefdabe7b11dd4fe6b173a0a22f412 100644 --- a/lib_enc/enc_acelp.c +++ b/lib_enc/enc_acelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_enc/enc_acelp_tcx_main.c b/lib_enc/enc_acelp_tcx_main.c index e087c8cedece6912e3f641679e02ce03334455f9..5c549b23d292dd2abf57ab228e0b4b1e8463285b 100644 --- a/lib_enc/enc_acelp_tcx_main.c +++ b/lib_enc/enc_acelp_tcx_main.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * enc_acelp_tcx_main() @@ -64,7 +64,7 @@ void enc_acelp_tcx_main( float old_bwe_exc[( PIT16k_MAX + ( L_FRAME16k + 1 ) + L_SUBFR16k ) * 2]; /* excitation buffer */ float *ptr_bwe_exc; /* pointer to BWE excitation signal in the current frame */ - wmops_sub_start( "enc_acelp_tcx_main" ); + push_wmops( "enc_acelp_tcx_main" ); ptr_bwe_exc = old_bwe_exc + PIT16k_MAX * 2; @@ -129,6 +129,6 @@ void enc_acelp_tcx_main( /* coreSwitching update of Mode 1 parameters in the last frame */ st->last_coder_type = st->coder_type; - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/enc_acelpx.c b/lib_enc/enc_acelpx.c index 6c8e783d76c804ee26607987079a8bde9b75be7c..72bea4748dcfa86a6431a78e5df324471163453c 100644 --- a/lib_enc/enc_acelpx.c +++ b/lib_enc/enc_acelpx.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #endif #include "prot.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /* Iterations: nb_pos_ix*16 */ diff --git a/lib_enc/enc_amr_wb.c b/lib_enc/enc_amr_wb.c index 2e88776d8f2e7686fd0c37275ea28dfa0fd8e5f6..bb09c0886b61dacb0d13955adab692aba4ad0d67 100644 --- a/lib_enc/enc_amr_wb.c +++ b/lib_enc/enc_amr_wb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * encod_amr_wb() diff --git a/lib_enc/enc_gain.c b/lib_enc/enc_gain.c index a5728e1f377cfee91c3e03d1704e99e2a689b87b..e3621d654c022e0e95787bb8fa01fca2d5556165 100644 --- a/lib_enc/enc_gain.c +++ b/lib_enc/enc_gain.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "prot.h" #include "rom_enc.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /* diff --git a/lib_enc/enc_gen_voic.c b/lib_enc/enc_gen_voic.c index dd642cd47035c4a7433c243a20147e1bba33b058..4c78b484c0a220df9d0afc91326e66b0e182e0fe 100644 --- a/lib_enc/enc_gen_voic.c +++ b/lib_enc/enc_gen_voic.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * encod_gen_voic() diff --git a/lib_enc/enc_gen_voic_rf.c b/lib_enc/enc_gen_voic_rf.c index e8af6856adee45d1d887ce2fd0f9fe88c6d150ae..7ceece404da285849d32cbfc147a3558881f379f 100644 --- a/lib_enc/enc_gen_voic_rf.c +++ b/lib_enc/enc_gen_voic_rf.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * reset_rf_indices() diff --git a/lib_enc/enc_higher_acelp.c b/lib_enc/enc_higher_acelp.c index ebda178d8b37f71bda0657efae99f87f73e7c8d1..5610bdfe4e9add94f1660bc404b11e07e06b868f 100644 --- a/lib_enc/enc_higher_acelp.c +++ b/lib_enc/enc_higher_acelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/enc_nelp.c b/lib_enc/enc_nelp.c index 11ec6105b9b82ca923730d8349706512353e4a3e..7d828208b281e6a6f73dfcc9d180501ef239ea20 100644 --- a/lib_enc/enc_nelp.c +++ b/lib_enc/enc_nelp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * encod_nelp() diff --git a/lib_enc/enc_pit_exc.c b/lib_enc/enc_pit_exc.c index 900d4021d0632090c71580301ac6ac157d76763a..eba203b6a6ac5464268fd2ce09c7293534e5e380 100644 --- a/lib_enc/enc_pit_exc.c +++ b/lib_enc/enc_pit_exc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * enc_pit_exc() @@ -64,8 +64,8 @@ void enc_pit_exc( float *pitch_buf, /* i/o: Fractionnal per subframe pitch */ const int16_t nb_subfr, /* i : Number of subframe considered */ float *gpit, /* o : pitch mean gpit */ - const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag */ - const float tdm_Pri_pitch_buf[] /* i : primary channel pitch buffer */ + const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag */ + const float tdm_Pri_pitch_buf[] /* i : primary channel pitch buffer */ ) { float xn[PIT_EXC_L_SUBFR]; /* Target vector for pitch search */ diff --git a/lib_enc/enc_ppp.c b/lib_enc/enc_ppp.c index b7668bfb012b47be57df34012ec15252ce038920..823d6cf3cdb244a96f0f894df172f66aafbf0b7d 100644 --- a/lib_enc/enc_ppp.c +++ b/lib_enc/enc_ppp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * encod_ppp() diff --git a/lib_enc/enc_prm.c b/lib_enc/enc_prm.c index cd606af8fbbf669acc52c9334a410def511adab7..758d672d0b71fd6b9747c0fd580fb0a56c3764ee 100644 --- a/lib_enc/enc_prm.c +++ b/lib_enc/enc_prm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/enc_tran.c b/lib_enc/enc_tran.c index ee1768067e5aa3e54cb518f3f24069ea5cba2368..d713584fa7e9010d71159a2949014ee8d281b5dd 100644 --- a/lib_enc/enc_tran.c +++ b/lib_enc/enc_tran.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * encod_tran() diff --git a/lib_enc/enc_uv.c b/lib_enc/enc_uv.c index c34419c7dfd1a5c03294fbee08cf51af32abc70c..f6c17e410c324bc14e8f44f47ec48faa0f71a062 100644 --- a/lib_enc/enc_uv.c +++ b/lib_enc/enc_uv.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * encod_unvoiced() diff --git a/lib_enc/energy.c b/lib_enc/energy.c index e69063b873e12a99cb191eda821eb2d0a8206a87..f9cb7f6a2ef0630dde1f920d00e8dce2628d15cb 100644 --- a/lib_enc/energy.c +++ b/lib_enc/energy.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "prot.h" #include "cnst.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * background_update() diff --git a/lib_enc/eval_pit_contr.c b/lib_enc/eval_pit_contr.c index d7eb087e570da5dff87efb1d00429578c8ec2d7c..5dd310177230d29c68fe414a5eaa9db3e7ce91cd 100644 --- a/lib_enc/eval_pit_contr.c +++ b/lib_enc/eval_pit_contr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constantes diff --git a/lib_enc/evs_enc.c b/lib_enc/evs_enc.c index 29b610db79e0f760e3f1fa76627235768cf3852f..b90f10359b2eddf3bb4250e421fc41b8fc1bc7f2 100644 --- a/lib_enc/evs_enc.c +++ b/lib_enc/evs_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes @@ -72,7 +72,6 @@ ivas_error evs_enc( float old_inp_12k8[L_INP_12k8], *inp; /* buffer of input signal @ 12k8 */ float old_inp_16k[L_INP]; /* buffer of input signal @ 16kHz */ float fr_bands[2 * NB_BANDS]; /* energy in frequency bands */ - float Etot; /* total energy; correlation shift */ float ener; /* residual energy from Levinson-Durbin */ float A[NB_SUBFR16k * ( M + 1 )]; /* A(z) unquantized for subframes */ float Aw[NB_SUBFR16k * ( M + 1 )]; /* weighted A(z) unquantized for subframes */ @@ -103,7 +102,7 @@ ivas_error evs_enc( error = IVAS_ERR_OK; - wmops_sub_start( "evs_enc" ); + push_wmops( "evs_enc" ); /*------------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ @@ -163,15 +162,6 @@ ivas_error evs_enc( if ( st->last_core == AMR_WB_CORE ) { updt_IO_switch_enc( st, input_frame ); - set_f( st->hBWE_TD->old_speech_shb, 0, L_LOOK_16k + L_SUBFR16k ); - set_f( st->hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); - set_f( st->hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); - st->hBWE_TD->old_mean_EnvSHBres = 0.0f; - st->hBWE_TD->prev_enr_EnvSHBres = 1.0f; - st->hBWE_TD->prev_shb_env_tilt = 0.0f; - st->hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; - st->hBWE_TD->prev_mix_factor = 1.0f; - st->hBWE_TD->prev_Env_error = 0.0f; cldfb_reset_memory( st->cldfbAnaEnc ); cldfb_reset_memory( st->cldfbSynTd ); } @@ -181,12 +171,11 @@ ivas_error evs_enc( *---------------------------------------------------------------------*/ #ifdef FIX_I4_OL_PITCH - pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, &Etot, &ener, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type ); + pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, Etot, &ener, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type ); #else - pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, &Etot, &ener, pitch_orig, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type ); + pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, &ener, pitch_orig, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type ); #endif - if ( st->mdct_sw == MODE2 ) { st->bits_frame_nominal = (int16_t) ( st->total_brate / FRAMES_PER_SEC ); @@ -390,7 +379,7 @@ ivas_error evs_enc( * WB TBE encoding * WB BWE encoding *---------------------------------------------------------------------*/ - wmops_sub_start( "BWE_encoding" ); + push_wmops( "BWE_encoding" ); if ( st->input_Fs >= 16000 && st->bwidth < SWB ) { @@ -426,16 +415,7 @@ ivas_error evs_enc( } else if ( st->input_Fs >= 32000 ) { - set_f( st->hBWE_TD->old_speech_shb, 0.0f, L_LOOK_16k + L_SUBFR16k ); - set_f( shb_speech, 0.0f, L_FRAME16k ); - set_f( st->hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); - set_f( st->hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); - st->hBWE_TD->old_mean_EnvSHBres = 0.0f; - st->hBWE_TD->prev_enr_EnvSHBres = 1.0f; - st->hBWE_TD->prev_shb_env_tilt = 0.0f; - st->hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; - st->hBWE_TD->prev_mix_factor = 1.0f; - st->hBWE_TD->prev_Env_error = 0.0f; + InitSWBencBufferStates( st->hBWE_TD, shb_speech ); } /* SWB TBE encoder */ @@ -497,7 +477,7 @@ ivas_error evs_enc( swb_CNG_enc( st, shb_speech, old_syn_12k8_16k ); } - wmops_sub_end(); + pop_wmops(); /*---------------------------------------------------------------------* * Channel-aware mode - write signaling information into the bitstream *---------------------------------------------------------------------*/ @@ -509,7 +489,7 @@ ivas_error evs_enc( * Updates *---------------------------------------------------------------------*/ - updt_enc_common( st, Etot ); + updt_enc_common( st ); if ( st->mdct_sw == MODE1 ) { @@ -565,7 +545,7 @@ ivas_error evs_enc( } #endif - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/ext_sig_ana.c b/lib_enc/ext_sig_ana.c index 58d1e34a5687da491394666ee4fd0fbddbc89226..9e1ad869ab239d34105dbbc93b7573f34a75c87c 100644 --- a/lib_enc/ext_sig_ana.c +++ b/lib_enc/ext_sig_ana.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif diff --git a/lib_enc/fd_cng_enc.c b/lib_enc/fd_cng_enc.c index e3a349b2ae77a3b67bfc21e51a9d237019d8a47e..20aa31f3cac2f148ef7de09ebdb16a188716b174 100644 --- a/lib_enc/fd_cng_enc.c +++ b/lib_enc/fd_cng_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "prot.h" #include "ivas_prot.h" #include "stat_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * createFdCngEnc() @@ -66,7 +66,7 @@ ivas_error createFdCngEnc( *hFdCngEnc = NULL; /* Allocate memory */ - hs = (HANDLE_FD_CNG_ENC) count_malloc( sizeof( FD_CNG_ENC ) ); + hs = (HANDLE_FD_CNG_ENC) malloc( sizeof( FD_CNG_ENC ) ); if ( hs == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for FD CNG ENC structure" ); @@ -282,7 +282,7 @@ void deleteFdCngEnc( if ( hsEnc != NULL ) { deleteFdCngCom( &( hsEnc->hFdCngCom ) ); - count_free( hsEnc ); + free( hsEnc ); *hFdCngEnc = NULL; } diff --git a/lib_enc/find_tar.c b/lib_enc/find_tar.c index b97cd8fd575444f703139ccd3b11ace049f61a9e..008fb17cb98a18b443a770d0726b92a815eda841 100644 --- a/lib_enc/find_tar.c +++ b/lib_enc/find_tar.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * find_targets() diff --git a/lib_enc/find_tilt.c b/lib_enc/find_tilt.c index 140c3b84bff77930041dfbe8a6617708aeeaee74..bdfac0569b07e2b49833e9c2f607e4ca8d30b314 100644 --- a/lib_enc/find_tilt.c +++ b/lib_enc/find_tilt.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_enc/find_uv.c b/lib_enc/find_uv.c index fcfbfaa497eec502dc1b87b0abae420d2cb54648..a80971880fbd3857c3975c5c7099e215912b2635 100644 --- a/lib_enc/find_uv.c +++ b/lib_enc/find_uv.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/find_wsp.c b/lib_enc/find_wsp.c index d2e2575b521ee2d71ae401c1ff196e387104072b..e08918a4de10e9e9d9f25d965e6552c75f0382bc 100644 --- a/lib_enc/find_wsp.c +++ b/lib_enc/find_wsp.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * find_wsp() diff --git a/lib_enc/frame_spec_dif_cor_rate.c b/lib_enc/frame_spec_dif_cor_rate.c index 9b3329c5c1d25ff0b5b074525d68697e4bd077d0..b0ececfb38628c38ab0835e13a7ef35866ce14f7 100644 --- a/lib_enc/frame_spec_dif_cor_rate.c +++ b/lib_enc/frame_spec_dif_cor_rate.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * frame_spec_dif_cor_rate() diff --git a/lib_enc/gain_enc.c b/lib_enc/gain_enc.c index 41389a6edba51c4cfb0f3d279021b1f48658fa8d..4883ea77b4129e77f1aca399ef458e8201c45741 100644 --- a/lib_enc/gain_enc.c +++ b/lib_enc/gain_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/gaus_enc.c b/lib_enc/gaus_enc.c index 080f12f707d5dcc422ab77a47d7b6721e95edd93..79b480e5161a0719f12d8d7ea4ce5c1b0e8966a1 100644 --- a/lib_enc/gaus_enc.c +++ b/lib_enc/gaus_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/gp_clip.c b/lib_enc/gp_clip.c index 036fcd2bf7bf75cd2a20297580afe59a1176bcf4..43394c2bf58b3246402d851a9aa08c709cdb13e3 100644 --- a/lib_enc/gp_clip.c +++ b/lib_enc/gp_clip.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/gs_enc.c b/lib_enc/gs_enc.c index bd8897e554f4a03f4b09c9a045e92b381da16f49..25f1f8fc762f3e985936a75585ddc0ab8b69a84a 100644 --- a/lib_enc/gs_enc.c +++ b/lib_enc/gs_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/guided_plc_enc.c b/lib_enc/guided_plc_enc.c index 28dd46c5448203906329e92344b7c81674cc1b9a..cb5e84683d5aa3163c1ddb7df3b609887b308d20 100644 --- a/lib_enc/guided_plc_enc.c +++ b/lib_enc/guided_plc_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "prot.h" #include "stat_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * coderLookAheadInnovation() diff --git a/lib_enc/hf_cod_amrwb.c b/lib_enc/hf_cod_amrwb.c index e731e13da959e2302681868191c0dbb9ff2fd4f3..c9cbba3cd472f8e96075cd6e0d14aa379eaeefa1 100644 --- a/lib_enc/hf_cod_amrwb.c +++ b/lib_enc/hf_cod_amrwb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/hq_classifier_enc.c b/lib_enc/hq_classifier_enc.c index f604939d21226563e3be3fa329a8abf7048af05e..a8d798e65713e126a39dd65770b99ccf94d52535 100644 --- a/lib_enc/hq_classifier_enc.c +++ b/lib_enc/hq_classifier_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants diff --git a/lib_enc/hq_core_enc.c b/lib_enc/hq_core_enc.c index bb66182d3d9130a9b75acbfa1da5e2623769c3e0..4bc332fd5e39cbb7acdd1db5e1a9c74c40074127 100644 --- a/lib_enc/hq_core_enc.c +++ b/lib_enc/hq_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * hq_core_enc() @@ -72,7 +72,7 @@ void hq_core_enc( BSTR_ENC_HANDLE hBstr = st->hBstr; - wmops_sub_start( "hq_core_enc" ); + push_wmops( "hq_core_enc" ); set_f( t_audio, 0, L_FRAME48k ); st->Nb_ACELP_frames = 0; @@ -289,7 +289,7 @@ void hq_core_enc( mvr2r( output, st->hLPDmem->old_exc, L_FRAME16k ); } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/hq_env_enc.c b/lib_enc/hq_env_enc.c index 0ddfc2cb0ef43cb518a307666c1a91c7fd278687..4d57dde16475b0e99e55c941ad181c891e474b5f 100644 --- a/lib_enc/hq_env_enc.c +++ b/lib_enc/hq_env_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------------------* * encode_envelope_indices() diff --git a/lib_enc/hq_hr_enc.c b/lib_enc/hq_hr_enc.c index 569d616066fd257a209f85da4b428f3f4b804439..d815295a4df1246a9609dce1976cab538a173ddc 100644 --- a/lib_enc/hq_hr_enc.c +++ b/lib_enc/hq_hr_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_enc.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hq_hr_enc() diff --git a/lib_enc/hq_lr_enc.c b/lib_enc/hq_lr_enc.c index 184dc79e6b8094d21d1fe347b66ddbf4cb7ec0b4..9401a1bb573aebafa625d0b749975eca8f959385 100644 --- a/lib_enc/hq_lr_enc.c +++ b/lib_enc/hq_lr_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "prot.h" #include "stl.h" #include "basop_util.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* @@ -326,7 +326,7 @@ void hq_lr_enc( spt_shorten_domain_set( hBstr, hHQ_core, t_audio, p2a_flags, new_band_start, new_band_end, new_band_width, bands, band_start, band_end, band_width, &bit_budget ); } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* Estimate number of bits per band */ Q_band_energy = SWB_BWE_LR_Qbe; FOR( i = 0; i < bands; i++ ) @@ -368,11 +368,11 @@ void hq_lr_enc( move32(); /*Q(31-exp2) */ Ep_tmp_fx[i] = L_shr( L_tmp, sub( 15, exp2 ) ); /*Q13 */ } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP if ( is_transient == 0 && inner_frame == L_FRAME8k && st->core_brate <= ACELP_13k20 ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP lowband = 6; move16(); trans_bit = 2; @@ -640,7 +640,7 @@ void hq_lr_enc( L_band_energy_tmp[i] = L_shl( L_tmp, 1 ); /*Q_band_energy */ } } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP for ( i = 0; i < bands; i++ ) { @@ -657,7 +657,7 @@ void hq_lr_enc( } else if ( is_transient == 0 && inner_frame == L_FRAME16k ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP bit_budget = sub( bit_budget, 2 ); /* bits in high bands to indicate the last 2 subbands is allocated bits or not */ FOR( i = 0; i < bands; i++ ) { @@ -909,7 +909,7 @@ void hq_lr_enc( L_band_energy_tmp[i] = L_shl( L_tmp, 1 ); /*Q_band_energy */ } } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP for ( i = 0; i < bands; i++ ) { @@ -1510,7 +1510,7 @@ static float band_energy_quant( for ( k = 0; k < bands; k++ ) L_band_energy[k] = (Word32) ( band_energy[k] * pow( 2.0f, SWB_BWE_LR_Qbe ) ); -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP exp_normd = norm_l( L_qint ); div_s( &rev_qint_fx, 0x4000, round_fx( L_shl( L_qint, exp_normd ) ) ); /* Q14-(29+exp_normd-16)+15 */ Qrev_qint = sub( 14 - ( 29 - 16 ) + 15, exp_normd ); @@ -1522,7 +1522,7 @@ static float band_energy_quant( L_tmp = L_mls( L_band_energy[k], rev_qint_fx ); /* Q14+Qrev_qint-15 */ bq1[k] = round_fx( L_shl( L_tmp, sub( 17, Qrev_qint ) ) ); /* 16-(14+Qrev_qint-15) */ } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP if ( is_transient ) { @@ -1604,10 +1604,10 @@ static float band_energy_quant( for ( k = 0; k < bands; k++ ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP L_band_energy[k] = L_mls( L_qint, (Word16) bq1[k] ); move32(); /* 29+0-15 -> Qbe(Q14) */ -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP band_energy[k] = (float) ( L_band_energy[k] / pow( 2.0f, SWB_BWE_LR_Qbe ) ); } @@ -1708,7 +1708,7 @@ static void mdct_spectrum_fine_gain_enc( Word16 Qgt; Word16 temp_lo_fx, temp_hi_fx; -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP /* Fine gain quantization on only the most significant energy bands */ /*delta = qint / gqlevs; */ exp_normn = norm_l( L_qint ); @@ -1733,7 +1733,7 @@ static void mdct_spectrum_fine_gain_enc( gain_table_fx[i] = shl( gain_table_fx[i], sub( 14, Qgt ) ); /* Qgt -> Q14 */ gain_table[i] = (float) ( gain_table_fx[i] / pow( 2.0f, 14 ) ); } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP for ( k = bands - Ngq; k < bands; k++ ) { diff --git a/lib_enc/hvq_enc.c b/lib_enc/hvq_enc.c index d82de6f5f394c6b55fba891ba02d217b12b49e08..42ac52cc3c56533b0b026a6dc38421271ad97189 100644 --- a/lib_enc/hvq_enc.c +++ b/lib_enc/hvq_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_enc.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * hvq_enc() diff --git a/lib_enc/igf_enc.c b/lib_enc/igf_enc.c index e355cd2083872b56e454db3a66d7591c118c281c..9c68e3fcc760981ad66e0da3ec77b7ebd427ce18 100644 --- a/lib_enc/igf_enc.c +++ b/lib_enc/igf_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "ivas_prot.h" #include "cnst.h" #include "stat_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif diff --git a/lib_enc/igf_scf_enc.c b/lib_enc/igf_scf_enc.c index b1a3842b8f4b534d0891a9352144cdb15969b8d3..f893a8b315d3f193d09b62c10f8f7c7ec029a0c4 100644 --- a/lib_enc/igf_scf_enc.c +++ b/lib_enc/igf_scf_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "stat_enc.h" #include "stat_com.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_enc/init_enc.c b/lib_enc/init_enc.c index 4e4ab24369b8d1da2cafa350a819fbbcbf2b45d4..e456a52a614f6ba95bf0eb6dbfa0e65564ba4fb5 100644 --- a/lib_enc/init_enc.c +++ b/lib_enc/init_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #include "prot.h" #include "ivas_prot.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * init_encoder() @@ -107,7 +107,7 @@ ivas_error init_encoder( if ( !vad_only_flag ) { - if ( ( st->hBstr = (BSTR_ENC_HANDLE) count_malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) + if ( ( st->hBstr = (BSTR_ENC_HANDLE) malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Bitstream structure\n" ) ); } @@ -256,7 +256,7 @@ ivas_error init_encoder( if ( !vad_only_flag ) { - if ( ( st->hSignalBuf = (SIGNAL_BUFFERS_ENC_HANDLE) count_malloc( sizeof( SIGNAL_BUFFERS_ENC_DATA ) ) ) == NULL ) + if ( ( st->hSignalBuf = (SIGNAL_BUFFERS_ENC_HANDLE) malloc( sizeof( SIGNAL_BUFFERS_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Signal buffers\n" ) ); } @@ -311,7 +311,7 @@ ivas_error init_encoder( if ( idchan == 0 || st->element_mode == IVAS_CPE_TD || st->element_mode == IVAS_CPE_MDCT || st->element_mode == EVS_MONO ) { - if ( ( st->hNoiseEst = (NOISE_EST_HANDLE) count_malloc( sizeof( NOISE_EST_DATA ) ) ) == NULL ) + if ( ( st->hNoiseEst = (NOISE_EST_HANDLE) malloc( sizeof( NOISE_EST_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Noise estimation\n" ); } @@ -332,7 +332,7 @@ ivas_error init_encoder( if ( ( idchan == 0 || st->element_mode == IVAS_CPE_TD || st->element_mode == IVAS_CPE_MDCT || st->element_mode == EVS_MONO ) && ( !vad_only_flag ) ) { - if ( ( st->hVAD = (VAD_HANDLE) count_malloc( sizeof( VAD_DATA ) ) ) == NULL ) + if ( ( st->hVAD = (VAD_HANDLE) malloc( sizeof( VAD_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for VAD\n" ) ); } @@ -348,7 +348,7 @@ ivas_error init_encoder( /* CLDFB-based VAD */ if ( st->element_mode == EVS_MONO ) { - if ( ( st->hVAD_CLDFB = (VAD_CLDFB_HANDLE) count_malloc( sizeof( T_CldfbVadState ) ) ) == NULL ) + if ( ( st->hVAD_CLDFB = (VAD_CLDFB_HANDLE) malloc( sizeof( T_CldfbVadState ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CLDFB VAD\n" ) ); } @@ -366,7 +366,7 @@ ivas_error init_encoder( if ( idchan == 0 || st->element_mode == IVAS_CPE_TD || st->element_mode == IVAS_CPE_MDCT || st->element_mode == EVS_MONO ) { - if ( ( st->hSpMusClas = (SP_MUS_CLAS_HANDLE) count_malloc( sizeof( SP_MUS_CLAS_DATA ) ) ) == NULL ) + if ( ( st->hSpMusClas = (SP_MUS_CLAS_HANDLE) malloc( sizeof( SP_MUS_CLAS_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Speech/music classifier\n" ) ); } @@ -414,7 +414,7 @@ ivas_error init_encoder( if ( ( ( idchan == 0 && st->Opt_DTX_ON ) || st->element_mode == EVS_MONO ) || ( st->element_mode == IVAS_CPE_MDCT && st->Opt_DTX_ON ) ) { - if ( ( st->hDtxEnc = (DTX_ENC_HANDLE) count_malloc( sizeof( DTX_ENC_DATA ) ) ) == NULL ) + if ( ( st->hDtxEnc = (DTX_ENC_HANDLE) malloc( sizeof( DTX_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX variables\n" ) ); } @@ -464,7 +464,7 @@ ivas_error init_encoder( if ( ( ( idchan == 0 && st->Opt_DTX_ON && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == EVS_MONO ) ) { - if ( ( st->hTdCngEnc = (TD_CNG_ENC_HANDLE) count_malloc( sizeof( TD_CNG_ENC_DATA ) ) ) == NULL ) + if ( ( st->hTdCngEnc = (TD_CNG_ENC_HANDLE) malloc( sizeof( TD_CNG_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX/TD CNG\n" ) ); } @@ -500,7 +500,7 @@ ivas_error init_encoder( if ( st->Opt_SC_VBR || st->element_mode == EVS_MONO ) { - if ( ( st->hSC_VBR = (SC_VBR_ENC_HANDLE) count_malloc( sizeof( SC_VBR_ENC_DATA ) ) ) == NULL ) + if ( ( st->hSC_VBR = (SC_VBR_ENC_HANDLE) malloc( sizeof( SC_VBR_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SC-VBR\n" ) ); } @@ -521,7 +521,7 @@ ivas_error init_encoder( if ( st->Opt_AMR_WB || st->element_mode == EVS_MONO ) { - if ( ( st->hAmrwb_IO = (AMRWB_IO_ENC_HANDLE) count_malloc( sizeof( AMRWB_IO_ENC_DATA ) ) ) == NULL ) + if ( ( st->hAmrwb_IO = (AMRWB_IO_ENC_HANDLE) malloc( sizeof( AMRWB_IO_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AMR-WB IO\n" ) ); } @@ -539,7 +539,7 @@ ivas_error init_encoder( if ( ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == IVAS_CPE_TD ) { - if ( ( st->hLPDmem = (LPD_state_HANDLE) count_malloc( sizeof( LPD_state ) ) ) == NULL ) + if ( ( st->hLPDmem = (LPD_state_HANDLE) malloc( sizeof( LPD_state ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LPDmem\n" ) ); } @@ -560,7 +560,7 @@ ivas_error init_encoder( if ( ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) || st->element_mode == IVAS_CPE_TD ) { - if ( ( st->hGSCEnc = (GSC_ENC_HANDLE) count_malloc( sizeof( GSC_ENC_DATA ) ) ) == NULL ) + if ( ( st->hGSCEnc = (GSC_ENC_HANDLE) malloc( sizeof( GSC_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for GSC\n" ) ); } @@ -578,7 +578,7 @@ ivas_error init_encoder( if ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) { - if ( ( st->hBWE_TD = (TD_BWE_ENC_HANDLE) count_malloc( sizeof( TD_BWE_ENC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_TD = (TD_BWE_ENC_HANDLE) malloc( sizeof( TD_BWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD BWE\n" ) ); } @@ -603,7 +603,7 @@ ivas_error init_encoder( if ( idchan == 0 && st->element_mode != IVAS_CPE_MDCT ) { - if ( ( st->hBWE_FD = (FD_BWE_ENC_HANDLE) count_malloc( sizeof( FD_BWE_ENC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_FD = (FD_BWE_ENC_HANDLE) malloc( sizeof( FD_BWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FD BWE\n" ) ); } @@ -621,7 +621,7 @@ ivas_error init_encoder( if ( st->element_mode != IVAS_CPE_TD && st->element_mode != IVAS_CPE_MDCT && idchan == 0 ) { - if ( ( st->hHQ_core = (HQ_ENC_HANDLE) count_malloc( sizeof( HQ_ENC_DATA ) ) ) == NULL ) + if ( ( st->hHQ_core = (HQ_ENC_HANDLE) malloc( sizeof( HQ_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HQ core\n" ) ); } @@ -657,7 +657,7 @@ ivas_error init_encoder( if ( st->Opt_RF_ON || st->element_mode == EVS_MONO ) { - if ( ( st->hRF = (RF_ENC_HANDLE) count_malloc( sizeof( RF_ENC_DATA ) ) ) == NULL ) + if ( ( st->hRF = (RF_ENC_HANDLE) malloc( sizeof( RF_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for RF\n" ) ); } @@ -676,7 +676,7 @@ ivas_error init_encoder( if ( st->element_mode == EVS_MONO ) { - if ( ( st->hTECEnc = (TEC_ENC_HANDLE) count_malloc( sizeof( TEC_ENC_DATA ) ) ) == NULL ) + if ( ( st->hTECEnc = (TEC_ENC_HANDLE) malloc( sizeof( TEC_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TEC\n" ) ); } @@ -694,7 +694,7 @@ ivas_error init_encoder( // VE: reduction possible for MCT_CHAN_MODE_LFE channel - see I1-172 if ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) { - if ( ( st->hTcxEnc = (TCX_ENC_HANDLE) count_malloc( sizeof( TCX_ENC_DATA ) ) ) == NULL ) + if ( ( st->hTcxEnc = (TCX_ENC_HANDLE) malloc( sizeof( TCX_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxEnc\n" ) ); } @@ -711,7 +711,7 @@ ivas_error init_encoder( /* MDCT classifier */ MDCT_classifier_reset( st->hTcxEnc ); - if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) count_malloc( sizeof( TCX_config ) ) ) == NULL ) + if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) malloc( sizeof( TCX_config ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxCfg\n" ) ); } @@ -728,7 +728,7 @@ ivas_error init_encoder( if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - if ( ( st->hIGFEnc = (IGF_ENC_INSTANCE_HANDLE) count_malloc( sizeof( IGF_ENC_INSTANCE ) ) ) == NULL ) + if ( ( st->hIGFEnc = (IGF_ENC_INSTANCE_HANDLE) malloc( sizeof( IGF_ENC_INSTANCE ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hIGFEnc\n" ) ); } @@ -756,7 +756,7 @@ ivas_error init_encoder( /* PLC encoder */ if ( st->element_mode == EVS_MONO ) { - if ( ( st->hPlcExt = (PLC_ENC_EVS_HANDLE) count_malloc( sizeof( PLC_ENC_EVS ) ) ) == NULL ) + if ( ( st->hPlcExt = (PLC_ENC_EVS_HANDLE) malloc( sizeof( PLC_ENC_EVS ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hPlcExt\n" ) ); } @@ -803,7 +803,7 @@ ivas_error init_encoder( if ( st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { - if ( ( st->hTranDet = (TRAN_DET_HANDLE) count_malloc( sizeof( TRAN_DET_DATA ) ) ) == NULL ) + if ( ( st->hTranDet = (TRAN_DET_HANDLE) malloc( sizeof( TRAN_DET_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Transient Detection\n" ) ); } diff --git a/lib_enc/inov_enc.c b/lib_enc/inov_enc.c index c80057f0551d0629adf17ca5c635f445c4fb073e..fedc98e103c2d67a90e3f5567d7ca4712d144b90 100644 --- a/lib_enc/inov_enc.c +++ b/lib_enc/inov_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * inov_encode() diff --git a/lib_enc/isf_enc_amr_wb.c b/lib_enc/isf_enc_amr_wb.c index 441c66be9bf459f34d565c848cc62945c1022a30..c10ee6288b030dc738eb341571d36dd3111ed839 100644 --- a/lib_enc/isf_enc_amr_wb.c +++ b/lib_enc/isf_enc_amr_wb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants diff --git a/lib_enc/ivas_agc_enc.c b/lib_enc/ivas_agc_enc.c index d8d0f1f772761740e7c8077ffbd420b7cfe1c04e..f98c22b97e46d286c4a5be8e8df49c9c299d4c48 100644 --- a/lib_enc/ivas_agc_enc.c +++ b/lib_enc/ivas_agc_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "prot.h" #include #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* @@ -152,7 +152,7 @@ ivas_error ivas_spar_agc_enc_open( ivas_agc_enc_state_t *hAgc; int16_t input_frame, delay; - if ( ( hAgc = (ivas_agc_enc_state_t *) count_malloc( sizeof( ivas_agc_enc_state_t ) ) ) == NULL ) + if ( ( hAgc = (ivas_agc_enc_state_t *) malloc( sizeof( ivas_agc_enc_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR AGC encoder" ); } @@ -160,17 +160,17 @@ ivas_error ivas_spar_agc_enc_open( input_frame = (int16_t) ( input_Fs / FRAMES_PER_SEC ); delay = NS2SA( input_Fs, ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) ); - if ( ( hAgc->agc_com.winFunc = (float *) count_malloc( sizeof( float ) * ( input_frame - delay ) ) ) == NULL ) + if ( ( hAgc->agc_com.winFunc = (float *) malloc( sizeof( float ) * ( input_frame - delay ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR AGC encoder" ); } - if ( ( hAgc->gain_state = (ivas_agc_enc_chan_state_t *) count_malloc( sizeof( ivas_agc_enc_chan_state_t ) * nchan_inp ) ) == NULL ) + if ( ( hAgc->gain_state = (ivas_agc_enc_chan_state_t *) malloc( sizeof( ivas_agc_enc_chan_state_t ) * nchan_inp ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR AGC encoder" ); } - if ( ( hAgc->gain_data = (ivas_agc_chan_data_t *) count_malloc( sizeof( ivas_agc_chan_data_t ) * nchan_inp ) ) == NULL ) + if ( ( hAgc->gain_data = (ivas_agc_chan_data_t *) malloc( sizeof( ivas_agc_chan_data_t ) * nchan_inp ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR AGC encoder" ); } @@ -199,16 +199,16 @@ void ivas_spar_agc_enc_close( if ( hAgc != NULL ) { - count_free( hAgc->agc_com.winFunc ); + free( hAgc->agc_com.winFunc ); hAgc->agc_com.winFunc = NULL; - count_free( hAgc->gain_state ); + free( hAgc->gain_state ); hAgc->gain_state = NULL; - count_free( hAgc->gain_data ); + free( hAgc->gain_data ); hAgc->gain_data = NULL; - count_free( hAgc ); + free( hAgc ); hAgc = NULL; } @@ -329,7 +329,8 @@ void ivas_agc_enc_process( { int16_t isCompensated = FALSE; actualMaxAbsVal = pState->gain_state[i].lastMaxAbs * pState->gain_state[i].lastGain; - pState->gain_state[i].gainExpVal = (int16_t) ceilf( -logf( actualMaxAbsVal * MDFT_NORM_SCALING ) / logf( pState->agc_com.winFunc[min( offset - 1, MaxAbsValIdx )] ) ); + idx = min( offset - 1, MaxAbsValIdx ); + pState->gain_state[i].gainExpVal = (int16_t) ceilf( -logf( actualMaxAbsVal * MDFT_NORM_SCALING ) / logf( pState->agc_com.winFunc[idx] ) ); while ( !isCompensated ) { diff --git a/lib_enc/ivas_core_enc.c b/lib_enc/ivas_core_enc.c index dc3247cbfbc11b84261bf67742331e48b6196540..e53033ab98546480c4d75cce2b2a898d208dbf81 100644 --- a/lib_enc/ivas_core_enc.c +++ b/lib_enc/ivas_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "prot.h" #include "ivas_cnst.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include #ifdef DEBUG_MODE_ACELP @@ -61,7 +61,6 @@ ivas_error ivas_core_enc( const int16_t n_CoreChannels, /* i : number of core channels to be coded */ float old_inp_12k8[CPE_CHANNELS][L_INP_12k8], /* i : buffer of old input signal */ float old_inp_16k[CPE_CHANNELS][L_INP], /* i : buffer of old input signal */ - const float Etot[CPE_CHANNELS], /* i : total energy */ float ener[CPE_CHANNELS], /* i : residual energy from Levinson-Durbin */ float A[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes */ float Aw[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquantized for subframes */ @@ -105,7 +104,7 @@ ivas_error ivas_core_enc( int32_t element_brate, last_element_brate, input_Fs; ivas_error error; - wmops_sub_start( "ivas_core_enc" ); + push_wmops( "ivas_core_enc" ); error = IVAS_ERR_OK; @@ -343,16 +342,7 @@ ivas_error ivas_core_enc( { if ( st->hBWE_TD != NULL ) { - set_f( st->hBWE_TD->old_speech_shb, 0.0f, L_LOOK_16k + L_SUBFR16k ); - set_f( shb_speech, 0.0f, L_FRAME16k ); - set_f( st->hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); - set_f( st->hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); - st->hBWE_TD->old_mean_EnvSHBres = 0.0f; - st->hBWE_TD->prev_enr_EnvSHBres = 1.0f; - st->hBWE_TD->prev_shb_env_tilt = 0.0f; - st->hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; - st->hBWE_TD->prev_mix_factor = 1.0f; - st->hBWE_TD->prev_Env_error = 0.0f; + InitSWBencBufferStates( st->hBWE_TD, shb_speech ); } } @@ -409,7 +399,10 @@ ivas_error ivas_core_enc( * Common updates *---------------------------------------------------------------------*/ - updt_enc_common( st, Etot[n] ); + if ( !MCT_flag ) /* for MCT do this later, otherwise there can be a problem because TCX quant happens later and might get the wrong last_core on a bit rate switch */ + { + updt_enc_common( st ); + } } @@ -523,7 +516,7 @@ ivas_error ivas_core_enc( } #endif - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/ivas_core_pre_proc.c b/lib_enc/ivas_core_pre_proc.c index acbacc09e0a266da989089bf1a8d6bee139076a5..7a0d25ddfa4e2883fd7db7eb507d72b24123e064 100644 --- a/lib_enc/ivas_core_pre_proc.c +++ b/lib_enc/ivas_core_pre_proc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -85,7 +85,7 @@ ivas_error pre_proc_ivas( int32_t sr_core_tmp, total_brate_tmp; ivas_error error; - wmops_sub_start( "pre_proc" ); + push_wmops( "pre_proc" ); error = IVAS_ERR_OK; @@ -459,7 +459,7 @@ ivas_error pre_proc_ivas( dbgwrite( inp_16k, sizeof( float ), L_FRAME, 1, fname( debug_dir, "inp_16k", st->idchan, st->id_element, ENC ) ); #endif - wmops_sub_end(); + pop_wmops(); return error; } @@ -659,7 +659,9 @@ ivas_error ivas_compute_core_buffers( * Perform fixed preemphasis (16kHz signal) through 1 - g*z^-1 *-----------------------------------------------------------------*/ - if ( !( ( element_mode == IVAS_CPE_TD && st->idchan == 1 ) || element_mode == IVAS_CPE_MDCT ) ) + if ( + st->tcxonly == 0 && + !( ( element_mode == IVAS_CPE_TD && st->idchan == 1 ) || element_mode == IVAS_CPE_MDCT ) ) { st->mem_preemph_enc = new_inp_16k[L_frame_tmp - 1]; } diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index 828fdf17a1db4fe7da194c0c38be216bbb7b5c14..be28d0ee7fe1bb726260b5815b312c8e773139a7 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,10 +41,17 @@ #include "rom_com.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include +/*---------------------------------------------------------------* + * Local constants + *---------------------------------------------------------------*/ + +#define SCE_SMC_THR 16000 + + /*-------------------------------------------------------------------* * Local function prototypes *--------------------------------------------------------------------*/ @@ -68,7 +75,6 @@ ivas_error pre_proc_front_ivas( const int16_t n, /* i : channel number */ float old_inp_12k8[], /* o : buffer of old input signal */ float old_inp_16k[], /* o : buffer of old input signal @16kHz */ - float *Etot, /* o : total energy */ float *ener, /* o : residual energy from Levinson-Durbin */ float *relE, /* o : frame relative energy */ float A[NB_SUBFR16k * ( M + 1 )], /* o : A(z) unquantized for the 4 subframes */ @@ -100,13 +106,13 @@ ivas_error pre_proc_front_ivas( const int16_t flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz */ const int16_t front_vad_flag, /* i : front-VAD flag to overwrite VAD decision */ const int16_t force_front_vad, /* i : flag to force VAD decision */ - const int16_t front_vad_dtx_flag /* i : front-VAD DTX flag to overwrite VAD decision*/ - , - const int32_t ivas_total_brate /* i : IVAS total bitrate - for setting the DTX */ -) + const int16_t front_vad_dtx_flag, /* i : front-VAD DTX flag to overwrite VAD decision*/ + const int32_t ivas_total_brate, /* i : IVAS total bitrate - for setting the DTX */ + const int16_t ivas_format ) { float *inp_12k8, *new_inp_12k8; /* pointers to current frame and new data */ float *wsp; /* weighted input signal buffer */ + float Etot; /* total energy */ float fr_bands[2 * NB_BANDS]; /* energy in frequency bands */ float lf_E[2 * VOIC_BINS]; /* per bin spectrum energy in lf */ float tmpN[NB_BANDS]; /* Temporary noise update */ @@ -157,7 +163,7 @@ ivas_error pre_proc_front_ivas( int16_t LR_vad_flag; ivas_error error; - wmops_sub_start( "pre_proc_front" ); + push_wmops( "pre_proc_front" ); /*------------------------------------------------------------------* * Initialization @@ -408,11 +414,11 @@ ivas_error pre_proc_front_ivas( * Spectral analysis *--------------------------------------------------------------------------*/ - analy_sp( element_mode, hCPE, input_Fs, inp_12k8, st->Bin_E, st->Bin_E_old, fr_bands, lf_E, Etot, st->min_band, st->max_band, band_energies, PS, fft_buff ); + analy_sp( element_mode, hCPE, input_Fs, inp_12k8, st->Bin_E, st->Bin_E_old, fr_bands, lf_E, &Etot, st->min_band, st->max_band, band_energies, PS, fft_buff ); if ( hStereoClassif != NULL ) { - if ( st->lp_speech - *Etot > 25 ) + if ( st->lp_speech - Etot > 25 ) { hStereoClassif->silence_flag = 2; } @@ -427,7 +433,7 @@ ivas_error pre_proc_front_ivas( * SAD (1-signal, 0-noise) *----------------------------------------------------------------*/ - noise_est_pre( *Etot, st->ini_frame, st->hNoiseEst, st->idchan, element_mode, hCPE != NULL ? hCPE->last_element_mode : element_mode ); + noise_est_pre( Etot, st->ini_frame, st->hNoiseEst, st->idchan, element_mode, hCPE != NULL ? hCPE->last_element_mode : element_mode ); if ( element_mode == IVAS_CPE_TD && ( ( abs( hCPE->hStereoTD->tdm_last_ratio_idx - tdm_ratio_idx ) > 5 && st->idchan == 1 ) || abs( hCPE->hStereoTD->tdm_last_inst_ratio_idx - hCPE->hStereoTD->tdm_inst_ratio_idx ) > 10 ) ) { @@ -450,15 +456,9 @@ ivas_error pre_proc_front_ivas( st->vad_flag = front_vad_flag; st->localVAD = front_vad_flag; } - if ( ( hCPE != NULL && !( lr_vad_enabled && st->idchan == 0 ) ) || hSCE != NULL ) { - *vad_flag_dtx = dtx_hangover_addition( st, st->vad_flag, st->lp_speech - st->lp_noise, 0, vad_hover_flag, NULL, NULL -#ifdef FIX_ITD_CNG - , - NULL -#endif - ); + *vad_flag_dtx = dtx_hangover_addition( st, st->vad_flag, st->lp_speech - st->lp_noise, 0, vad_hover_flag, NULL, NULL, NULL ); } else { @@ -505,7 +505,7 @@ ivas_error pre_proc_front_ivas( * Correlation correction as a function of total noise level *----------------------------------------------------------------*/ - noise_est_down( fr_bands, st->hNoiseEst->bckr, tmpN, tmpE, st->min_band, st->max_band, &st->hNoiseEst->totalNoise, *Etot, &st->hNoiseEst->Etot_last, &st->hNoiseEst->Etot_v_h2 ); + noise_est_down( fr_bands, st->hNoiseEst->bckr, tmpN, tmpE, st->min_band, st->max_band, &st->hNoiseEst->totalNoise, Etot, &st->hNoiseEst->Etot_last, &st->hNoiseEst->Etot_v_h2 ); if ( lr_vad_enabled && st->idchan == 0 ) { @@ -515,7 +515,7 @@ ivas_error pre_proc_front_ivas( corr_shiftR = correlation_shift( hCPE->hFrontVad[1]->hNoiseEst->totalNoise ); } - *relE = *Etot - st->lp_speech; + *relE = Etot - st->lp_speech; corr_shift = correlation_shift( st->hNoiseEst->totalNoise ); @@ -556,13 +556,11 @@ ivas_error pre_proc_front_ivas( dtx( st, ivas_total_brate, *vad_flag_dtx, inp_12k8 ); -#ifdef FIX_ITD_CNG if ( hCPE != NULL && hCPE->hStereoDft != NULL && st->core_brate == SID_2k40 ) { /* Add another period of expected xcorr updates */ hCPE->hStereoDft->expectedNumUpdates += st->hDtxEnc->max_SID; } -#endif /*----------------------------------------------------------------* * Adjust FD-CNG Noise Estimator @@ -663,7 +661,7 @@ ivas_error pre_proc_front_ivas( * Update estimated noise energy and voicing cut-off frequency *-----------------------------------------------------------------*/ - noise_est( st, old_pitch1, tmpN, epsP, *Etot, *relE, corr_shift, tmpE, fr_bands, cor_map_sum, &ncharX, &sp_div, + noise_est( st, old_pitch1, tmpN, epsP, Etot, *relE, corr_shift, tmpE, fr_bands, cor_map_sum, &ncharX, &sp_div, &non_staX, loc_harm, lf_E, &st->hNoiseEst->harm_cor_cnt, st->hNoiseEst->Etot_l_lp, &dummy /*sp_floor*/, S_map, hStereoClassif, NULL, st->ini_frame ); if ( lr_vad_enabled && st->idchan == 0 ) @@ -696,7 +694,7 @@ ivas_error pre_proc_front_ivas( find_tilt( fr_bands, st->hNoiseEst->bckr, ee, st->pitch, st->voicing, lf_E, corr_shift, st->input_bwidth, st->max_band, hp_E, MODE1, &( st->bckr_tilt_lt ), st->Opt_SC_VBR ); - st->coder_type = find_uv( st, pitch_fr, voicing_fr, inp_12k8, ee, &dE1X, corr_shift, *relE, *Etot, hp_E, &flag_spitch, last_core_orig, hStereoClassif ); + st->coder_type = find_uv( st, pitch_fr, voicing_fr, inp_12k8, ee, &dE1X, corr_shift, *relE, Etot, hp_E, &flag_spitch, last_core_orig, hStereoClassif ); /*-----------------------------------------------------------------* * channel aware mode configuration * @@ -732,7 +730,7 @@ ivas_error pre_proc_front_ivas( * 1st stage speech/music classification (GMM model) *----------------------------------------------------------------*/ - smc_dec = ivas_smc_gmm( st, hStereoClassif, localVAD_HE_SAD, *Etot, lsp_new, *cor_map_sum, epsP, PS, non_staX, *relE, &high_lpn_flag, flag_spitch ); + smc_dec = ivas_smc_gmm( st, hStereoClassif, localVAD_HE_SAD, Etot, lsp_new, *cor_map_sum, epsP, PS, non_staX, *relE, &high_lpn_flag, flag_spitch ); #ifdef DEBUGGING if ( st->idchan == 0 ) @@ -755,19 +753,16 @@ ivas_error pre_proc_front_ivas( * Update of old per-band energy spectrum *----------------------------------------------------------------*/ - long_enr( st, *Etot, localVAD_HE_SAD, high_lpn_flag, NULL, 1, NULL, NULL ); + long_enr( st, Etot, localVAD_HE_SAD, high_lpn_flag, NULL, 1, NULL, NULL ); mvr2r( fr_bands + NB_BANDS, st->hNoiseEst->enrO, NB_BANDS ); if ( lr_vad_enabled && st->idchan == 0 ) { - long_enr( st, *Etot, localVAD_HE_SAD, high_lpn_flag, hCPE->hFrontVad, CPE_CHANNELS, localVAD_HE_SAD_LR, Etot_LR ); + long_enr( st, -1, localVAD_HE_SAD, high_lpn_flag, hCPE->hFrontVad, CPE_CHANNELS, localVAD_HE_SAD_LR, Etot_LR ); mvr2r( fr_bands_LR[0] + NB_BANDS, hCPE->hFrontVad[0]->hNoiseEst->enrO, NB_BANDS ); mvr2r( fr_bands_LR[1] + NB_BANDS, hCPE->hFrontVad[1]->hNoiseEst->enrO, NB_BANDS ); - - hCPE->hFrontVad[0]->hNoiseEst->Etot_last = Etot_LR[0]; - hCPE->hFrontVad[1]->hNoiseEst->Etot_last = Etot_LR[1]; } /*----------------------------------------------------------------* @@ -791,7 +786,7 @@ ivas_error pre_proc_front_ivas( else if ( element_mode != IVAS_CPE_MDCT ) { /* SNR-based speech/music classification */ - if ( ( element_mode >= IVAS_CPE_DFT && element_brate >= IVAS_24k4 ) || ( element_mode == IVAS_SCE && element_brate >= 16000 ) ) + if ( ( element_mode >= IVAS_CPE_DFT && element_brate >= IVAS_24k4 ) || ( element_mode == IVAS_SCE && element_brate >= SCE_SMC_THR ) ) { if ( flag_16k_smc ) { @@ -809,9 +804,30 @@ ivas_error pre_proc_front_ivas( smc_dec = ivas_acelp_tcx20_switching( st, inp_12k8, wsp, non_staX, pitch_fr, voicing_fr, currFlatness, lsp_mid, stab_fac, res_cod_SNR_M, flag_16k_smc ); } } + /* Switch to ACELP for non-harmonic transient signals */ + else if ( ( ( ivas_format == STEREO_FORMAT && element_brate <= IVAS_16k4 ) || ( ivas_format == ISM_FORMAT && element_brate < SCE_SMC_THR ) ) && ( loc_harm[0] != 1 ) && smc_dec == MUSIC ) + { + if ( element_mode == IVAS_SCE ) + { + if ( transient_analysis( st->hTranDet, st->hNoiseEst->cor_map, st->hNoiseEst->multi_harm_limit ) ) + { + smc_dec = SPEECH; + } + } + else if ( element_mode == IVAS_CPE_DFT ) + { + for ( i = 0; i < CPE_CHANNELS; i++ ) + { + if ( smc_dec != SPEECH && transient_analysis( hCPE->hCoreCoder[i]->hTranDet, st->hNoiseEst->cor_map, st->hNoiseEst->multi_harm_limit ) ) + { + smc_dec = SPEECH; /* overwrite initial music decision, intial SPEECH_MUSIC never changed */ + } + } + } + } /* 2nd stage speech/music classification (ACELP/GSC/TCX core selection) */ - ivas_smc_mode_selection( st, element_brate, smc_dec, *relE, *Etot, attack_flag, inp_12k8, S_map, flag_spitch ); + ivas_smc_mode_selection( st, element_brate, smc_dec, *relE, Etot, attack_flag, inp_12k8, S_map, flag_spitch ); #ifdef ITD_WINNER_GAIN_MODIFY if ( element_mode == IVAS_CPE_DFT ) @@ -858,7 +874,7 @@ ivas_error pre_proc_front_ivas( mvr2r( &old_inp_12k8[L_FRAME], st->old_inp_12k8, L_INP_MEM ); - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/ivas_corecoder_enc_reconfig.c b/lib_enc/ivas_corecoder_enc_reconfig.c index dffd53bb93c0cdc7225a60c10a40553fdbeb8c1a..e8486d77382b95866009ae265498450d0b562af9 100644 --- a/lib_enc/ivas_corecoder_enc_reconfig.c +++ b/lib_enc/ivas_corecoder_enc_reconfig.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -50,10 +50,13 @@ *-------------------------------------------------------------------*/ ivas_error ivas_corecoder_enc_reconfig( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ - const int16_t nSCE_old, /* i : number of SCEs in previous frame */ - const int16_t nCPE_old, /* i : number of CPEs in previous frame */ - const int16_t nchan_transport_old /* i : number of TCs in previous frame */ + Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ + const int16_t nSCE_old, /* i : number of SCEs in previous frame */ + const int16_t nCPE_old, /* i : number of CPEs in previous frame */ + const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ + const int32_t brate_SCE, /* i : bitrate to be set for the SCEs */ + const int32_t brate_CPE, /* i : bitrate to be set for the CPEs */ + const MC_MODE last_mc_mode /* i : switching between MC modes: last mode */ ) { int16_t n, sce_id, cpe_id; @@ -62,7 +65,6 @@ ivas_error ivas_corecoder_enc_reconfig( BSTR_ENC_HANDLE hBstr, hMetaData; Indice *ind_list, *ind_list_metadata; int16_t nb_bits_tot, next_ind, last_ind; - int32_t ivas_total_brate; ENCODER_CONFIG_HANDLE hEncoderConfig; ivas_error error; @@ -71,7 +73,6 @@ ivas_error ivas_corecoder_enc_reconfig( *-----------------------------------------------------------------*/ hEncoderConfig = st_ivas->hEncoderConfig; - ivas_total_brate = hEncoderConfig->ivas_total_brate; error = IVAS_ERR_OK; len_inp_memory = (int16_t) ( hEncoderConfig->input_Fs / FRAMES_PER_SEC ); @@ -84,19 +85,18 @@ ivas_error ivas_corecoder_enc_reconfig( * Switching between SCE(s)/CPE(s)/MCT *-----------------------------------------------------------------*/ - if ( st_ivas->nchan_transport == nchan_transport_old ) + if ( st_ivas->nchan_transport == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old ) /* in McMASA, nchan_transport may be the same, but nSCE/nCPE differs */ { for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { copy_encoder_config( st_ivas, st_ivas->hSCE[sce_id]->hCoreCoder[0], 0 ); - st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; + st_ivas->hSCE[sce_id]->element_brate = brate_SCE; st_ivas->hSCE[sce_id]->hCoreCoder[0]->total_brate = st_ivas->hSCE[sce_id]->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ } for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { - st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; - + st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { @@ -116,7 +116,23 @@ ivas_error ivas_corecoder_enc_reconfig( } else { + int16_t nchan_transport_real, nchan_transport_old_real; + + nchan_transport_old_real = nchan_transport_old; + nchan_transport_real = st_ivas->nchan_transport; + /* in SCE+CPE McMASA nchan_transport is still 2, fix the numbers */ + if ( hEncoderConfig->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA ) + { + nchan_transport_old_real = nSCE_old + CPE_CHANNELS * nCPE_old; + } + if ( hEncoderConfig->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) + { + nchan_transport_real = st_ivas->nSCE + CPE_CHANNELS * st_ivas->nCPE; + } + + /* something in transport changes */ ind_list = NULL; + ind_list_metadata = NULL; hBstr = NULL; hMetaData = NULL; @@ -139,13 +155,39 @@ ivas_error ivas_corecoder_enc_reconfig( #endif /* save bitstream information */ - ind_list = hBstr->ind_list; + ind_list = hBstr->ind_list; /* pointer to the beginning of the global list */ nb_bits_tot = hBstr->nb_bits_tot; next_ind = hBstr->next_ind; last_ind = hBstr->last_ind; - ind_list_metadata = hMetaData->ind_list; + ind_list_metadata = hMetaData->ind_list; /* pointer to the beginning of the global list */ + + if ( hEncoderConfig->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA && st_ivas->mc_mode == MC_MODE_MCMASA ) + { + /* within McMASA we can modify the transport signals when switching */ + /* copy earlier dmx buffers */ + if ( nSCE_old > 0 ) + { + set_zero( input_buff[0], len_inp_memory ); + mvr2r( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff, input_buff[0], len_inp_memory ); + } + + for ( n = 0; n < CPE_CHANNELS; n++ ) + { + set_zero( input_buff[n + 1], len_inp_memory ); + if ( nCPE_old > 0 ) + { + mvr2r( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff, input_buff[n + 1], len_inp_memory ); + } + } + + ivas_mcmasa_dmx_modify( len_inp_memory, input_buff, nSCE_old + CPE_CHANNELS * nCPE_old, st_ivas->nSCE + CPE_CHANNELS * st_ivas->nCPE ); - n_CoreCoder_existing = min( st_ivas->nchan_transport, nchan_transport_old ); + n_CoreCoder_existing = 0; + } + else + { + n_CoreCoder_existing = min( nchan_transport_real, nchan_transport_old_real ); + } /* destroy superfluous core-coder elements */ for ( sce_id = st_ivas->nSCE; sce_id < nSCE_old; sce_id++ ) @@ -167,7 +209,7 @@ ivas_error ivas_corecoder_enc_reconfig( { if ( n_CoreCoder_existing > cpe_id * CPE_CHANNELS + n ) { - mvr2r( st_ivas->hCPE[cpe_id]->hCoreCoder[0]->input_buff, input_buff[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n], len_inp_memory ); + mvr2r( st_ivas->hCPE[cpe_id]->hCoreCoder[0]->input_buff, input_buff[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n], len_inp_memory ); /* TODO VoiceAge: Please check if this should be hCoreCoder[n] */ } } @@ -184,7 +226,7 @@ ivas_error ivas_corecoder_enc_reconfig( /* special case, if we have MCT now and had a single CPE before, remove the MDCT Stereo handles */ if ( st_ivas->nCPE > 1 && nCPE_old == 1 ) { - count_free( st_ivas->hCPE[0]->hStereoMdct ); + free( st_ivas->hCPE[0]->hStereoMdct ); st_ivas->hCPE[0]->hStereoMdct = NULL; } @@ -196,13 +238,13 @@ ivas_error ivas_corecoder_enc_reconfig( for ( sce_id = 0; sce_id < nSCE_existing; sce_id++ ) { copy_encoder_config( st_ivas, st_ivas->hSCE[sce_id]->hCoreCoder[0], 0 ); - st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; + st_ivas->hSCE[sce_id]->element_brate = brate_SCE; st_ivas->hSCE[sce_id]->hCoreCoder[0]->total_brate = st_ivas->hSCE[sce_id]->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ } for ( sce_id = nSCE_existing; sce_id < st_ivas->nSCE; sce_id++ ) { - if ( ( error = create_sce_enc( st_ivas, sce_id, ivas_total_brate / st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) + if ( ( error = create_sce_enc( st_ivas, sce_id, brate_SCE ) ) != IVAS_ERR_OK ) { return error; } @@ -239,19 +281,35 @@ ivas_error ivas_corecoder_enc_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { - st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; - + st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { copy_encoder_config( st_ivas, st_ivas->hCPE[cpe_id]->hCoreCoder[n], 0 ); st_ivas->hCPE[cpe_id]->hCoreCoder[n]->total_brate = st_ivas->hCPE[cpe_id]->element_brate / ( st_ivas->nCPE > 1 ? 1 : CPE_CHANNELS ); /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ + + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list + ( cpe_id * CPE_CHANNELS + n + st_ivas->nSCE ) * MAX_NUM_INDICES; + if ( cpe_id * CPE_CHANNELS + n > 0 || ( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->nSCE > 0 ) ) + { + reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); + } + else + { + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->last_ind = last_ind; + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_bits_tot = nb_bits_tot; + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->next_ind = next_ind; + } } } for ( cpe_id = nCPE_existing; cpe_id < st_ivas->nCPE; cpe_id++ ) { - if ( ( error = create_cpe_enc( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK ) + if ( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->hMcMasa->separateChannelEnabled ) + { + st_ivas->hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; + } + + if ( ( error = create_cpe_enc( st_ivas, cpe_id, brate_CPE ) ) != IVAS_ERR_OK ) { return error; } @@ -261,15 +319,15 @@ ivas_error ivas_corecoder_enc_reconfig( { if ( n_CoreCoder_existing > cpe_id * CPE_CHANNELS + n ) { - mvr2r( input_buff[n], st_ivas->hCPE[cpe_id]->hCoreCoder[0]->input_buff, len_inp_memory ); + mvr2r( input_buff[n], st_ivas->hCPE[cpe_id]->hCoreCoder[0]->input_buff, len_inp_memory ); /* TODO VoiceAge: Please check if this should be hCoreCoder[n] */ } } /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { - st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list + ( cpe_id * CPE_CHANNELS + n ) * MAX_NUM_INDICES; - if ( cpe_id * CPE_CHANNELS + n > 0 ) + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list + ( cpe_id * CPE_CHANNELS + n + st_ivas->nSCE ) * MAX_NUM_INDICES; + if ( cpe_id * CPE_CHANNELS + n > 0 || ( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->nSCE > 0 ) ) { reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); } @@ -288,6 +346,22 @@ ivas_error ivas_corecoder_enc_reconfig( } } + if ( last_mc_mode == MC_MODE_MCMASA && st_ivas->mc_mode == MC_MODE_MCMASA ) + { + /* restore modified transport signal */ + if ( st_ivas->nSCE ) + { + mvr2r( input_buff[0], st_ivas->hSCE[0]->hCoreCoder[0]->input_buff, len_inp_memory ); + } + if ( st_ivas->nCPE ) + { + for ( n = 0; n < CPE_CHANNELS; n++ ) + { + mvr2r( input_buff[n + 1], st_ivas->hCPE[0]->hCoreCoder[n]->input_buff, len_inp_memory ); + } + } + } + if ( st_ivas->nCPE > 1 && nCPE_old <= 1 ) { if ( nCPE_old == 1 ) @@ -333,20 +407,20 @@ ivas_error ivas_corecoder_enc_reconfig( { if ( st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData == NULL ) { - if ( ( st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData = (BSTR_ENC_HANDLE) count_malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) + if ( ( st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData = (BSTR_ENC_HANDLE) malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MetaData structure\n" ) ); } } - st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->ind_list = ind_list_metadata; + st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->ind_list = ind_list_metadata + st_ivas->nSCE * MAX_NUM_INDICES; reset_indices_enc( st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData, MAX_BITS_METADATA ); for ( cpe_id = 0; cpe_id < st_ivas->nCPE - 1; cpe_id++ ) { if ( st_ivas->hCPE[cpe_id]->hMetaData != NULL ) { - count_free( st_ivas->hCPE[cpe_id]->hMetaData ); + free( st_ivas->hCPE[cpe_id]->hMetaData ); st_ivas->hCPE[cpe_id]->hMetaData = NULL; } } @@ -355,7 +429,7 @@ ivas_error ivas_corecoder_enc_reconfig( /* special case, if we have a single CPE and had MCT before we need to init the MDCT stereo handles here */ if ( st_ivas->nCPE == 1 && nCPE_old > 1 ) { - if ( ( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) + if ( ( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -385,6 +459,9 @@ ivas_error ivas_corecoder_enc_reconfig( st_ivas->hCPE[0]->hCoreCoder[n]->mct_chan_mode = MCT_CHAN_MODE_REGULAR; } +#ifdef DEBUGGING + st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->mdct_stereo_mode_cmdl = hEncoderConfig->stereo_mode_cmdl; +#endif initMdctStereoEncData( st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct, hEncoderConfig->ivas_format, st_ivas->hCPE[st_ivas->nCPE - 1]->element_mode, st_ivas->hCPE[st_ivas->nCPE - 1]->element_brate, hEncoderConfig->max_bwidth, 0, NULL, 1 ); st_ivas->hCPE[st_ivas->nCPE - 1]->hStereoMdct->isSBAStereoMode = ( ( hEncoderConfig->ivas_format == SBA_FORMAT ) && ( st_ivas->nchan_transport == 2 ) ); } diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index 470d597b15ab425dcde5cf681e11ce7a7341dc68..17d91a31d5fbdb6abb3347f077b3ddf2d6ec8f44 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -65,7 +65,6 @@ ivas_error ivas_cpe_enc( int16_t n, n_CoreChannels; float old_inp_12k8[CPE_CHANNELS][L_INP_12k8]; /* buffer of input signal @ 12k8 */ float old_inp_16k[CPE_CHANNELS][L_INP]; /* buffer of input signal @ 16kHz */ - float Etot[CPE_CHANNELS]; /* total energy; correlation shift */ float ener[CPE_CHANNELS]; /* residual energy from Levinson-Durbin */ float relE[CPE_CHANNELS]; /* frame relative energy */ float A[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )]; /* A(z) unquantized for subframes */ @@ -96,6 +95,7 @@ ivas_error ivas_cpe_enc( int16_t localVAD_HE_SAD[CPE_CHANNELS]; /* HE-SAD flag without hangover, LR channels */ float band_energies_LR[2 * NB_BANDS]; /* energy in critical bands without minimum noise floor E_MIN */ float orig_input[CPE_CHANNELS][L_FRAME48k]; + float Etot_last[CPE_CHANNELS]; int32_t tmp, input_Fs; int16_t max_bwidth, ivas_format; ENCODER_CONFIG_HANDLE hEncoderConfig; @@ -104,7 +104,7 @@ ivas_error ivas_cpe_enc( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_cpe_enc" ); + push_wmops( "ivas_cpe_enc" ); hCPE = st_ivas->hCPE[cpe_id]; sts = hCPE->hCoreCoder; @@ -349,11 +349,7 @@ ivas_error ivas_cpe_enc( stereo_dft_enc_update( hCPE->hStereoDft, sts[0]->max_bwidth ); /* DFT stereo processing */ -#ifdef FIX_ITD_CNG stereo_dft_enc_process( hCPE, vad_flag_dtx, vad_hover_flag, input_frame ); -#else - stereo_dft_enc_process( hCPE, input_frame ); -#endif } else if ( hCPE->element_mode == IVAS_CPE_TD ) { @@ -370,14 +366,13 @@ ivas_error ivas_cpe_enc( { sts[1]->bits_frame_channel -= st_ivas->hQMetaData->metadata_max_bits; } + + Etot_last[0] = sts[0]->hNoiseEst->Etot_last; + Etot_last[1] = sts[1]->hNoiseEst->Etot_last; } else if ( hCPE->element_mode == IVAS_CPE_MDCT ) { -#ifdef FIX_ITD_CNG stereo_td_itd_mdct_stereo( hCPE, vad_flag_dtx, vad_hover_flag, input_frame ); -#else - stereo_td_itd_mdct_stereo( hCPE, input_frame ); -#endif } /*----------------------------------------------------------------* @@ -434,10 +429,11 @@ ivas_error ivas_cpe_enc( for ( n = 0; n < n_CoreChannels; n++ ) { - error = pre_proc_front_ivas( NULL, hCPE, hCPE->element_brate, nb_bits_metadata, input_frame, n, old_inp_12k8[n], old_inp_16k[n], &Etot[n], &ener[n], &relE[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], + error = pre_proc_front_ivas( NULL, hCPE, hCPE->element_brate, nb_bits_metadata, input_frame, n, old_inp_12k8[n], old_inp_16k[n], + &ener[n], &relE[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], &vad_hover_flag[n], &attack_flag[n], realBuffer[n], imagBuffer[n], old_wsp[n], pitch_fr[n], voicing_fr[n], &loc_harm[n], &cor_map_sum[n], &vad_flag_dtx[n], enerBuffer[n], fft_buff[n], A[0], lsp_new[0], currFlatness[n], tdm_ratio_idx, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, band_energies_LR, 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, 0, 0, - ivas_total_brate ); + ivas_total_brate, st_ivas->hEncoderConfig->ivas_format ); if ( error != IVAS_ERR_OK ) { return error; @@ -450,6 +446,9 @@ ivas_error ivas_cpe_enc( if ( sts[0]->core_brate == SID_2k40 || sts[0]->core_brate == FRAME_NO_DATA ) { sts[0]->core_brate = -1; +#ifdef SBA_BR_SWITCHING_RECONFIG + sts[0]->total_brate = hCPE->element_brate; +#endif } } @@ -520,15 +519,11 @@ ivas_error ivas_cpe_enc( { tdm_ol_pitch_comparison( hCPE, pitch_fr, voicing_fr ); - tdm_configure_enc( hCPE, tdm_SM_or_LRTD_Pri, tdm_ratio_idx, tdm_ratio_idx_SM, attack_flag[0], nb_bits_metadata ); + tdm_configure_enc( hCPE, Etot_last, tdm_SM_or_LRTD_Pri, tdm_ratio_idx, tdm_ratio_idx_SM, attack_flag[0], nb_bits_metadata ); if ( hEncoderConfig->Opt_DTX_ON ) { -#ifdef FIX_ITD_CNG stereo_cng_upd_counters( hCPE->hStereoCng, hCPE->element_mode, -1, NULL, sts[0]->hTdCngEnc->burst_ho_cnt, NULL ); -#else - stereo_cng_upd_counters( hCPE->hStereoCng, hCPE->element_mode, -1, NULL, sts[0]->hTdCngEnc->burst_ho_cnt ); -#endif } } @@ -581,11 +576,7 @@ ivas_error ivas_cpe_enc( } else { -#ifdef FIX_ITD_CNG stereo_cng_upd_counters( hCPE->hStereoCng, hCPE->element_mode, hCPE->hStereoDft->nbands, hCPE->hStereoDft->sidSideGain, sts[0]->hTdCngEnc->burst_ho_cnt, &hCPE->hStereoDft->coh_fade_counter ); -#else - stereo_cng_upd_counters( hCPE->hStereoCng, hCPE->element_mode, hCPE->hStereoDft->nbands, hCPE->hStereoDft->sidSideGain, sts[0]->hTdCngEnc->burst_ho_cnt ); -#endif } } @@ -629,7 +620,7 @@ ivas_error ivas_cpe_enc( * Core Encoder *----------------------------------------------------------------*/ - if ( ( error = ivas_core_enc( NULL, hCPE, st_ivas->hMCT, n_CoreChannels, old_inp_12k8, old_inp_16k, Etot, ener, A, Aw, epsP, lsp_new, lsp_mid, vad_hover_flag, attack_flag, realBuffer, imagBuffer, old_wsp, loc_harm, cor_map_sum, vad_flag_dtx, enerBuffer, fft_buff, tdm_SM_or_LRTD_Pri, ivas_format, 0 ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_core_enc( NULL, hCPE, st_ivas->hMCT, n_CoreChannels, old_inp_12k8, old_inp_16k, ener, A, Aw, epsP, lsp_new, lsp_mid, vad_hover_flag, attack_flag, realBuffer, imagBuffer, old_wsp, loc_harm, cor_map_sum, vad_flag_dtx, enerBuffer, fft_buff, tdm_SM_or_LRTD_Pri, ivas_format, 0 ) ) != IVAS_ERR_OK ) { return error; } @@ -668,6 +659,15 @@ ivas_error ivas_cpe_enc( hCPE->hFrontVad[0]->ini_frame = min( hCPE->hFrontVad[0]->ini_frame, MAX_FRAME_COUNTER ); } + /* Store previous attack detection flag */ + for ( n = 0; n < CPE_CHANNELS; n++ ) + { + if ( sts[n]->mct_chan_mode != MCT_CHAN_MODE_LFE ) + { + sts[n]->hTranDet->transientDetector.prev_bIsAttackPresent = sts[n]->hTranDet->transientDetector.bIsAttackPresent; + } + } + #ifdef DEBUG_MODE_INFO if ( hCPE->element_mode == IVAS_CPE_DFT ) { @@ -704,7 +704,7 @@ ivas_error ivas_cpe_enc( } #endif - wmops_sub_end(); + pop_wmops(); return error; } @@ -742,7 +742,7 @@ ivas_error create_cpe_enc( * Allocate CPE handle *-----------------------------------------------------------------*/ - if ( ( hCPE = (CPE_ENC_HANDLE) count_malloc( sizeof( CPE_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE = (CPE_ENC_HANDLE) malloc( sizeof( CPE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CPE\n" ) ); } @@ -776,7 +776,7 @@ ivas_error create_cpe_enc( { if ( ivas_format == STEREO_FORMAT || ivas_format == MASA_FORMAT || ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) { - if ( ( hCPE->input_mem[n] = (float *) count_malloc( sizeof( float ) * NS2SA( input_Fs, STEREO_DFT_OVL_NS ) ) ) == NULL ) + if ( ( hCPE->input_mem[n] = (float *) malloc( sizeof( float ) * NS2SA( input_Fs, STEREO_DFT_OVL_NS ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT stereo memory\n" ) ); } @@ -793,7 +793,7 @@ ivas_error create_cpe_enc( * stereo classifier: allocate and initialize *-----------------------------------------------------------------*/ - if ( ( hCPE->hStereoClassif = (STEREO_CLASSIF_HANDLE) count_malloc( sizeof( STEREO_CLASSIF_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoClassif = (STEREO_CLASSIF_HANDLE) malloc( sizeof( STEREO_CLASSIF_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for stereo classifier structure\n" ) ); } @@ -804,9 +804,12 @@ ivas_error create_cpe_enc( * Metadata: allocate and initialize *-----------------------------------------------------------------*/ - if ( !( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT ) && ( cpe_id == ( st_ivas->nCPE - 1 ) ) ) + /* we need the meta data handle also if we init as MC_FORMAT/MCT since it might be needed + at a bit rate switch to ParamMC or McMASA and the metadata index list is only really reachable + in the ivas_init_encoder() function and has to be connected to the MD handle there */ + if ( cpe_id == ( st_ivas->nCPE - 1 ) ) { - if ( ( hCPE->hMetaData = (BSTR_ENC_HANDLE) count_malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hMetaData = (BSTR_ENC_HANDLE) malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MetaData structure\n" ) ); } @@ -818,7 +821,7 @@ ivas_error create_cpe_enc( for ( n = 0; n < CPE_CHANNELS; n++ ) { - if ( ( st = (ENC_CORE_HANDLE) count_malloc( sizeof( Encoder_State ) ) ) == NULL ) + if ( ( st = (ENC_CORE_HANDLE) malloc( sizeof( Encoder_State ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CoreCoder structure\n" ) ); } @@ -852,7 +855,7 @@ ivas_error create_cpe_enc( { if ( hCPE->element_mode == IVAS_CPE_TD || hCPE->element_mode == IVAS_CPE_DFT ) { - if ( ( hCPE->hStereoCng = (STEREO_CNG_ENC_HANDLE) count_malloc( sizeof( STEREO_CNG_ENC ) ) ) == NULL ) + if ( ( hCPE->hStereoCng = (STEREO_CNG_ENC_HANDLE) malloc( sizeof( STEREO_CNG_ENC ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo Cng for Unified/TD \n" ) ); } @@ -905,7 +908,7 @@ ivas_error create_cpe_enc( if ( hCPE->element_mode != IVAS_CPE_MDCT ) { - if ( ( hCPE->hStereoTCA = (STEREO_TCA_ENC_HANDLE) count_malloc( sizeof( STEREO_TCA_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTCA = (STEREO_TCA_ENC_HANDLE) malloc( sizeof( STEREO_TCA_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo TCA\n" ) ); } @@ -919,7 +922,7 @@ ivas_error create_cpe_enc( if ( hCPE->element_mode != IVAS_CPE_MDCT ) { - if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_ENC_HANDLE) count_malloc( sizeof( STEREO_ICBWE_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_ENC_HANDLE) malloc( sizeof( STEREO_ICBWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo ICBWE \n" ) ); } @@ -933,7 +936,7 @@ ivas_error create_cpe_enc( if ( hCPE->element_mode == IVAS_CPE_TD ) { - if ( ( hCPE->hStereoTD = (STEREO_TD_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_TD_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTD = (STEREO_TD_ENC_DATA_HANDLE) malloc( sizeof( STEREO_TD_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD Stereo\n" ) ); } @@ -947,7 +950,7 @@ ivas_error create_cpe_enc( if ( hCPE->element_mode == IVAS_CPE_MDCT && st_ivas->nCPE == 1 ) { - if ( ( hCPE->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -988,7 +991,7 @@ void destroy_cpe_enc( if ( hCPE->hStereoClassif != NULL ) { - count_free( hCPE->hStereoClassif ); + free( hCPE->hStereoClassif ); hCPE->hStereoClassif = NULL; } @@ -996,14 +999,14 @@ void destroy_cpe_enc( { if ( hCPE->input_mem[n] != NULL ) { - count_free( hCPE->input_mem[n] ); + free( hCPE->input_mem[n] ); hCPE->input_mem[n] = NULL; } } if ( hCPE->hMetaData != NULL ) { - count_free( hCPE->hMetaData ); + free( hCPE->hMetaData ); hCPE->hMetaData = NULL; } @@ -1026,7 +1029,7 @@ void destroy_cpe_enc( if ( hCPE->hStereoTD != NULL ) { - count_free( hCPE->hStereoTD ); + free( hCPE->hStereoTD ); hCPE->hStereoTD = NULL; } @@ -1038,19 +1041,19 @@ void destroy_cpe_enc( if ( hCPE->hStereoTCA != NULL ) { - count_free( hCPE->hStereoTCA ); + free( hCPE->hStereoTCA ); hCPE->hStereoTCA = NULL; } if ( hCPE->hStereoICBWE != NULL ) { - count_free( hCPE->hStereoICBWE ); + free( hCPE->hStereoICBWE ); hCPE->hStereoICBWE = NULL; } if ( hCPE->hStereoCng != NULL ) { - count_free( hCPE->hStereoCng ); + free( hCPE->hStereoCng ); hCPE->hStereoCng = NULL; } @@ -1063,7 +1066,7 @@ void destroy_cpe_enc( } } - count_free( hCPE ); + free( hCPE ); return; } diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index de6fe8dc96bfd9b90375133a903436d4e4c6aeec..7b4685251f2466d24529b595dacdb60cb409bada 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index 52b67fe0568bd3fac9bf195dc2dc10831b000fab..92c2f80fadf734d36af84bb460cdf56d9afae991 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- * Local function prototypes @@ -70,12 +70,12 @@ ivas_error ivas_dirac_enc_open( error = IVAS_ERR_OK; - if ( ( hDirAC = (DIRAC_ENC_HANDLE) count_malloc( sizeof( DIRAC_ENC_DATA ) ) ) == NULL ) + if ( ( hDirAC = (DIRAC_ENC_HANDLE) malloc( sizeof( DIRAC_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); } - if ( ( hDirAC->hConfig = (DIRAC_CONFIG_DATA_HANDLE) count_malloc( sizeof( DIRAC_CONFIG_DATA ) ) ) == NULL ) + if ( ( hDirAC->hConfig = (DIRAC_CONFIG_DATA_HANDLE) malloc( sizeof( DIRAC_CONFIG_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC Config\n" ) ); } @@ -125,7 +125,7 @@ ivas_error ivas_dirac_enc_open( for ( i = 0; i < DIRAC_MAX_ANA_CHANS; i++ ) { - hDirAC->sba_synchro_buffer[i] = (float *) count_malloc( hDirAC->num_samples_synchro_delay * sizeof( float ) ); + hDirAC->sba_synchro_buffer[i] = (float *) malloc( hDirAC->num_samples_synchro_delay * sizeof( float ) ); set_zero( hDirAC->sba_synchro_buffer[i], hDirAC->num_samples_synchro_delay ); } } @@ -142,11 +142,11 @@ ivas_error ivas_dirac_enc_open( /* intensity 3-dim */ for ( i = 0; i < DIRAC_NUM_DIMS; i++ ) { - hDirAC->direction_vector_m[i] = (float **) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( float * ) ); + hDirAC->direction_vector_m[i] = (float **) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( float * ) ); for ( j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) { - hDirAC->direction_vector_m[i][j] = (float *) count_malloc( DIRAC_MAX_NBANDS * sizeof( float ) ); + hDirAC->direction_vector_m[i][j] = (float *) malloc( DIRAC_MAX_NBANDS * sizeof( float ) ); set_f( hDirAC->direction_vector_m[i][j], 0.0f, DIRAC_MAX_NBANDS ); } } @@ -154,14 +154,14 @@ ivas_error ivas_dirac_enc_open( hDirAC->no_col_avg_diff = (int16_t) ( DIRAC_NO_COL_AVG_DIFF_NS / dirac_slot_ns ); for ( i = 0; i < DIRAC_NUM_DIMS; i++ ) { - hDirAC->buffer_intensity_real[i] = (float **) count_malloc( hDirAC->no_col_avg_diff * sizeof( float * ) ); + hDirAC->buffer_intensity_real[i] = (float **) malloc( hDirAC->no_col_avg_diff * sizeof( float * ) ); for ( j = 0; j < hDirAC->no_col_avg_diff; j++ ) { - hDirAC->buffer_intensity_real[i][j] = (float *) count_malloc( DIRAC_MAX_NBANDS * sizeof( float ) ); + hDirAC->buffer_intensity_real[i][j] = (float *) malloc( DIRAC_MAX_NBANDS * sizeof( float ) ); set_f( hDirAC->buffer_intensity_real[i][j], 0.0f, DIRAC_MAX_NBANDS ); } } - hDirAC->buffer_energy = (float *) count_malloc( DIRAC_MAX_NBANDS * hDirAC->no_col_avg_diff * sizeof( float ) ); + hDirAC->buffer_energy = (float *) malloc( DIRAC_MAX_NBANDS * hDirAC->no_col_avg_diff * sizeof( float ) ); set_f( hDirAC->buffer_energy, 0.0f, DIRAC_MAX_NBANDS * hDirAC->no_col_avg_diff ); if ( st_ivas->hQMetaData->useLowerRes ) @@ -245,7 +245,7 @@ void ivas_dirac_enc_close( { if ( hDirAC->sba_synchro_buffer[i] != NULL ) { - count_free( hDirAC->sba_synchro_buffer[i] ); + free( hDirAC->sba_synchro_buffer[i] ); hDirAC->sba_synchro_buffer[i] = NULL; } } @@ -255,7 +255,7 @@ void ivas_dirac_enc_close( { for ( j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) { - count_free( hDirAC->direction_vector_m[i][j] ); + free( hDirAC->direction_vector_m[i][j] ); hDirAC->direction_vector_m[i][j] = NULL; } @@ -263,28 +263,28 @@ void ivas_dirac_enc_close( { if ( hDirAC->buffer_intensity_real[i][j] != 0 ) { - count_free( hDirAC->buffer_intensity_real[i][j] ); + free( hDirAC->buffer_intensity_real[i][j] ); hDirAC->buffer_intensity_real[i][j] = NULL; } } - count_free( hDirAC->buffer_intensity_real[i] ); + free( hDirAC->buffer_intensity_real[i] ); hDirAC->buffer_intensity_real[i] = NULL; - count_free( hDirAC->direction_vector_m[i] ); + free( hDirAC->direction_vector_m[i] ); hDirAC->direction_vector_m[i] = NULL; } - count_free( hDirAC->buffer_energy ); + free( hDirAC->buffer_energy ); hDirAC->buffer_energy = NULL; if ( hDirAC->hConfig != NULL ) { - count_free( hDirAC->hConfig ); + free( hDirAC->hConfig ); hDirAC->hConfig = NULL; } - count_free( hDirAC ); + free( hDirAC ); return; } @@ -315,7 +315,7 @@ void ivas_dirac_enc( { int16_t i; - wmops_sub_start( "ivas_dirac_enc" ); + push_wmops( "ivas_dirac_enc" ); /*Check if highest band of input signal <= enc_param_start_band: could happen for WB input signal in 4TCs mode*/ if ( hDirAC->band_grouping[hDirAC->hConfig->nbands] <= hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band] ) @@ -436,7 +436,7 @@ void ivas_dirac_enc( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -589,7 +589,7 @@ void ivas_dirac_param_est_enc( float reference_power[CLDFB_NO_COL_MAX][DIRAC_NO_FB_BANDS_MAX]; - wmops_sub_start( "dirac_enc_param_est" ); + push_wmops( "dirac_enc_param_est" ); /* Initialization */ l_ts = input_frame / MAX_PARAM_SPATIAL_SUBFRAMES; @@ -865,7 +865,7 @@ void ivas_dirac_param_est_enc( } #endif - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index 61faee23a4320855fb763885cd1613a75e02847e..e5794d756ac809dde2be8f0282070d7cfecb4468 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * ivas_enc() @@ -65,14 +65,12 @@ ivas_error ivas_enc( float data_f[MAX_INPUT_CHANNELS][L_FRAME48k]; /* IVAS_fmToDo: buffer can be allocated dynamically based on the number of analysed channels */ int32_t ivas_total_brate; ivas_error error; -#ifndef SBA_BR_SWITCHING_2 -#ifdef SBA_BR_SWITCHING +#ifndef SBA_BR_SWITCHING int16_t sba_reinit_flag; -#endif #endif error = IVAS_ERR_OK; - wmops_sub_start( "ivas_enc" ); + push_wmops( "ivas_enc" ); /*------------------------------------------------------------------* * Initialization - general @@ -89,19 +87,15 @@ ivas_error ivas_enc( n_samples_chan = n_samples / nchan_inp; set_s( nb_bits_metadata, 0, MAX_SCE ); -#ifdef SBA_BR_SWITCHING -#ifndef SBA_BR_SWITCHING_2 +#ifndef SBA_BR_SWITCHING sba_reinit_flag = 0; #endif +#ifndef SBA_BR_SWITCHING_RECONFIG +#ifdef SBA_BR_SWITCHING if ( ivas_format == SBA_FORMAT ) { -#ifndef SBA_BR_SWITCHING_2 - sba_reinit_flag = get_sba_reinit_flag( ivas_total_brate, st_ivas->hEncoderConfig->last_ivas_total_brate ); - if ( sba_reinit_flag ) -#else st_ivas->sba_reinit_flag = get_sba_reinit_flag( ivas_total_brate, st_ivas->hEncoderConfig->last_ivas_total_brate, st_ivas->hEncoderConfig->sba_order ); if ( st_ivas->sba_reinit_flag ) -#endif { if ( ( error = ivas_sba_enc_reinit( st_ivas ) ) != IVAS_ERR_OK ) { @@ -110,7 +104,7 @@ ivas_error ivas_enc( } } #endif - +#endif /*----------------------------------------------------------------* * convert 'short' input data to 'float' *----------------------------------------------------------------*/ @@ -215,11 +209,9 @@ ivas_error ivas_enc( if ( ivas_format == SBA_FORMAT ) { #ifndef SBA_BR_SWITCHING - if ( st_ivas->sba_mode == SBA_MODE_DIRAC ) -#else -#ifndef SBA_BR_SWITCHING_2 if ( ( st_ivas->sba_mode == SBA_MODE_DIRAC ) && ( !sba_reinit_flag ) ) #else +#ifndef SBA_BR_SWITCHING_RECONFIG if ( !st_ivas->sba_reinit_flag ) #endif #endif @@ -399,6 +391,6 @@ ivas_error ivas_enc( } #endif - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/ivas_enc_cov_handler.c b/lib_enc/ivas_enc_cov_handler.c index 933c2c5de9b5a7185169fe7beb82396b379808a9..97cb1c40de87854a6dc73e27305b87ec6c16dd9d 100644 --- a/lib_enc/ivas_enc_cov_handler.c +++ b/lib_enc/ivas_enc_cov_handler.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* * Local constants @@ -74,7 +74,7 @@ ivas_error ivas_spar_covar_enc_open( error = IVAS_ERR_OK; - if ( ( hCovState = (ivas_enc_cov_handler_state_t *) count_malloc( sizeof( ivas_enc_cov_handler_state_t ) ) ) == NULL ) + if ( ( hCovState = (ivas_enc_cov_handler_state_t *) malloc( sizeof( ivas_enc_cov_handler_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV encoder" ); } @@ -125,7 +125,7 @@ void ivas_spar_covar_enc_close( ivas_spar_covar_smooth_enc_close( &hCovState->pCov_dtx_state, nchan_inp ); - count_free( hCovState ); + free( hCovState ); hCovState = NULL; } diff --git a/lib_enc/ivas_entropy_coder.c b/lib_enc/ivas_entropy_coder.c index a3714821f373f3aed82085d2ff2be94466494d23..a8f5219f2a3f692b44e6edfcfbfce3771d0a8315 100644 --- a/lib_enc/ivas_entropy_coder.c +++ b/lib_enc/ivas_entropy_coder.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "ivas_rom_com.h" #include "math.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* * Local constants diff --git a/lib_enc/ivas_front_vad.c b/lib_enc/ivas_front_vad.c index cc2a4b08d8de3756e85aa511212a63a1bfdeb851..be476b1244c1bd897f14d76ac2ac4879e106e3ff 100644 --- a/lib_enc/ivas_front_vad.c +++ b/lib_enc/ivas_front_vad.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "ivas_prot.h" #include -#include "wmops.h" +#include "wmc_auto.h" #include @@ -83,7 +83,7 @@ ivas_error front_vad( error = IVAS_ERR_OK; - wmops_sub_start( "front_vad" ); + push_wmops( "front_vad" ); if ( hCPE != NULL ) { @@ -110,9 +110,7 @@ ivas_error front_vad( { localVAD_HE_SAD[n] = 0; vad_hover_flag[n] = 0; -#ifdef FIX_ITD_CNG vad_flag_dtx[n] = 1; -#endif } /*------------------------------------------------------------------* @@ -195,12 +193,7 @@ ivas_error front_vad( } /* DTX hangover addition */ - vad_flag_dtx[n] = dtx_hangover_addition( sts[n], hFrontVad->hVAD->vad_flag, hFrontVad->lp_speech - hFrontVad->lp_noise, 0 /* <- no cldfb addition */, &vad_hover_flag[n], hFrontVad->hVAD, hFrontVad->hNoiseEst -#ifdef FIX_ITD_CNG - , - &hFrontVads[n]->rem_dtx_ho -#endif - ); + vad_flag_dtx[n] = dtx_hangover_addition( sts[n], hFrontVad->hVAD->vad_flag, hFrontVad->lp_speech - hFrontVad->lp_noise, 0 /* <- no cldfb addition */, &vad_hover_flag[n], hFrontVad->hVAD, hFrontVad->hNoiseEst, &hFrontVads[n]->rem_dtx_ho ); if ( n_chan == 1 ) { @@ -256,7 +249,7 @@ ivas_error front_vad( mvr2r( Bin_E, Bin_E_out, L_FRAME ); } - wmops_sub_end(); + pop_wmops(); return error; } @@ -274,18 +267,18 @@ ivas_error front_vad_create( { FRONT_VAD_ENC_HANDLE hFrontVad; - if ( ( hFrontVad = (FRONT_VAD_ENC_HANDLE) count_malloc( sizeof( FRONT_VAD_ENC ) ) ) == NULL ) + if ( ( hFrontVad = (FRONT_VAD_ENC_HANDLE) malloc( sizeof( FRONT_VAD_ENC ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for front-VAD structure \n" ) ); } - if ( ( hFrontVad->hNoiseEst = (NOISE_EST_HANDLE) count_malloc( sizeof( NOISE_EST_DATA ) ) ) == NULL ) + if ( ( hFrontVad->hNoiseEst = (NOISE_EST_HANDLE) malloc( sizeof( NOISE_EST_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Noise estimation\n" ) ); } noise_est_init( hFrontVad->hNoiseEst ); - if ( ( hFrontVad->hVAD = (VAD_HANDLE) count_malloc( sizeof( VAD_DATA ) ) ) == NULL ) + if ( ( hFrontVad->hVAD = (VAD_HANDLE) malloc( sizeof( VAD_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for VAD\n" ) ); } @@ -304,7 +297,7 @@ ivas_error front_vad_create( hFrontVad->delay_buf = NULL; if ( hFrontVad->delay_samples > 0 ) { - if ( ( hFrontVad->delay_buf = (float *) count_malloc( hFrontVad->delay_samples * sizeof( float ) ) ) == NULL ) + if ( ( hFrontVad->delay_buf = (float *) malloc( hFrontVad->delay_samples * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for VAD delay buffer\n" ) ); } @@ -330,19 +323,19 @@ void front_vad_destroy( { if ( *hFrontVad != NULL ) { - count_free( ( *hFrontVad )->hNoiseEst ); + free( ( *hFrontVad )->hNoiseEst ); ( *hFrontVad )->hNoiseEst = NULL; - count_free( ( *hFrontVad )->hVAD ); + free( ( *hFrontVad )->hVAD ); ( *hFrontVad )->hVAD = NULL; if ( ( *hFrontVad )->delay_buf != NULL ) { - count_free( ( *hFrontVad )->delay_buf ); + free( ( *hFrontVad )->delay_buf ); ( *hFrontVad )->delay_buf = NULL; } - count_free( *hFrontVad ); + free( *hFrontVad ); *hFrontVad = NULL; } @@ -397,7 +390,7 @@ ivas_error front_vad_spar( int16_t old_pitch; ivas_error error; - wmops_sub_start( "front_vad_SPAR" ); + push_wmops( "front_vad_SPAR" ); error = IVAS_ERR_OK; @@ -479,11 +472,10 @@ ivas_error front_vad_spar( /* 1st stage speech/music classification (GMM model) */ /* run only to get 'high_lpn_flag' parameter */ - ivas_smc_gmm( st, NULL /* <-- hStereoClassif */, localVAD_HE_SAD[0], *Etot, lsp_new, cor_map_sum, epsP, PS, non_staX, relE, &high_lpn_flag, flag_spitch ); + ivas_smc_gmm( st, NULL, localVAD_HE_SAD[0], Etot[0], lsp_new, cor_map_sum, epsP, PS, non_staX, relE, &high_lpn_flag, flag_spitch ); /* long-term energy update */ - long_enr( st, *Etot, localVAD_HE_SAD[0], high_lpn_flag, &hFrontVad, 1, localVAD_HE_SAD, Etot ); - hFrontVad->hNoiseEst->Etot_last = Etot[0]; + long_enr( st, -1, localVAD_HE_SAD[0], high_lpn_flag, &hFrontVad, 1, localVAD_HE_SAD, Etot ); /* increase ini_frame counter */ hFrontVad->ini_frame = min( hFrontVad->ini_frame + 1, MAX_FRAME_COUNTER ); @@ -505,7 +497,7 @@ ivas_error front_vad_spar( hSpar->force_front_vad = 0; } - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/ivas_init_enc.c b/lib_enc/ivas_init_enc.c index 8d3f78d1541d9ed074a2eb7d5d7300ff7dc667f6..fd92453980a01b1688418cfc0455bf1281b14baa 100644 --- a/lib_enc/ivas_init_enc.c +++ b/lib_enc/ivas_init_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -342,8 +342,10 @@ ivas_error ivas_init_encoder( st_ivas->sba_mode = SBA_MODE_NONE; st_ivas->nchan_transport = -1; -#ifdef SBA_BR_SWITCHING_2 +#ifndef SBA_BR_SWITCHING_RECONFIG +#ifdef SBA_BR_SWITCHING st_ivas->sba_reinit_flag = 0; +#endif #endif /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles @@ -526,10 +528,6 @@ ivas_error ivas_init_encoder( st_ivas->mc_mode = ivas_mc_mode_select( hEncoderConfig->mc_input_setup, ivas_total_brate ); hEncoderConfig->nchan_inp = ivas_mc_ls_setup_get_num_channels( hEncoderConfig->mc_input_setup ); - if ( ( error = ivas_create_lfe_enc( &st_ivas->hLFE, input_Fs ) ) != IVAS_ERR_OK ) - { - return error; - } if ( st_ivas->mc_mode == MC_MODE_MCT ) { @@ -545,14 +543,17 @@ ivas_error ivas_init_encoder( for ( n = 0; n < CPE_CHANNELS; n++ ) { - if ( cpe_id * CPE_CHANNELS + n == LFE_CHANNEL ) - { - st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_bits_tot = 0; - continue; - } + /* we need the correct bitstream also for the LFE channel since it might become a proper coded channel when + switching to ParamMC and ind_list is only visible here, can't be done later */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list[cpe_id * CPE_CHANNELS + n]; reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); } + /* Metadata only initialized for the last CPE index*/ + if ( cpe_id == st_ivas->nCPE - 1 ) + { + st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata[st_ivas->nSCE]; + reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); + } } if ( ( error = create_mct_enc( st_ivas ) ) != IVAS_ERR_OK ) @@ -560,6 +561,11 @@ ivas_error ivas_init_encoder( return error; } + if ( ( error = ivas_create_lfe_enc( &st_ivas->hLFE, input_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + st_ivas->nchan_transport = ivas_mc_ls_setup_get_num_channels( st_ivas->hEncoderConfig->mc_input_setup ); } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) @@ -576,6 +582,7 @@ ivas_error ivas_init_encoder( return error; } + /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { @@ -601,6 +608,8 @@ ivas_error ivas_init_encoder( } else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { + int32_t brate_sce, brate_cpe; + ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( hEncoderConfig->element_mode_init ), ivas_total_brate ); if ( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) @@ -618,21 +627,13 @@ ivas_error ivas_init_encoder( return error; } + ivas_mcmasa_split_brate( st_ivas->hMcMasa->separateChannelEnabled, ivas_total_brate, st_ivas->nSCE, st_ivas->nCPE, &brate_sce, &brate_cpe ); + for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { - if ( st_ivas->hMcMasa->separateChannelEnabled ) + if ( ( error = create_sce_enc( st_ivas, sce_id, brate_sce ) ) != IVAS_ERR_OK ) { - if ( ( error = create_sce_enc( st_ivas, sce_id, ivas_mcmasa_mono_brate( ivas_total_brate ) ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else - { - if ( ( error = create_sce_enc( st_ivas, sce_id, ivas_total_brate / ( st_ivas->nCPE + st_ivas->nSCE ) ) ) != IVAS_ERR_OK ) - { - return error; - } + return error; } /* prepare bitstream buffers */ @@ -645,21 +646,11 @@ ivas_error ivas_init_encoder( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { - if ( st_ivas->hMcMasa->separateChannelEnabled ) - { - hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; + hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; - if ( ( error = create_cpe_enc( st_ivas, cpe_id, ivas_total_brate - st_ivas->hSCE[0]->element_brate ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else + if ( ( error = create_cpe_enc( st_ivas, cpe_id, brate_cpe ) ) != IVAS_ERR_OK ) { - if ( ( error = create_cpe_enc( st_ivas, cpe_id, ivas_total_brate / ( st_ivas->nCPE + st_ivas->nSCE ) ) ) != IVAS_ERR_OK ) - { - return error; - } + return error; } /* prepare bitstream buffers */ @@ -694,7 +685,7 @@ ivas_error ivas_init_encoder( if ( n > 0 ) { - if ( ( st_ivas->mem_hp20_in = (float **) count_malloc( n * sizeof( float * ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_in = (float **) malloc( n * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -706,7 +697,7 @@ ivas_error ivas_init_encoder( for ( i = 0; i < n; i++ ) { - if ( ( st_ivas->mem_hp20_in[i] = (float *) count_malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_in[i] = (float *) malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -732,137 +723,137 @@ void destroy_core_enc( if ( hCoreCoder->hSignalBuf != NULL ) { - count_free( hCoreCoder->hSignalBuf ); + free( hCoreCoder->hSignalBuf ); hCoreCoder->hSignalBuf = NULL; } if ( hCoreCoder->hBstr != NULL ) { - count_free( hCoreCoder->hBstr ); + free( hCoreCoder->hBstr ); hCoreCoder->hBstr = NULL; } if ( hCoreCoder->hLPDmem != NULL ) { - count_free( hCoreCoder->hLPDmem ); + free( hCoreCoder->hLPDmem ); hCoreCoder->hLPDmem = NULL; } if ( hCoreCoder->hTranDet != NULL ) { - count_free( hCoreCoder->hTranDet ); + free( hCoreCoder->hTranDet ); hCoreCoder->hTranDet = NULL; } if ( hCoreCoder->hNoiseEst != NULL ) { - count_free( hCoreCoder->hNoiseEst ); + free( hCoreCoder->hNoiseEst ); hCoreCoder->hNoiseEst = NULL; } if ( hCoreCoder->hVAD != NULL ) { - count_free( hCoreCoder->hVAD ); + free( hCoreCoder->hVAD ); hCoreCoder->hVAD = NULL; } if ( hCoreCoder->hVAD_CLDFB != NULL ) { - count_free( hCoreCoder->hVAD_CLDFB ); + free( hCoreCoder->hVAD_CLDFB ); hCoreCoder->hVAD_CLDFB = NULL; } if ( hCoreCoder->hTdCngEnc != NULL ) { - count_free( hCoreCoder->hTdCngEnc ); + free( hCoreCoder->hTdCngEnc ); hCoreCoder->hTdCngEnc = NULL; } if ( hCoreCoder->hDtxEnc != NULL ) { - count_free( hCoreCoder->hDtxEnc ); + free( hCoreCoder->hDtxEnc ); hCoreCoder->hDtxEnc = NULL; } if ( hCoreCoder->hSpMusClas != NULL ) { - count_free( hCoreCoder->hSpMusClas ); + free( hCoreCoder->hSpMusClas ); hCoreCoder->hSpMusClas = NULL; } if ( hCoreCoder->hGSCEnc != NULL ) { - count_free( hCoreCoder->hGSCEnc ); + free( hCoreCoder->hGSCEnc ); hCoreCoder->hGSCEnc = NULL; } if ( hCoreCoder->hSC_VBR != NULL ) { - count_free( hCoreCoder->hSC_VBR ); + free( hCoreCoder->hSC_VBR ); hCoreCoder->hSC_VBR = NULL; } if ( hCoreCoder->hAmrwb_IO != NULL ) { - count_free( hCoreCoder->hAmrwb_IO ); + free( hCoreCoder->hAmrwb_IO ); hCoreCoder->hAmrwb_IO = NULL; } if ( hCoreCoder->hBWE_TD != NULL ) { - count_free( hCoreCoder->hBWE_TD ); + free( hCoreCoder->hBWE_TD ); hCoreCoder->hBWE_TD = NULL; } if ( hCoreCoder->hBWE_FD != NULL ) { - count_free( hCoreCoder->hBWE_FD ); + free( hCoreCoder->hBWE_FD ); hCoreCoder->hBWE_FD = NULL; } if ( hCoreCoder->hRF != NULL ) { - count_free( hCoreCoder->hRF ); + free( hCoreCoder->hRF ); hCoreCoder->hRF = NULL; } if ( hCoreCoder->hTECEnc != NULL ) { - count_free( hCoreCoder->hTECEnc ); + free( hCoreCoder->hTECEnc ); hCoreCoder->hTECEnc = NULL; } if ( hCoreCoder->hTcxEnc != NULL ) { - count_free( hCoreCoder->hTcxEnc ); + free( hCoreCoder->hTcxEnc ); hCoreCoder->hTcxEnc = NULL; } if ( hCoreCoder->hTcxCfg != NULL ) { - count_free( hCoreCoder->hTcxCfg ); + free( hCoreCoder->hTcxCfg ); hCoreCoder->hTcxCfg = NULL; } if ( hCoreCoder->hIGFEnc != NULL ) { - count_free( hCoreCoder->hIGFEnc ); + free( hCoreCoder->hIGFEnc ); hCoreCoder->hIGFEnc = NULL; } if ( hCoreCoder->hPlcExt != NULL ) { - count_free( hCoreCoder->hPlcExt ); + free( hCoreCoder->hPlcExt ); hCoreCoder->hPlcExt = NULL; } if ( hCoreCoder->hHQ_core != NULL ) { - count_free( hCoreCoder->hHQ_core ); + free( hCoreCoder->hHQ_core ); hCoreCoder->hHQ_core = NULL; } - count_free( hCoreCoder ); + free( hCoreCoder ); return; } @@ -911,10 +902,10 @@ void ivas_destroy_enc( for ( i = 0; i < n; i++ ) { - count_free( st_ivas->mem_hp20_in[i] ); + free( st_ivas->mem_hp20_in[i] ); st_ivas->mem_hp20_in[i] = NULL; } - count_free( st_ivas->mem_hp20_in ); + free( st_ivas->mem_hp20_in ); st_ivas->mem_hp20_in = NULL; } @@ -923,7 +914,7 @@ void ivas_destroy_enc( { if ( st_ivas->hIsmMetaData[n] != NULL ) { - count_free( st_ivas->hIsmMetaData[n] ); + free( st_ivas->hIsmMetaData[n] ); st_ivas->hIsmMetaData[n] = NULL; } } @@ -997,12 +988,12 @@ void ivas_destroy_enc( /* Encoder configuration handle */ if ( st_ivas->hEncoderConfig != NULL ) { - count_free( st_ivas->hEncoderConfig ); + free( st_ivas->hEncoderConfig ); st_ivas->hEncoderConfig = NULL; } /* main IVAS handle */ - count_free( st_ivas ); + free( st_ivas ); return; } diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index 39d5b42a07fbc7adbfe56496949beed2abbeceba..92435ac7b219799deea1bfb08715479ef3b1aea3 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -61,7 +61,6 @@ ivas_error ivas_ism_enc( float old_inp_12k8[MAX_NUM_OBJECTS][1][L_INP_12k8]; /* buffer of input signal @ 12k8 */ float old_inp_16k[MAX_NUM_OBJECTS][1][L_INP]; /* buffer of input signal @ 16kHz */ int16_t vad_flag[MAX_NUM_OBJECTS]; /* VAD flag */ - float Etot[MAX_NUM_OBJECTS][1]; /* total energy; correlation shift */ float ener[MAX_NUM_OBJECTS][1]; /* residual energy from Levinson-Durbin */ float relE[MAX_NUM_OBJECTS][1]; /* frame relative energy */ float A[MAX_NUM_OBJECTS][1][NB_SUBFR16k * ( M + 1 )]; /* A(z) unquantized for subframes */ @@ -91,7 +90,7 @@ ivas_error ivas_ism_enc( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_ism_enc" ); + push_wmops( "ivas_ism_enc" ); /*------------------------------------------------------------------* * Preprocesing @@ -148,10 +147,10 @@ ivas_error ivas_ism_enc( *----------------------------------------------------------------*/ error = pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata[sce_id], input_frame, 0, old_inp_12k8[sce_id][0], old_inp_16k[sce_id][0], - &Etot[sce_id][0], &ener[sce_id][0], &relE[sce_id][0], A[sce_id][0], Aw[sce_id][0], epsP[sce_id][0], lsp_new[sce_id][0], lsp_mid[sce_id][0], + &ener[sce_id][0], &relE[sce_id][0], A[sce_id][0], Aw[sce_id][0], epsP[sce_id][0], lsp_new[sce_id][0], lsp_mid[sce_id][0], &vad_hover_flag[sce_id][0], &attack_flag[sce_id][0], realBuffer[sce_id][0], imagBuffer[sce_id][0], old_wsp[sce_id][0], pitch_fr[sce_id][0], voicing_fr[sce_id][0], &loc_harm[sce_id][0], &cor_map_sum[sce_id][0], &vad_flag_dtx[sce_id][0], enerBuffer[sce_id][0], fft_buff[sce_id][0], A[sce_id][0], lsp_new[sce_id][0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, 0, 0, 0, 0, - st_ivas->hEncoderConfig->ivas_total_brate ); + st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->hEncoderConfig->ivas_format ); if ( error != IVAS_ERR_OK ) { return error; @@ -263,7 +262,7 @@ ivas_error ivas_ism_enc( * Encoder *----------------------------------------------------------------*/ - if ( ( error = ivas_core_enc( hSCE, NULL, NULL, 1, old_inp_12k8[sce_id], old_inp_16k[sce_id], Etot[sce_id], ener[sce_id], A[sce_id], Aw[sce_id], epsP[sce_id], lsp_new[sce_id], lsp_mid[sce_id], vad_hover_flag[sce_id], attack_flag[sce_id], realBuffer[sce_id], imagBuffer[sce_id], old_wsp[sce_id], loc_harm[sce_id], cor_map_sum[sce_id], vad_flag_dtx[sce_id], enerBuffer[sce_id], fft_buff[sce_id], 0, ISM_FORMAT, 0 ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_core_enc( hSCE, NULL, NULL, 1, old_inp_12k8[sce_id], old_inp_16k[sce_id], ener[sce_id], A[sce_id], Aw[sce_id], epsP[sce_id], lsp_new[sce_id], lsp_mid[sce_id], vad_hover_flag[sce_id], attack_flag[sce_id], realBuffer[sce_id], imagBuffer[sce_id], old_wsp[sce_id], loc_harm[sce_id], cor_map_sum[sce_id], vad_flag_dtx[sce_id], enerBuffer[sce_id], fft_buff[sce_id], 0, ISM_FORMAT, 0 ) ) != IVAS_ERR_OK ) { return error; } @@ -274,9 +273,12 @@ ivas_error ivas_ism_enc( /* update input samples buffer */ mvr2r( st->input, st->old_input_signal, input_frame ); + + /* Store previous attack detection flag */ + st->hTranDet->transientDetector.prev_bIsAttackPresent = st->hTranDet->transientDetector.bIsAttackPresent; } - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/ivas_ism_metadata_enc.c b/lib_enc/ivas_ism_metadata_enc.c index c4fcd2dee7d3af543431257faa591a6c0421bf75..970a54b665f106d03312ce0325c479df4026454f 100644 --- a/lib_enc/ivas_ism_metadata_enc.c +++ b/lib_enc/ivas_ism_metadata_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -105,7 +105,6 @@ static void rate_ism_importance( { ctype = hSCE[ch]->hCoreCoder[0]->coder_type_raw; -#ifdef FIX_ISM_INACTIVE_BITS if ( hSCE[ch]->hCoreCoder[0]->tcxonly ) { if ( hSCE[ch]->hCoreCoder[0]->localVAD == 0 ) @@ -117,7 +116,6 @@ static void rate_ism_importance( ctype = GENERIC; } } -#endif if ( hIsmMeta[ch]->ism_metadata_flag == 0 ) { @@ -171,7 +169,7 @@ ivas_error ivas_ism_metadata_enc( error = IVAS_ERR_OK; - wmops_sub_start( "ism_meta_enc" ); + push_wmops( "ism_meta_enc" ); if ( ism_mode == ISM_MODE_PARAM ) { @@ -189,7 +187,7 @@ ivas_error ivas_ism_metadata_enc( if ( num_obj == 1 && ( hSCE[0]->hCoreCoder[0]->core_brate == SID_2k40 || hSCE[0]->hCoreCoder[0]->core_brate == FRAME_NO_DATA ) && ( ism_mode == ISM_MODE_DISC ) ) { /* no metadata encoding in CNG */ - wmops_sub_end(); + pop_wmops(); return error; } @@ -719,7 +717,7 @@ ivas_error ivas_ism_metadata_enc( } } - wmops_sub_end(); + pop_wmops(); return error; } @@ -754,7 +752,7 @@ ivas_error create_ism_metadata_enc( /* allocate ISm metadata handles */ for ( ch = 0; ch < n_ISms; ch++ ) { - if ( ( st_ivas->hIsmMetaData[ch] = (ISM_METADATA_HANDLE) count_malloc( sizeof( ISM_METADATA_FRAME ) ) ) == NULL ) + if ( ( st_ivas->hIsmMetaData[ch] = (ISM_METADATA_HANDLE) malloc( sizeof( ISM_METADATA_FRAME ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISm MetaData\n" ) ); } diff --git a/lib_enc/ivas_ism_param_enc.c b/lib_enc/ivas_ism_param_enc.c index 8dcdef30b50c3169fa74697896f5f0372dee114e..98054cf51ef6c8d0c0de66abfdd0662e9ca161e9 100644 --- a/lib_enc/ivas_ism_param_enc.c +++ b/lib_enc/ivas_ism_param_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "cnst.h" #include "ivas_cnst.h" #include "ivas_rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- * Local function definitions @@ -197,7 +197,7 @@ void ivas_param_ism_stereo_dmx( float stereo_dmx[2][L_FRAME48k]; ISM_METADATA_HANDLE hIsmMetaData; - wmops_sub_start( "ivas_param_ism_st_dmx" ); + push_wmops( "ivas_param_ism_st_dmx" ); /*Initialization*/ alpha = 0.5; @@ -232,7 +232,7 @@ void ivas_param_ism_stereo_dmx( mvr2r( stereo_dmx[0], data[0], input_frame ); mvr2r( stereo_dmx[1], data[1], input_frame ); - wmops_sub_end(); + pop_wmops(); return; } @@ -258,13 +258,13 @@ ivas_error ivas_param_ism_enc_open( error = IVAS_ERR_OK; /* Assign memory to DirAC handle */ - if ( ( hDirAC = (DIRAC_ENC_HANDLE) count_malloc( sizeof( DIRAC_ENC_DATA ) ) ) == NULL ) + if ( ( hDirAC = (DIRAC_ENC_HANDLE) malloc( sizeof( DIRAC_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); } /* Assign memory to Param Object handle */ - if ( ( hDirAC->hParamIsm = (PARAM_ISM_CONFIG_HANDLE) count_malloc( sizeof( PARAM_ISM_CONFIG_DATA ) ) ) == NULL ) + if ( ( hDirAC->hParamIsm = (PARAM_ISM_CONFIG_HANDLE) malloc( sizeof( PARAM_ISM_CONFIG_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM\n" ) ); } @@ -326,11 +326,11 @@ void ivas_param_ism_enc_close( if ( hDirAC->hParamIsm != NULL ) { - count_free( hDirAC->hParamIsm ); + free( hDirAC->hParamIsm ); hDirAC->hParamIsm = NULL; } - count_free( hDirAC ); + free( hDirAC ); return; } @@ -362,7 +362,7 @@ void ivas_param_ism_enc( hDirAC = st_ivas->hDirAC; hParamIsm = hDirAC->hParamIsm; - wmops_sub_start( "ivas_param_ism_enc" ); + push_wmops( "ivas_param_ism_enc" ); l_ts = input_frame / PARAM_ISM_MDFT_NO_SLOTS; num_time_slots = PARAM_ISM_MDFT_NO_SLOTS; @@ -396,7 +396,7 @@ void ivas_param_ism_enc( /* Compute object indices and power ratios */ ivas_param_ism_compute_obj_parameters( reference_power_obj, hParamIsm ); - wmops_sub_end(); + pop_wmops(); return; } @@ -415,6 +415,7 @@ ivas_error ivas_ism_enc_config( ivas_error error; ISM_MODE last_ism_mode; int16_t nchan_transport_old; + int16_t nSCE_old, nCPE_old; error = IVAS_ERR_OK; last_ism_mode = st_ivas->ism_mode; @@ -439,12 +440,13 @@ ivas_error ivas_ism_enc_config( st_ivas->nchan_transport = st_ivas->hEncoderConfig->nchan_inp; } + nCPE_old = st_ivas->nCPE; + nSCE_old = st_ivas->nSCE; st_ivas->nSCE = st_ivas->nchan_transport; st_ivas->nCPE = 0; ivas_ism_config( st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hEncoderConfig->nchan_inp, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ); - - ivas_corecoder_enc_reconfig( st_ivas, nchan_transport_old, 0, nchan_transport_old ); + ivas_corecoder_enc_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport, ( st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS, MC_MODE_NONE ); if ( st_ivas->ism_mode == ISM_MODE_PARAM && last_ism_mode == ISM_MODE_DISC ) { diff --git a/lib_enc/ivas_lfe_enc.c b/lib_enc/ivas_lfe_enc.c index a333995d69ca850eb69b6558fca19375608daf13..fc16c279ee62d40309caec961f91836c0ef5a5de 100644 --- a/lib_enc/ivas_lfe_enc.c +++ b/lib_enc/ivas_lfe_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------------------------* @@ -391,7 +391,7 @@ ivas_error ivas_create_lfe_enc( * Allocate LFE handle *-----------------------------------------------------------------*/ - if ( ( hLFE = (LFE_ENC_HANDLE) count_malloc( sizeof( LFE_ENC_DATA ) ) ) == NULL ) + if ( ( hLFE = (LFE_ENC_HANDLE) malloc( sizeof( LFE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE\n" ) ); } @@ -406,7 +406,7 @@ ivas_error ivas_create_lfe_enc( * Input memory buffer: allocate and initialize *-----------------------------------------------------------------*/ - if ( ( hLFE->old_wtda_audio = (float *) count_malloc( sizeof( float ) * NS2SA( input_Fs, IVAS_LFE_FADE_NS ) ) ) == NULL ) + if ( ( hLFE->old_wtda_audio = (float *) malloc( sizeof( float ) * NS2SA( input_Fs, IVAS_LFE_FADE_NS ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE memory\n" ) ); } @@ -417,7 +417,7 @@ ivas_error ivas_create_lfe_enc( * LFE Window: allocate and initialize *-----------------------------------------------------------------*/ - if ( ( hLFE->pWindow_state = (LFE_WINDOW_HANDLE) count_malloc( sizeof( LFE_WINDOW_DATA ) ) ) == NULL ) + if ( ( hLFE->pWindow_state = (LFE_WINDOW_HANDLE) malloc( sizeof( LFE_WINDOW_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE window structure\n" ) ); } @@ -465,16 +465,16 @@ void ivas_lfe_enc_close( { if ( hLFE->old_wtda_audio != NULL ) { - count_free( hLFE->old_wtda_audio ); + free( hLFE->old_wtda_audio ); hLFE->old_wtda_audio = NULL; } if ( hLFE->pWindow_state ) { - count_free( hLFE->pWindow_state ); + free( hLFE->pWindow_state ); hLFE->pWindow_state = NULL; } - count_free( hLFE ); + free( hLFE ); return; } diff --git a/lib_enc/ivas_masa_enc.c b/lib_enc/ivas_masa_enc.c index c2649adc56c10964b037c39eeb7c1e3f6b70f433..f358a8ba2e7d53c02e759d592b2e324e03c48a63 100644 --- a/lib_enc/ivas_masa_enc.c +++ b/lib_enc/ivas_masa_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include "ivas_stat_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" /*-----------------------------------------------------------------------* @@ -88,7 +88,7 @@ ivas_error ivas_masa_enc_open( error = IVAS_ERR_OK; - if ( ( hMasa = (MASA_ENCODER_HANDLE) count_malloc( sizeof( MASA_ENCODER ) ) ) == NULL ) + if ( ( hMasa = (MASA_ENCODER_HANDLE) malloc( sizeof( MASA_ENCODER ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MASA encoder\n" ) ); } @@ -123,7 +123,7 @@ ivas_error ivas_masa_enc_open( { for ( i = 0; i < st_ivas->nchan_transport; i++ ) { - hMasa->data.delay_buffer[i] = (float *) count_malloc( MASA_ENC_DELAY_SLOTS * CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hMasa->data.delay_buffer[i] = (float *) malloc( MASA_ENC_DELAY_SLOTS * CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); set_f( hMasa->data.delay_buffer[i], 0.0f, MASA_ENC_DELAY_SLOTS * CLDFB_NO_CHANNELS_MAX ); } } @@ -163,12 +163,12 @@ void ivas_masa_enc_close( { for ( i = 0; i < nchan_transport; i++ ) { - count_free( hMasa->data.delay_buffer[i] ); + free( hMasa->data.delay_buffer[i] ); hMasa->data.delay_buffer[i] = NULL; } } - count_free( hMasa ); + free( hMasa ); return; } @@ -219,7 +219,7 @@ void ivas_masa_encode( if ( Opt_DTX_ON ) { - h_orig_metadata = (MASA_DIRECTIONAL_SPATIAL_META *) count_malloc( MASA_MAXIMUM_DIRECTIONS * sizeof( MASA_DIRECTIONAL_SPATIAL_META ) ); + h_orig_metadata = (MASA_DIRECTIONAL_SPATIAL_META *) malloc( MASA_MAXIMUM_DIRECTIONS * sizeof( MASA_DIRECTIONAL_SPATIAL_META ) ); for ( i = 0; i < MASA_MAXIMUM_DIRECTIONS; i++ ) { for ( j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) @@ -348,7 +348,7 @@ void ivas_masa_encode( } } - count_free( h_orig_metadata ); + free( h_orig_metadata ); ivas_qmetadata_enc_sid_encode( hMetaData, hQMetaData, masa_sid_descriptor, ivas_format, SBA_MODE_NONE ); diff --git a/lib_enc/ivas_mc_param_enc.c b/lib_enc/ivas_mc_param_enc.c index af7a48a80b2b585d3f26fd34f4a5611436ccb60b..5de51576e9de47e51e707e816b927ee074772dd3 100644 --- a/lib_enc/ivas_mc_param_enc.c +++ b/lib_enc/ivas_mc_param_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #ifdef DEBUG_PLOT #include "deb_out.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -75,6 +75,7 @@ static void ivas_param_mc_encode_parameter( int16_t *idx_in, HANDLE_IVAS_PARAM_M static void ivas_param_mc_range_encoder( const int16_t *seq_in, const int16_t num_symbols, const uint16_t *cum_freq, const uint16_t *sym_freq, const uint16_t tot_shift, const int16_t max_nb_bits, uint16_t *bit_buffer, int16_t *bit_pos ); + /*------------------------------------------------------------------------- * ivas_param_mc_enc_open() * @@ -97,7 +98,7 @@ ivas_error ivas_param_mc_enc_open( error = IVAS_ERR_OK; /* Sanity Checks */ - if ( ( hParamMC = (PARAM_MC_ENC_HANDLE) count_malloc( sizeof( PARAM_MC_ENC_DATA ) ) ) == NULL ) + if ( ( hParamMC = (PARAM_MC_ENC_HANDLE) malloc( sizeof( PARAM_MC_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Paramtric MC\n" ) ); } @@ -219,6 +220,141 @@ ivas_error ivas_param_mc_enc_open( } +/*------------------------------------------------------------------------- + * ivas_param_mc_enc_reconfig() + * + * Reconfigure Parametric MC encoder + *------------------------------------------------------------------------*/ + +ivas_error ivas_param_mc_enc_reconfig( + Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ +) +{ + int16_t i, k, l; + PARAM_MC_ENC_HANDLE hParamMC; + uint16_t config_index; + MC_LS_SETUP mc_input_setup; + int16_t max_bwidth; + int32_t input_Fs, ivas_total_brate; + ivas_error error; + + error = IVAS_ERR_OK; + + mc_input_setup = st_ivas->hEncoderConfig->mc_input_setup; + max_bwidth = st_ivas->hEncoderConfig->max_bwidth; + input_Fs = st_ivas->hEncoderConfig->input_Fs; + ivas_total_brate = st_ivas->hEncoderConfig->ivas_total_brate; + hParamMC = st_ivas->hParamMC; + + /* Preparing Config */ + st_ivas->nchan_transport = ivas_param_mc_getNumTransportChannels( ivas_total_brate, mc_input_setup ); + + /* get configuration index */ + config_index = ivas_param_mc_get_configuration_index( mc_input_setup, ivas_total_brate ); + + /* set core coder dependent on the number of transport channels */ + switch ( st_ivas->nchan_transport ) + { + case 4: + case 3: + st_ivas->nCPE = 2; + st_ivas->nSCE = 0; + st_ivas->hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; + break; + case 2: + st_ivas->nCPE = 1; + st_ivas->nSCE = 0; + st_ivas->hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; + break; +#ifdef DEBUGGING + default: + assert( 0 && "Number of transport channels not supported by ParamMC!\n" ); +#endif + } + + /* get dmx factors */ + hParamMC->dmx_factors = ivas_param_mc_conf[config_index].dmx_fac; + + + /* deallocate the full icc map, gets newly allocated in the metadata open function */ + for ( i = 0; i < 2; i++ ) + { +#ifdef DEBUGGING + assert( hParamMC->hMetadataPMC.icc_map_full[i] != NULL ); +#endif + if ( hParamMC->hMetadataPMC.icc_map_full[i] != NULL ) + { + free( hParamMC->hMetadataPMC.icc_map_full[i] ); + hParamMC->hMetadataPMC.icc_map_full[i] = NULL; + } + } + + /* open/init parameter coding */ + ivas_param_mc_metadata_open( mc_input_setup, hParamMC->lfe_index, ivas_total_brate, &hParamMC->hMetadataPMC ); + + /* init icc index states */ + for ( i = 0; i < PARAM_MC_PARAMETER_FRAMES; i++ ) + { + set_s( hParamMC->icc_map_index[i], -1, PARAM_MC_SZ_ICC_MAP ); + + for ( l = 0; l < hParamMC->hMetadataPMC.icc_mapping_conf->icc_map_size_lfe; l++ ) + { + for ( k = 0; k < hParamMC->hMetadataPMC.icc_map_size_full; k++ ) + { + if ( hParamMC->hMetadataPMC.icc_mapping[i][l][0] == hParamMC->hMetadataPMC.icc_map_full[0][k] && hParamMC->hMetadataPMC.icc_mapping[i][l][1] == hParamMC->hMetadataPMC.icc_map_full[1][k] ) + { + hParamMC->icc_map_index[i][l] = k; + } + } + } + } + + /* Band Grouping */ + if ( hParamMC->hMetadataPMC.num_parameter_bands == 20 ) + { + mvs2s( param_mc_band_grouping_20, hParamMC->band_grouping, 20 + 1 ); + } + else if ( hParamMC->hMetadataPMC.num_parameter_bands == 14 ) + { + mvs2s( param_mc_band_grouping_14, hParamMC->band_grouping, 14 + 1 ); + } + else if ( hParamMC->hMetadataPMC.num_parameter_bands == 10 ) + { + mvs2s( param_mc_band_grouping_10, hParamMC->band_grouping, 10 + 1 ); + } + else + { + assert( 0 && "nbands must be 20, 14, or 10!" ); + } + + /* set max parameter band for abs cov */ + i = 0; + while ( hParamMC->band_grouping[i] <= PARAM_MC_MAX_BAND_ABS_COV_ENC ) + { + hParamMC->max_param_band_abs_cov = ( i++ ); + } + + /* parameter band grouping: 60 band CLDFB to 240 band MDFT resolution */ + for ( i = 0; i < hParamMC->hMetadataPMC.num_parameter_bands + 1; i++ ) + { + hParamMC->band_grouping[i] *= CLDFB_TO_MDFT_FAC; + } + + /* set correct coded band width */ + hParamMC->hMetadataPMC.coded_bwidth = max_bwidth; + hParamMC->hMetadataPMC.last_coded_bwidth = max_bwidth; + ivas_param_mc_set_coded_bands( &hParamMC->hMetadataPMC ); + + /* initialize offset for transient detection */ + hParamMC->transient_detector_delay = ( NSUBBLOCKS_SHIFT + 1 ) + NSUBBLOCKS + 1 - (int16_t) ceilf( (float) NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS ) / (float) NS2SA( input_Fs, 2 * DIRAC_SLOT_NS ) ); + + /* Init total/dmx ener factors */ + set_f( hParamMC->ener_fac, 0.0f, PARAM_MC_MAX_PARAMETER_BANDS ); + + return error; +} + + /*------------------------------------------------------------------------- * ivas_param_mc_enc_close() * @@ -233,7 +369,7 @@ void ivas_param_mc_enc_close( ivas_FB_mixer_close( &hParamMC->hFbMixer, sampling_rate ); - count_free( hParamMC ); + free( hParamMC ); return; } @@ -267,7 +403,7 @@ void ivas_param_mc_enc( PARAM_MC_ENC_HANDLE hParamMC; int16_t nchan_inp; - wmops_sub_start( "param_mc_enc" ); + push_wmops( "param_mc_enc" ); /* initializations */ hParamMC = st_ivas->hParamMC; @@ -409,7 +545,7 @@ void ivas_param_mc_enc( /* updates */ hParamMC->hMetadataPMC.last_coded_bwidth = hParamMC->hMetadataPMC.coded_bwidth; - wmops_sub_end(); + pop_wmops(); return; } @@ -500,7 +636,7 @@ static void ivas_param_mc_param_est_enc( int16_t start_ts; const float *p_dmx_fac; - wmops_sub_start( "param_mc_prm_est" ); + push_wmops( "param_mc_prm_est" ); /* initializations */ @@ -777,7 +913,7 @@ static void ivas_param_mc_param_est_enc( } - wmops_sub_end(); + pop_wmops(); return; } @@ -1034,7 +1170,7 @@ static void ivas_param_mc_quantize_ilds( float tot_ener, dmx_ener, ener_fac, delta_fac; int16_t ILD_idx[PARAM_MC_SZ_ILD_MAP]; - wmops_sub_start( "param_mc_prm_q" ); + push_wmops( "param_mc_prm_q" ); /* Initialization */ set_zero( Nrg, MAX_CICP_CHANNELS ); @@ -1056,7 +1192,7 @@ static void ivas_param_mc_quantize_ilds( /* Downsampling */ if ( ( hParamMC->hMetadataPMC.bAttackPresent == 0 ) && ( hParamMC->hMetadataPMC.param_frame_idx != hParamMC->hMetadataPMC.coding_band_mapping[freq_idx] ) ) { - wmops_sub_end(); + pop_wmops(); return; } @@ -1143,7 +1279,7 @@ static void ivas_param_mc_quantize_ilds( /* Save current quantized ICLDs */ mvs2s( ILD_idx, ILD_idx_out + freq_idx * ild_map_size, num_ilds_to_code ); - wmops_sub_end(); + pop_wmops(); return; } @@ -1308,7 +1444,7 @@ static void ivas_param_mc_transient_detection( float *pAccSubblockNrg; float attackRatioThreshold; - wmops_sub_start( "param_mc_trn_det" ); + push_wmops( "param_mc_trn_det" ); attackRatioThreshold = hTranDet->transientDetector.attackRatioThreshold; pSubblockNrg = &hTranDet->subblockEnergies.subblockNrg[hParamMC->transient_detector_delay]; @@ -1339,7 +1475,7 @@ static void ivas_param_mc_transient_detection( *pAttackIndex = attackIndex; *pbIsAttackPresent = bIsAttackPresent; - wmops_sub_end(); + pop_wmops(); return; } @@ -1369,7 +1505,7 @@ static void ivas_param_mc_write_bs( int16_t ild_map_size_wo_lfe; int16_t ild_map_size; - wmops_sub_start( "param_mc_prm_enc" ); + push_wmops( "param_mc_prm_enc" ); /* Init */ set_zero( seq_tmp_uni, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_SZ_ILD_MAP ); @@ -1434,7 +1570,7 @@ static void ivas_param_mc_write_bs( ivas_param_mc_encode_parameter( ILD_idx, &hParamMC->hMetadataPMC, &hParamMC->hMetadataPMC.ild_coding, nbands, band_step, ild_map_size_wo_lfe, ild_map_size, bit_buffer, bit_pos ); - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/ivas_mcmasa_enc.c b/lib_enc/ivas_mcmasa_enc.c index 8d127e17d5fd20311e32a9d52e0cb736c945b899..e456cb3b70bf5b31d15f3062947fc33bce6f09a9 100644 --- a/lib_enc/ivas_mcmasa_enc.c +++ b/lib_enc/ivas_mcmasa_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -111,7 +111,7 @@ ivas_error ivas_mcmasa_enc_open( assert( st_ivas->hMasa != NULL && "MASA encoder handle is not present" ); hMasa = st_ivas->hMasa; - if ( NULL == ( hMcMasa = (MCMASA_ENC_HANDLE) count_malloc( sizeof( MCMASA_ENC_DATA ) ) ) ) + if ( NULL == ( hMcMasa = (MCMASA_ENC_HANDLE) malloc( sizeof( MCMASA_ENC_DATA ) ) ) ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for McMasa\n" ) ); } @@ -204,9 +204,9 @@ ivas_error ivas_mcmasa_enc_open( if ( hMcMasa->separateChannelEnabled ) { /* TD Energy calculation with LP */ - hMcMasa->delay_buffer_lfe[0] = (float *) count_malloc( NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) * sizeof( float ) ); + hMcMasa->delay_buffer_lfe[0] = (float *) malloc( NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) * sizeof( float ) ); set_zero( hMcMasa->delay_buffer_lfe[0], NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) ); - hMcMasa->delay_buffer_lfe[1] = (float *) count_malloc( NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) * sizeof( float ) ); + hMcMasa->delay_buffer_lfe[1] = (float *) malloc( NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) * sizeof( float ) ); set_zero( hMcMasa->delay_buffer_lfe[1], NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) ); hMcMasa->hFbMixerLfe = NULL; } @@ -236,7 +236,7 @@ ivas_error ivas_mcmasa_enc_open( bufferSize = (int16_t) ( ( input_Fs / FRAMES_PER_SEC ) / MAX_PARAM_SPATIAL_SUBFRAMES ); for ( i = 0; i < 2; i++ ) { - hMcMasa->lfeAnaRingBuffer[i] = (float *) count_malloc( bufferSize * sizeof( float ) ); + hMcMasa->lfeAnaRingBuffer[i] = (float *) malloc( bufferSize * sizeof( float ) ); set_zero( hMcMasa->lfeAnaRingBuffer[i], bufferSize ); hMcMasa->lowpassSum[i] = 0.0f; } @@ -250,33 +250,33 @@ ivas_error ivas_mcmasa_enc_open( /* intensity 3-dim */ for ( i = 0; i < DIRAC_NUM_DIMS; i++ ) { - hMcMasa->direction_vector_m[i] = (float **) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( float * ) ); + hMcMasa->direction_vector_m[i] = (float **) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( float * ) ); for ( j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) { - hMcMasa->direction_vector_m[i][j] = (float *) count_malloc( hMcMasa->nbands * sizeof( float ) ); + hMcMasa->direction_vector_m[i][j] = (float *) malloc( hMcMasa->nbands * sizeof( float ) ); } } hMcMasa->no_col_avg_diff = (int8_t) ( DIRAC_NO_COL_AVG_DIFF_NS / dirac_slot_ns ); for ( i = 0; i < DIRAC_NUM_DIMS; i++ ) { - hMcMasa->buffer_intensity_real[i] = (float **) count_malloc( hMcMasa->no_col_avg_diff * sizeof( float * ) ); + hMcMasa->buffer_intensity_real[i] = (float **) malloc( hMcMasa->no_col_avg_diff * sizeof( float * ) ); for ( j = 0; j < hMcMasa->no_col_avg_diff; j++ ) { - hMcMasa->buffer_intensity_real[i][j] = (float *) count_malloc( hMcMasa->nbands * sizeof( float ) ); + hMcMasa->buffer_intensity_real[i][j] = (float *) malloc( hMcMasa->nbands * sizeof( float ) ); set_zero( hMcMasa->buffer_intensity_real[i][j], hMcMasa->nbands ); } } - hMcMasa->buffer_intensity_real_vert = (float **) count_malloc( hMcMasa->no_col_avg_diff * sizeof( float * ) ); + hMcMasa->buffer_intensity_real_vert = (float **) malloc( hMcMasa->no_col_avg_diff * sizeof( float * ) ); for ( j = 0; j < hMcMasa->no_col_avg_diff; j++ ) { - hMcMasa->buffer_intensity_real_vert[j] = (float *) count_malloc( hMcMasa->nbands * sizeof( float ) ); + hMcMasa->buffer_intensity_real_vert[j] = (float *) malloc( hMcMasa->nbands * sizeof( float ) ); set_zero( hMcMasa->buffer_intensity_real_vert[j], hMcMasa->nbands ); } - hMcMasa->buffer_energy = (float *) count_malloc( hMcMasa->nbands * hMcMasa->no_col_avg_diff * sizeof( float ) ); + hMcMasa->buffer_energy = (float *) malloc( hMcMasa->nbands * hMcMasa->no_col_avg_diff * sizeof( float ) ); set_zero( hMcMasa->buffer_energy, hMcMasa->nbands * hMcMasa->no_col_avg_diff ); if ( st_ivas->hEncoderConfig->mc_input_setup == MC_LS_SETUP_5_1 ) @@ -396,6 +396,50 @@ ivas_error ivas_mcmasa_enc_open( } +/*------------------------------------------------------------------------- + * ivas_mcmasa_enc_reconfig() + * + * Reconfigure McMASA encoder + *------------------------------------------------------------------------*/ + +ivas_error ivas_mcmasa_enc_reconfig( + Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ +) +{ + int32_t ivas_total_brate; + ivas_error error; + + error = IVAS_ERR_OK; + + ivas_total_brate = st_ivas->hEncoderConfig->ivas_total_brate; + + if ( ivas_total_brate != st_ivas->hEncoderConfig->last_ivas_total_brate ) + { + /* bitrate changed, may need to do something */ + + /* brute-force solution: close McMASA and re-instantiate with new settings */ + ivas_masa_enc_close( st_ivas->hMasa, st_ivas->nchan_transport, st_ivas->hEncoderConfig->ivas_format ); + ivas_mcmasa_enc_close( st_ivas->hMcMasa, st_ivas->hEncoderConfig->input_Fs ); + + /* Determine if to separate some channels from the analysis */ + ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( st_ivas->hEncoderConfig->element_mode_init ), ivas_total_brate ); + + if ( ( error = ivas_masa_enc_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ( error = ivas_mcmasa_enc_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* core SCE, CPE reconfiguration happens later */ + } + + return error; +} + /*--------------------------------------------------------------------------* * ivas_mcmasa_enc_close() * @@ -411,14 +455,14 @@ void ivas_mcmasa_enc_close( if ( hMcMasa->separateChannelEnabled ) { - count_free( hMcMasa->delay_buffer_lfe[0] ); - count_free( hMcMasa->delay_buffer_lfe[1] ); + free( hMcMasa->delay_buffer_lfe[0] ); + free( hMcMasa->delay_buffer_lfe[1] ); } if ( hMcMasa->separateChannelEnabled ) { for ( i = 0; i < 2; i++ ) { - count_free( hMcMasa->lfeAnaRingBuffer[i] ); + free( hMcMasa->lfeAnaRingBuffer[i] ); } } @@ -434,35 +478,35 @@ void ivas_mcmasa_enc_close( { for ( j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) { - count_free( hMcMasa->direction_vector_m[i][j] ); + free( hMcMasa->direction_vector_m[i][j] ); hMcMasa->direction_vector_m[i][j] = NULL; } for ( j = 0; j < hMcMasa->no_col_avg_diff; j++ ) { - count_free( hMcMasa->buffer_intensity_real[i][j] ); + free( hMcMasa->buffer_intensity_real[i][j] ); hMcMasa->buffer_intensity_real[i][j] = NULL; } - count_free( hMcMasa->buffer_intensity_real[i] ); + free( hMcMasa->buffer_intensity_real[i] ); hMcMasa->buffer_intensity_real[i] = NULL; - count_free( hMcMasa->direction_vector_m[i] ); + free( hMcMasa->direction_vector_m[i] ); hMcMasa->direction_vector_m[i] = NULL; } for ( j = 0; j < hMcMasa->no_col_avg_diff; j++ ) { - count_free( hMcMasa->buffer_intensity_real_vert[j] ); + free( hMcMasa->buffer_intensity_real_vert[j] ); hMcMasa->buffer_intensity_real_vert[j] = NULL; } - count_free( hMcMasa->buffer_intensity_real_vert ); + free( hMcMasa->buffer_intensity_real_vert ); hMcMasa->buffer_intensity_real_vert = NULL; - count_free( hMcMasa->buffer_energy ); + free( hMcMasa->buffer_energy ); hMcMasa->buffer_energy = NULL; - count_free( hMcMasa ); + free( hMcMasa ); return; } @@ -1151,6 +1195,86 @@ void ivas_mcmasa_param_est_enc( } +/*--------------------------------------------------------------------------* + * ivas_mcmasa_dmx_modify() + * + * + *--------------------------------------------------------------------------*/ + +void ivas_mcmasa_dmx_modify( + const int16_t n_samples, /* i : input frame length in samples */ + float dmx[][L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS )], /* i/o: downmix signal to be transformed into another format. TODO: buffer size into define? */ + const int16_t n_chnls_dmx_old, /* i : number of downmix channels in the old format */ + const int16_t n_chnls_dmx_new ) /* i : number of downmix channels in the target format */ +{ + /* assumed data ordering in **dmx: [sce][cpe_chnl0][cpe_chnl1], i.e., [c][l][r] */ + int16_t i; + + assert( ( n_chnls_dmx_old == 1 || n_chnls_dmx_old == 2 || n_chnls_dmx_old == 3 ) && "Input downmix may contain only 1-3 channels." ); + assert( ( n_chnls_dmx_new == 1 || n_chnls_dmx_new == 2 || n_chnls_dmx_new == 3 ) && "Output downmix may contain only 1-3 channels." ); + + if ( n_chnls_dmx_old == n_chnls_dmx_new ) + { + /* same dmx layout -> nothing to do */ + return; + } + + if ( n_chnls_dmx_old == 1 ) + { + /* split mono energy into identical channels */ + for ( i = 0; i < n_samples; i++ ) + { + if ( n_chnls_dmx_new == 2 ) + { + dmx[1][i] = dmx[0][i] * INV_SQRT2; + dmx[2][i] = dmx[1][i]; + } + else if ( n_chnls_dmx_new == 3 ) + { + dmx[0][i] = dmx[0][i] * INV_SQRT3; + } + } + } + else if ( n_chnls_dmx_old == 2 ) + { + for ( i = 0; i < n_samples; i++ ) + { + if ( n_chnls_dmx_new == 1 ) + { + /* sum l and r */ + dmx[0][i] = dmx[1][i] + dmx[2][i]; + } + else if ( n_chnls_dmx_new == 3 ) + { + dmx[0][i] = 0.5f * ( dmx[1][i] + dmx[2][i] ); + dmx[1][i] = dmx[1][i] - dmx[0][i]; + dmx[2][i] = dmx[2][i] - dmx[0][i]; + } + } + } + else if ( n_chnls_dmx_old == 3 ) + { + for ( i = 0; i < n_samples; i++ ) + { + if ( n_chnls_dmx_new == 1 ) + { + /* sum all channels */ + dmx[0][i] = dmx[0][i] + dmx[1][i] + dmx[2][i]; + } + else if ( n_chnls_dmx_new == 2 ) + { + /* mix center into sides */ + dmx[0][i] *= INV_SQRT2; + dmx[1][i] += dmx[0][i]; + dmx[2][i] += dmx[0][i]; + } + } + } + + return; +} + + /*--------------------------------------------------------------------------* * Local functions *--------------------------------------------------------------------------*/ @@ -1263,6 +1387,7 @@ static void ivas_mcmasa_dmx( /* Compute covariance matrix, i.e., xT * conj(x), and accumulate to the output */ + static void compute_cov_mtx( float sr[MCMASA_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : Input matrix, real, s[ch][freq] */ float si[MCMASA_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : Input matrix, imag, s[ch][freq] */ diff --git a/lib_enc/ivas_mct_core_enc.c b/lib_enc/ivas_mct_core_enc.c index 4a94dee5d9bb7c91e6bcee39cc8e7c48a5b8f248..08e54c9bf9ad6606f11fc121440e8479c5641441 100644 --- a/lib_enc/ivas_mct_core_enc.c +++ b/lib_enc/ivas_mct_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------* @@ -114,28 +114,17 @@ static void FindChannelRatio( static void AdjustChannelRatios( int16_t chBitRatios[MCT_MAX_CHANNELS], /* o : bit-disctribution channel ratios */ - const int16_t nChannels /* i/o: number of channels */ -#ifdef FIX_I1_113 - , - const int32_t ivas_total_brate, /* i : IVAS total bitrate */ - const int16_t nAvailBits, /* i : number of available bits */ - const int16_t sba_order /* i : Ambisonic (SBA) order */ -#endif + const int16_t nChannels, /* i/o: number of channels */ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + const int16_t nAvailBits, /* i : number of available bits */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ ) { int16_t force_ch_bit_ratios[IVAS_SPAR_MAX_DMX_CHS]; -#ifdef FIX_I1_113 int32_t temp_brs[IVAS_SPAR_MAX_DMX_CHS]; -#endif float cur_ratio, tar_ratio, sum_ratio, sum_tar_ratio; int16_t ratio_diff, i; -#ifndef FIX_I1_113 - force_ch_bit_ratios[0] = 9; - force_ch_bit_ratios[1] = 7; - force_ch_bit_ratios[2] = 5; - force_ch_bit_ratios[3] = 3; -#else ivas_spar_bitrate_dist( temp_brs, nAvailBits, ivas_total_brate, sba_order, (int16_t) FB ); sum_ratio = 0.0f; @@ -148,7 +137,6 @@ static void AdjustChannelRatios( cur_ratio = temp_brs[i] / sum_ratio; force_ch_bit_ratios[i] = min( BITRATE_MCT_RATIO_RANGE - 1, max( 1, (uint16_t) ( BITRATE_MCT_RATIO_RANGE * cur_ratio + 0.5f ) ) ); } -#endif /* adjust the ratios further based on received chBitRatios[]*/ ratio_diff = 0; @@ -207,11 +195,8 @@ void ivas_mct_core_enc( const int16_t nChannels, /* i : number of channels to be coded */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t switch_bw, /* i : flag bandwidth switch occurance */ - const int16_t lfe_bits /* i : bits spent for LFE */ -#ifdef FIX_I1_113 - , - const int16_t sba_order /* i : Ambisonic (SBA) order */ -#endif + const int16_t lfe_bits, /* i : bits spent for LFE */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ ) { int16_t ch, ch_core, nSubframes, L_subframeTCX; @@ -243,7 +228,7 @@ void ivas_mct_core_enc( static FILE *f_bit_split = 0; #endif - wmops_sub_start( "mct_encoding" ); + push_wmops( "mct_encoding" ); /*--------------------------------------------------------------* * Initialization @@ -477,13 +462,6 @@ void ivas_mct_core_enc( FindChannelRatio( hMCT, sts, chBitRatios, nChannels ); -#ifndef FIX_I1_113 - if ( hMCT->hbr_mct ) - { - assert( ivas_total_brate >= IVAS_256k ); - AdjustChannelRatios( chBitRatios, nChannels ); - } -#endif nAvailBits = (int16_t) ( ( ivas_total_brate / FRAMES_PER_SEC ) - NBITS_BWIDTH - hMCT->nBitsMCT - lfe_bits ); @@ -523,13 +501,11 @@ void ivas_mct_core_enc( dbgwrite( &nAvailBits, sizeof( int16_t ), 1, 1, "./res/availBits" ); #endif -#ifdef FIX_I1_113 if ( hMCT->hbr_mct ) { assert( ivas_total_brate >= IVAS_256k ); AdjustChannelRatios( chBitRatios, nChannels, ivas_total_brate, nAvailBits, sba_order ); } -#endif for ( ch = 0; ch < nChannels; ch++ ) { @@ -580,7 +556,7 @@ void ivas_mct_core_enc( assert( ( total_brate + ( NBITS_BWIDTH + format_bits + mct_bits + sba_meta + lfe_bits ) * FRAMES_PER_SEC ) == ivas_total_brate ); #endif - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/ivas_mct_enc.c b/lib_enc/ivas_mct_enc.c index c9f3698b27b720b8696de642d916436970193445..5da41e279e1fbd8fa4264cb1f96e7e4975fea974 100644 --- a/lib_enc/ivas_mct_enc.c +++ b/lib_enc/ivas_mct_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,14 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" + + +/*-----------------------------------------------------------------------* + * Local function prototypes + *-----------------------------------------------------------------------*/ + +static ivas_error ivas_mc_enc_reconfig( Encoder_Struct *st_ivas, const int16_t last_mc_mode ); /*-------------------------------------------------------------------* @@ -110,7 +117,7 @@ ivas_error ivas_mct_enc( error = IVAS_ERR_OK; - wmops_sub_start( "ivas_mct_enc" ); + push_wmops( "ivas_mct_enc" ); /* Initialization */ hMCT = st_ivas->hMCT; @@ -167,12 +174,8 @@ ivas_error ivas_mct_enc( /* joint MCT encoding */ ivas_mct_core_enc( ivas_format, hMCT, st_ivas->hCPE, hMCT->nchan_out_woLFE + hMCT->num_lfe, ivas_total_brate, switch_bw, - ivas_format == MC_FORMAT ? (int16_t) st_ivas->hLFE->lfe_bits : 0 -#ifdef FIX_I1_113 - , - st_ivas->hEncoderConfig->sba_order -#endif - ); + ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT ) ? (int16_t) st_ivas->hLFE->lfe_bits : 0, + st_ivas->hEncoderConfig->sba_order ); /* Spectrum quantization and coding */ for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) @@ -185,10 +188,13 @@ ivas_error ivas_mct_enc( for ( n = 0; n < CPE_CHANNELS; n++ ) { mvr2r( hCPE->hCoreCoder[n]->input, hCPE->hCoreCoder[n]->old_input_signal, input_frame ); + + /* common encoder updates */ + updt_enc_common( hCPE->hCoreCoder[n] ); } } - wmops_sub_end(); + pop_wmops(); return error; } @@ -218,7 +224,7 @@ ivas_error create_mct_enc( * Allocate MCT handle *-----------------------------------------------------------------*/ - if ( ( hMCT = (MCT_ENC_HANDLE) count_malloc( sizeof( MCT_ENC_DATA ) ) ) == NULL ) + if ( ( hMCT = (MCT_ENC_HANDLE) malloc( sizeof( MCT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MCT\n" ) ); } @@ -280,9 +286,10 @@ ivas_error create_mct_enc( for ( n = 0; n < max_blocks; n++ ) { + assert( st_ivas->hEncoderConfig->element_mode_init == IVAS_CPE_MDCT && "MCT is not supported for other stereo modes" ); - if ( ( hMCT->hBlockData[n] = (MCT_BLOCK_DATA_HANDLE) count_malloc( sizeof( MCT_BLOCK_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n] = (MCT_BLOCK_DATA_HANDLE) malloc( sizeof( MCT_BLOCK_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MCT block data structure\n" ) ); } @@ -296,7 +303,7 @@ ivas_error create_mct_enc( * MDCT stereo initialization *-----------------------------------------------------------------*/ - if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -357,6 +364,11 @@ ivas_error mct_enc_reconfigure( hMCT->nchan_out_woLFE = st_ivas->hEncoderConfig->nchan_inp - 1; /* LFE channel is coded separately */ hMCT->num_lfe = TRUE; } + else if ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMMC ) + { + hMCT->nchan_out_woLFE = ivas_param_mc_getNumTransportChannels( ivas_total_brate, st_ivas->hEncoderConfig->mc_input_setup ); + hMCT->num_lfe = FALSE; + } else if ( ivas_format == SBA_FORMAT ) { hMCT->nchan_out_woLFE = st_ivas->nchan_transport; @@ -373,6 +385,7 @@ ivas_error mct_enc_reconfigure( /* indicate LFE for appropriate core-coder channel */ for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { + st_ivas->hCPE[cpe_id]->element_brate = cp_bitrate; for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->mct_chan_mode = MCT_CHAN_MODE_REGULAR; @@ -427,7 +440,7 @@ ivas_error mct_enc_reconfigure( if ( hMCT->hBlockData[n] == NULL ) { mem_init = 1; - if ( ( hMCT->hBlockData[n] = (MCT_BLOCK_DATA_HANDLE) count_malloc( sizeof( MCT_BLOCK_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n] = (MCT_BLOCK_DATA_HANDLE) malloc( sizeof( MCT_BLOCK_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MCT block data structure\n" ) ); } @@ -441,7 +454,7 @@ ivas_error mct_enc_reconfigure( * MDCT stereo initialization *-----------------------------------------------------------------*/ - if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) + if ( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -461,11 +474,11 @@ ivas_error mct_enc_reconfigure( { if ( hMCT->hBlockData[n]->hStereoMdct != NULL ) { - count_free( hMCT->hBlockData[n]->hStereoMdct ); + free( hMCT->hBlockData[n]->hStereoMdct ); hMCT->hBlockData[n]->hStereoMdct = NULL; } - count_free( hMCT->hBlockData[n] ); + free( hMCT->hBlockData[n] ); hMCT->hBlockData[n] = NULL; } } @@ -500,16 +513,16 @@ void ivas_mct_enc_close( { if ( hMCT->hBlockData[n]->hStereoMdct != NULL ) { - count_free( hMCT->hBlockData[n]->hStereoMdct ); + free( hMCT->hBlockData[n]->hStereoMdct ); hMCT->hBlockData[n]->hStereoMdct = NULL; } - count_free( hMCT->hBlockData[n] ); + free( hMCT->hBlockData[n] ); hMCT->hBlockData[n] = NULL; } } - count_free( hMCT ); + free( hMCT ); return; } @@ -545,8 +558,260 @@ ivas_error ivas_mc_enc_config( /* MC format switching */ if ( st_ivas->hEncoderConfig->last_ivas_total_brate != st_ivas->hEncoderConfig->ivas_total_brate || st_ivas->mc_mode != last_mc_mode ) { - /*ivas_mc_enc_reconfigure( st_ivas );*/ - return IVAS_ERROR( IVAS_ERR_RECONFIGURE_NOT_SUPPORTED, "Error: MC format switching not supported yet!!!\n\n" ); + ivas_mc_enc_reconfig( st_ivas, last_mc_mode ); + } + + return error; +} + + +/*------------------------------------------------------------------------- + * ivas_mc_enc_reconfig() + * + * Reconfigure the MC format encoder + *-------------------------------------------------------------------------*/ + +static ivas_error ivas_mc_enc_reconfig( + Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ + const int16_t last_mc_mode /* i: last frame mc mode */ +) +{ + int16_t nchan_transport_old, nSCE_old, nCPE_old; + ivas_error error; + int32_t new_brate_SCE, new_brate_CPE; + + error = IVAS_ERR_OK; + + nchan_transport_old = st_ivas->nchan_transport; + nSCE_old = st_ivas->nSCE; + nCPE_old = st_ivas->nCPE; + + /*-----------------------------------------------------------------* + * Reconfigure MC modules + *-----------------------------------------------------------------*/ + + if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + st_ivas->nSCE = 0; + st_ivas->nCPE = st_ivas->hEncoderConfig->nchan_inp / 2; + + st_ivas->nchan_transport = ivas_mc_ls_setup_get_num_channels( st_ivas->hEncoderConfig->mc_input_setup ); + + if ( last_mc_mode != MC_MODE_MCT ) + { + /* create LFE handle */ + if ( ( error = ivas_create_lfe_enc( &st_ivas->hLFE, st_ivas->hEncoderConfig->input_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + + /*De-allocate handles for other MC modes*/ + if ( st_ivas->hParamMC != NULL ) + { + ivas_param_mc_enc_close( st_ivas->hParamMC, st_ivas->hEncoderConfig->input_Fs ); + st_ivas->hParamMC = NULL; + } + + /* De-allocate McMasa-related handles */ + if ( st_ivas->hMcMasa != NULL ) + { + ivas_mcmasa_enc_close( st_ivas->hMcMasa, st_ivas->hEncoderConfig->input_Fs ); + st_ivas->hMcMasa = NULL; + } + + if ( st_ivas->hMasa != NULL ) + { + ivas_masa_enc_close( st_ivas->hMasa, nchan_transport_old, MC_FORMAT ); + st_ivas->hMasa = NULL; + } + + if ( st_ivas->hQMetaData != NULL ) + { + ivas_qmetadata_close( &st_ivas->hQMetaData ); + st_ivas->hQMetaData = NULL; + } + } + } + else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + { + if ( last_mc_mode != MC_MODE_PARAMMC ) + { + if ( ( error = ivas_param_mc_enc_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + ivas_param_mc_enc_reconfig( st_ivas ); + } + + /* De-allocate McMasa-related handles */ + if ( st_ivas->hMcMasa != NULL ) + { + ivas_mcmasa_enc_close( st_ivas->hMcMasa, st_ivas->hEncoderConfig->input_Fs ); + st_ivas->hMcMasa = NULL; + } + if ( st_ivas->hMasa != NULL ) + { + ivas_masa_enc_close( st_ivas->hMasa, nchan_transport_old, MC_FORMAT ); + st_ivas->hMasa = NULL; + } + + if ( st_ivas->hQMetaData != NULL ) + { + ivas_qmetadata_close( &st_ivas->hQMetaData ); + st_ivas->hQMetaData = NULL; + } + + /* De-allocate MCT handle if last mode was MCT */ + if ( last_mc_mode == MC_MODE_MCT && st_ivas->hMCT != NULL && st_ivas->nchan_transport <= CPE_CHANNELS ) + { + ivas_mct_enc_close( st_ivas->hMCT ); + st_ivas->hMCT = NULL; + } + + if ( last_mc_mode == MC_MODE_MCT && st_ivas->hLFE != NULL ) + { + /* LFE handle */ + ivas_lfe_enc_close( st_ivas->hLFE ); + st_ivas->hLFE = NULL; + } + } + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + if ( last_mc_mode != MC_MODE_MCMASA ) + { + ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( st_ivas->hEncoderConfig->element_mode_init ), st_ivas->hEncoderConfig->ivas_total_brate ); + + if ( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ( error = ivas_masa_enc_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ( error = ivas_mcmasa_enc_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + /* reconfigure McMASA instance */ + if ( ( error = ivas_mcmasa_enc_reconfig( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( st_ivas->hParamMC != NULL ) + { + ivas_param_mc_enc_close( st_ivas->hParamMC, st_ivas->hEncoderConfig->input_Fs ); + st_ivas->hParamMC = NULL; + } + + if ( last_mc_mode == MC_MODE_MCT ) + { + /* LFE handle */ + if ( st_ivas->hLFE != NULL ) + { + ivas_lfe_enc_close( st_ivas->hLFE ); + st_ivas->hLFE = NULL; + } + + if ( st_ivas->hMCT != NULL ) + { + ivas_mct_enc_close( st_ivas->hMCT ); + st_ivas->hMCT = NULL; + } + } + } + + if ( st_ivas->mc_mode != MC_MODE_MCMASA ) + { + if ( st_ivas->nchan_transport == 1 ) + { + st_ivas->hEncoderConfig->element_mode_init = IVAS_SCE; + } + else + { + st_ivas->hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; + } + } + + /*-----------------------------------------------------------------* + * Reconfigure core coder + *-----------------------------------------------------------------*/ + + /* special case: MCT->ParamMC with more than 2 TC, CPE 1 stays, but has the wrong mct_chan_mode in channel 1 + and might have IGF and TranDet static memory not allocated and the bit stream index list not set, + set correct mct_chan_mode and init missing static mem + do it here since it is _very_ MC specific */ + if ( last_mc_mode == MC_MODE_MCT && st_ivas->mc_mode == MC_MODE_PARAMMC && st_ivas->nchan_transport > CPE_CHANNELS ) + { + Encoder_State *st = st_ivas->hCPE[1]->hCoreCoder[1]; + + if ( st_ivas->nchan_transport == 3 ) + { + st->mct_chan_mode = MCT_CHAN_MODE_IGNORE; + } + else + { + st->mct_chan_mode = MCT_CHAN_MODE_REGULAR; + } + + if ( st->hTranDet == NULL ) + { + if ( ( st->hTranDet = (TRAN_DET_HANDLE) malloc( sizeof( TRAN_DET_DATA ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Transient Detection\n" ) ); + } + + InitTransientDetection( (int16_t) ( st->input_Fs / FRAMES_PER_SEC ), NS2SA( st->input_Fs, DELAY_FIR_RESAMPL_NS ), st->hTranDet, 0 ); + } + + if ( st->hIGFEnc == NULL ) + { + if ( ( st->hIGFEnc = (IGF_ENC_INSTANCE_HANDLE) malloc( sizeof( IGF_ENC_INSTANCE ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hIGFEnc\n" ) ); + } + } + + st->igf = getIgfPresent( st->element_mode, st->total_brate, st->bwidth, st->rf_mode, st->mct_chan_mode ); + /* set last core to TCX20 */ + st->last_core = TCX_20_CORE; + } + else if ( last_mc_mode == MC_MODE_PARAMMC && st_ivas->mc_mode == MC_MODE_MCT && nchan_transport_old > 2 ) + { +#ifdef DEBUGGING + assert( st_ivas->hCPE[1] != NULL ); +#endif + st_ivas->hCPE[1]->hCoreCoder[1]->mct_chan_mode = MCT_CHAN_MODE_LFE; + } + + if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + ivas_mcmasa_split_brate( st_ivas->hMcMasa->separateChannelEnabled, st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->nSCE, st_ivas->nCPE, &new_brate_SCE, &new_brate_CPE ); + } + else if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + new_brate_SCE = 0; + new_brate_CPE = ( st_ivas->hEncoderConfig->ivas_total_brate / ( st_ivas->nchan_transport - 1 ) ) * CPE_CHANNELS; + } + else + { + new_brate_SCE = 0; /*st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport;*/ + new_brate_CPE = ( st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; + } + + if ( ( error = ivas_corecoder_enc_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, new_brate_SCE, new_brate_CPE, last_mc_mode ) ) != IVAS_ERR_OK ) + { + return error; } return error; diff --git a/lib_enc/ivas_mct_enc_mct.c b/lib_enc/ivas_mct_enc_mct.c old mode 100755 new mode 100644 index 0e36280b20ff70aa8cb1d011522c82fa55c5604c..ee0c529b8bab2758c7f97463529bc6ee1db12e90 --- a/lib_enc/ivas_mct_enc_mct.c +++ b/lib_enc/ivas_mct_enc_mct.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "ivas_cnst.h" #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include #define SPAR_CORR_THRES 0.9f @@ -474,7 +474,7 @@ void apply_MCT_enc( float tmp_max_corr; int16_t count_active_ch = 0; - wmops_sub_start( "mct_core_enc_mct" ); + push_wmops( "mct_core_enc_mct" ); forceKeepTree = 1; inactiveBlockDetected = 0; @@ -739,7 +739,7 @@ void apply_MCT_enc( } #endif - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/ivas_mdct_core_enc.c b/lib_enc/ivas_mdct_core_enc.c index a999681ab48948089aca55ec4ae7c00f2f6dbba9..626dcf2631cee1f65518558caaa04e9a58a22919 100644 --- a/lib_enc/ivas_mdct_core_enc.c +++ b/lib_enc/ivas_mdct_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------* * Local constants @@ -602,7 +602,7 @@ void ivas_mdct_core_whitening_enc( int16_t nbits_start_sns; int16_t num_sns; - wmops_sub_start( "mdct_core_whitening" ); + push_wmops( "mdct_core_whitening" ); /*--------------------------------------------------------------* * Initialization @@ -894,7 +894,7 @@ void ivas_mdct_core_whitening_enc( } /* set low br mode, if possible. Can later be discarded, depending on the stereo mode used for SNS parameter decoding */ - if ( hCPE->element_brate == IVAS_48k && !( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) ) + if ( hCPE->element_brate == IVAS_48k && !( ( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) || sts[1]->mct_chan_mode == MCT_CHAN_MODE_LFE ) ) { sns_low_br_mode = !sts[0]->sp_aud_decision0; } @@ -1110,7 +1110,7 @@ void ivas_mdct_core_whitening_enc( { push_next_indice( hBstr, param_lpc[0][0] >> 1, 1 ); - if ( st->element_brate == IVAS_48k && !( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) ) + if ( st->element_brate == IVAS_48k && !( ( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) || sts[1]->mct_chan_mode == MCT_CHAN_MODE_LFE ) ) { /* write classifier decision to signal low br mode for SNS encoding, for all other configs, low_br mode is not possible */ push_next_indice( hBstr, sns_low_br_mode, 1 ); @@ -1139,7 +1139,7 @@ void ivas_mdct_core_whitening_enc( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -1178,7 +1178,7 @@ void ivas_mdct_quant_coder( int16_t target_bitsTCX10[CPE_CHANNELS][NB_DIV]; int16_t nbits_start, total_nbbits; - wmops_sub_start( "mdct_core_Q" ); + push_wmops( "mdct_core_Q" ); sts = hCPE->hCoreCoder; @@ -1298,7 +1298,7 @@ void ivas_mdct_quant_coder( assert( st->bits_frame_channel == total_nbbits ); } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/ivas_pca_enc.c b/lib_enc/ivas_pca_enc.c index c6b804088e6e4b6e62903122c31f9bb7ea8ba36a..9c780f65e5d4d9f4f2c0aa2577cd28cb319ac382 100644 --- a/lib_enc/ivas_pca_enc.c +++ b/lib_enc/ivas_pca_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include #include #include "typedef.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* diff --git a/lib_enc/ivas_qmetadata_enc.c b/lib_enc/ivas_qmetadata_enc.c index c9f0bd70ff6dab1a2287483a3b3ef2735d9443f7..ac4f83a65794d7bbcdc2104e7b858d5bc8319ff7 100644 --- a/lib_enc/ivas_qmetadata_enc.c +++ b/lib_enc/ivas_qmetadata_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include "ivas_stat_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" @@ -4056,27 +4056,24 @@ static int16_t encode_spread_coherence_1sf( BSTR_ENC_HANDLE hMasaMetaData /* i/o: metadata bitstream handle */ ) { - int16_t i, j; + int16_t i, j, k; int16_t idx_ER; int16_t nbits, nbits_fr; uint16_t idx_sp_coh[MASA_MAXIMUM_CODING_SUBBANDS]; uint16_t mr_idx_sp_coh[MASA_MAXIMUM_CODING_SUBBANDS]; int16_t GR_ord, bits_GR; - uint64_t idx; + uint64_t idx, idx1; int16_t no_idx16; - int16_t k; int16_t no_cv[MASA_MAXIMUM_CODING_SUBBANDS]; IVAS_QDIRECTION *q_direction; - int16_t half_coding_subbands, nbits_fr1; - uint64_t idx1; - uint8_t coding_subbands; + int16_t half_coding_subbands, nbits_fr1, coding_subbands; uint16_t idx_sp_coh_shift[MASA_MAXIMUM_CODING_SUBBANDS]; uint8_t idx_shift; int16_t max_val = 0, nbits_max; int16_t extra_cv; int16_t no_cv_shift[MASA_MAXIMUM_CODING_SUBBANDS], min_idx; - coding_subbands = (uint8_t) ( q_metadata->q_direction[idx_d].cfg.nbands ); + coding_subbands = q_metadata->q_direction[idx_d].cfg.nbands; q_direction = &( q_metadata->q_direction[idx_d] ); nbits = 0; GR_ord = 1; @@ -4237,28 +4234,25 @@ static int16_t encode_surround_coherence( BSTR_ENC_HANDLE hMetaData /* i/o: metadata bitstream handle */ ) { - int16_t i, j; - int16_t idx_ER; + int16_t i, j, k; + int16_t idx_ER, idx16; int16_t nbits, nbits_fr; uint16_t idx_sur_coh[MASA_MAXIMUM_CODING_SUBBANDS]; uint16_t mr_idx_sur_coh[MASA_MAXIMUM_CODING_SUBBANDS]; int16_t GR_ord, bits_GR; - uint64_t idx; + uint64_t idx, idx1; int16_t no_idx16; - int16_t k; int16_t no_cv[MASA_MAXIMUM_CODING_SUBBANDS]; float error_ratio_surr; IVAS_QDIRECTION *q_direction; - int16_t half_coding_subbands, nbits_fr1; - uint64_t idx1; - uint8_t coding_subbands; + int16_t half_coding_subbands, nbits_fr1, coding_subbands; int16_t all_coherence_zero; uint16_t idx_sur_coh_shift[MASA_MAXIMUM_CODING_SUBBANDS]; uint8_t idx_shift; int16_t max_val = 0, nbits_max; int16_t no_cv_shift[MASA_MAXIMUM_CODING_SUBBANDS], min_idx; - coding_subbands = (uint8_t) ( hQMetaData->q_direction[0].cfg.nbands ); + coding_subbands = hQMetaData->q_direction[0].cfg.nbands; all_coherence_zero = hQMetaData->all_coherence_zero; q_direction = &( hQMetaData->q_direction[0] ); nbits = 0; @@ -4277,7 +4271,8 @@ static int16_t encode_surround_coherence( if ( hQMetaData->no_directions == 2 ) { k += hQMetaData->twoDirBands[j]; - error_ratio_surr = 1.0f - q_direction[0].band_data[j].energy_ratio[0] - q_direction[1].band_data[max( k - 1, 0 )].energy_ratio[0] * hQMetaData->twoDirBands[j]; + idx16 = max( k - 1, 0 ); + error_ratio_surr = 1.0f - q_direction[0].band_data[j].energy_ratio[0] - q_direction[1].band_data[idx16].energy_ratio[0] * hQMetaData->twoDirBands[j]; } else { diff --git a/lib_enc/ivas_qspherical_enc.c b/lib_enc/ivas_qspherical_enc.c index b8f889b472b55059c4599a19f66a15aecccaad66..80a9d0064f2dcfb23dbeb91ed3719dd74e0a526c 100644 --- a/lib_enc/ivas_qspherical_enc.c +++ b/lib_enc/ivas_qspherical_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #include "ivas_stat_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "prot.h" diff --git a/lib_enc/ivas_range_uni_enc.c b/lib_enc/ivas_range_uni_enc.c index be325d47bc76841b7116256fffc131107d64cf86..82f6813c2e8bcd56293f85de9ca1f5d3dc87f225 100644 --- a/lib_enc/ivas_range_uni_enc.c +++ b/lib_enc/ivas_range_uni_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "options.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" #endif diff --git a/lib_enc/ivas_rom_enc.c b/lib_enc/ivas_rom_enc.c index ebc4ee6bc3207a85fc8bf4e2454e5de8a82fe4aa..ae7cd2ee1a6c29c3f1fdcb2ae51b93bf31803ce1 100644 --- a/lib_enc/ivas_rom_enc.c +++ b/lib_enc/ivas_rom_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "cnst.h" #include "ivas_cnst.h" #include -#include "wmops.h" +#include "wmc_auto.h" /* clang-format off */ diff --git a/lib_enc/ivas_rom_enc.h b/lib_enc/ivas_rom_enc.h index 8bcad95506fe4696e56f980b45a3fcd8aacba409..d240fb69187fded50b89d4c3ae5056002b238f30 100644 --- a/lib_enc/ivas_rom_enc.h +++ b/lib_enc/ivas_rom_enc.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_enc/ivas_sba_enc.c b/lib_enc/ivas_sba_enc.c index 04aba97747c614c2803259e837c93055247e8eca..e1887ec1241e9147cbf50ce891a7d6b82bdf8ede 100644 --- a/lib_enc/ivas_sba_enc.c +++ b/lib_enc/ivas_sba_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -92,7 +92,7 @@ void ivas_sba_getTCs( return; } - +#ifndef SBA_BR_SWITCHING_RECONFIG #ifdef SBA_BR_SWITCHING /*-------------------------------------------------------------------* * ivas_sba_enc_reinit() @@ -200,10 +200,10 @@ ivas_error ivas_sba_enc_reinit( for ( i = 0; i < n; i++ ) { - count_free( st_ivas->mem_hp20_in[i] ); + free( st_ivas->mem_hp20_in[i] ); st_ivas->mem_hp20_in[i] = NULL; } - count_free( st_ivas->mem_hp20_in ); + free( st_ivas->mem_hp20_in ); st_ivas->mem_hp20_in = NULL; } @@ -291,7 +291,7 @@ ivas_error ivas_sba_enc_reinit( if ( n > 0 ) { - if ( ( st_ivas->mem_hp20_in = (float **) count_malloc( n * sizeof( float * ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_in = (float **) malloc( n * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -303,7 +303,7 @@ ivas_error ivas_sba_enc_reinit( for ( i = 0; i < n; i++ ) { - if ( ( st_ivas->mem_hp20_in[i] = (float *) count_malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) + if ( ( st_ivas->mem_hp20_in[i] = (float *) malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } @@ -313,7 +313,7 @@ ivas_error ivas_sba_enc_reinit( return error; } #endif - +#endif /*-------------------------------------------------------------------* * ivas_sba_enc_reconfigure() @@ -328,26 +328,29 @@ ivas_error ivas_sba_enc_reconfigure( int16_t nSCE_old, nCPE_old, nchan_transport_old; int32_t ivas_total_brate; ivas_error error; + ENCODER_CONFIG_HANDLE hEncoderConfig; error = IVAS_ERR_OK; - ivas_total_brate = st_ivas->hEncoderConfig->ivas_total_brate; -#ifdef SBA_BR_SWITCHING_2 - ENCODER_CONFIG_HANDLE hEncoderConfig; hEncoderConfig = st_ivas->hEncoderConfig; -#endif - if ( ivas_total_brate != st_ivas->hEncoderConfig->last_ivas_total_brate ) + ivas_total_brate = hEncoderConfig->ivas_total_brate; + + if ( ivas_total_brate != hEncoderConfig->last_ivas_total_brate ) { -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING DIRAC_ENC_HANDLE hDirAC = st_ivas->hDirAC; SPAR_ENC_HANDLE hSpar; + SBA_MODE sba_mode_old; #endif nchan_transport_old = st_ivas->nchan_transport; nCPE_old = st_ivas->nCPE; nSCE_old = st_ivas->nSCE; +#ifdef SBA_BR_SWITCHING_RECONFIG + sba_mode_old = st_ivas->sba_mode; +#endif - st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->hEncoderConfig->sba_order ); -#ifdef SBA_BR_SWITCHING_2 + st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order ); +#ifdef SBA_BR_SWITCHING st_ivas->sba_mode = ivas_sba_mode_select( ivas_total_brate ); if ( st_ivas->sba_mode == SBA_MODE_SPAR ) @@ -382,10 +385,127 @@ ivas_error ivas_sba_enc_reconfigure( hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; } +#endif +#ifdef SBA_BR_SWITCHING_RECONFIG + /*TODO : Verify if full SPAR close and open can be used instead of submodules close and open */ + if ( ( sba_mode_old != st_ivas->sba_mode ) || ( nchan_transport_old != st_ivas->nchan_transport ) ) + { + /* FB mixer handle */ + if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + // VE: TBV whether 'hFbMixer' can be reused + if ( hDirAC->hFbMixer != NULL ) + { + ivas_FB_mixer_close( &( hDirAC->hFbMixer ), hEncoderConfig->input_Fs ); + hDirAC->hFbMixer = NULL; + } + + if ( sba_mode_old == SBA_MODE_SPAR ) + { + // VE: dirty patch -> reconfiguration of SPAR MD, TD_decorr, FbMixer modules should be used instead !! + + IVAS_FB_CFG *fb_cfg; + int16_t nchan_internal, sba_order_internal; + int16_t table_idx, active_w_mixing; + + sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); + nchan_internal = ivas_sba_get_nchan_metadata( sba_order_internal ); + + /* Covar. State handle */ + ivas_spar_covar_enc_close( &hSpar->hCovEnc, hSpar->hFbMixer->fb_cfg->num_in_chans ); + + /* MD handle */ + ivas_spar_md_enc_close( &hSpar->hMdEnc ); + + if ( ( error = ivas_spar_md_enc_open( &( hSpar->hMdEnc ), hEncoderConfig, sba_order_internal ) ) != IVAS_ERR_OK ) + { + return error; + } + /*Initialization*/ + hSpar->hMdEnc->table_idx = -1; + /* FB mixer handle */ + ivas_FB_mixer_close( &hSpar->hFbMixer, hEncoderConfig->input_Fs ); + + table_idx = ivas_get_spar_table_idx( ivas_total_brate, sba_order_internal, SPAR_CONFIG_BW, NULL, NULL ); + active_w_mixing = ivas_spar_br_table_consts[table_idx].active_w; + if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, nchan_internal, st_ivas->nchan_transport, active_w_mixing, hEncoderConfig->input_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + fb_cfg->remix_order = remix_order_set[hSpar->hMdEnc->spar_md_cfg.remix_unmix_order]; + + if ( ( error = ivas_FB_mixer_open( &( hSpar->hFbMixer ), hEncoderConfig->input_Fs, fb_cfg ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* Covar. State handle */ + if ( ( error = ivas_spar_covar_enc_open( &( hSpar->hCovEnc ), hSpar->hFbMixer->pFb, hEncoderConfig->input_Fs, nchan_internal ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + else + { + if ( hDirAC->hFbMixer == NULL ) + { + IVAS_FB_CFG *fb_cfg; + + if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_DIRAC, DIRAC_MAX_ANA_CHANS, 0, 0, hEncoderConfig->input_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* Allocate and initialize FB mixer handle */ + if ( ( error = ivas_FB_mixer_open( &( hDirAC->hFbMixer ), hEncoderConfig->input_Fs, fb_cfg ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + + /* initalize delay for SPAR/DirAC delay synchronization */ + if ( ( st_ivas->sba_mode == SBA_MODE_DIRAC ) && ( ( sba_mode_old != st_ivas->sba_mode ) || ( nchan_transport_old != st_ivas->nchan_transport ) ) ) + { + int16_t n; + + if ( hDirAC->num_samples_synchro_delay == 0 ) + { + hDirAC->num_samples_synchro_delay = NS2SA( hEncoderConfig->input_Fs, IVAS_FB_ENC_DELAY_NS ); + + for ( n = 0; n < DIRAC_MAX_ANA_CHANS; n++ ) + { + if ( ( hDirAC->sba_synchro_buffer[n] = (float *) malloc( hDirAC->num_samples_synchro_delay * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hDirAC synchro buffer\n" ) ); + } + set_zero( hDirAC->sba_synchro_buffer[n], hDirAC->num_samples_synchro_delay ); + } + for ( ; n < DIRAC_MAX_ANA_CHANS; n++ ) + { + hDirAC->sba_synchro_buffer[n] = NULL; + } + } + } + else + { + for ( int16_t n = 0; n < DIRAC_MAX_ANA_CHANS; n++ ) + { + if ( hDirAC->sba_synchro_buffer[n] != NULL ) + { + free( hDirAC->sba_synchro_buffer[n] ); + hDirAC->sba_synchro_buffer[n] = NULL; + } + } + hDirAC->num_samples_synchro_delay = 0; + } + } + #endif ivas_dirac_enc_reconfigure( st_ivas ); -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { mvs2s( hDirAC->dirac_to_spar_md_bands, hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); @@ -396,7 +516,7 @@ ivas_error ivas_sba_enc_reconfigure( * Allocate, initalize, and configure SCE/CPE/MCT handles *-----------------------------------------------------------------*/ - ivas_corecoder_enc_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old ); + ivas_corecoder_enc_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, ivas_total_brate / st_ivas->nchan_transport, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS, MC_MODE_NONE ); } return error; diff --git a/lib_enc/ivas_sce_enc.c b/lib_enc/ivas_sce_enc.c index 2a74fcf68d5c261a81a43fd12c6974684a98440f..0134efc0f096a851b04d818afa0c72544872f40e 100644 --- a/lib_enc/ivas_sce_enc.c +++ b/lib_enc/ivas_sce_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -60,7 +60,6 @@ ivas_error ivas_sce_enc( { float old_inp_12k8[1][L_INP_12k8]; /* buffer of input signal @ 12k8 */ float old_inp_16k[1][L_INP]; /* buffer of input signal @ 16kHz */ - float Etot[1]; /* total energy; correlation shift */ float ener[1]; /* residual energy from Levinson-Durbin */ float relE[1]; /* frame relative energy */ float A[1][NB_SUBFR16k * ( M + 1 )]; /* A(z) unquantized for subframes */ @@ -91,7 +90,7 @@ ivas_error ivas_sce_enc( ivas_error error; int16_t flag_16k_smc; - wmops_sub_start( "ivas_sce_enc" ); + push_wmops( "ivas_sce_enc" ); error = IVAS_ERR_OK; @@ -182,11 +181,11 @@ ivas_error ivas_sce_enc( *----------------------------------------------------------------*/ error = pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata, input_frame, 0, old_inp_12k8[0], old_inp_16k[0], - &Etot[0], &ener[0], &relE[0], A[0], Aw[0], epsP[0], lsp_new[0], lsp_mid[0], + &ener[0], &relE[0], A[0], Aw[0], epsP[0], lsp_new[0], lsp_mid[0], &vad_hover_flag[0], &attack_flag[0], realBuffer[0], imagBuffer[0], old_wsp[0], pitch_fr[0], voicing_fr[0], &loc_harm[0], &cor_map_sum[0], &vad_flag_dtx[0], enerBuffer[0], fft_buff[0], A[0], lsp_new[0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, flag_16k_smc, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->force_front_vad : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_dtx_flag : 0, - st_ivas->hEncoderConfig->ivas_total_brate ); + st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->hEncoderConfig->ivas_format ); if ( error != IVAS_ERR_OK ) { return error; @@ -238,7 +237,7 @@ ivas_error ivas_sce_enc( * Encoder *----------------------------------------------------------------*/ - if ( ( error = ivas_core_enc( hSCE, NULL, NULL, 1, old_inp_12k8, old_inp_16k, Etot, ener, A, Aw, epsP, lsp_new, lsp_mid, vad_hover_flag, attack_flag, realBuffer, imagBuffer, old_wsp, loc_harm, cor_map_sum, vad_flag_dtx, enerBuffer, fft_buff, 0, ivas_format, flag_16k_smc ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_core_enc( hSCE, NULL, NULL, 1, old_inp_12k8, old_inp_16k, ener, A, Aw, epsP, lsp_new, lsp_mid, vad_hover_flag, attack_flag, realBuffer, imagBuffer, old_wsp, loc_harm, cor_map_sum, vad_flag_dtx, enerBuffer, fft_buff, 0, ivas_format, flag_16k_smc ) ) != IVAS_ERR_OK ) { return error; } @@ -259,7 +258,7 @@ ivas_error ivas_sce_enc( } #endif - wmops_sub_end(); + pop_wmops(); return error; } @@ -287,7 +286,7 @@ ivas_error create_sce_enc( * Allocate SCE handle *-----------------------------------------------------------------*/ - if ( ( hSCE = (SCE_ENC_HANDLE) count_malloc( sizeof( SCE_ENC_DATA ) ) ) == NULL ) + if ( ( hSCE = (SCE_ENC_HANDLE) malloc( sizeof( SCE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SCE\n" ) ); } @@ -306,7 +305,7 @@ ivas_error create_sce_enc( if ( st_ivas->hEncoderConfig->ivas_format != MONO_FORMAT ) { - if ( ( hSCE->hMetaData = (BSTR_ENC_HANDLE) count_malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) + if ( ( hSCE->hMetaData = (BSTR_ENC_HANDLE) malloc( sizeof( BSTR_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MetaData structure\n" ) ); } @@ -320,7 +319,7 @@ ivas_error create_sce_enc( * Core Coder, 1 instance: allocate and initialize *-----------------------------------------------------------------*/ - if ( ( st = (ENC_CORE_HANDLE) count_malloc( sizeof( Encoder_State ) ) ) == NULL ) + if ( ( st = (ENC_CORE_HANDLE) malloc( sizeof( Encoder_State ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CoreCoder structure\n" ) ); } @@ -365,11 +364,11 @@ void destroy_sce_enc( if ( hSCE->hMetaData != NULL ) { - count_free( hSCE->hMetaData ); + free( hSCE->hMetaData ); hSCE->hMetaData = NULL; } - count_free( hSCE ); + free( hSCE ); return; } diff --git a/lib_enc/ivas_sns_enc.c b/lib_enc/ivas_sns_enc.c index 45c04ac9ea083618f1195a4621213403fd4c48dc..9eeb4d87605cc97362ea2ffbb5bcc34f96512fd1 100644 --- a/lib_enc/ivas_sns_enc.c +++ b/lib_enc/ivas_sns_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index dc6b5f7c73fc7496439c88137ef7a5b69f9bc261..5e9dd6400c868e97217188bd088b9819c0058607 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "prot.h" #include "math.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -73,7 +73,7 @@ ivas_error ivas_spar_enc_open( error = IVAS_ERR_OK; /* SPAR encoder handle */ - if ( ( hSpar = (SPAR_ENC_HANDLE) count_malloc( sizeof( SPAR_ENC_DATA ) ) ) == NULL ) + if ( ( hSpar = (SPAR_ENC_HANDLE) malloc( sizeof( SPAR_ENC_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR encoder" ); } @@ -138,7 +138,7 @@ ivas_error ivas_spar_enc_open( hSpar->hPCA = NULL; if ( hEncoderConfig->Opt_PCA_ON ) { - if ( ( hSpar->hPCA = (PCA_ENC_STATE *) count_malloc( sizeof( PCA_ENC_STATE ) ) ) == NULL ) + if ( ( hSpar->hPCA = (PCA_ENC_STATE *) malloc( sizeof( PCA_ENC_STATE ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR PCA encoder" ); } @@ -179,7 +179,7 @@ ivas_error ivas_spar_enc_open( return error; } - if ( ( hSpar->hCoreCoderVAD = (ENC_CORE_HANDLE) count_malloc( sizeof( Encoder_State ) ) ) == NULL ) + if ( ( hSpar->hCoreCoderVAD = (ENC_CORE_HANDLE) malloc( sizeof( Encoder_State ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CoreCoder structure\n" ) ); } @@ -260,11 +260,11 @@ void ivas_spar_enc_close( /* PCA */ if ( hSpar->hPCA != NULL ) { - count_free( hSpar->hPCA ); + free( hSpar->hPCA ); hSpar->hPCA = NULL; } - count_free( hSpar ); + free( hSpar ); hSpar = NULL; } @@ -292,6 +292,39 @@ ivas_error ivas_spar_enc( error = IVAS_ERR_OK; hEncoderConfig = st_ivas->hEncoderConfig; +#ifdef SBA_BR_SWITCHING_RECONFIG + // VE2DB: can hFbMixer->ppFilterbank_prior_input be replaced by st->input ? + + /* check last sba_mode */ + if ( ivas_sba_mode_select( st_ivas->hEncoderConfig->last_ivas_total_brate ) == SBA_MODE_DIRAC ) + { + Encoder_State *sts[MCT_MAX_BLOCKS]; + + /* initializations */ + for ( int16_t sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) + { + sts[sce_id] = st_ivas->hSCE[sce_id]->hCoreCoder[0]; + } + + for ( int16_t cpe_id = 0, i = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) + { + for ( int16_t ch = 0; ch < CPE_CHANNELS; ch++ ) + { + sts[i] = st_ivas->hCPE[cpe_id]->hCoreCoder[ch]; + i++; + } + } + + /* update FB prior input */ + // VE: last 1ms of 'ppFilterbank_prior_input' is not correct + for ( int16_t i = 0; i < st_ivas->nchan_transport; i++ ) + { + mvr2r( ( sts[i]->input_buff + NS2SA( hEncoderConfig->input_Fs, IVAS_FB_ENC_DELAY_NS ) ), + ( st_ivas->hSpar->hFbMixer->ppFilterbank_prior_input[i] + st_ivas->hSpar->hFbMixer->fb_cfg->prior_input_length - input_frame ), input_frame ); + } + } +#endif + /* front VAD */ if ( ( error = front_vad_spar( st_ivas->hSpar, data_f[0], hEncoderConfig, input_frame ) ) != IVAS_ERR_OK ) { @@ -358,7 +391,7 @@ static ivas_error ivas_spar_enc_process( float dir[3], avg_dir[3]; float energySum, vecLen; - wmops_sub_start( "ivas_spar_enc_process" ); + push_wmops( "ivas_spar_enc_process" ); /*-----------------------------------------------------------------------------------------* * Initialization @@ -522,7 +555,7 @@ static ivas_error ivas_spar_enc_process( hQMetaData->q_direction->cfg.nbands = orig_dirac_bands; } } -#ifndef SBA_BR_SWITCHING_2 +#ifndef SBA_BR_SWITCHING /*-----------------------------------------------------------------------------------------* * Covariance process *-----------------------------------------------------------------------------------------*/ @@ -547,8 +580,12 @@ static ivas_error ivas_spar_enc_process( if ( hSpar->hMdEnc->table_idx != table_idx ) { hSpar->hMdEnc->table_idx = table_idx; -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING +#ifndef SBA_BR_SWITCHING_RECONFIG if ( ivas_total_brate != hEncoderConfig->last_ivas_total_brate && !st_ivas->sba_reinit_flag ) +#else + if ( ivas_total_brate != hEncoderConfig->last_ivas_total_brate ) +#endif { if ( ( error = ivas_spar_md_enc_init( hSpar->hMdEnc, hEncoderConfig, sba_order ) ) != IVAS_ERR_OK ) { @@ -559,11 +596,11 @@ static ivas_error ivas_spar_enc_process( { #endif ivas_spar_set_bitrate_config( &hSpar->hMdEnc->spar_md_cfg, table_idx, ( hSpar->hMdEnc->spar_hoa_md_flag ) ? IVAS_MAX_NUM_BANDS : SPAR_DIRAC_SPLIT_START_BAND ); -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING } #endif } -#ifdef SBA_BR_SWITCHING_2 +#ifdef SBA_BR_SWITCHING /*-----------------------------------------------------------------------------------------* * Covariance process *-----------------------------------------------------------------------------------------*/ @@ -803,7 +840,7 @@ static ivas_error ivas_spar_enc_process( set_f( data_f[order[j]], 0.0f, input_frame ); } - wmops_sub_end(); + pop_wmops(); return error; } diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index 11893eff818fc43ea3df2332c8d621f2601188d2..20a3e4322b29f44fb394fbbe4076c311dbe0f9af 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "math.h" #include "ivas_rom_com.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* @@ -83,7 +83,7 @@ static void ivas_select_next_strat( ivas_strats_t prior_strat, ivas_strats_t cs[ static void ivas_store_prior_coeffs( ivas_spar_md_enc_state_t *hMdEnc, const int16_t num_bands, const int16_t bands_bw, const int16_t strat, const int16_t dtx_vad, const int16_t qsi ); static void ivas_write_spar_md_bitstream( ivas_spar_md_enc_state_t *hMdEnc, const int16_t nB, const int16_t bands_bw, BSTR_ENC_HANDLE hMetaData, const int32_t ivas_total_brate, const int16_t strat, const int16_t qsi, const int16_t planarCP ); -#ifndef SBA_BR_SWITCHING_2 +#ifndef SBA_BR_SWITCHING static ivas_error ivas_spar_md_enc_init( ivas_spar_md_enc_state_t *hMdEnc, const ENCODER_CONFIG_HANDLE hEncoderConfig, const int16_t sba_order ); #endif static void ivas_spar_quant_pred_coeffs_dtx( ivas_spar_md_t *pSpar_md, const float *pValues, const int16_t ndm, int16_t *pIndex, const int16_t dim1, float *pQuant ); @@ -117,87 +117,87 @@ ivas_error ivas_spar_md_enc_open( error = IVAS_ERR_OK; - if ( ( hMdEnc = (ivas_spar_md_enc_state_t *) count_malloc( sizeof( ivas_spar_md_enc_state_t ) ) ) == NULL ) + if ( ( hMdEnc = (ivas_spar_md_enc_state_t *) malloc( sizeof( ivas_spar_md_enc_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD encoder" ); } num_channels = ivas_sba_get_nchan_metadata( sba_order ); - if ( ( hMdEnc->spar_md.band_coeffs = (ivas_band_coeffs_t *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) + if ( ( hMdEnc->spar_md.band_coeffs = (ivas_band_coeffs_t *) malloc( IVAS_MAX_NUM_BANDS * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for band_coeffs in SPAR MD" ); } - if ( ( hMdEnc->mixer_mat = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdEnc->mixer_mat = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdEnc->mixer_mat[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdEnc->mixer_mat[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdEnc->mixer_mat[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdEnc->mixer_mat[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } } } - if ( ( hMdEnc->cov_real = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdEnc->cov_real = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov real matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdEnc->cov_real[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdEnc->cov_real[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov real matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdEnc->cov_real[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdEnc->cov_real[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov real matrix" ); } } } - if ( ( hMdEnc->cov_dtx_real = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdEnc->cov_dtx_real = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov dtx real matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdEnc->cov_dtx_real[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdEnc->cov_dtx_real[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov dtx real matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdEnc->cov_dtx_real[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdEnc->cov_dtx_real[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov dtx real matrix" ); } } } - if ( ( hMdEnc->mixer_mat_local = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) + if ( ( hMdEnc->mixer_mat_local = (float ***) malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( i = 0; i < num_channels; i++ ) { - if ( ( hMdEnc->mixer_mat_local[i] = (float **) count_malloc( num_channels * sizeof( float * ) ) ) == NULL ) + if ( ( hMdEnc->mixer_mat_local[i] = (float **) malloc( num_channels * sizeof( float * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdEnc->mixer_mat_local[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdEnc->mixer_mat_local[i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } @@ -233,7 +233,7 @@ void ivas_spar_md_enc_close( if ( hMdEnc->spar_md.band_coeffs != NULL ) { - count_free( hMdEnc->spar_md.band_coeffs ); + free( hMdEnc->spar_md.band_coeffs ); hMdEnc->spar_md.band_coeffs = NULL; } if ( hMdEnc->mixer_mat != NULL ) @@ -242,11 +242,11 @@ void ivas_spar_md_enc_close( { for ( j = 0; j < num_channels; j++ ) { - count_free( hMdEnc->mixer_mat[i][j] ); + free( hMdEnc->mixer_mat[i][j] ); } - count_free( hMdEnc->mixer_mat[i] ); + free( hMdEnc->mixer_mat[i] ); } - count_free( hMdEnc->mixer_mat ); + free( hMdEnc->mixer_mat ); } if ( hMdEnc->cov_real != NULL ) @@ -256,11 +256,11 @@ void ivas_spar_md_enc_close( for ( j = 0; j < num_channels; j++ ) { - count_free( hMdEnc->cov_real[i][j] ); + free( hMdEnc->cov_real[i][j] ); } - count_free( hMdEnc->cov_real[i] ); + free( hMdEnc->cov_real[i] ); } - count_free( hMdEnc->cov_real ); + free( hMdEnc->cov_real ); } if ( hMdEnc->cov_dtx_real != NULL ) @@ -270,11 +270,11 @@ void ivas_spar_md_enc_close( for ( j = 0; j < num_channels; j++ ) { - count_free( hMdEnc->cov_dtx_real[i][j] ); + free( hMdEnc->cov_dtx_real[i][j] ); } - count_free( hMdEnc->cov_dtx_real[i] ); + free( hMdEnc->cov_dtx_real[i] ); } - count_free( hMdEnc->cov_dtx_real ); + free( hMdEnc->cov_dtx_real ); } if ( hMdEnc->mixer_mat_local != NULL ) @@ -284,16 +284,16 @@ void ivas_spar_md_enc_close( for ( j = 0; j < num_channels; j++ ) { - count_free( hMdEnc->mixer_mat_local[i][j] ); + free( hMdEnc->mixer_mat_local[i][j] ); } - count_free( hMdEnc->mixer_mat_local[i] ); + free( hMdEnc->mixer_mat_local[i] ); } - count_free( hMdEnc->mixer_mat_local ); + free( hMdEnc->mixer_mat_local ); } if ( hMdEnc != NULL ) { - count_free( hMdEnc ); + free( hMdEnc ); hMdEnc = NULL; } @@ -306,7 +306,7 @@ void ivas_spar_md_enc_close( * * SPAR MD encoder initialization *-----------------------------------------------------------------------------------------*/ -#ifndef SBA_BR_SWITCHING_2 +#ifndef SBA_BR_SWITCHING static ivas_error ivas_spar_md_enc_init #else ivas_error ivas_spar_md_enc_init diff --git a/lib_enc/ivas_stat_enc.h b/lib_enc/ivas_stat_enc.h index 81b89a5edc1cba59249ba4bf945e29548e3e5b95..ecf730cffa5fd4e854c9d85e75b179ad40308242 100644 --- a/lib_enc/ivas_stat_enc.h +++ b/lib_enc/ivas_stat_enc.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -193,10 +193,8 @@ typedef struct stereo_dft_enc_data_struct float Spd_R_smooth[STEREO_DFT_N_32k_ENC / 2]; float sid_gipd; int16_t coh_fade_counter; -#ifdef FIX_ITD_CNG float prev_sid_gipd; int16_t prev_sid_no_ipd_flag; -#endif /*IPD*/ float gipd[STEREO_DFT_ENC_DFT_NB]; @@ -212,6 +210,10 @@ typedef struct stereo_dft_enc_data_struct float sfm; float sum_dot_prod_real; float sum_dot_prod_img; + float dot_prod_real_smooth[STEREO_DFT_BAND_MAX]; + float dot_prod_img_smooth[STEREO_DFT_BAND_MAX]; + float ipd_buf[STEREO_DFT_BAND_MAX][STEREO_DFT_IPD_BUF_LEN]; + float prev_gipd; /*ITD*/ ITD_DATA_HANDLE hItd; @@ -235,11 +237,9 @@ typedef struct stereo_dft_enc_data_struct #endif -#ifdef FIX_ITD_CNG int16_t currentNumUpdates; int16_t expectedNumUpdates; /* Expected number of frames before use of ITD estimate */ int16_t resetFrames; -#endif /* energy buffers for ICBWE */ float nrg_L[2]; @@ -567,9 +567,7 @@ typedef struct front_vad_enc VAD_HANDLE hVAD; /* VAD handle */ float *delay_buf; int16_t delay_samples; -#ifdef FIX_ITD_CNG int16_t rem_dtx_ho; /* Remaining hangover frames */ -#endif } FRONT_VAD_ENC, *FRONT_VAD_ENC_HANDLE; @@ -816,21 +814,17 @@ typedef struct ivas_mcmasa_enc_data_structure typedef struct stereo_cng_enc { - int16_t prev_sg_average_counter; /* Counter for sidegain averaging */ - int16_t sg_active_cnt; /* Counter for sidegain averaging */ - int16_t sg_average_counter; /* Counter for sidegain averaging */ - float sg_average[STEREO_DFT_ERB4_BANDS]; /* Sidegain average */ - float prev_sg_average[STEREO_DFT_ERB4_BANDS]; /* Previous sidegain average */ - float mem_cohBand[STEREO_DFT_BAND_MAX / 2]; /* Coherence memory */ -#ifdef FIX_ITD_CNG + int16_t prev_sg_average_counter; /* Counter for sidegain averaging */ + int16_t sg_active_cnt; /* Counter for sidegain averaging */ + int16_t sg_average_counter; /* Counter for sidegain averaging */ + float sg_average[STEREO_DFT_ERB4_BANDS]; /* Sidegain average */ + float prev_sg_average[STEREO_DFT_ERB4_BANDS]; /* Previous sidegain average */ + float mem_cohBand[STEREO_DFT_BAND_MAX / 2]; /* Coherence memory */ float prev_cohBand[2 * ( STEREO_DFT_BAND_MAX / 2 )]; /* Previous coherence */ int16_t cng_counter; /* Counter for cng period length */ -#else - float coh_crossfade[STEREO_DFT_BAND_MAX / 2]; /* Coherence memory */ -#endif - int16_t td_active; /* TD-stereo indication */ - int16_t first_SID_after_TD; /* Set if first SID frame after TD stereo */ - int16_t first_SID; /* Set if first SID frame since codec start */ + int16_t td_active; /* TD-stereo indication */ + int16_t first_SID_after_TD; /* Set if first SID frame after TD stereo */ + int16_t first_SID; /* Set if first SID frame since codec start */ } STEREO_CNG_ENC, *STEREO_CNG_ENC_HANDLE; @@ -1048,8 +1042,10 @@ typedef struct int16_t sba_analysis_order; /* Ambisonic (SBA) order used for analysis and coding */ int16_t codec_mode; /* Mode1 or Mode2 of core codec */ int16_t last_codec_mode; /* previous frame Mode 1 or 2 */ -#ifdef SBA_BR_SWITCHING_2 +#ifndef SBA_BR_SWITCHING_RECONFIG +#ifdef SBA_BR_SWITCHING int16_t sba_reinit_flag; /*flag indicating whether reinitialisation or reconfiguration function should be used*/ +#endif #endif float **mem_hp20_in; /* input signals HP filter memories */ diff --git a/lib_enc/ivas_stereo_adapt_GR_enc.c b/lib_enc/ivas_stereo_adapt_GR_enc.c index 8f07441920a8506b175eeb558e29f8c58a868e9f..087ecda8e0553e06e075aaad3c8254e79ec15ac7 100644 --- a/lib_enc/ivas_stereo_adapt_GR_enc.c +++ b/lib_enc/ivas_stereo_adapt_GR_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "ivas_prot.h" #include "prot.h" #include "stat_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_rom_com.h" #ifdef DEBUGGING #include "debug.h" diff --git a/lib_enc/ivas_stereo_classifier.c b/lib_enc/ivas_stereo_classifier.c index 48b21146fadf2ba50c3f6c3f929bf3b05604d52e..d4d0b310b67e228da0bf9f526929fb64be8e7ec9 100644 --- a/lib_enc/ivas_stereo_classifier.c +++ b/lib_enc/ivas_stereo_classifier.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/ivas_stereo_cng_enc.c b/lib_enc/ivas_stereo_cng_enc.c index 68be66c2a107e18d20827281aa7844ea4b6f0d37..784ec10807aa6a92c0eb8a6d64c0afde1f342805 100644 --- a/lib_enc/ivas_stereo_cng_enc.c +++ b/lib_enc/ivas_stereo_cng_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,17 +43,15 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------- * Local constants *-------------------------------------------------------------------*/ -#define COH_FADE_MAX 4 -#ifdef FIX_ITD_CNG +#define COH_FADE_MAX 4 #define COH_FADE_UPDATES 2 -#endif /*--------------------------------------------------------------- @@ -63,23 +61,17 @@ * ---------------------------------------------------------------*/ void stereo_dft_enc_sid_calc_coh( - STEREO_DFT_ENC_DATA_HANDLE hStereoDft, /* i/o: DFT stereo handle */ -#ifdef FIX_ITD_CNG + STEREO_DFT_ENC_DATA_HANDLE hStereoDft, /* i/o: DFT stereo handle */ float prev_cohBand[2 * ( STEREO_DFT_BAND_MAX / 2 )], /* i/o: Previous coherence */ -#else - float coh_crossfade[STEREO_DFT_BAND_MAX / 2], /* i/o: Coherence crossfade memory */ -#endif - int16_t *td_active, /* i/o: TD stereo mode indicator */ - int16_t *first_SID, /* i/o: First SID indicator */ - float *cohBand /* i/o: Coherence per band */ + int16_t *td_active, /* i/o: TD stereo mode indicator */ + int16_t *first_SID, /* i/o: First SID indicator */ + float *cohBand /* i/o: Coherence per band */ ) { int16_t b, k; float coh_weight; float coh_weight_sum; -#ifdef FIX_ITD_CNG float xspec_scale; -#endif /* Cluster the coherence into bands using a weighted average. The coherence is weighted with the energy spectrum of the mixdown signal. */ for ( b = 0; b < hStereoDft->nbands; b++ ) @@ -87,7 +79,6 @@ void stereo_dft_enc_sid_calc_coh( cohBand[b] = 0; coh_weight_sum = 0; -#ifdef FIX_ITD_CNG if ( hStereoDft->coh_fade_counter == 0 && !*first_SID ) { for ( k = hStereoDft->band_limits[b]; k < hStereoDft->band_limits[b + 1]; k++ ) @@ -112,67 +103,35 @@ void stereo_dft_enc_sid_calc_coh( cohBand[b] = cohBand[b] / coh_weight_sum; } } -#else - for ( k = hStereoDft->band_limits[b]; k < hStereoDft->band_limits[b + 1]; k++ ) - { - coh_weight = hStereoDft->DFT[0][2 * k] * hStereoDft->DFT[0][2 * k] + hStereoDft->DFT[0][2 * k + 1] * hStereoDft->DFT[0][2 * k + 1]; - cohBand[b] += coh_weight * ( hStereoDft->xspec_smooth[2 * k] * hStereoDft->xspec_smooth[2 * k] + hStereoDft->xspec_smooth[2 * k + 1] * hStereoDft->xspec_smooth[2 * k + 1] ) / ( hStereoDft->Spd_L_smooth[k] * hStereoDft->Spd_R_smooth[k] + EPSILON ); - coh_weight_sum += coh_weight; - } - if ( coh_weight_sum > 0 ) - { - cohBand[b] = cohBand[b] / coh_weight_sum; - } -#endif } if ( *first_SID ) { -#ifdef FIX_ITD_CNG mvr2r( cohBand, prev_cohBand, hStereoDft->nbands ); mvr2r( prev_cohBand, &( prev_cohBand[STEREO_DFT_BAND_MAX / 2] ), hStereoDft->nbands ); -#else - mvr2r( cohBand, coh_crossfade, hStereoDft->nbands ); -#endif *first_SID = 0; } -#ifdef FIX_ITD_CNG if ( hStereoDft->coh_fade_counter < COH_FADE_MAX && ( *td_active || hStereoDft->currentNumUpdates < COH_FADE_UPDATES ) ) -#else - if ( hStereoDft->coh_fade_counter < COH_FADE_MAX && *td_active ) -#endif { for ( b = 0; b < hStereoDft->nbands; b++ ) { -#ifdef FIX_ITD_CNG cohBand[b] = ( cohBand[b] * hStereoDft->coh_fade_counter + prev_cohBand[b] * ( COH_FADE_MAX - hStereoDft->coh_fade_counter ) ) / COH_FADE_MAX; -#else - cohBand[b] = ( cohBand[b] * hStereoDft->coh_fade_counter + coh_crossfade[b] * ( COH_FADE_MAX - hStereoDft->coh_fade_counter ) ) / COH_FADE_MAX; -#endif } hStereoDft->coh_fade_counter++; -#ifdef FIX_ITD_CNG if ( hStereoDft->coh_fade_counter > 0 ) { mvr2r( &prev_cohBand[STEREO_DFT_BAND_MAX / 2], prev_cohBand, hStereoDft->nbands ); } mvr2r( cohBand, &prev_cohBand[STEREO_DFT_BAND_MAX / 2], hStereoDft->nbands ); -#else - mvr2r( cohBand, coh_crossfade, hStereoDft->nbands ); -#endif } else { -#ifdef FIX_ITD_CNG if ( hStereoDft->coh_fade_counter > 0 ) { mvr2r( &prev_cohBand[STEREO_DFT_BAND_MAX / 2], prev_cohBand, hStereoDft->nbands ); } mvr2r( cohBand, &prev_cohBand[STEREO_DFT_BAND_MAX / 2], hStereoDft->nbands ); -#else - mvr2r( cohBand, coh_crossfade, hStereoDft->nbands ); -#endif hStereoDft->coh_fade_counter = COH_FADE_MAX; *td_active = 0; } @@ -412,10 +371,8 @@ void stereo_dft_cng_side_gain( } hStereoCng->sg_average_counter++; -#ifdef FIX_ITD_CNG hStereoCng->cng_counter++; hStereoCng->cng_counter = min( hStereoCng->cng_counter, STEREO_DFT_SG_ACT_CNT_MAX ); -#endif if ( core_brate == SID_2k40 ) { @@ -514,16 +471,10 @@ void stereo_enc_cng_init( hStereoCng->sg_active_cnt = 0; hStereoCng->first_SID = 1; set_f( hStereoCng->mem_cohBand, 0.5f, STEREO_DFT_BAND_MAX / 2 ); -#ifdef FIX_ITD_CNG set_zero( hStereoCng->prev_cohBand, 2 * ( STEREO_DFT_BAND_MAX / 2 ) ); -#else - set_zero( hStereoCng->coh_crossfade, STEREO_DFT_BAND_MAX / 2 ); -#endif hStereoCng->td_active = 0; hStereoCng->first_SID_after_TD = 1; -#ifdef FIX_ITD_CNG hStereoCng->cng_counter = 0; -#endif return; } @@ -540,11 +491,8 @@ void stereo_cng_upd_counters( const int32_t element_mode, /* i : element mode */ const int16_t nbands, /* i : Number of bands in active */ const float sidSideGain[], /* i : SID side gains */ - const int16_t burst_ho_count /* i : Hang-over count */ -#ifdef FIX_ITD_CNG - , - int16_t *coh_fade_counter /* i : Coherence fade counter */ -#endif + const int16_t burst_ho_count, /* i : Hang-over count */ + int16_t *coh_fade_counter /* i : Coherence fade counter */ ) { int16_t b; @@ -568,7 +516,6 @@ void stereo_cng_upd_counters( hStereoCng->sg_active_cnt++; hStereoCng->sg_active_cnt = min( hStereoCng->sg_active_cnt, STEREO_DFT_SG_ACT_CNT_MAX ); -#ifdef FIX_ITD_CNG if ( hStereoCng->sg_active_cnt > STEREO_DFT_CNG_ITD_CNT ) { hStereoCng->cng_counter = 0; @@ -578,6 +525,5 @@ void stereo_cng_upd_counters( { *coh_fade_counter = 0; } -#endif return; } diff --git a/lib_enc/ivas_stereo_dft_enc.c b/lib_enc/ivas_stereo_dft_enc.c index e54b98a942499f062d44dec67e4d5cf9057ad06a..ab4844ab944067f4a519135e05b06574f6d460f5 100644 --- a/lib_enc/ivas_stereo_dft_enc.c +++ b/lib_enc/ivas_stereo_dft_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif @@ -62,9 +62,7 @@ static FILE *pF = NULL; #define STEREO_DFT_NRG_PAST_MAX_BAND_LB 4 #define STEREO_DFT_DMX_CROSSOVER ( int16_t )( 132 * ( (float) ( STEREO_DFT_N_NS_ENC ) / STEREO_DFT_N_NS ) + 0.5f ) /* crossover bin between binwise and bandwise DMX */ #define ITD_VAD_E_BAND_N_INIT 200000 -#ifdef FIX_ITD_CNG -#define ITD_SID_PREV_FRAMES 5 -#endif +#define ITD_SID_PREV_FRAMES 5 /*------------------------------------------------------------------------- @@ -75,6 +73,12 @@ static void stereo_dft_enc_open( STEREO_DFT_ENC_DATA_HANDLE hStereoDft, const in static void stereo_dft_enc_compute_prm( STEREO_DFT_ENC_DATA_HANDLE hStereoDft, float *DFT_L, float *DFT_R, int16_t k_offset, int16_t flag_quant, const int16_t sp_aud_decision0, const int16_t vad_flag, float *bin_nrgL, float *bin_nrgR, float *dot_prod_nrg_ratio ); +static float stereo_dft_calc_mean_bipd( float *pIpd, float ipd_buf[STEREO_DFT_IPD_BUF_LEN] ); + +static float stereo_dft_calc_mean_ipd_change( float *pIpd, float *ipd_smooth, int16_t gipd_band_max ); + +static void stereo_dft_gipd_stabilization( float *pgIpd, float prev_gipd, float ipd_mean_change ); + #ifdef DEBUG_MODE_DFT static void stereo_dft_enc_get_nipd_flag( STEREO_DFT_ENC_DATA_HANDLE hStereoDft, float *pgIpd, const int16_t sp_aud_decision0, const float gainIPD ); #else @@ -272,17 +276,17 @@ ivas_error stereo_dft_enc_create( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: DFT Stereo memory already allocated\n" ); } - if ( ( hStereoDft_loc = (STEREO_DFT_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_DFT_ENC_DATA ) ) ) == NULL ) + if ( ( hStereoDft_loc = (STEREO_DFT_ENC_DATA_HANDLE) malloc( sizeof( STEREO_DFT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT Stereo\n" ) ); } - if ( ( hStereoDft_loc->hConfig = (STEREO_DFT_CONFIG_DATA_HANDLE) count_malloc( sizeof( STEREO_DFT_CONFIG_DATA ) ) ) == NULL ) + if ( ( hStereoDft_loc->hConfig = (STEREO_DFT_CONFIG_DATA_HANDLE) malloc( sizeof( STEREO_DFT_CONFIG_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DFT Stereo Config\n" ) ); } - if ( ( hStereoDft_loc->hItd = (ITD_DATA_HANDLE) count_malloc( sizeof( ITD_DATA ) ) ) == NULL ) + if ( ( hStereoDft_loc->hItd = (ITD_DATA_HANDLE) malloc( sizeof( ITD_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ITD data\n" ) ); } @@ -435,6 +439,13 @@ void stereo_dft_enc_reset( hStereoDft->side_gain_counter = 0; hStereoDft->side_gain_bitdiff_lp = STEREO_DFT_BITDIFF_INIT; set_zero( hStereoDft->gipd, STEREO_DFT_ENC_DFT_NB ); + set_zero( hStereoDft->dot_prod_real_smooth, STEREO_DFT_BAND_MAX ); + set_zero( hStereoDft->dot_prod_img_smooth, STEREO_DFT_BAND_MAX ); + for ( i = 0; i < STEREO_DFT_BAND_MAX; i++ ) + { + set_zero( hStereoDft->ipd_buf[i], STEREO_DFT_IPD_BUF_LEN ); + } + hStereoDft->prev_gipd = 0.f; hStereoDft->gipd_index = 0; set_zero( hStereoDft->res_pred_gain, STEREO_DFT_ENC_DFT_NB * STEREO_DFT_BAND_MAX ); set_s( hStereoDft->res_pred_index_EC, 0, STEREO_DFT_BAND_MAX ); @@ -494,14 +505,12 @@ void stereo_dft_enc_reset( set_f( hStereoDft->Spd_L_smooth, 1.0f, STEREO_DFT_N_32k_ENC / 2 ); set_f( hStereoDft->Spd_R_smooth, 1.0f, STEREO_DFT_N_32k_ENC / 2 ); -#ifdef FIX_ITD_CNG hStereoDft->currentNumUpdates = 0; hStereoDft->expectedNumUpdates = FIXED_SID_RATE; hStereoDft->resetFrames = 0; hStereoDft->sid_gipd = 0; hStereoDft->prev_sid_gipd = 0; hStereoDft->prev_sid_no_ipd_flag = 1; -#endif hStereoDft->coh_fade_counter = 0; @@ -630,7 +639,7 @@ void stereo_dft_enc_update( hStereoDft->nbands_dmx = stereo_dft_band_config( hStereoDft->band_limits_dmx, 1, NFFT_inner, ENC ); /*Compute main parameters*/ - hStereoDft->gipd_band_max = dft_band_ipd[hStereoDft->hConfig->band_res][3]; + hStereoDft->gipd_band_max = dft_band_ipd[1][3]; hStereoDft->res_cod_band_max = dft_band_res_cod[hStereoDft->hConfig->band_res][hStereoDft->res_cod_mode[k_offset]]; hStereoDft->res_cod_line_max = (int16_t) ( 0.5f + ( hStereoDft->band_limits[hStereoDft->res_cod_band_max] - 1 ) * 2.f * hStereoDft->N / (float) ( hStereoDft->NFFT ) ); hStereoDft->res_cod_line_max = 8 * ( hStereoDft->res_cod_line_max / 8 ); @@ -703,17 +712,17 @@ void stereo_dft_enc_destroy( { if ( ( *hStereoDft )->hConfig != NULL ) { - count_free( ( *hStereoDft )->hConfig ); + free( ( *hStereoDft )->hConfig ); ( *hStereoDft )->hConfig = NULL; } if ( ( *hStereoDft )->hItd != NULL ) { - count_free( ( *hStereoDft )->hItd ); + free( ( *hStereoDft )->hItd ); ( *hStereoDft )->hItd = NULL; } - count_free( *hStereoDft ); + free( *hStereoDft ); *hStereoDft = NULL; return; @@ -747,7 +756,7 @@ void stereo_dft_enc_analyze( int16_t trigo_step; - wmops_sub_start( "DFT_analysis" ); + push_wmops( "DFT_analysis" ); /*-----------------------------------------------------------------* * Initialization @@ -871,7 +880,7 @@ void stereo_dft_enc_analyze( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -947,7 +956,7 @@ float stereo_dft_enc_synthesize( win = hStereoDft->win; win_ana = hStereoDft->win_ana; - wmops_sub_start( "DFT_synth_fs" ); + push_wmops( "DFT_synth_fs" ); } else if ( output_sampling_rate == INT_FS_12k8 ) { @@ -964,7 +973,7 @@ float stereo_dft_enc_synthesize( win = hStereoDft->win_12k8; win_ana = hStereoDft->win_ana_12k8; - wmops_sub_start( "DFT_synth_12k8" ); + push_wmops( "DFT_synth_12k8" ); } else if ( output_sampling_rate == 16000 ) { @@ -981,13 +990,13 @@ float stereo_dft_enc_synthesize( { mem = hStereoDft->output_mem_dmx_16k_shb; - wmops_sub_start( "DFT_synth_16k_shb" ); + push_wmops( "DFT_synth_16k_shb" ); } else { mem = hStereoDft->output_mem_dmx_16k; - wmops_sub_start( "DFT_synth_16k" ); + push_wmops( "DFT_synth_16k" ); } win = hStereoDft->win_16k; win_ana = hStereoDft->win_ana_16k; @@ -1007,7 +1016,7 @@ float stereo_dft_enc_synthesize( win = hStereoDft->win_32k; win_ana = hStereoDft->win_ana_32k; - wmops_sub_start( "DFT_synth_32k" ); + push_wmops( "DFT_synth_32k" ); } else if ( output_sampling_rate == 8000 ) { @@ -1024,7 +1033,7 @@ float stereo_dft_enc_synthesize( win = hStereoDft->win_8k; win_ana = hStereoDft->win_ana_8k; - wmops_sub_start( "DFT_synth_8k" ); + push_wmops( "DFT_synth_8k" ); } else { @@ -1220,7 +1229,7 @@ float stereo_dft_enc_synthesize( } #endif - wmops_sub_end(); + pop_wmops(); return ( nrg ); } @@ -1234,12 +1243,10 @@ float stereo_dft_enc_synthesize( *-------------------------------------------------------------------------*/ void stereo_dft_enc_process( - CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ -#ifdef FIX_ITD_CNG + CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ const int16_t vad_flag_dtx[], /* i: VAD dtx flags */ const int16_t vad_hover_flag[], /* i: VAD hangover flags */ -#endif - const int16_t input_frame /* i : input frame length */ + const int16_t input_frame /* i : input frame length */ ) { int16_t i, j, b; @@ -1281,7 +1288,7 @@ void stereo_dft_enc_process( /* Initialization */ k_offset = STEREO_DFT_OFFSET; /*Add an offset at encoder*/ - hStereoDft->gipd_band_max = dft_band_ipd[hStereoDft->band_res[k_offset]][3]; + hStereoDft->gipd_band_max = dft_band_ipd[1][3]; hStereoDft->res_cod_band_max = dft_band_res_cod[hStereoDft->band_res[k_offset]][hStereoDft->res_cod_mode[k_offset]]; hStereoDft->res_cod_line_max = (int16_t) ( 0.5f + ( hStereoDft->band_limits[hStereoDft->res_cod_band_max] - 1 ) * 2.f * input_frame / (float) ( hStereoDft->NFFT ) ); hStereoDft->res_cod_line_max = 8 * ( hStereoDft->res_cod_line_max / 8 ); @@ -1309,11 +1316,7 @@ void stereo_dft_enc_process( if ( hStereoDft->hConfig->itd_mode ) #endif { -#ifdef FIX_ITD_CNG stereo_dft_enc_compute_itd( hCPE, pDFT_L, pDFT_R, k_offset, input_frame, vad_flag_dtx, vad_hover_flag, bin_nrgL, bin_nrgR ); -#else - stereo_dft_enc_compute_itd( hCPE, pDFT_L, pDFT_R, k_offset, input_frame, bin_nrgL, bin_nrgR ); -#endif if ( hCPE->element_mode == IVAS_CPE_MDCT ) { return; @@ -1386,7 +1389,6 @@ void stereo_dft_enc_process( /* DFT stereo parameters */ stereo_dft_enc_compute_prm( hStereoDft, pDFT_L, pDFT_R, k_offset, 1, hCPE->hCoreCoder[0]->sp_aud_decision0, hCPE->hCoreCoder[0]->vad_flag, bin_nrgL, bin_nrgR, dot_prod_nrg_ratio ); -#ifdef FIX_ITD_CNG if ( vad_flag_dtx[0] == 0 ) { if ( hCPE->hStereoCng->cng_counter == 0 && !hCPE->hStereoCng->first_SID_after_TD ) @@ -1401,7 +1403,6 @@ void stereo_dft_enc_process( hStereoDft->prev_sid_no_ipd_flag = hStereoDft->no_ipd_flag; } } -#endif /*----------------------------------------------------------------* * UNCLR classifier (detection of uncorrelated L and R channels) @@ -1459,11 +1460,7 @@ void stereo_dft_enc_process( } } -#ifdef FIX_ITD_CNG if ( b < hStereoDft->res_cod_band_max && vad_flag_dtx[0] ) -#else - if ( b < hStereoDft->res_cod_band_max ) -#endif { #ifdef DEBUGGING assert( hStereoDft->nbands == hStereoDft->nbands_dmx && "Don't use coarser stereo parameter resolution for residual coding bitrates!" ); @@ -1961,7 +1958,7 @@ void stereo_dft_enc_res( dbgwrite( &max_snr, sizeof( float ), 1, 1, "./res/stereo_dft_res_cod_target_snr.dat" ); #endif - wmops_sub_start( "residual_encode" ); + push_wmops( "residual_encode" ); /* residual encoding */ ECSQ_init_instance( &ecsq_inst, 0 /*dummy index*/, &range_uni_enc_state ); @@ -2039,7 +2036,7 @@ void stereo_dft_enc_res( } #endif - wmops_sub_end(); + pop_wmops(); #ifdef DEBUG_MODE_DFT { @@ -2353,11 +2350,7 @@ void stereo_dft_enc_write_BS( if ( core_brate == SID_2k40 ) { -#ifdef FIX_ITD_CNG stereo_dft_enc_sid_calc_coh( hStereoDft, hCPE->hStereoCng->prev_cohBand, &hCPE->hStereoCng->td_active, &hCPE->hStereoCng->first_SID, cohBand ); -#else - stereo_dft_enc_sid_calc_coh( hStereoDft, hCPE->hStereoCng->coh_crossfade, &hCPE->hStereoCng->td_active, &hCPE->hStereoCng->first_SID, cohBand ); -#endif if ( *nb_bits <= ( ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS - STEREO_DFT_ITD_MODE_NBITS - STEREO_DFT_SID_ITD_NBITS - 1 ) ) { @@ -2606,8 +2599,10 @@ static void stereo_dft_enc_compute_prm( float sum_energy_L, sum_energy_R; float g, c; float abs_L_R; + float abs_L_R2; float gain_IPD; float sub_nrg_DMX[STEREO_DFT_BAND_MAX]; + float sub_nrg_DMX2; float sub_nrg_L[STEREO_DFT_BAND_MAX]; float sub_nrg_R[STEREO_DFT_BAND_MAX]; float diff_ipd; @@ -2621,6 +2616,9 @@ static void stereo_dft_enc_compute_prm( float sum_past_dot_prod_abs, sum_past_dot_prod_abs2; float sum_past_nrg_dmx; int16_t pos; + float pIpd[STEREO_DFT_BAND_MAX]; + float ipd_smooth[STEREO_DFT_BAND_MAX]; + float ipd_mean_change; /*------------------------------------------------------------------* * Initialization @@ -2633,7 +2631,6 @@ static void stereo_dft_enc_compute_prm( set_f( sub_nrg_L, 0, STEREO_DFT_BAND_MAX ); set_f( sub_nrg_R, 0, STEREO_DFT_BAND_MAX ); - pSideGain = hStereoDft->side_gain + k_offset * STEREO_DFT_BAND_MAX; pgIpd = hStereoDft->gipd + k_offset; pPredGain = hStereoDft->res_pred_gain + k_offset * STEREO_DFT_BAND_MAX; @@ -2642,6 +2639,7 @@ static void stereo_dft_enc_compute_prm( sum_energy_R = EPSILON; sum_dot_prod_real = EPSILON; sum_dot_prod_img = EPSILON; + sub_nrg_DMX2 = 0.f; #ifdef DEBUG_MODE_DFT sum_nrg_L = EPSILON; sum_nrg_R = EPSILON; @@ -2671,10 +2669,10 @@ static void stereo_dft_enc_compute_prm( pNrgL = bin_nrgL; pNrgR = bin_nrgR; - sum_nrg_L2 = 0; - sum_nrg_R2 = 0; - dot_prod_real2 = 0; - dot_prod_img2 = 0; + sum_nrg_L2 = EPSILON; + sum_nrg_R2 = EPSILON; + dot_prod_real2 = EPSILON; + dot_prod_img2 = EPSILON; for ( i = hStereoDft->band_limits_dmx[b2]; i < hStereoDft->band_limits_dmx[b2 + 1]; i++ ) { @@ -2685,6 +2683,19 @@ static void stereo_dft_enc_compute_prm( dot_prod_real2 += pDFT_L[2 * i] * pDFT_R[2 * i] + pDFT_L[2 * i + 1] * pDFT_R[2 * i + 1]; dot_prod_img2 += pDFT_L[2 * i + 1] * pDFT_R[2 * i] - pDFT_L[2 * i] * pDFT_R[2 * i + 1]; } + abs_L_R2 = sqrtf( dot_prod_real2 * dot_prod_real2 + dot_prod_img2 * dot_prod_img2 ); + sub_nrg_DMX2 = sum_nrg_L2 + sum_nrg_R2 + 2 * abs_L_R2; + + if ( b2 < hStereoDft->gipd_band_max ) + { + hStereoDft->dot_prod_real_smooth[b2] = 0.5f * hStereoDft->dot_prod_real_smooth[b2] + 0.5f * dot_prod_real2; + hStereoDft->dot_prod_img_smooth[b2] = 0.5f * hStereoDft->dot_prod_img_smooth[b2] + 0.5f * dot_prod_img2; + pIpd[b2] = (float) atan2( hStereoDft->dot_prod_img_smooth[b2], hStereoDft->dot_prod_real_smooth[b2] ); + + ipd_smooth[b2] = stereo_dft_calc_mean_bipd( &pIpd[b2], hStereoDft->ipd_buf[b2] ); + + gain_IPD += ( sum_nrg_L2 + sum_nrg_R2 + 2 * dot_prod_real2 ) / sub_nrg_DMX2 / hStereoDft->gipd_band_max; + } sum_past_nrgL2 = EPSILON; sum_past_nrgR2 = EPSILON; @@ -2839,17 +2850,16 @@ static void stereo_dft_enc_compute_prm( } - if ( b < hStereoDft->gipd_band_max ) - { - gain_IPD += ( sum_nrg_L + sum_nrg_R + 2 * dot_prod_real ) / sub_nrg_DMX[b] / hStereoDft->gipd_band_max; - } - - if ( b == hStereoDft->gipd_band_max - 1 ) + if ( b2 == hStereoDft->gipd_band_max ) { + ipd_mean_change = stereo_dft_calc_mean_ipd_change( pIpd, ipd_smooth, hStereoDft->gipd_band_max ); hStereoDft->sum_dot_prod_real = ( 1.f - hStereoDft->sfm ) * hStereoDft->sum_dot_prod_real + hStereoDft->sfm * sum_dot_prod_real; hStereoDft->sum_dot_prod_img = ( 1.f - hStereoDft->sfm ) * hStereoDft->sum_dot_prod_img + hStereoDft->sfm * sum_dot_prod_img; pgIpd[0] = (float) atan2( hStereoDft->sum_dot_prod_img, hStereoDft->sum_dot_prod_real ); + + stereo_dft_gipd_stabilization( &pgIpd[0], hStereoDft->prev_gipd, ipd_mean_change ); + hStereoDft->prev_gipd = pgIpd[0]; } } @@ -3188,6 +3198,171 @@ static void res_pred_gain_mode_decision( } +/*------------------------------------------------------------------------- + * stereo_dft_calc_mean_bipd() + * + * Calculate mean of previous bandwise IPD values + *------------------------------------------------------------------------*/ + +static float stereo_dft_calc_mean_bipd( + float *pIpd, /* i: current bandwise IPD */ + float ipd_buf[STEREO_DFT_IPD_BUF_LEN] /* i/o: previous bandwise IPDs */ +) +{ + int16_t i; + float ipd_smooth; + float diff_to_last; + + assert( *pIpd <= EVS_PI && *pIpd >= -EVS_PI ); + + ipd_smooth = 0.f; + for ( i = 0; i < STEREO_DFT_IPD_BUF_LEN; i++ ) + { + if ( i == 0 ) + { + diff_to_last = ipd_buf[0]; + } + else + { + diff_to_last = fabsf( ipd_buf[i] - ipd_smooth ); + } + if ( diff_to_last > EVS_PI ) + { + if ( ipd_buf[i] > 0 ) + { + ipd_buf[i] -= 2 * EVS_PI; + } + else + { + ipd_buf[i] += 2 * EVS_PI; + } + } + ipd_smooth = ( i / (float) ( i + 1 ) ) * ipd_smooth + ( 1 / (float) ( i + 1 ) ) * ipd_buf[i]; + if ( ipd_smooth < -EVS_PI ) + { + ipd_smooth += 2 * EVS_PI; + } + else if ( ipd_smooth > EVS_PI ) + { + ipd_smooth -= 2 * EVS_PI; + } + } + + for ( i = 0; i < STEREO_DFT_IPD_BUF_LEN - 1; i++ ) + { + ipd_buf[i] = ipd_buf[i + 1]; + } + ipd_buf[STEREO_DFT_IPD_BUF_LEN - 1] = *pIpd; + +#ifdef DEBUG_MODE_DFT + dbgwrite( pIpd, sizeof( float ), 1, 1, "res/stereo_dft_bipd.pcm" ); + dbgwrite( &ipd_smooth, sizeof( float ), 1, 1, "res/stereo_dft_bipd_smooth.pcm" ); +#endif + + return ipd_smooth; +} + + +/*------------------------------------------------------------------------- + * stereo_dft_calc_mean_ipd_change() + * + * Calculate mean IPD change over all bands + *------------------------------------------------------------------------*/ + +static float stereo_dft_calc_mean_ipd_change( + float *pIpd, /* i: bandwise IPDs */ + float *ipd_smooth, /* i: mean of previous bandwise IPDs */ + int16_t gipd_band_max /* i: number of IPD bands */ +) +{ + int16_t b; + float ipd_mean_change; + float ipd_change[STEREO_DFT_BAND_MAX]; + + ipd_mean_change = 0.f; + for ( b = 0; b < gipd_band_max; b++ ) + { + ipd_change[b] = fabsf( pIpd[b] - ipd_smooth[b] ); + if ( ipd_change[b] > EVS_PI ) + { + ipd_change[b] = 2 * EVS_PI - ipd_change[b]; + } + ipd_mean_change += ipd_change[b]; + } + ipd_mean_change /= gipd_band_max; + +#ifdef DEBUG_MODE_DFT + dbgwrite( ipd_change, sizeof( float ), hStereoDft->gipd_band_max, 1, "res/stereo_dft_ipd_change.pcm" ); + dbgwrite( &ipd_mean_change, sizeof( float ), 1, 1, "res/stereo_dft_ipd_mean_change.pcm" ); +#endif + + return ipd_mean_change; +} + + +/*------------------------------------------------------------------------- + * stereo_dft_gipd_stabilization() + * + * stabilize global IPD based on stability of bandwise IPDs + *------------------------------------------------------------------------*/ + +static void stereo_dft_gipd_stabilization( + float *pgIpd, /* i/o: global IPD to be stabilized */ + float prev_gipd, /* i: previous global IPD */ + float ipd_mean_change /* i: mean of previous bandwise IPDs */ +) +{ + float diff_gipd; + + if ( ipd_mean_change < 0.3f ) + { + *pgIpd = prev_gipd; + } + else + { + diff_gipd = fabsf( *pgIpd - prev_gipd ); + if ( diff_gipd > EVS_PI ) + { + diff_gipd = 2 * EVS_PI - diff_gipd; + } + if ( diff_gipd > ipd_mean_change ) + { + if ( *pgIpd > prev_gipd ) + { + if ( *pgIpd - prev_gipd < EVS_PI ) + { + *pgIpd = prev_gipd + ipd_mean_change; + } + else + { + *pgIpd = prev_gipd - ipd_mean_change; + if ( *pgIpd < -EVS_PI ) + { + *pgIpd += 2 * EVS_PI; + } + } + } + else + { + if ( prev_gipd - *pgIpd < EVS_PI ) + { + *pgIpd = prev_gipd - ipd_mean_change; + } + else + { + *pgIpd = prev_gipd + ipd_mean_change; + if ( *pgIpd > EVS_PI ) + { + *pgIpd -= 2 * EVS_PI; + } + } + } + } + } + return; +} + + /*------------------------------------------------------------------------- * stereo_dft_enc_get_nipd_flag() * diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index e917c36e361d780cbc78edda143909fe98032851..f52d67a47a328fe47fcdc6ccf4d2c167dc7564f4 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -45,7 +45,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -66,11 +66,9 @@ #define SUBDIV ( 2 * STEREO_DFT_ITD_MAX_ANA / L_SAMPLES ) #define DENOM 0.05f -#define XSPEC_ALPHA ( 1.f / 32 ) -#ifdef FIX_ITD_CNG +#define XSPEC_ALPHA ( 1.f / 32 ) #define CORR_FILT 0.8f #define CORR_RESET_FRAMES_MAX 20 -#endif #define ITD_VAD_NOISE_INIT_FRAMES 30 #define ITD_VAD_THRSHOLD 0.001f @@ -726,10 +724,8 @@ void stereo_dft_enc_compute_itd( float *DFT_R, const int16_t k_offset, const int16_t input_frame, -#ifdef FIX_ITD_CNG const int16_t vad_flag_dtx[], const int16_t vad_hover_flag[], -#endif float *bin_nrgL, float *bin_nrgR ) { @@ -776,9 +772,7 @@ void stereo_dft_enc_compute_itd( const float *dft_trigo32k; float trigo_enc[STEREO_DFT_N_32k_ENC / 2 + 1]; -#ifdef FIX_ITD_CNG float cng_xcorr_filt; -#endif if ( hCPE->element_mode == IVAS_CPE_DFT ) { @@ -938,9 +932,7 @@ void stereo_dft_enc_compute_itd( vad_flag_itd = stereo_dft_enc_itd_vad( hItd->E_band_n, &( hItd->vad_frm_cnt ), Spd_L, Spd_R, &mssnr ); -#ifdef FIX_ITD_CNG vad_flag_itd = vad_flag_itd && vad_flag_dtx[0]; -#endif if ( sum_nrg_L < EPSILON ) { @@ -1069,7 +1061,6 @@ void stereo_dft_enc_compute_itd( if ( hCPE->hCoreCoder[0]->Opt_DTX_ON && hCPE->element_mode == IVAS_CPE_DFT ) { -#ifdef FIX_ITD_CNG if ( hCPE->hFrontVad[0] != NULL ) { /* Determine if we are in hangover */ @@ -1119,14 +1110,8 @@ void stereo_dft_enc_compute_itd( } } } -#endif -#ifdef FIX_ITD_CNG if ( ( vad_flag_dtx[0] == 0 ) || ( hCPE->hFrontVad[0] == NULL && ( hCPE->hCoreCoder[0]->last_core_brate == SID_2k40 || hCPE->hCoreCoder[0]->last_core_brate == FRAME_NO_DATA ) ) || hCPE->hStereoCng->first_SID_after_TD ) -#else - if ( hCPE->hCoreCoder[0]->last_core_brate == SID_2k40 || hCPE->hCoreCoder[0]->last_core_brate == FRAME_NO_DATA || hCPE->hStereoCng->first_SID_after_TD ) -#endif { -#ifdef FIX_ITD_CNG if ( vad_flag_dtx[0] == 0 ) { /* expectedNumUpdates updated after call to dtx() in SID frames */ @@ -1144,19 +1129,13 @@ void stereo_dft_enc_compute_itd( { mvr2r( hStereoDft->xspec_smooth, hItd->xcorr_smooth, NFFT ); } -#endif for ( i = 1; i < NFFT / 2; i++ ) { /* Low pass filter cross L/R power spectrum */ hStereoDft->xspec_smooth[2 * i] = ( 1.f - XSPEC_ALPHA ) * hStereoDft->xspec_smooth[2 * i] + XSPEC_ALPHA * xcorr[2 * i]; hStereoDft->xspec_smooth[2 * i + 1] = ( 1.f - XSPEC_ALPHA ) * hStereoDft->xspec_smooth[2 * i + 1] + XSPEC_ALPHA * xcorr[2 * i + 1]; -#ifdef FIX_ITD_CNG hItd->xcorr_smooth[2 * i] = ( 1.f - cng_xcorr_filt ) * hItd->xcorr_smooth[2 * i] + cng_xcorr_filt * xcorr[2 * i]; hItd->xcorr_smooth[2 * i + 1] = ( 1.f - cng_xcorr_filt ) * hItd->xcorr_smooth[2 * i + 1] + cng_xcorr_filt * xcorr[2 * i + 1]; -#else - hItd->xcorr_smooth[2 * i] = ( 1.f - sfm_L ) * hItd->xcorr_smooth[2 * i] + sfm_L * xcorr[2 * i]; - hItd->xcorr_smooth[2 * i + 1] = ( 1.f - sfm_L ) * hItd->xcorr_smooth[2 * i + 1] + sfm_L * xcorr[2 * i + 1]; -#endif tmpf1 = sqrtf( hItd->xcorr_smooth[i * 2] * hItd->xcorr_smooth[i * 2] + hItd->xcorr_smooth[i * 2 + 1] * hItd->xcorr_smooth[i * 2 + 1] ); tmpf1 += EPSILON; tmpf2 = tmpf1; diff --git a/lib_enc/ivas_stereo_dft_td_itd.c b/lib_enc/ivas_stereo_dft_td_itd.c index fd4cbdde71842712c1aa5a1b5c8f63d4a4e2c7eb..b7fb95422f3136080892b0df097b65719ef747c6 100644 --- a/lib_enc/ivas_stereo_dft_td_itd.c +++ b/lib_enc/ivas_stereo_dft_td_itd.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -47,7 +47,7 @@ #ifdef DEBUG_PLOT #include "deb_out.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -383,12 +383,10 @@ void stereo_td_itd( * ---------------------------------------------------------------*/ void stereo_td_itd_mdct_stereo( - CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder handle */ -#ifdef FIX_ITD_CNG + CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder handle */ const int16_t vad_flag_dtx[], /* i: VAD dtx flags */ const int16_t vad_hover_flag[], /* i: VAD hangover flags */ -#endif - const int16_t input_frame /* i : frame length */ + const int16_t input_frame /* i : frame length */ ) { int16_t i; @@ -415,11 +413,7 @@ void stereo_td_itd_mdct_stereo( stereo_dft_enc_analyze( hCPE->hCoreCoder, CPE_CHANNELS, input_frame, NULL, hStereoMdct, DFT, hCPE->input_mem ); /*call ITD function*/ -#ifdef FIX_ITD_CNG stereo_dft_enc_compute_itd( hCPE, DFT[0], DFT[1], STEREO_DFT_OFFSET, input_frame, vad_flag_dtx, vad_hover_flag, bin_nrgL, bin_nrgR ); -#else - stereo_dft_enc_compute_itd( hCPE, DFT[0], DFT[1], STEREO_DFT_OFFSET, input_frame, bin_nrgL, bin_nrgR ); -#endif /* Time Domain ITD compensation using extrapolation */ #ifdef DEBUG_MODE_DFT diff --git a/lib_enc/ivas_stereo_dmx_evs.c b/lib_enc/ivas_stereo_dmx_evs.c index e522912cc794345a68fcbedd5cde2422850e35cd..052970fa70c14831fb4768897e0e59ac17383095 100644 --- a/lib_enc/ivas_stereo_dmx_evs.c +++ b/lib_enc/ivas_stereo_dmx_evs.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -847,7 +847,7 @@ ivas_error stereo_dmx_evs_init_encoder( input_frame = (int16_t) ( input_Fs / FRAMES_PER_SEC ); hStereoDmxEVS = NULL; - if ( ( hStereoDmxEVS = (STEREO_DMX_EVS_ENC_HANDLE) count_malloc( sizeof( STEREO_DMX_EVS_ENC_DATA ) ) ) == NULL ) + if ( ( hStereoDmxEVS = (STEREO_DMX_EVS_ENC_HANDLE) malloc( sizeof( STEREO_DMX_EVS_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for STEREO_DMX_EVS_ENC_DATA\n" ) ); } @@ -881,7 +881,7 @@ ivas_error stereo_dmx_evs_init_encoder( } hStereoDmxEVS->hPOC = NULL; - if ( ( hStereoDmxEVS->hPOC = (STEREO_DMX_EVS_POC_HANDLE) count_malloc( sizeof( STEREO_DMX_EVS_POC_DATA ) ) ) == NULL ) + if ( ( hStereoDmxEVS->hPOC = (STEREO_DMX_EVS_POC_HANDLE) malloc( sizeof( STEREO_DMX_EVS_POC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for STEREO_DMX_EVS_POC_DATA\n" ) ); } @@ -951,11 +951,11 @@ void stereo_dmx_evs_close_encoder( { if ( hStereoDmxEVS->hPOC != NULL ) { - count_free( hStereoDmxEVS->hPOC ); + free( hStereoDmxEVS->hPOC ); hStereoDmxEVS->hPOC = NULL; } - count_free( hStereoDmxEVS ); + free( hStereoDmxEVS ); return; } diff --git a/lib_enc/ivas_stereo_eclvq_enc.c b/lib_enc/ivas_stereo_eclvq_enc.c index dffdafd17a64d09b598c4d9d4ca9b5683eb4e8be..fc622b53211efc8ee744f8a5ac3dba69815ba764 100644 --- a/lib_enc/ivas_stereo_eclvq_enc.c +++ b/lib_enc/ivas_stereo_eclvq_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_rom_enc.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /* used only for norm_s in the code_length_from_count function */ #include "basop32.h" @@ -240,9 +240,9 @@ static int16_t code_length_from_count( assert( c <= ( 1 << 14 ) ); #endif -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP c_norm = norm_s( (int16_t) c ); /* equivalent with 14 - floor(log_base2(c)) */ -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /* compute linear approximation of log2(1 + x), for x in [0, 1], using a look-up table with 64 entries */ /* normalize to {16384, ..., 32767}, subtract MSB bit, and convert to Q6 for indexing log2_1px_table */ diff --git a/lib_enc/ivas_stereo_ica_enc.c b/lib_enc/ivas_stereo_ica_enc.c index c178d05a91cd7a8008f9bb28bd38e71ac7e80e12..4cdd1c2fc367bbce50e9ca5ccdedf31b810c94fc 100644 --- a/lib_enc/ivas_stereo_ica_enc.c +++ b/lib_enc/ivas_stereo_ica_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #include "rom_com.h" #include "ivas_rom_com.h" diff --git a/lib_enc/ivas_stereo_icbwe_enc.c b/lib_enc/ivas_stereo_icbwe_enc.c index 1d1f89f65642238e706b001d6c2e91e574a812f8..43ae497df8c602bdc9415f47ddb7cfaca78237ee 100644 --- a/lib_enc/ivas_stereo_icbwe_enc.c +++ b/lib_enc/ivas_stereo_icbwe_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include "ivas_cnst.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include "rom_com.h" #include "ivas_rom_com.h" #ifdef DEBUGGING diff --git a/lib_enc/ivas_stereo_mdct_core_enc.c b/lib_enc/ivas_stereo_mdct_core_enc.c old mode 100755 new mode 100644 index 6d1e9a32b0d10110079f5ebbce5095092c976766..9500da4fb9d21b5e7181d2349306a66fc5e46774 --- a/lib_enc/ivas_stereo_mdct_core_enc.c +++ b/lib_enc/ivas_stereo_mdct_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * sync_tcx_mode() @@ -146,7 +146,7 @@ void stereo_mdct_core_enc( int16_t stereo_bits; int16_t meta_bits, signal_bits; - wmops_sub_start( "stereo_mdct_core_enc" ); + push_wmops( "stereo_mdct_core_enc" ); L_subframeTCX = 0; /* to avoid compilation warning */ @@ -451,7 +451,7 @@ void stereo_mdct_core_enc( ivas_mdct_quant_coder( hCPE, 0, tnsBits, tnsSize, p_param, 0 ); - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/ivas_stereo_mdct_igf_enc.c b/lib_enc/ivas_stereo_mdct_igf_enc.c index b04fe84de23a8f7c17434e40bf60d33b056333d0..1924028bcf9ff6ae1ea8f3470f59e5b5090ada01 100644 --- a/lib_enc/ivas_stereo_mdct_igf_enc.c +++ b/lib_enc/ivas_stereo_mdct_igf_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "stat_enc.h" #include "ivas_stat_enc.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/ivas_stereo_mdct_stereo_enc.c b/lib_enc/ivas_stereo_mdct_stereo_enc.c index fcad004b3a2148aa840e381293540f05b7c50f21..4ef24de8a191368165a8406f556121d047f5be93 100644 --- a/lib_enc/ivas_stereo_mdct_stereo_enc.c +++ b/lib_enc/ivas_stereo_mdct_stereo_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "prot.h" #include "ivas_rom_com.h" #include "ivas_rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "stat_enc.h" #ifdef DEBUG_PLOT #include "deb_out.h" @@ -189,7 +189,7 @@ void stereo_coder_tcx( int16_t k; int16_t nSubframes, L_frameTCX; int16_t nAvailBitsMS[NB_DIV]; - wmops_sub_start( "stereo_coder_tcx" ); + push_wmops( "stereo_coder_tcx" ); set_s( nAvailBitsMS, 0, NB_DIV ); @@ -321,7 +321,7 @@ void stereo_coder_tcx( #endif hStereoMdct->sw_uncorr = 1; - wmops_sub_end(); + pop_wmops(); return; } #ifdef DEBUGGING @@ -342,7 +342,7 @@ void stereo_coder_tcx( set_s( &ms_mask[k][0], 1, MAX_SFB ); } - wmops_sub_end(); + pop_wmops(); return; } #endif @@ -464,7 +464,7 @@ void stereo_coder_tcx( hStereoMdct->sw_uncorr = ( sw_uncorr_mean > 0.6f ); } - wmops_sub_end(); + pop_wmops(); #ifdef DEBUG_MODE_MDCT /* MDCT stereo data */ @@ -1161,13 +1161,13 @@ void initMdctStereoEncData( { if ( hStereoMdct->hDft_ana != NULL ) { - count_free( hStereoMdct->hDft_ana ); + free( hStereoMdct->hDft_ana ); hStereoMdct->hDft_ana = NULL; } if ( hStereoMdct->hItd != NULL ) { - count_free( hStereoMdct->hItd ); + free( hStereoMdct->hItd ); hStereoMdct->hItd = NULL; } } @@ -1188,7 +1188,7 @@ ivas_error initMdctItdHandling( { if ( hStereoMdct->hItd == NULL ) { - if ( ( hStereoMdct->hItd = (ITD_DATA_HANDLE) count_malloc( sizeof( ITD_DATA ) ) ) == NULL ) + if ( ( hStereoMdct->hItd = (ITD_DATA_HANDLE) malloc( sizeof( ITD_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ITD data\n" ) ); } @@ -1196,7 +1196,7 @@ ivas_error initMdctItdHandling( if ( hStereoMdct->hDft_ana == NULL ) { - if ( ( hStereoMdct->hDft_ana = (DFT_ANA_HANDLE) count_malloc( sizeof( DFT_ANA ) ) ) == NULL ) + if ( ( hStereoMdct->hDft_ana = (DFT_ANA_HANDLE) malloc( sizeof( DFT_ANA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ITD data\n" ) ); } @@ -1223,17 +1223,17 @@ void stereo_mdct_enc_destroy( { if ( ( *hStereoMdct )->hDft_ana != NULL ) { - count_free( ( *hStereoMdct )->hDft_ana ); + free( ( *hStereoMdct )->hDft_ana ); ( *hStereoMdct )->hDft_ana = NULL; } if ( ( *hStereoMdct )->hItd != NULL ) { - count_free( ( *hStereoMdct )->hItd ); + free( ( *hStereoMdct )->hItd ); ( *hStereoMdct )->hItd = NULL; } - count_free( *hStereoMdct ); + free( *hStereoMdct ); *hStereoMdct = NULL; return; diff --git a/lib_enc/ivas_stereo_switching_enc.c b/lib_enc/ivas_stereo_switching_enc.c index 59adc49fef6eda1e46ec21310a51cd0c0e6f855e..1be9af224e8341d63fbfbfd1763d3d8820fd2519 100644 --- a/lib_enc/ivas_stereo_switching_enc.c +++ b/lib_enc/ivas_stereo_switching_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -32,16 +32,16 @@ #include #include "options.h" -#ifdef DEBUGGING -#include "debug.h" -#endif #include "cnst.h" #include "rom_com.h" #include "prot.h" #include "ivas_prot.h" #include "ivas_rom_com.h" -#include "wmops.h" - +#include "assert.h" +#include "wmc_auto.h" +#ifdef DEBUGGING +#include "debug.h" +#endif /*-------------------------------------------------------------------* * Function allocate_CoreCoder_enc() @@ -55,7 +55,7 @@ static ivas_error allocate_CoreCoder_enc( { if ( st->hLPDmem == NULL && st->element_mode != IVAS_CPE_MDCT ) { - if ( ( st->hLPDmem = (LPD_state_HANDLE) count_malloc( sizeof( LPD_state ) ) ) == NULL ) + if ( ( st->hLPDmem = (LPD_state_HANDLE) malloc( sizeof( LPD_state ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LPDmem\n" ) ); } @@ -64,7 +64,7 @@ static ivas_error allocate_CoreCoder_enc( if ( st->hGSCEnc == NULL && st->element_mode != IVAS_CPE_MDCT ) { - if ( ( st->hGSCEnc = (GSC_ENC_HANDLE) count_malloc( sizeof( GSC_ENC_DATA ) ) ) == NULL ) + if ( ( st->hGSCEnc = (GSC_ENC_HANDLE) malloc( sizeof( GSC_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for GSC\n" ) ); } @@ -73,7 +73,7 @@ static ivas_error allocate_CoreCoder_enc( if ( st->hNoiseEst == NULL ) { - if ( ( st->hNoiseEst = (NOISE_EST_HANDLE) count_malloc( sizeof( NOISE_EST_DATA ) ) ) == NULL ) + if ( ( st->hNoiseEst = (NOISE_EST_HANDLE) malloc( sizeof( NOISE_EST_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Noise estimation\n" ) ); } @@ -82,7 +82,7 @@ static ivas_error allocate_CoreCoder_enc( if ( st->hVAD == NULL ) { - if ( ( st->hVAD = (VAD_HANDLE) count_malloc( sizeof( VAD_DATA ) ) ) == NULL ) + if ( ( st->hVAD = (VAD_HANDLE) malloc( sizeof( VAD_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for VAD\n" ) ); } @@ -91,7 +91,7 @@ static ivas_error allocate_CoreCoder_enc( if ( st->hSpMusClas == NULL ) { - if ( ( st->hSpMusClas = (SP_MUS_CLAS_HANDLE) count_malloc( sizeof( SP_MUS_CLAS_DATA ) ) ) == NULL ) + if ( ( st->hSpMusClas = (SP_MUS_CLAS_HANDLE) malloc( sizeof( SP_MUS_CLAS_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Speech/music classifier\n" ) ); } @@ -114,25 +114,25 @@ static void deallocate_CoreCoder_TCX_enc( { if ( st->hTcxEnc != NULL ) { - count_free( st->hTcxEnc ); + free( st->hTcxEnc ); st->hTcxEnc = NULL; } if ( st->hTcxCfg != NULL ) { - count_free( st->hTcxCfg ); + free( st->hTcxCfg ); st->hTcxCfg = NULL; } if ( st->hIGFEnc != NULL ) { - count_free( st->hIGFEnc ); + free( st->hIGFEnc ); st->hIGFEnc = NULL; } if ( st->hHQ_core != NULL ) { - count_free( st->hHQ_core ); + free( st->hHQ_core ); st->hHQ_core = NULL; } @@ -152,31 +152,31 @@ static void deallocate_CoreCoder_enc( { if ( st->hLPDmem != NULL ) { - count_free( st->hLPDmem ); + free( st->hLPDmem ); st->hLPDmem = NULL; } if ( st->hGSCEnc != NULL ) { - count_free( st->hGSCEnc ); + free( st->hGSCEnc ); st->hGSCEnc = NULL; } if ( st->hNoiseEst != NULL && st->element_mode != IVAS_CPE_MDCT ) { - count_free( st->hNoiseEst ); + free( st->hNoiseEst ); st->hNoiseEst = NULL; } if ( st->hVAD != NULL && st->element_mode != IVAS_CPE_MDCT ) { - count_free( st->hVAD ); + free( st->hVAD ); st->hVAD = NULL; } if ( st->hSpMusClas != NULL && st->element_mode != IVAS_CPE_MDCT ) { - count_free( st->hSpMusClas ); + free( st->hSpMusClas ); st->hSpMusClas = NULL; } @@ -187,7 +187,7 @@ static void deallocate_CoreCoder_enc( if ( st->hBWE_TD != NULL ) { - count_free( st->hBWE_TD ); + free( st->hBWE_TD ); st->hBWE_TD = NULL; } @@ -198,7 +198,7 @@ static void deallocate_CoreCoder_enc( if ( st->hBWE_FD != NULL ) { - count_free( st->hBWE_FD ); + free( st->hBWE_FD ); st->hBWE_FD = NULL; } @@ -231,6 +231,8 @@ ivas_error stereo_memory_enc( error = IVAS_ERR_OK; + assert( hCPE->last_element_mode >= IVAS_CPE_DFT && "Switching from SCE to CPE is not a valid configuration!" ); + /*--------------------------------------------------------------* * save parameters from structures that will be freed *---------------------------------------------------------------*/ @@ -261,7 +263,7 @@ ivas_error stereo_memory_enc( /* deallocate data structure of the previous CPE mode */ if ( hCPE->hStereoTD != NULL ) { - count_free( hCPE->hStereoTD ); + free( hCPE->hStereoTD ); hCPE->hStereoTD = NULL; } @@ -283,7 +285,7 @@ ivas_error stereo_memory_enc( /* allocate ICBWE structure */ if ( hCPE->hStereoICBWE == NULL ) { - if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_ENC_HANDLE) count_malloc( sizeof( STEREO_ICBWE_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_ENC_HANDLE) malloc( sizeof( STEREO_ICBWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo ICBWE \n" ) ); } @@ -295,7 +297,7 @@ ivas_error stereo_memory_enc( st = hCPE->hCoreCoder[0]; if ( st->hHQ_core == NULL ) { - if ( ( st->hHQ_core = (HQ_ENC_HANDLE) count_malloc( sizeof( HQ_ENC_DATA ) ) ) == NULL ) + if ( ( st->hHQ_core = (HQ_ENC_HANDLE) malloc( sizeof( HQ_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HQ core\n" ) ); } @@ -332,7 +334,7 @@ ivas_error stereo_memory_enc( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: TD Stereo memory already allocated\n" ); } - if ( ( hCPE->hStereoTD = (STEREO_TD_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_TD_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTD = (STEREO_TD_ENC_DATA_HANDLE) malloc( sizeof( STEREO_TD_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD Stereo\n" ) ); } @@ -360,7 +362,7 @@ ivas_error stereo_memory_enc( { if ( hCPE->hCoreCoder[1]->hDtxEnc != NULL ) { - count_free( hCPE->hCoreCoder[1]->hDtxEnc ); + free( hCPE->hCoreCoder[1]->hDtxEnc ); hCPE->hCoreCoder[1]->hDtxEnc = NULL; } @@ -372,7 +374,7 @@ ivas_error stereo_memory_enc( if ( hCPE->hCoreCoder[0]->Opt_DTX_ON && hCPE->hCoreCoder[0]->hTdCngEnc == NULL ) { - if ( ( hCPE->hCoreCoder[0]->hTdCngEnc = (TD_CNG_ENC_HANDLE) count_malloc( sizeof( TD_CNG_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hCoreCoder[0]->hTdCngEnc = (TD_CNG_ENC_HANDLE) malloc( sizeof( TD_CNG_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX/TD CNG\n" ) ); } @@ -386,7 +388,7 @@ ivas_error stereo_memory_enc( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: TCA Stereo memory already allocated\n" ); } - if ( ( hCPE->hStereoTCA = (STEREO_TCA_ENC_HANDLE) count_malloc( sizeof( STEREO_TCA_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoTCA = (STEREO_TCA_ENC_HANDLE) malloc( sizeof( STEREO_TCA_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo TCA\n" ) ); } @@ -413,7 +415,7 @@ ivas_error stereo_memory_enc( /* allocate BWEs for primary channel */ if ( st->hBWE_TD == NULL ) { - if ( ( st->hBWE_TD = (TD_BWE_ENC_HANDLE) count_malloc( sizeof( TD_BWE_ENC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_TD = (TD_BWE_ENC_HANDLE) malloc( sizeof( TD_BWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD BWE\n" ) ); } @@ -429,7 +431,7 @@ ivas_error stereo_memory_enc( InitSWBencBuffer( st->hBWE_TD ); ResetSHBbuffer_Enc( st->hBWE_TD ); - if ( ( st->hBWE_FD = (FD_BWE_ENC_HANDLE) count_malloc( sizeof( FD_BWE_ENC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_FD = (FD_BWE_ENC_HANDLE) malloc( sizeof( FD_BWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FD BWE\n" ) ); } @@ -440,7 +442,7 @@ ivas_error stereo_memory_enc( /* allocate stereo CNG structure */ if ( hCPE->hStereoCng == NULL ) { - if ( ( hCPE->hStereoCng = (STEREO_CNG_ENC_HANDLE) count_malloc( sizeof( STEREO_CNG_ENC ) ) ) == NULL ) + if ( ( hCPE->hStereoCng = (STEREO_CNG_ENC_HANDLE) malloc( sizeof( STEREO_CNG_ENC ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo Cng for Unified/TD\n" ) ); } @@ -466,19 +468,19 @@ ivas_error stereo_memory_enc( if ( hCPE->hStereoTD != NULL ) { - count_free( hCPE->hStereoTD ); + free( hCPE->hStereoTD ); hCPE->hStereoTD = NULL; } if ( hCPE->hStereoTCA != NULL ) { - count_free( hCPE->hStereoTCA ); + free( hCPE->hStereoTCA ); hCPE->hStereoTCA = NULL; } if ( hCPE->hStereoICBWE != NULL ) { - count_free( hCPE->hStereoICBWE ); + free( hCPE->hStereoICBWE ); hCPE->hStereoICBWE = NULL; } @@ -500,7 +502,7 @@ ivas_error stereo_memory_enc( /* allocate TCX/IGF structures for second channel */ st = hCPE->hCoreCoder[1]; - if ( ( st->hTcxEnc = (TCX_ENC_HANDLE) count_malloc( sizeof( TCX_ENC_DATA ) ) ) == NULL ) + if ( ( st->hTcxEnc = (TCX_ENC_HANDLE) malloc( sizeof( TCX_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxEnc\n" ) ); } @@ -515,19 +517,19 @@ ivas_error stereo_memory_enc( st->last_core = ACELP_CORE; /* needed to set-up TCX core in SetTCXModeInfo() */ } - if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) count_malloc( sizeof( TCX_config ) ) ) == NULL ) + if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) malloc( sizeof( TCX_config ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxCfg\n" ) ); } - if ( ( st->hIGFEnc = (IGF_ENC_INSTANCE_HANDLE) count_malloc( sizeof( IGF_ENC_INSTANCE ) ) ) == NULL ) + if ( ( st->hIGFEnc = (IGF_ENC_INSTANCE_HANDLE) malloc( sizeof( IGF_ENC_INSTANCE ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hIGFEnc\n" ) ); } st->igf = getIgfPresent( st->element_mode, st->total_brate, st->bwidth, st->rf_mode, st->mct_chan_mode ); /* allocate and initialize MDCT stereo structure */ - if ( ( hCPE->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) count_malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoMdct = (STEREO_MDCT_ENC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } @@ -562,7 +564,7 @@ ivas_error stereo_memory_enc( if ( st->hDtxEnc == NULL ) { - if ( ( st->hDtxEnc = (DTX_ENC_HANDLE) count_malloc( sizeof( DTX_ENC_DATA ) ) ) == NULL ) + if ( ( st->hDtxEnc = (DTX_ENC_HANDLE) malloc( sizeof( DTX_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DTX variables\n" ) ); } @@ -571,7 +573,7 @@ ivas_error stereo_memory_enc( if ( st->hTdCngEnc != NULL ) { - count_free( st->hTdCngEnc ); + free( st->hTdCngEnc ); st->hTdCngEnc = NULL; } diff --git a/lib_enc/ivas_stereo_td_analysis.c b/lib_enc/ivas_stereo_td_analysis.c index 41de84d71422668fd36ec663d569d256e9fa2087..d2d72c153426b47d40febe4c2079a100de5f2247 100644 --- a/lib_enc/ivas_stereo_td_analysis.c +++ b/lib_enc/ivas_stereo_td_analysis.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/ivas_stereo_td_enc.c b/lib_enc/ivas_stereo_td_enc.c index 1e7fe30bd1d7ba6800a3ac0cf631b37aa725fa26..3857795dceadc5a1f43a07939971f77ac20dcd90 100644 --- a/lib_enc/ivas_stereo_td_enc.c +++ b/lib_enc/ivas_stereo_td_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "prot.h" #include "ivas_prot.h" #include "ivas_rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include "math.h" @@ -190,7 +190,7 @@ ivas_error stereo_set_tdm( { if ( st->hBWE_TD != NULL ) { - count_free( st->hBWE_TD ); + free( st->hBWE_TD ); st->hBWE_TD = NULL; } @@ -198,7 +198,7 @@ ivas_error stereo_set_tdm( if ( st->hBWE_FD != NULL ) { - count_free( st->hBWE_FD ); + free( st->hBWE_FD ); st->hBWE_FD = NULL; } } @@ -206,7 +206,7 @@ ivas_error stereo_set_tdm( /* allocate ICBWE structure */ if ( hCPE->hStereoICBWE == NULL ) { - if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_ENC_HANDLE) count_malloc( sizeof( STEREO_ICBWE_ENC_DATA ) ) ) == NULL ) + if ( ( hCPE->hStereoICBWE = (STEREO_ICBWE_ENC_HANDLE) malloc( sizeof( STEREO_ICBWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Stereo ICBWE \n" ) ); } @@ -222,7 +222,7 @@ ivas_error stereo_set_tdm( /* deallocate ICBWE structure */ if ( hCPE->hStereoICBWE != NULL ) { - count_free( hCPE->hStereoICBWE ); + free( hCPE->hStereoICBWE ); hCPE->hStereoICBWE = NULL; } @@ -238,7 +238,7 @@ ivas_error stereo_set_tdm( /* allocate BWEs for secondary channel */ if ( st->hBWE_TD == NULL ) { - if ( ( st->hBWE_TD = (TD_BWE_ENC_HANDLE) count_malloc( sizeof( TD_BWE_ENC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_TD = (TD_BWE_ENC_HANDLE) malloc( sizeof( TD_BWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD BWE\n" ) ); } @@ -251,7 +251,7 @@ ivas_error stereo_set_tdm( InitSWBencBuffer( st->hBWE_TD ); ResetSHBbuffer_Enc( st->hBWE_TD ); - if ( ( st->hBWE_FD = (FD_BWE_ENC_HANDLE) count_malloc( sizeof( FD_BWE_ENC_DATA ) ) ) == NULL ) + if ( ( st->hBWE_FD = (FD_BWE_ENC_HANDLE) malloc( sizeof( FD_BWE_ENC_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FD BWE\n" ) ); } @@ -302,12 +302,13 @@ ivas_error stereo_set_tdm( *-------------------------------------------------------------------*/ void tdm_configure_enc( - CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ - const int16_t tdm_SM_or_LRTD_Pri, /* i : channel combination scheme flag in TD stereo OR LRTD primary channel */ - const int16_t tdm_ratio_idx, /* i : ratio index */ - const int16_t tdm_ratio_idx_SM, /* i : ratio index in SM mode */ - const int16_t attack_flag, /* i : Primary channel attack flag */ - const int16_t nb_bits_metadata /* i : number of metadata bits */ + CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ + const float Etot_last[CPE_CHANNELS], /* i/o: Energy of last frame */ + const int16_t tdm_SM_or_LRTD_Pri, /* i : channel combination scheme flag in TD stereo OR LRTD primary channel */ + const int16_t tdm_ratio_idx, /* i : ratio index */ + const int16_t tdm_ratio_idx_SM, /* i : ratio index in SM mode */ + const int16_t attack_flag, /* i : Primary channel attack flag */ + const int16_t nb_bits_metadata /* i : number of metadata bits */ ) { int16_t tdm_ratio_bit_alloc_idx, mod_ct; @@ -326,11 +327,11 @@ void tdm_configure_enc( *----------------------------------------------------------------*/ hStereoTD->tdm_use_IAWB_Ave_lpc = 0; /* Flag initialisation */ - sts[0]->hSpMusClas->tdm_lt_Etot = 0.1f * sts[0]->hNoiseEst->Etot_last + 0.9f * sts[0]->hSpMusClas->tdm_lt_Etot; - sts[1]->hSpMusClas->tdm_lt_Etot = 0.1f * sts[1]->hNoiseEst->Etot_last + 0.9f * sts[1]->hSpMusClas->tdm_lt_Etot; + sts[0]->hSpMusClas->tdm_lt_Etot = 0.1f * Etot_last[0] + 0.9f * sts[0]->hSpMusClas->tdm_lt_Etot; + sts[1]->hSpMusClas->tdm_lt_Etot = 0.1f * Etot_last[1] + 0.9f * sts[1]->hSpMusClas->tdm_lt_Etot; if ( hCPE->hStereoClassif->lrtd_mode == 0 && ( ( sts[1]->hSpMusClas->tdm_lt_Etot < 0 && hCPE->hCoreCoder[1]->vad_flag == 0 ) /* very clean signal */ - || ( hCPE->hCoreCoder[1]->vad_flag == 0 || ( sts[1]->hNoiseEst->Etot_last < 30.0f && ( sts[0]->hSpMusClas->tdm_lt_Etot - sts[1]->hSpMusClas->tdm_lt_Etot ) > 26.0f ) ) ) ) + || ( hCPE->hCoreCoder[1]->vad_flag == 0 || ( Etot_last[1] < 30.0f && ( sts[0]->hSpMusClas->tdm_lt_Etot - sts[1]->hSpMusClas->tdm_lt_Etot ) > 26.0f ) ) ) ) { sts[1]->coder_type = INACTIVE; @@ -340,7 +341,7 @@ void tdm_configure_enc( } hStereoTD->tdm_lp_reuse_flag = 1; } - else if ( ( ( hCPE->hCoreCoder[1]->vad_flag == 0 ) || ( hCPE->hCoreCoder[0]->vad_flag == 0 && sts[1]->hNoiseEst->Etot_last < 30.0f && ( sts[0]->hSpMusClas->tdm_lt_Etot - sts[1]->hSpMusClas->tdm_lt_Etot ) > 26.0f ) ) && ( hCPE->hStereoClassif->lrtd_mode == 1 ) /* && NO_DTX */ ) /* boths channels are inactive but not DTX used*/ + else if ( ( ( hCPE->hCoreCoder[1]->vad_flag == 0 ) || ( hCPE->hCoreCoder[0]->vad_flag == 0 && Etot_last[1] < 30.0f && ( sts[0]->hSpMusClas->tdm_lt_Etot - sts[1]->hSpMusClas->tdm_lt_Etot ) > 26.0f ) ) && ( hCPE->hStereoClassif->lrtd_mode == 1 ) /* && NO_DTX */ ) /* boths channels are inactive but not DTX used*/ { sts[1]->coder_type = INACTIVE; if ( tdm_ratio_idx > 1 && tdm_ratio_idx < 29 ) @@ -352,7 +353,7 @@ void tdm_configure_enc( hStereoTD->tdm_lp_reuse_flag = 1; } } - else if ( !( sts[1]->sp_aud_decision0 ) && sts[1]->tc_cnt <= 0 && ( sts[1]->coder_type_raw == UNVOICED || ( hStereoTD->tdm_LRTD_flag == 1 && hStereoTD->tdm_lp_reuse_flag == 0 && ( hCPE->hCoreCoder[1]->vad_flag == 0 || ( sts[1]->hNoiseEst->Etot_last < 30.0f && ( sts[0]->hSpMusClas->tdm_lt_Etot - sts[1]->hSpMusClas->tdm_lt_Etot ) > 26.0f ) ) ) ) ) + else if ( !( sts[1]->sp_aud_decision0 ) && sts[1]->tc_cnt <= 0 && ( sts[1]->coder_type_raw == UNVOICED || ( hStereoTD->tdm_LRTD_flag == 1 && hStereoTD->tdm_lp_reuse_flag == 0 && ( hCPE->hCoreCoder[1]->vad_flag == 0 || ( Etot_last[1] < 30.0f && ( sts[0]->hSpMusClas->tdm_lt_Etot - sts[1]->hSpMusClas->tdm_lt_Etot ) > 26.0f ) ) ) ) ) { sts[1]->coder_type = UNVOICED; if ( hStereoTD->tdm_LRTD_flag == 1 ) diff --git a/lib_enc/ivas_tcx_core_enc.c b/lib_enc/ivas_tcx_core_enc.c index e8cfaf66977de809850fdccde926d7289e5bb01c..b11435e25b35644090fd77828b51c80b2198909f 100644 --- a/lib_enc/ivas_tcx_core_enc.c +++ b/lib_enc/ivas_tcx_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "prot.h" #include "rom_com.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /*-------------------------------------------------------------------* @@ -100,6 +100,10 @@ void stereo_tcx_init_enc( st->hTcxCfg->resq = getResq( st->bits_frame_nominal * FRAMES_PER_SEC ); st->hTcxEnc->tcx_lpc_shaped_ari = getTcxLpcShapedAri( st->bits_frame_nominal * FRAMES_PER_SEC, st->rf_mode, st->element_mode ); st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_mode, st->mct_chan_mode ); + if ( st->element_mode != EVS_MONO ) + { + st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( st->bits_frame_nominal * FRAMES_PER_SEC, st->igf, st->element_mode, st->mct_chan_mode ); + } st->core_brate = st->total_brate; @@ -171,7 +175,7 @@ void stereo_tcx_core_enc( pF = fopen( "./res/stereo_tcx_enc_ind.txt", "w" ); #endif - wmops_sub_start( "stereo_tcx_core_enc" ); + push_wmops( "stereo_tcx_core_enc" ); /*Sanity check*/ assert( st->mdct_sw == MODE1 && "MDCT switching should be in TCX MODE 1\n" ); @@ -547,7 +551,7 @@ void stereo_tcx_core_enc( set_f( pitch_buf, L_SUBFR, NB_SUBFR16k ); } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/ivas_td_low_rate_enc.c b/lib_enc/ivas_td_low_rate_enc.c index 87140143470a208af975ac7e938ba975d261ef55..de75faf2f97f46af7df4ca8a628eebb13923450e 100644 --- a/lib_enc/ivas_td_low_rate_enc.c +++ b/lib_enc/ivas_td_low_rate_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "ivas_cnst.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/lead_indexing.c b/lib_enc/lead_indexing.c index d97ccc69559526f8211641a5cdb55d1e4652ab4d..6208d66eb8228059fdf727c294a69f24d2086d70 100644 --- a/lib_enc/lead_indexing.c +++ b/lib_enc/lead_indexing.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c old mode 100755 new mode 100644 index b4eb85915e3d878b70b8d4bee72dc22209ebce52..8049f5215c329d6e7b7d121196321aeb8d1763cc --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,10 +39,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#ifdef WMOPS -#include "wmops.h" -#endif - +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local struct @@ -114,9 +111,11 @@ ivas_error IVAS_ENC_Open( *-----------------------------------------------------------------*/ #ifdef BITSTREAM_INDICES_MEMORY - if ( ( *phIvasEnc = (IVAS_ENC_HANDLE) dynamic_malloc( sizeof( struct IVAS_ENC ) ) ) == NULL ) +#define WMC_TOOL_SKIP + if ( ( *phIvasEnc = (IVAS_ENC_HANDLE) malloc( sizeof( struct IVAS_ENC ) ) ) == NULL ) +#undef WMC_TOOL_SKIP #else - if ( ( *phIvasEnc = (IVAS_ENC_HANDLE) count_malloc( sizeof( struct IVAS_ENC ) ) ) == NULL ) + if ( ( *phIvasEnc = (IVAS_ENC_HANDLE) malloc( sizeof( struct IVAS_ENC ) ) ) == NULL ) #endif { return IVAS_ERR_FAILED_ALLOC; @@ -157,12 +156,12 @@ ivas_error IVAS_ENC_Open( * Allocate IVAS-codec encoder state *-----------------------------------------------------------------*/ - if ( ( ( *phIvasEnc )->st_ivas = (Encoder_Struct *) count_malloc( sizeof( Encoder_Struct ) ) ) == NULL ) + if ( ( ( *phIvasEnc )->st_ivas = (Encoder_Struct *) malloc( sizeof( Encoder_Struct ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS encoder structure" ); } - if ( ( ( *phIvasEnc )->st_ivas->hEncoderConfig = (ENCODER_CONFIG_HANDLE) count_malloc( sizeof( ENCODER_CONFIG ) ) ) == NULL ) + if ( ( ( *phIvasEnc )->st_ivas->hEncoderConfig = (ENCODER_CONFIG_HANDLE) malloc( sizeof( ENCODER_CONFIG ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for Encoder config structure" ); } @@ -213,18 +212,20 @@ void IVAS_ENC_Close( { if ( ( *phIvasEnc )->st_ivas->hEncoderConfig ) { - count_free( ( *phIvasEnc )->st_ivas->hEncoderConfig ); + free( ( *phIvasEnc )->st_ivas->hEncoderConfig ); ( *phIvasEnc )->st_ivas->hEncoderConfig = NULL; } - count_free( ( *phIvasEnc )->st_ivas ); + free( ( *phIvasEnc )->st_ivas ); } ( *phIvasEnc )->st_ivas = NULL; #ifdef BITSTREAM_INDICES_MEMORY - dynamic_free( *phIvasEnc ); +#define WMC_TOOL_SKIP + free( *phIvasEnc ); +#undef WMC_TOOL_SKIP #else - count_free( *phIvasEnc ); + free( *phIvasEnc ); #endif *phIvasEnc = NULL; @@ -951,7 +952,7 @@ ivas_error IVAS_ENC_GetDelay( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - *delay = NS2SA( hEncoderConfig->input_Fs, get_delay( ENC, hEncoderConfig->input_Fs, hEncoderConfig->ivas_format, NULL, RENDERER_DISABLE, 0 ) ); + *delay = NS2SA( hEncoderConfig->input_Fs, get_delay( ENC, hEncoderConfig->input_Fs, hEncoderConfig->ivas_format, NULL, 0 ) ); *delay *= hEncoderConfig->nchan_inp; diff --git a/lib_enc/lib_enc.h b/lib_enc/lib_enc.h index dbcb21c9897449b671635fff3ccf2cf8ab6846fd..be4d67359665a975f0a86d7de51e6417e9348802 100644 --- a/lib_enc/lib_enc.h +++ b/lib_enc/lib_enc.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_enc/long_enr.c b/lib_enc/long_enr.c index 3dc098af6193abf26bed2f8374d0417432204bc5..c520c642c786962bda2c1e7a83e395c526514b3a 100644 --- a/lib_enc/long_enr.c +++ b/lib_enc/long_enr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * long_enr() @@ -67,6 +67,7 @@ void long_enr( * Compute long term estimate of total noise energy * and total active speech energy *-----------------------------------------------------------------*/ + if ( hFrontVad != NULL ) { if ( hFrontVad[0]->ini_frame < 4 ) @@ -114,6 +115,12 @@ void long_enr( } } } + + /* Update */ + for ( n = 0; n < n_chan; n++ ) + { + hFrontVad[n]->hNoiseEst->Etot_last = Etot_LR[n]; + } } else { @@ -150,6 +157,9 @@ void long_enr( } } } + + /* Update */ + st->hNoiseEst->Etot_last = Etot; } return; diff --git a/lib_enc/lp_exc_e.c b/lib_enc/lp_exc_e.c index e8078c5e0e2d5eb921690a045cefa93bc70bdac8..4fb81a9b75bdade7e74cb2007975462ec4cc3846 100644 --- a/lib_enc/lp_exc_e.c +++ b/lib_enc/lp_exc_e.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/lsf_enc.c b/lib_enc/lsf_enc.c index 8e561c76e87315de90530dda3d536415de1ddf78..052bfbe96e5756518e94fe0c634fa9fb3fb9aa2e 100644 --- a/lib_enc/lsf_enc.c +++ b/lib_enc/lsf_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -49,7 +49,7 @@ #include "ivas_prot.h" #include "ivas_rom_com.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants diff --git a/lib_enc/lsf_msvq_ma_enc.c b/lib_enc/lsf_msvq_ma_enc.c index bf115aa6719b35f8a114d13e2ee3721995cc2efa..a620dfac384f499c5d779d0048fc1ac5d0b89ece 100644 --- a/lib_enc/lsf_msvq_ma_enc.c +++ b/lib_enc/lsf_msvq_ma_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_com.h" #include "rom_enc.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" #define kMaxC 8 @@ -120,14 +120,14 @@ void msvq_enc( cb_stage = cbp; /* Set up pointers to parent and current nodes */ -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP swap( indices[0], indices[1], int16_t * ); MOVE( 3 ); swap( resid[0], resid[1], float * ); MOVE( 3 ); swap( dist[0], dist[1], float * ); MOVE( 3 ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /* p_max points to maximum distortion node (worst of best) */ p_max = 0; diff --git a/lib_enc/ltd_stable.c b/lib_enc/ltd_stable.c index 5650f93e67bb0dc32ce7b0c2fdee50a2f6992f44..a6222a411f11a1e43573879233718d283f85a885 100644 --- a/lib_enc/ltd_stable.c +++ b/lib_enc/ltd_stable.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * ltd_stable() diff --git a/lib_enc/mdct_classifier.c b/lib_enc/mdct_classifier.c index ae7e6f7e3f31513688134da43ddf34cc21a12a44..f26b1277336fbf9352d52af1d7d5a224129de3b6 100644 --- a/lib_enc/mdct_classifier.c +++ b/lib_enc/mdct_classifier.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include diff --git a/lib_enc/mdct_selector.c b/lib_enc/mdct_selector.c index 1f118d23d2d03bd73ca3ef02b10970c07fd2b79c..45f3d3174c982e4f3f1434221e419f4a863a70e9 100644 --- a/lib_enc/mdct_selector.c +++ b/lib_enc/mdct_selector.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants diff --git a/lib_enc/mslvq_enc.c b/lib_enc/mslvq_enc.c index 3c910cbf0663194fc83df13ecd829504de6a4726..e4e98ea1e63e79e1b27af55cc2f97aedffb34973 100644 --- a/lib_enc/mslvq_enc.c +++ b/lib_enc/mslvq_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "prot.h" #include "rom_com.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /*-----------------------------------------------------------------* diff --git a/lib_enc/multi_harm.c b/lib_enc/multi_harm.c index 4427b3376c4cec7121e5ff4d31fc2df5a74db434..c53371e28dc58a5520acd01b3d517c021bc15c74 100644 --- a/lib_enc/multi_harm.c +++ b/lib_enc/multi_harm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants diff --git a/lib_enc/nelp_enc.c b/lib_enc/nelp_enc.c index 8f8f407749e6b7cc59aeb0e5255e9a146cb37ede..a1ae3c20d733696eb296c5e78c63a3329faadcb2 100644 --- a/lib_enc/nelp_enc.c +++ b/lib_enc/nelp_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * quantize_uvg() diff --git a/lib_enc/nois_est.c b/lib_enc/nois_est.c index b8d551a738cea3cb7eb59d1949dfcfe5bb3fd2e2..50dab410281d7ae6e98b803c6a792242b37f9981 100644 --- a/lib_enc/nois_est.c +++ b/lib_enc/nois_est.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constants @@ -232,7 +232,7 @@ void noise_est_pre( /*-----------------------------------------------------------------* * noise_est_down() * - * Down-ward noise udatation routine + * Down-ward noise updatation routine * Total Noise computation, relative frame Energy computation * Noise energy update - here, the energy is updated only if it is * decreasing to improve noise suppression. Otherwise, the noise @@ -298,6 +298,7 @@ void noise_est_down( *------------------------------------------------------------------*/ Etot_v = (float) fabs( *Etot_last - Etot ); + *Etot_v_h2 = ( 1.0f - 0.02f ) * *Etot_v_h2 + 0.02f * min( 3.0f, Etot_v ); if ( *Etot_v_h2 < 0.1f ) { diff --git a/lib_enc/noise_adjust.c b/lib_enc/noise_adjust.c index 5d592d071bf05340a0ed48f75f711f3852e68398..0ba9bd45370e6c1ad28770dddbde4f4aff15c429 100644 --- a/lib_enc/noise_adjust.c +++ b/lib_enc/noise_adjust.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * noise_adjust() diff --git a/lib_enc/normalizecoefs.c b/lib_enc/normalizecoefs.c index 7e039f171e43e2deb13761f78c5707337c69bf74..bd24f2cd2bd2c2ab654ba60dc72cbe3410edc26c 100644 --- a/lib_enc/normalizecoefs.c +++ b/lib_enc/normalizecoefs.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------- * normalizecoefs() diff --git a/lib_enc/peak_vq_enc.c b/lib_enc/peak_vq_enc.c index a77f071112164ee5d99ba68c1b21d53a2c50444b..efdd0b14a90e251da397e8235bfd037c7b2b97ee 100644 --- a/lib_enc/peak_vq_enc.c +++ b/lib_enc/peak_vq_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #include /*-------------------------------------------------------------------------- diff --git a/lib_enc/pit_enc.c b/lib_enc/pit_enc.c index 454da71966fa8c11cfd8eea3443de688d75d872c..d8d51e2a1b7a977b89fc5cc2ea6e488482e8db62 100644 --- a/lib_enc/pit_enc.c +++ b/lib_enc/pit_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "rom_enc.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * pit_encode() diff --git a/lib_enc/pitch_ol.c b/lib_enc/pitch_ol.c index 72d454fd3037e9697d4e3680b905112bcd524dc8..8f149a35d8893c6f12924f2ce058f54278a506d2 100644 --- a/lib_enc/pitch_ol.c +++ b/lib_enc/pitch_ol.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "cnst.h" #include "rom_com.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_enc/pitch_ol2.c b/lib_enc/pitch_ol2.c index 13f5bd33de6cb6adcc3ca404baf382d57ea5f10b..bc414158e1605fc92c5d3a9a6b21652a7b360b96 100644 --- a/lib_enc/pitch_ol2.c +++ b/lib_enc/pitch_ol2.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_enc.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local constants diff --git a/lib_enc/plc_enc_ext.c b/lib_enc/plc_enc_ext.c index 70b573c5a9aa9cac9d02d1296d27ab3829c1b25a..305e4074bc656edb33be4811b9062f204db9921a 100644 --- a/lib_enc/plc_enc_ext.c +++ b/lib_enc/plc_enc_ext.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "stat_enc.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #define NBITS_GACELP 5 diff --git a/lib_enc/ppp_enc.c b/lib_enc/ppp_enc.c index f2c6f4e2bd183a7ac9f43fcf72e5361e4877997f..d55cb135dd440de26da83b9d845347779fbf9915 100644 --- a/lib_enc/ppp_enc.c +++ b/lib_enc/ppp_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -355,7 +355,7 @@ ivas_error ppp_quarter_encoder( push_indice( hBstr, IND_GLOBAL_ALIGNMENT, (int16_t) ( tmp + 3 ), 3 ); - dynamic_free( PREVDTFS ); + free( PREVDTFS ); return error; } diff --git a/lib_enc/pre_proc.c b/lib_enc/pre_proc.c index 7fb89690f1be709c7b62c9f606994bf9076e5ea3..300cb79787d08451ccd6734198d38938badce4ed 100644 --- a/lib_enc/pre_proc.c +++ b/lib_enc/pre_proc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "rom_enc.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -59,7 +59,6 @@ void pre_proc( float old_inp_16k[], /* i/o: buffer of old input signal @ 16kHz */ float **inp, /* o : ptr. to inp. signal in the current frame*/ float fr_bands[2 * NB_BANDS], /* i : energy in frequency bands */ - float *Etot, /* i : total energy */ float *ener, /* o : residual energy from Levinson-Durbin */ #ifndef FIX_I4_OL_PITCH int16_t pitch_orig[3], /* o : open-loop pitch values for quantization */ @@ -84,6 +83,7 @@ void pre_proc( float old_wsp[L_WSP], *wsp; /* weighted input signal buffer */ float pitch_fr[NB_SUBFR]; /* fractional pitch values */ float voicing_fr[NB_SUBFR]; /* fractional pitch gains */ + float Etot; /* total energy */ float lf_E[2 * VOIC_BINS]; /* per bin spectrum energy in lf */ float tmpN[NB_BANDS]; /* Temporary noise update */ float tmpE[NB_BANDS]; /* Temporary averaged energy of 2 sf. */ @@ -118,7 +118,7 @@ void pre_proc( int16_t clas_mod; int16_t old_pitch1; - wmops_sub_start( "pre_proc" ); + push_wmops( "pre_proc" ); /*------------------------------------------------------------------* * Initialization @@ -190,14 +190,16 @@ void pre_proc( * Spectral analysis *--------------------------------------------------------------------------*/ - analy_sp( -1, NULL, st->input_Fs, inp_12k8, st->Bin_E, st->Bin_E_old, fr_bands, lf_E, Etot, st->min_band, st->max_band, band_energies, PS, fft_buff ); + analy_sp( -1, NULL, st->input_Fs, inp_12k8, st->Bin_E, st->Bin_E_old, fr_bands, lf_E, &Etot, st->min_band, st->max_band, band_energies, PS, fft_buff ); /*----------------------------------------------------------------* * SAD (1-signal, 0-noise) *----------------------------------------------------------------*/ - noise_est_pre( *Etot, st->ini_frame, st->hNoiseEst, 0, EVS_MONO, EVS_MONO ); + noise_est_pre( Etot, st->ini_frame, st->hNoiseEst, 0, EVS_MONO, EVS_MONO ); + st->vad_flag = wb_vad( st, fr_bands, &noisy_speech_HO, &clean_speech_HO, &NB_speech_HO, &snr_sum_he, &localVAD_HE_SAD, &( st->flag_noisy_speech_snr ), NULL, NULL, -1000.0f, -1000.0f ); + vad_flag_cldfb = vad_proc( realBuffer, imagBuffer, enerBuffer, st->cldfbAnaEnc->no_channels, st->hVAD_CLDFB, &cldfb_addition, st->vad_flag ); if ( st->Pos_relE_cnt < 20 ) /* Ensure the level is high enough and cldfb decision is reliable */ @@ -211,12 +213,7 @@ void pre_proc( st->vad_flag = vad_flag_cldfb; } - vad_flag_dtx = dtx_hangover_addition( st, st->vad_flag, st->lp_speech - st->lp_noise, cldfb_addition, vad_hover_flag, NULL, NULL -#ifdef FIX_ITD_CNG - , - NULL -#endif - ); + vad_flag_dtx = dtx_hangover_addition( st, st->vad_flag, st->lp_speech - st->lp_noise, cldfb_addition, vad_hover_flag, NULL, NULL, NULL ); /*----------------------------------------------------------------* * NB/WB/SWB/FB bandwidth detector @@ -230,9 +227,9 @@ void pre_proc( * Correlation correction as a function of total noise level *----------------------------------------------------------------*/ - noise_est_down( fr_bands, st->hNoiseEst->bckr, tmpN, tmpE, st->min_band, st->max_band, &st->hNoiseEst->totalNoise, *Etot, &st->hNoiseEst->Etot_last, &st->hNoiseEst->Etot_v_h2 ); + noise_est_down( fr_bands, st->hNoiseEst->bckr, tmpN, tmpE, st->min_band, st->max_band, &st->hNoiseEst->totalNoise, Etot, &st->hNoiseEst->Etot_last, &st->hNoiseEst->Etot_v_h2 ); - relE = *Etot - st->lp_speech; + relE = Etot - st->lp_speech; if ( relE > 1.5f ) { @@ -255,7 +252,6 @@ void pre_proc( /*-----------------------------------------------------------------* * Select SID or FRAME_NO_DATA frame if DTX enabled *-----------------------------------------------------------------*/ - dtx( st, -1, vad_flag_dtx, inp_12k8 ); /*----------------------------------------------------------------* @@ -358,7 +354,7 @@ void pre_proc( * Update estimated noise energy and voicing cut-off frequency *-----------------------------------------------------------------*/ - noise_est( st, old_pitch1, tmpN, epsP, *Etot, relE, corr_shift, tmpE, fr_bands, &cor_map_sum, NULL, &sp_div, &non_staX, &loc_harm, lf_E, &st->hNoiseEst->harm_cor_cnt, st->hNoiseEst->Etot_l_lp, &sp_floor, 0, NULL, NULL, st->ini_frame ); + noise_est( st, old_pitch1, tmpN, epsP, Etot, relE, corr_shift, tmpE, fr_bands, &cor_map_sum, NULL, &sp_div, &non_staX, &loc_harm, lf_E, &st->hNoiseEst->harm_cor_cnt, st->hNoiseEst->Etot_l_lp, &sp_floor, 0, NULL, NULL, st->ini_frame ); /*------------------------------------------------------------------* * Update parameters used in the VAD and DTX @@ -373,7 +369,7 @@ void pre_proc( find_tilt( fr_bands, st->hNoiseEst->bckr, ee, st->pitch, st->voicing, lf_E, corr_shift, st->input_bwidth, st->max_band, hp_E, st->codec_mode, &( st->bckr_tilt_lt ), st->Opt_SC_VBR ); - st->coder_type = find_uv( st, pitch_fr, voicing_fr, inp_12k8, ee, NULL, corr_shift, relE, *Etot, hp_E, &flag_spitch, last_core_orig, NULL ); + st->coder_type = find_uv( st, pitch_fr, voicing_fr, inp_12k8, ee, NULL, corr_shift, relE, Etot, hp_E, &flag_spitch, last_core_orig, NULL ); /*-----------------------------------------------------------------* * channel aware mode configuration * @@ -427,8 +423,9 @@ void pre_proc( st->GSC_IVAS_mode = 0; - speech_music_classif( st, new_inp_12k8, inp_12k8, localVAD_HE_SAD, lsp_new, cor_map_sum, epsP, PS, *Etot, old_cor, attack_flag, non_staX, relE, &high_lpn_flag, flag_spitch ); - long_enr( st, *Etot, localVAD_HE_SAD, high_lpn_flag, NULL, 1, NULL, NULL ); + speech_music_classif( st, new_inp_12k8, inp_12k8, localVAD_HE_SAD, lsp_new, cor_map_sum, epsP, PS, Etot, old_cor, attack_flag, non_staX, relE, &high_lpn_flag, flag_spitch ); + + long_enr( st, Etot, localVAD_HE_SAD, high_lpn_flag, NULL, 1, NULL, NULL ); /*----------------------------------------------------------------* * Final VAD correction ( when HE-SAD is used instead of the normal VAD, @@ -580,7 +577,7 @@ void pre_proc( } if ( st->total_brate == ACELP_13k20 && st->bwidth != FB ) { - MDCT_selector( st, sp_floor, *Etot, cor_map_sum, enerBuffer ); + MDCT_selector( st, sp_floor, Etot, cor_map_sum, enerBuffer ); } } else @@ -876,7 +873,7 @@ void pre_proc( if ( st->total_brate == ACELP_16k40 && st->bwidth != FB ) { - MDCT_selector( st, sp_floor, *Etot, cor_map_sum, enerBuffer ); + MDCT_selector( st, sp_floor, Etot, cor_map_sum, enerBuffer ); } } else @@ -964,6 +961,6 @@ void pre_proc( } } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_enc/pvq_core_enc.c b/lib_enc/pvq_core_enc.c index 3603b950e9bc32f8ec9209dab730cf035367c0e9..5876c8b44a129572c1f36a16c3b2c9dc0452e824 100644 --- a/lib_enc/pvq_core_enc.c +++ b/lib_enc/pvq_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "prot.h" #include "stl.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/pvq_encode.c b/lib_enc/pvq_encode.c index acf7928a6faf4b6c1f6ce890dd8a878b8fb38116..eb066e8ed20fcad4dbfff05f4a7ea8da4e3b11ad 100644 --- a/lib_enc/pvq_encode.c +++ b/lib_enc/pvq_encode.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" static void pyramidSearch( const float *const s, const int16_t L, const int16_t Ptot, const float A, int16_t *ztak, float *stak ); diff --git a/lib_enc/q_gain2p.c b/lib_enc/q_gain2p.c index 8a3bc04b9a86cc7efd717b713bd6b8d6ac339bc6..9c89b44c8753110da3c354b7b0bc6a2cf43c5cb8 100644 --- a/lib_enc/q_gain2p.c +++ b/lib_enc/q_gain2p.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/qlpc_avq.c b/lib_enc/qlpc_avq.c index 03aeab128e90a8441cbedd83741aa1e5a76350f5..eabbd8128fe80fc718d334d7f0f66b3c0177ca86 100644 --- a/lib_enc/qlpc_avq.c +++ b/lib_enc/qlpc_avq.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * qlpc_avq() diff --git a/lib_enc/qlpc_stoch.c b/lib_enc/qlpc_stoch.c index 403132b6e820b573dc0905a649452b7a4ce1e509..8defb07034305ca3298c61478317cd05da8952fa 100644 --- a/lib_enc/qlpc_stoch.c +++ b/lib_enc/qlpc_stoch.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "rom_com.h" #include "rom_enc.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * lpc_quantization() diff --git a/lib_enc/range_enc.c b/lib_enc/range_enc.c index d44ed895a4f7d0a1b04a0d9ae7324a5584f3d399..8ea8c888d22c5d64de577c2346db9c9ba4fd3030 100644 --- a/lib_enc/range_enc.c +++ b/lib_enc/range_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/re8_cod.c b/lib_enc/re8_cod.c index 30030cc394b23a994b8e077bf8e5fa821ccc7465..5facffd8f448caeb2534eecc3aa7913ba5fdc7ec 100644 --- a/lib_enc/re8_cod.c +++ b/lib_enc/re8_cod.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------ diff --git a/lib_enc/reordernorm.c b/lib_enc/reordernorm.c index 2387263aab5abdab44b792ceda6ce65215b78415..831adeee53b0f55aa6b0fb940ff66cf31e73d847 100644 --- a/lib_enc/reordernorm.c +++ b/lib_enc/reordernorm.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------*/ /* Function reordernorm */ diff --git a/lib_enc/rom_enc.c b/lib_enc/rom_enc.c index cc9755ce9243d13f63d47f6f2bfb557a55d4cffe..ae96fdfc31744efad74681b5e509fddc89182a65 100644 --- a/lib_enc/rom_enc.c +++ b/lib_enc/rom_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /* clang-format off */ diff --git a/lib_enc/rom_enc.h b/lib_enc/rom_enc.h index e3e62cb6e90e8021da1118b9f49061709b7b6c4e..7e7659ceb6a46baa1066bf5af7af2096ae5f367a 100644 --- a/lib_enc/rom_enc.h +++ b/lib_enc/rom_enc.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_enc/rst_enc.c b/lib_enc/rst_enc.c index ac8853c7211666ae99d0daf14736eec1137740cd..e069d6d94ee42b919c2bff1fc92068db5d63db34 100644 --- a/lib_enc/rst_enc.c +++ b/lib_enc/rst_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * CNG_reset_enc() diff --git a/lib_enc/set_impulse.c b/lib_enc/set_impulse.c index 493d373d1ecb897b7144fb2d5249569fc340fd19..4cafeea9e8a253a5b53ee88df65a4e91b0e5796d 100644 --- a/lib_enc/set_impulse.c +++ b/lib_enc/set_impulse.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local constant diff --git a/lib_enc/setmodeindex.c b/lib_enc/setmodeindex.c index 67d2d9d7103d61aa7b074d5c843d3d9a80f6d097..b2187b89908a93a706682a39516e06b35a8c7cd9 100644 --- a/lib_enc/setmodeindex.c +++ b/lib_enc/setmodeindex.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "prot.h" #include "cnst.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------- diff --git a/lib_enc/sig_clas.c b/lib_enc/sig_clas.c index c1438b6b7686d6fd0dfd1801ab861446ef5c9ee6..18ee55df61e0d504d8bd2503ebfc4d4fcef08fbc 100644 --- a/lib_enc/sig_clas.c +++ b/lib_enc/sig_clas.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants diff --git a/lib_enc/spec_center.c b/lib_enc/spec_center.c index f565cba7a8eb23f8c2a86fff1fb84a47a202a993..73835a15117876c83542e86b9c1327ed57edfdf3 100644 --- a/lib_enc/spec_center.c +++ b/lib_enc/spec_center.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "prot.h" #include "rom_enc.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * spec_center() diff --git a/lib_enc/spec_flatness.c b/lib_enc/spec_flatness.c index 2ef6bd3b606bf1f6487ded483384eaea312706e1..0473cc6b983950b3b8f880c205fda63f1bfa36f0 100644 --- a/lib_enc/spec_flatness.c +++ b/lib_enc/spec_flatness.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "options.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * spec_flatness() diff --git a/lib_enc/speech_music_classif.c b/lib_enc/speech_music_classif.c index a61e42c1646254ddef87ee57d26ed054bc06cafc..cf8568e649db982127b0cd978a935d7f28b97b2f 100644 --- a/lib_enc/speech_music_classif.c +++ b/lib_enc/speech_music_classif.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "ivas_prot.h" #include "rom_enc.h" #include "rom_com.h" /* Common static table prototypes */ -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* diff --git a/lib_enc/stat_enc.h b/lib_enc/stat_enc.h index de0451d3bc63d17a62bf119c6059203aed678ab0..ec7fb594d1a9d6c326de1f3964f895fd1c7ba01b 100644 --- a/lib_enc/stat_enc.h +++ b/lib_enc/stat_enc.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -123,6 +123,8 @@ typedef struct float firState1; float firState2; + int16_t ramp_up_flag; /* bit map flags to indicate a ramp up in beginning of TCX frame */ + } SubblockEnergies; @@ -138,8 +140,8 @@ typedef struct TransientDetector TCheckSubblocksForAttack CheckSubblocksForAttack; /* Function for checking a presence of an attack. */ float attackRatioThreshold; /* Attack ratio threshold. */ int16_t bIsAttackPresent; /* True when an attack was detected. */ + int16_t prev_bIsAttackPresent; /* True if an attack was detected in the previous frame. */ int16_t attackIndex; /* The index of an attack. */ - } TransientDetector; /* Transient detection: Holds all transient detectors and buffers used by them. */ diff --git a/lib_enc/stat_noise_uv_enc.c b/lib_enc/stat_noise_uv_enc.c index 3cb876097b9b35fe2c531fba1c6282f97749e98d..a1adfb052a7c3e3f3ba070f27343d8b0e62ffe14 100644 --- a/lib_enc/stat_noise_uv_enc.c +++ b/lib_enc/stat_noise_uv_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #endif #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * stat_noise_uv_enc() diff --git a/lib_enc/subband_fft.c b/lib_enc/subband_fft.c index 9f02fa04aeec09ad1e2ab133dca047ab2b76b764..638a6d63f830bc1e24cf4575d3e9e201c9296d50 100644 --- a/lib_enc/subband_fft.c +++ b/lib_enc/subband_fft.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include #include "prot.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/swb_bwe_enc.c b/lib_enc/swb_bwe_enc.c index 54e786d7616073b63b86b98b092e6586df8b6b8b..e2c8812eca9d6b2af15435b40b5dc5a16162eed5 100644 --- a/lib_enc/swb_bwe_enc.c +++ b/lib_enc/swb_bwe_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,7 +46,7 @@ #include "rom_enc.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local function prototypes @@ -1795,6 +1795,11 @@ void hq_generic_hf_encoding( { Word16 tmp, frac, exp; Word32 L_tmp; +#ifdef BASOP_NOGLOB + Flag Overflow; + + Overflow = 0; +#endif tmp = add( (int16_t) ( hq_generic_fenv[n_band] * 256 ), (int16_t) ( Mean_env[n_band] * 256 ) ); /*Q8 */ L_tmp = L_mult( tmp, 21771 ); /* 0.166096 in Q17 -> Q26 */ @@ -1805,7 +1810,11 @@ void hq_generic_hf_encoding( /* output of Pow2() will be: */ /* 16384 < Pow2() <= 32767 */ exp = sub( exp, 13 ); - tmp = shl( tmp, add( exp, 1 ) ); /*Q1 */ +#ifdef BASOP_NOGLOB + tmp = shl_o( tmp, add( exp, 1 ), &Overflow ); /*Q1 */ +#else + tmp = shl( tmp, add( exp, 1 ) ); /*Q1 */ +#endif hq_generic_fenv[n_band] = (float) tmp * 0.5f; /*Q1 */ } diff --git a/lib_enc/swb_bwe_enc_hr.c b/lib_enc/swb_bwe_enc_hr.c index 63e5753650fdb51b1bf2bf3a7c7f1db2b250d6d6..7b2f3687a0dc69eda51d3528ad6598920ac293b2 100644 --- a/lib_enc/swb_bwe_enc_hr.c +++ b/lib_enc/swb_bwe_enc_hr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * en_band_quant() diff --git a/lib_enc/swb_bwe_enc_lr.c b/lib_enc/swb_bwe_enc_lr.c index 7273972d7c463f186bad04d6e2b0dffb0d2ae7fb..afa9e75ac792c6d74bc4b5e1b1ef7dcbdc0a91d6 100644 --- a/lib_enc/swb_bwe_enc_lr.c +++ b/lib_enc/swb_bwe_enc_lr.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "stat_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*--------------------------------------------------------------------------* * GetSubbandCorrIndex2_har() diff --git a/lib_enc/swb_pre_proc.c b/lib_enc/swb_pre_proc.c index 4d6eaf7836788e2484075243fa30722c18fe72f0..3ec175958aa4e12f12a2c33c95522e050f00f9cd 100644 --- a/lib_enc/swb_pre_proc.c +++ b/lib_enc/swb_pre_proc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" #include "ivas_rom_enc.h" @@ -677,16 +677,7 @@ void swb_pre_proc( { if ( ( st->bwidth == FB || st->core == ACELP_CORE ) && ( st->element_mode == EVS_MONO ) ) { - set_f( hBWE_TD->old_speech_shb, 0, L_LOOK_16k + L_SUBFR16k ); - set_f( shb_speech, 0, L_FRAME16k ); /* shb_speech for FB/SWB BWE_HIGHRATE is not used at 64kbps */ - set_f( st->hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); - set_f( st->hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); - st->hBWE_TD->old_mean_EnvSHBres = 0.0f; - st->hBWE_TD->prev_enr_EnvSHBres = 1.0f; - st->hBWE_TD->prev_shb_env_tilt = 0.0f; - st->hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; - st->hBWE_TD->prev_mix_factor = 1.0f; - st->hBWE_TD->prev_Env_error = 0.0f; + InitSWBencBufferStates( st->hBWE_TD, shb_speech ); } else { diff --git a/lib_enc/swb_tbe_enc.c b/lib_enc/swb_tbe_enc.c index 036611efb314f51a2361109701b45942b669c53b..bdd2483251c6e1b85d64a7abe9704feefa614977 100644 --- a/lib_enc/swb_tbe_enc.c +++ b/lib_enc/swb_tbe_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /*-----------------------------------------------------------------* @@ -76,9 +76,9 @@ static void gainFrSmooth_En( TD_BWE_ENC_HANDLE hBWE_TD, const int16_t last_extl, static void Quant_BWE_LSF( BSTR_ENC_HANDLE hBstr, TD_BWE_ENC_HANDLE hBWE_TD, const int16_t codec_mode, const float lsp_shb[], float Q_lsfs[], const int32_t extl_brate ); static void Quant_shb_ener_sf( Encoder_State *st, float *shb_ener_sf ); static void Quant_shb_res_gshape( Encoder_State *st, float *shb_res_gshape ); - static void LVQQuant_BWE_LSF( BSTR_ENC_HANDLE hBstr, const float lsf_shb[], float Q_lsfs[], int16_t nbits ); + /*-------------------------------------------------------------------* * InitSWBencBuffer() * @@ -108,14 +108,8 @@ void InitSWBencBuffer( set_f( hBWE_TD->old_speech_shb, 0.0f, L_LOOK_16k + L_SUBFR16k ); set_f( hBWE_TD->old_speech_wb, 0.0f, ( L_LOOK_12k8 + L_SUBFR ) * 5 / 16 ); set_f( hBWE_TD->old_input_fhb, 0.0f, NS2SA( 48000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS ) - L_FRAME48k / 2 ); - set_f( hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); - set_f( hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); - hBWE_TD->old_mean_EnvSHBres = 0.0f; - hBWE_TD->prev_enr_EnvSHBres = 1.0f; - hBWE_TD->prev_shb_env_tilt = 0.0f; - hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; - hBWE_TD->prev_mix_factor = 1.0f; - hBWE_TD->prev_Env_error = 0.0f; + + InitSWBencBufferStates( hBWE_TD, NULL ); for ( i = 0; i < LPC_SHB_ORDER; i++ ) { @@ -156,6 +150,36 @@ void InitSWBencBuffer( } +/*-------------------------------------------------------------------* + * InitSWBencBufferStates() + * + * Initialize SWB buffer states + *-------------------------------------------------------------------*/ + +void InitSWBencBufferStates( + TD_BWE_ENC_HANDLE hBWE_TD, /* i/o: TD BWE data handle */ + float *shb_speech /* o : SHB target signal (6-14kHz) at 16kHz */ +) +{ + if ( shb_speech != NULL ) + { + set_f( shb_speech, 0.0f, L_FRAME16k ); + } + + set_f( hBWE_TD->old_speech_shb, 0.0f, L_LOOK_16k + L_SUBFR16k ); + set_f( hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); + set_f( hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); + hBWE_TD->old_mean_EnvSHBres = 0.0f; + hBWE_TD->prev_enr_EnvSHBres = 1.0f; + hBWE_TD->prev_shb_env_tilt = 0.0f; + hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; + hBWE_TD->prev_mix_factor = 1.0f; + hBWE_TD->prev_Env_error = 0.0f; + + return; +} + + /*-------------------------------------------------------------------* * ResetSHBbuffer_Enc() * diff --git a/lib_enc/tcq_core_enc.c b/lib_enc/tcq_core_enc.c index 11d96e2015eb17302e8bc96449af051a7d36a38f..aad3e54e7366f33374b6da098ca9d94e8ee81370 100644 --- a/lib_enc/tcq_core_enc.c +++ b/lib_enc/tcq_core_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "cnst.h" #include "basop_util.h" #include "basop_proto_func.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * tcq_core_LR_enc() @@ -181,7 +181,7 @@ ivas_error tcq_core_LR_enc( } } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP bsub_fx = L_shl( L_add( tcq_arbits, lsbtcq_bits ), 16 ); IF( bsub_fx > 0 ) { @@ -206,7 +206,7 @@ ivas_error tcq_core_LR_enc( } srt_vec_ind_fx( Rk_fx, Rk_sort_fx, k_sort, BANDS ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP /* Quantize spectral band shapes using TCQ */ /* Select ISC */ @@ -282,7 +282,7 @@ ivas_error tcq_core_LR_enc( if ( Rk_fx[k_sort[k]] > 0 && surplus_fx < 0 ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP IF( nzbands <= 1 ) { divider = 0; @@ -302,7 +302,7 @@ ivas_error tcq_core_LR_enc( delta_fx = 0; } surplus_fx = L_sub( surplus_fx, delta_fx ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP } else { @@ -311,13 +311,13 @@ ivas_error tcq_core_LR_enc( } } -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP if ( ( L_sub( surplus_fx, 524288 ) > 0 && sub( input_frame, L_FRAME8k ) == 0 ) || ( L_sub( surplus_fx, 786432 ) > 0 && sub( input_frame, L_FRAME16k ) == 0 ) ) { bit_surplus_fx[0] = Mult_32_16( surplus_fx, 24576 ); /* Q16 */ bit_surplus_fx[1] = Mult_32_16( surplus_fx, 8192 ); /* Q16 */ } -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP else { bit_surplus_fx[0] = surplus_fx; @@ -329,9 +329,9 @@ ivas_error tcq_core_LR_enc( { if ( k == k_num[j] ) { -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP Rk_fx[k_sort[k]] = L_add( Rk_fx[k_sort[k]], bit_surplus_fx[j] ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP if ( Rk_fx[k_sort[k]] > 0 && USQ_TCQ[k_sort[k]] == 0 ) /* Then have non-zero block AND WILL BE ENCODED BY TCQ */ { diff --git a/lib_enc/tcx_ltp_enc.c b/lib_enc/tcx_ltp_enc.c index fbac9b164075f5f00c9473f7618e50960a0613fa..0ea2e0424a4ddca8a922ce4b8cee25d905c5d3a9 100644 --- a/lib_enc/tcx_ltp_enc.c +++ b/lib_enc/tcx_ltp_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "prot.h" #include "rom_enc.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_PLOT #include "deb_out.h" #endif diff --git a/lib_enc/tcx_utils_enc.c b/lib_enc/tcx_utils_enc.c old mode 100755 new mode 100644 index 04b6f0a20633e8507330f7513b868dbded36f1e3..ba709f0158fee7c34847204f8e5984c5a50b61c9 --- a/lib_enc/tcx_utils_enc.c +++ b/lib_enc/tcx_utils_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "rom_com.h" #include "cnst.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /*---------------------------------------------------------------------* diff --git a/lib_enc/tfa_enc.c b/lib_enc/tfa_enc.c index dca8b62623ed05cb1a44540637b4d7d668e5379f..50dd7c36687fd0faf46ecdc78805c99a99599b53 100644 --- a/lib_enc/tfa_enc.c +++ b/lib_enc/tfa_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * tfaCalcEnv() diff --git a/lib_enc/tns_base_enc.c b/lib_enc/tns_base_enc.c index f008ed728fbf9dd34ebfde9ae98559bc355b4c4a..594f7824111edb5568679dea1315f25c5a431918 100644 --- a/lib_enc/tns_base_enc.c +++ b/lib_enc/tns_base_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #include #include #include "options.h" -#include "wmops.h" +#include "wmc_auto.h" #include "cnst.h" #include "rom_com.h" #include "prot.h" diff --git a/lib_enc/transient_detection.c b/lib_enc/transient_detection.c index 469c7c4d8d0f0bb10ff49837504a3455a8309bd4..91106686c091fe908b9fd9955a479335c6a42963 100644 --- a/lib_enc/transient_detection.c +++ b/lib_enc/transient_detection.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,7 +44,7 @@ #include "prot.h" #include "ivas_prot.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------* @@ -53,6 +53,12 @@ #define MIN_BLOCK_ENERGY 107.37f +#define THR_HIGH 8.5f +#define THR_NORM_HIGH 8.0f +#define THR_NORM_LOW 4.5f +#define THR_LOW 4.25f +#define THR_LOW_STEP 1.0f + /*---------------------------------------------------------------* * Local function prototypes @@ -218,6 +224,7 @@ void RunTransientDetection( float filteredInput[L_FRAME_MAX]; SubblockEnergies *pSubblockEnergies = &hTranDet->subblockEnergies; TransientDetector *pTransientDetector = &hTranDet->transientDetector; + float e0, e1; assert( ( input != NULL ) && ( hTranDet != NULL ) && ( pSubblockEnergies != NULL ) && ( pTransientDetector != NULL ) ); @@ -233,10 +240,22 @@ void RunTransientDetection( /* Update the delay buffer. */ UpdateDelayBuffer( filteredInput, length, &hTranDet->delayBuffer ); + /* compute ramp up flag */ + pSubblockEnergies->ramp_up_flag = pSubblockEnergies->ramp_up_flag << 1; + e0 = dotp( filteredInput + length / 2, filteredInput + length / 2, pSubblockEnergies->pDelayBuffer->nSubblockSize / 2 ) + 0.5f * MIN_BLOCK_ENERGY; + e1 = pSubblockEnergies->subblockNrg[pSubblockEnergies->nDelay + 4] - e0; + if ( e1 > e0 ) + { + pSubblockEnergies->ramp_up_flag |= 0x0001; + } + return; } -static uint16_t isLongTermTransient( const float frameTFM, float *lastTFM ) + +static uint16_t isLongTermTransient( + const float frameTFM, + float *lastTFM ) { float currTFM; @@ -250,11 +269,13 @@ static uint16_t isLongTermTransient( const float frameTFM, float *lastTFM ) { currTFM = *lastTFM * 0.96875f + frameTFM * 0.03125f; } + *lastTFM = max( 0.015625f, currTFM ); return ( currTFM < 0.5625f ? 1 : 0 ); } + /*-------------------------------------------------------------------* * SetTCXModeInfo() * @@ -556,7 +577,9 @@ static void InitTransientDetector( pTransientDetector->CheckSubblocksForAttack = pCheckSubblocksForAttack; pTransientDetector->attackRatioThreshold = attackRatioThreshold; pTransientDetector->bIsAttackPresent = FALSE; + pTransientDetector->prev_bIsAttackPresent = FALSE; pTransientDetector->attackIndex = -1; + pTransientDetector->pSubblockEnergies->ramp_up_flag = 0x0; return; } @@ -609,9 +632,9 @@ static void RunTransientDetector( assert( ( pTransientDetector->CheckSubblocksForAttack != NULL ) ); /* Variable initialization */ -#define WMC_TOOL_MAN +#define WMC_TOOL_SKIP pTransientDetector->CheckSubblocksForAttack( pSubblockNrg, pAccSubblockNrg, NSUBBLOCKS + nDelay, nRelativeDelay, attackRatioThreshold, &pTransientDetector->bIsAttackPresent, &pTransientDetector->attackIndex ); -#undef WMC_TOOL_MAN +#undef WMC_TOOL_SKIP return; } @@ -824,3 +847,99 @@ void set_transient_stereo( return; } + +/*-------------------------------------------------------------------* + * transient_analysis() + * + * + *-------------------------------------------------------------------*/ + +/*! r: preliminary flag to force ACELP */ +int16_t transient_analysis( + TRAN_DET_HANDLE hTranDet, /* i : handle transient detection */ + const float cor_map_LT[], /* i : LT correlation map */ + const float multi_harm_limit /* i : multi harminic threshold */ +) +{ + const float *pSubblockNrg; + float accSubblockNrgRev[NSUBBLOCKS]; /* store acc Nrg in reversed signal */ + float *pTmp; /* point to acc Nrg */ + int16_t offset; + int16_t i; + float thr_fwd; + float thr_rev; + const int16_t nRelativeDelay = hTranDet->subblockEnergies.nDelay - hTranDet->transientDetector.nDelay; + int16_t prel_force_td; + float cor_map_LT_sum; + + pTmp = &accSubblockNrgRev[NSUBBLOCKS - 1]; + offset = nRelativeDelay - 4; + prel_force_td = FALSE; + + /* summation of the LT correlation map */ + cor_map_LT_sum = sum_f( cor_map_LT, L_FFT / 2 ); /* Note maybe BE optimized by computing inside noise_est */ + + thr_fwd = THR_NORM_HIGH; + if ( cor_map_LT_sum > multi_harm_limit * 0.8f ) + { + thr_fwd = THR_HIGH; + } + thr_rev = THR_LOW; + if ( cor_map_LT_sum > multi_harm_limit * 0.6f ) + { + thr_rev = THR_NORM_LOW; + } + + /* forward attack analysis */ + for ( i = -2; i < 7; i++ ) + { + if ( hTranDet->subblockEnergies.subblockNrg[nRelativeDelay + i] > hTranDet->subblockEnergies.accSubblockNrg[nRelativeDelay + i] * thr_fwd ) + { + prel_force_td |= 0x0001; + } + } + if ( prel_force_td == 0 && hTranDet->transientDetector.prev_bIsAttackPresent == 1 ) + { + /* release analysis */ + pSubblockNrg = hTranDet->transientDetector.pSubblockEnergies->subblockNrg; + set_zero( accSubblockNrgRev, NSUBBLOCKS ); + + for ( i = NSUBBLOCKS - 1; i > -1; i-- ) + { + if ( i == NSUBBLOCKS - 1 ) + { + accSubblockNrgRev[i] = pSubblockNrg[i + offset]; + } + else + { + accSubblockNrgRev[i] = *pTmp; + *pTmp *= hTranDet->transientDetector.pSubblockEnergies->facAccSubblockNrg; + if ( pSubblockNrg[i + offset] > *pTmp ) + { + *pTmp = pSubblockNrg[i + offset]; + } + } + } + + /* -3 check */ + if ( pSubblockNrg[1 + offset] > accSubblockNrgRev[1] * thr_rev ) + { + prel_force_td |= 0x0002; + } + + /* -4 check */ + if ( prel_force_td == 0 && pSubblockNrg[offset] > accSubblockNrgRev[0] * thr_rev ) + { + if ( pSubblockNrg[offset] > accSubblockNrgRev[0] * ( thr_rev + THR_LOW_STEP ) ) + { + prel_force_td |= 0x0004; + } + else if ( ( hTranDet->subblockEnergies.ramp_up_flag & 0x0002 ) != 0 ) + { + prel_force_td |= 0x0008; + } + } + } + + return prel_force_td != 0; +} diff --git a/lib_enc/transition_enc.c b/lib_enc/transition_enc.c index ef291f23c27a0ad3b4eecc51310f741aee57e4d4..ce13d7fa36ecf6e44293c41ba52b8c9f49efd7bf 100644 --- a/lib_enc/transition_enc.c +++ b/lib_enc/transition_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------* * Local function prototypes diff --git a/lib_enc/update_decision.c b/lib_enc/update_decision.c index 05877f7a7ec4b2772c61e2e927bc3aeea3ceb307..1269ca68da6e44c4618b2c6c38b32bc5657bfd55 100644 --- a/lib_enc/update_decision.c +++ b/lib_enc/update_decision.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/updt_enc.c b/lib_enc/updt_enc.c index c6663895e0ebaba6da51595189782b6cf66192a2..cc2d5fce36637a9b754806d76706c54bb838f73f 100644 --- a/lib_enc/updt_enc.c +++ b/lib_enc/updt_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "rom_com.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * updt_enc() @@ -188,17 +188,10 @@ void updt_IO_switch_enc( preemph( st->old_inp_16k, PREEMPH_FAC_16k, L_INP_MEM, &( st->mem_preemph16k ) ); /* reset TD BWE buffers */ - set_f( st->hBWE_TD->old_speech_shb, 0.0f, L_LOOK_16k + L_SUBFR16k ); set_f( st->hBWE_TD->old_speech_wb, 0.0f, ( L_LOOK_12k8 + L_SUBFR ) * 5 / 16 ); set_f( st->hBWE_TD->old_bwe_exc, 0.0f, PIT16k_MAX * 2 ); set_f( st->hBWE_TD->old_bwe_exc_extended, 0.0f, NL_BUFF_OFFSET ); - set_f( st->hBWE_TD->mem_shb_res, 0.0f, MAX_LEN_MA_FILTER ); - set_f( st->hBWE_TD->old_EnvSHBres, 0.0f, L_FRAME4k ); - st->hBWE_TD->old_mean_EnvSHBres = 0.0f; - st->hBWE_TD->prev_enr_EnvSHBres = 1.0f; - st->hBWE_TD->prev_pow_exc16kWhtnd = 1.0f; - st->hBWE_TD->prev_mix_factor = 1.0f; - st->hBWE_TD->prev_Env_error = 0.0f; + InitSWBencBufferStates( st->hBWE_TD, NULL ); st->hBWE_TD->bwe_non_lin_prev_scale = 0.0; set_f( st->hBWE_TD->decim_state1, 0.0f, ( 2 * ALLPASSSECTIONS_STEEP + 1 ) ); @@ -297,8 +290,7 @@ void updt_IO_switch_enc( *-------------------------------------------------------------------*/ void updt_enc_common( - Encoder_State *st, /* i/o: encoder state structure */ - const float Etot /* i : total energy */ + Encoder_State *st /* i/o: encoder state structure */ ) { /*---------------------------------------------------------------------* @@ -316,7 +308,6 @@ void updt_enc_common( st->last_extl = st->extl; st->last_input_bwidth = st->input_bwidth; st->last_bwidth = st->bwidth; - st->hNoiseEst->Etot_last = Etot; st->last_coder_type_raw = st->coder_type_raw; if ( st->core_brate > SID_2k40 && st->hDtxEnc != NULL ) diff --git a/lib_enc/updt_tar.c b/lib_enc/updt_tar.c index 4cf7f78680cf9037a9e7f62f8b560ab3b3c6ad7f..4c3ff4843cf2aa4c36a1280952ad274da7277f2c 100644 --- a/lib_enc/updt_tar.c +++ b/lib_enc/updt_tar.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "debug.h" #endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*----------------------------------------------------------------------------------* * procedure updt_tar() diff --git a/lib_enc/vad.c b/lib_enc/vad.c index 98b6ad240e3a8e22db89102724cae0c4230c2114..62c7ccb913441af7c4c4c008e54812a358afaa8d 100644 --- a/lib_enc/vad.c +++ b/lib_enc/vad.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "cnst.h" #include "prot.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_prot.h" /*-----------------------------------------------------------------* @@ -155,17 +155,14 @@ static void sign_thr_snr_acc( *-----------------------------------------------------------------*/ int16_t dtx_hangover_addition( - Encoder_State *st, /* i/o: encoder state structure */ - const int16_t vad_flag, /* i : VAD flag */ - const float lp_snr, /* i : input single SNR estimate */ - const int16_t cldfb_subtraction, /* i : */ - int16_t *vad_hover_flag, /* o : VAD hangover flag */ - VAD_HANDLE hVAD, /* i/o: VAD handle for L or R channel */ - NOISE_EST_HANDLE hNoiseEst /* i : Noise estimation handle */ -#ifdef FIX_ITD_CNG - , - int16_t *rem_dtx_ho /* o : Expected remaining hangover frames */ -#endif + Encoder_State *st, /* i/o: encoder state structure */ + const int16_t vad_flag, /* i : VAD flag */ + const float lp_snr, /* i : input single SNR estimate */ + const int16_t cldfb_subtraction, /* i : */ + int16_t *vad_hover_flag, /* o : VAD hangover flag */ + VAD_HANDLE hVAD, /* i/o: VAD handle for L or R channel */ + NOISE_EST_HANDLE hNoiseEst, /* i : Noise estimation handle */ + int16_t *rem_dtx_ho /* o : Expected remaining hangover frames */ ) { int16_t hangover_short_dtx, flag_dtx; @@ -307,12 +304,10 @@ int16_t dtx_hangover_addition( if ( flag_dtx != 0 && st->localVAD == 0 ) { *vad_hover_flag = 1; -#ifdef FIX_ITD_CNG if ( rem_dtx_ho != NULL ) { *rem_dtx_ho = max( hangover_short_dtx - hVAD->hangover_cnt_dtx, 0 ); } -#endif } return flag_dtx; diff --git a/lib_enc/vad_param_updt.c b/lib_enc/vad_param_updt.c index cbbf5c37d9adaf78bbdac097dde4e8f71e442eb3..b7adac46ea2047ef9545f92296841969e4720fcc 100644 --- a/lib_enc/vad_param_updt.c +++ b/lib_enc/vad_param_updt.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * vad_param_updt() diff --git a/lib_enc/vad_proc.c b/lib_enc/vad_proc.c index f40ca2cb5fe86733a018dbed709174e38f3e1f65..07814aacf38d27eff15d4885f35cd78f76134946 100644 --- a/lib_enc/vad_proc.c +++ b/lib_enc/vad_proc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "options.h" #include "prot.h" #include "rom_enc.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* diff --git a/lib_enc/vbr_average_rate.c b/lib_enc/vbr_average_rate.c index a32091f690ba8c649280af992a81403eecc0b946..8e7330c8b824ea86011dc670c2ce6f9d4f48ed03 100644 --- a/lib_enc/vbr_average_rate.c +++ b/lib_enc/vbr_average_rate.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * Local constants diff --git a/lib_enc/vlpc_1st_cod.c b/lib_enc/vlpc_1st_cod.c index 9f9316705405cfb31269e9de043cab03e28e5d61..553cf7e264a57d47ff596702d6dfe5a1ab3d01fd 100644 --- a/lib_enc/vlpc_1st_cod.c +++ b/lib_enc/vlpc_1st_cod.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #include "cnst.h" #include "prot.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* diff --git a/lib_enc/vlpc_2st_cod.c b/lib_enc/vlpc_2st_cod.c index 86abfec1b03f9ce6e7faf90e6c734a2b9693779e..9e1e9fe5508416aced348832cab45457f0b15611 100644 --- a/lib_enc/vlpc_2st_cod.c +++ b/lib_enc/vlpc_2st_cod.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include "cnst.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------* * vlpc_2st_cod() diff --git a/lib_enc/voiced_enc.c b/lib_enc/voiced_enc.c index d67ecbbce248d2cc60f4e841b34156f80ac49cc0..b32692b983a426cdd3b8435fcdd666e943612901 100644 --- a/lib_enc/voiced_enc.c +++ b/lib_enc/voiced_enc.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include "prot.h" #include "cnst.h" #include "rom_com.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * Local function prototypes @@ -554,12 +554,12 @@ ivas_error ppp_voiced_encoder( { hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -580,12 +580,12 @@ ivas_error ppp_voiced_encoder( { hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -608,12 +608,12 @@ ivas_error ppp_voiced_encoder( { hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -749,12 +749,12 @@ ivas_error ppp_voiced_encoder( { hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -780,12 +780,12 @@ ivas_error ppp_voiced_encoder( { hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -800,13 +800,12 @@ ivas_error ppp_voiced_encoder( if ( hSC_VBR->bump_up == 1 ) { - - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -816,12 +815,12 @@ ivas_error ppp_voiced_encoder( { hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -835,12 +834,12 @@ ivas_error ppp_voiced_encoder( { if ( ( error = ppp_quarter_encoder( &flag, hBstr, CURRP_Q_E, TMPDTFS, dtfs_temp->lag, *CURRP_NQ, lpc2, &( hSC_VBR->lastLgainE ), &( hSC_VBR->lastHgainE ), &( hSC_VBR->lasterbE[0] ), *dtfs_temp ) ) != IVAS_ERR_OK ) { - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -1027,12 +1026,12 @@ ivas_error ppp_voiced_encoder( { hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -1047,12 +1046,12 @@ ivas_error ppp_voiced_encoder( PPP_MODE_E = 'B'; hSC_VBR->bump_up = 1; - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } @@ -1084,12 +1083,12 @@ ivas_error ppp_voiced_encoder( mvr2r( dtfs_temp->a, hSC_VBR->dtfs_enc_a, MAXLAG_WI ); mvr2r( dtfs_temp->b, hSC_VBR->dtfs_enc_b, MAXLAG_WI ); - dynamic_free( CURRP_NQ ); - dynamic_free( TMPDTFS ); - dynamic_free( TMPDTFS2 ); - dynamic_free( TMPDTFS3 ); - dynamic_free( CURRP_Q_E ); - dynamic_free( dtfs_temp ); + free( CURRP_NQ ); + free( TMPDTFS ); + free( TMPDTFS2 ); + free( TMPDTFS3 ); + free( CURRP_Q_E ); + free( dtfs_temp ); return error; } diff --git a/lib_enc/waveadjust_fec_cod.c b/lib_enc/waveadjust_fec_cod.c index e0b87477be6b3d4a054043f3112206f66f57c60a..bd57e4a09330c63bef7baa6ba7a0595bab3f06c6 100644 --- a/lib_enc/waveadjust_fec_cod.c +++ b/lib_enc/waveadjust_fec_cod.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "options.h" #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* * SFM_Cal() diff --git a/lib_rend/ivas_allrad_dec.c b/lib_rend/ivas_allrad_dec.c index a61f543cb197e72aea08175db9464106e45de617..ada7c2c6d106d00933248de425db7b2afb02b20b 100644 --- a/lib_rend/ivas_allrad_dec.c +++ b/lib_rend/ivas_allrad_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUG_MODE_INFO_ALLRAD @@ -108,7 +108,7 @@ ivas_error ivas_sba_get_hoa_dec_matrix( /* Allocate memory */ assert( *hoa_dec_mtx == NULL && "hoa_dec_mtx != NULL" ); - if ( ( *hoa_dec_mtx = (float *) count_malloc( SBA_NHARM_HOA3 * ( hOutSetup.nchan_out_woLFE ) * sizeof( float ) ) ) == NULL ) + if ( ( *hoa_dec_mtx = (float *) malloc( SBA_NHARM_HOA3 * ( hOutSetup.nchan_out_woLFE ) * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "ALLRAD: Cannot allocate memory!" ) ); } diff --git a/lib_rend/ivas_binauralRenderer.c b/lib_rend/ivas_binauralRenderer.c index 09713a6f5cc8a26c96c4f030c3f67aa205022507..d5c92353ab08c109f66c9927ae7b75cff83230f5 100644 --- a/lib_rend/ivas_binauralRenderer.c +++ b/lib_rend/ivas_binauralRenderer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -124,7 +124,12 @@ static ivas_error ivas_binRenderer_convModuleOpen( const int16_t renderer_type, const int16_t isLoudspeaker, const AUDIO_CONFIG input_config, - const RENDER_CONFIG_DATA *hRenderConfig ) + const RENDER_CONFIG_DATA *hRenderConfig +#ifdef HRTF_BINARY_FILE + , + const HRTFS_FASTCONV_HANDLE hHrtf +#endif +) { int16_t bandIdx, chIdx; BINRENDERER_CONV_MODULE_HANDLE hBinRenConvModule; @@ -133,7 +138,7 @@ static ivas_error ivas_binRenderer_convModuleOpen( * prepare library opening *-----------------------------------------------------------------*/ - if ( ( hBinRenConvModule = (BINRENDERER_CONV_MODULE_HANDLE) count_malloc( sizeof( BINRENDERER_CONV_MODULE ) ) ) == NULL ) + if ( ( hBinRenConvModule = (BINRENDERER_CONV_MODULE_HANDLE) malloc( sizeof( BINRENDERER_CONV_MODULE ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } @@ -187,79 +192,79 @@ static ivas_error ivas_binRenderer_convModuleOpen( } /* allocate memory for filter states */ - if ( ( hBinRenConvModule->filterTapsLeftReal = (float ***) count_malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsLeftReal = (float ***) malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterTapsLeftImag = (float ***) count_malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsLeftImag = (float ***) malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterTapsRightReal = (float ***) count_malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsRightReal = (float ***) malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterTapsRightImag = (float ***) count_malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsRightImag = (float ***) malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } for ( bandIdx = 0; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { - if ( ( hBinRenConvModule->filterTapsLeftReal[bandIdx] = (float **) count_malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsLeftReal[bandIdx] = (float **) malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterTapsLeftImag[bandIdx] = (float **) count_malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsLeftImag[bandIdx] = (float **) malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterTapsRightReal[bandIdx] = (float **) count_malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsRightReal[bandIdx] = (float **) malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterTapsRightImag[bandIdx] = (float **) count_malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterTapsRightImag[bandIdx] = (float **) malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } } - if ( ( hBinRenConvModule->filterStatesLeftReal = (float ***) count_malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterStatesLeftReal = (float ***) malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterStatesLeftImag = (float ***) count_malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterStatesLeftImag = (float ***) malloc( hBinRenderer->conv_band * sizeof( float ** ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } for ( bandIdx = 0; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { - if ( ( hBinRenConvModule->filterStatesLeftReal[bandIdx] = (float **) count_malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterStatesLeftReal[bandIdx] = (float **) malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterStatesLeftImag[bandIdx] = (float **) count_malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterStatesLeftImag[bandIdx] = (float **) malloc( hBinRenderer->nInChannels * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } for ( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { - if ( ( hBinRenConvModule->filterStatesLeftReal[bandIdx][chIdx] = (float *) count_malloc( hBinRenConvModule->numTapsArray[bandIdx] * sizeof( float ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterStatesLeftReal[bandIdx][chIdx] = (float *) malloc( hBinRenConvModule->numTapsArray[bandIdx] * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } - if ( ( hBinRenConvModule->filterStatesLeftImag[bandIdx][chIdx] = (float *) count_malloc( hBinRenConvModule->numTapsArray[bandIdx] * sizeof( float ) ) ) == NULL ) + if ( ( hBinRenConvModule->filterStatesLeftImag[bandIdx][chIdx] = (float *) malloc( hBinRenConvModule->numTapsArray[bandIdx] * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Convolution Module \n" ) ); } @@ -311,10 +316,17 @@ static ivas_error ivas_binRenderer_convModuleOpen( if ( isLoudspeaker ) { +#ifdef HRTF_BINARY_FILE + hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftBRIRReal[bandIdx][tmp]; + hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftBRIRImag[bandIdx][tmp]; + hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightBRIRReal[bandIdx][tmp]; + hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightBRIRImag[bandIdx][tmp]; +#else hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftBRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftBRIRImag[bandIdx][tmp]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightBRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightBRIRImag[bandIdx][tmp]; +#endif } #ifdef DEBUGGING else @@ -332,18 +344,32 @@ static ivas_error ivas_binRenderer_convModuleOpen( if ( isLoudspeaker ) { +#ifdef HRTF_BINARY_FILE + hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftHRIRReal[bandIdx][tmp]; + hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftHRIRImag[bandIdx][tmp]; + hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightHRIRReal[bandIdx][tmp]; + hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightHRIRImag[bandIdx][tmp]; +#else hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftHRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftHRIRImag[bandIdx][tmp]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightHRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightHRIRImag[bandIdx][tmp]; +#endif } else { /* HOA3 filter coefficients */ +#ifdef HRTF_BINARY_FILE + hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftHRIRReal_HOA3[bandIdx][chIdx]; + hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftHRIRImag_HOA3[bandIdx][chIdx]; + hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightHRIRReal_HOA3[bandIdx][chIdx]; + hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightHRIRImag_HOA3[bandIdx][chIdx]; +#else hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftHRIRReal_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftHRIRImag_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightHRIRReal_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightHRIRImag_HOA3[bandIdx][chIdx]; +#endif } } } @@ -354,6 +380,70 @@ static ivas_error ivas_binRenderer_convModuleOpen( return IVAS_ERR_OK; } +#ifdef HRTF_BINARY_FILE +/*-------------------------------------------------------------------------* + * ivas_binaural_HRTF_open() + * + * + *-------------------------------------------------------------------------*/ + +static ivas_error ivas_binaural_hrtf_open( + HRTFS_FASTCONV_HANDLE *hHrtfFastConv /* i : fastconv HRTF handle */ +) +{ + int16_t i, j; + if ( hHrtfFastConv != NULL && *hHrtfFastConv != NULL ) + { + /* Tables already loaded from file */ + return IVAS_ERR_OK; + } + else + { + /* Initialise tables from ROM */ + HRTFS_FASTCONV *HrtfFastConv; + + if ( ( HrtfFastConv = (HRTFS_FASTCONV *) malloc( sizeof( HRTFS_FASTCONV ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for FastConv HRTF tables" ); + } + + HrtfFastConv->FASTCONV_HRIR_latency_s = FASTCONV_HRIR_latency_s; + HrtfFastConv->FASTCONV_HOA3_latency_s = FASTCONV_HOA3_latency_s; + HrtfFastConv->FASTCONV_BRIR_latency_s = FASTCONV_BRIR_latency_s; + + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + mvr2r( leftHRIRReal[i][j], HrtfFastConv->leftHRIRReal[i][j], 7 ); + mvr2r( leftHRIRImag[i][j], HrtfFastConv->leftHRIRImag[i][j], 7 ); + mvr2r( rightHRIRReal[i][j], HrtfFastConv->rightHRIRReal[i][j], 7 ); + mvr2r( rightHRIRImag[i][j], HrtfFastConv->rightHRIRImag[i][j], 7 ); + + mvr2r( leftBRIRReal[i][j], HrtfFastConv->leftBRIRReal[i][j], BINAURAL_NTAPS_MAX ); + mvr2r( leftBRIRImag[i][j], HrtfFastConv->leftBRIRImag[i][j], BINAURAL_NTAPS_MAX ); + mvr2r( rightBRIRReal[i][j], HrtfFastConv->rightBRIRReal[i][j], BINAURAL_NTAPS_MAX ); + mvr2r( rightBRIRImag[i][j], HrtfFastConv->rightBRIRImag[i][j], BINAURAL_NTAPS_MAX ); + } + + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + mvr2r( leftHRIRReal_HOA3[i][j], HrtfFastConv->leftHRIRReal_HOA3[i][j], 7 ); + mvr2r( leftHRIRImag_HOA3[i][j], HrtfFastConv->leftHRIRImag_HOA3[i][j], 7 ); + mvr2r( rightHRIRReal_HOA3[i][j], HrtfFastConv->rightHRIRReal_HOA3[i][j], 7 ); + mvr2r( rightHRIRImag_HOA3[i][j], HrtfFastConv->rightHRIRImag_HOA3[i][j], 7 ); + } + } + + mvr2r( fastconvReverberationTimes, HrtfFastConv->fastconvReverberationTimes, CLDFB_NO_CHANNELS_MAX ); + mvr2r( fastconvReverberationEneCorrections, HrtfFastConv->fastconvReverberationEneCorrections, CLDFB_NO_CHANNELS_MAX ); + + *hHrtfFastConv = HrtfFastConv; + } + + return IVAS_ERR_OK; +} +#endif /*-------------------------------------------------------------------------* * ivas_binaural_obtain_DMX() @@ -495,7 +585,7 @@ ivas_error ivas_binRenderer_open( * prepare library opening *-----------------------------------------------------------------*/ - if ( ( hBinRenderer = (BINAURAL_RENDERER_HANDLE) count_malloc( sizeof( BINAURAL_RENDERER ) ) ) == NULL ) + if ( ( hBinRenderer = (BINAURAL_RENDERER_HANDLE) malloc( sizeof( BINAURAL_RENDERER ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Renderer\n" ) ); } @@ -541,21 +631,33 @@ ivas_error ivas_binRenderer_open( hBinRenderer->render_lfe = 1; } +#ifdef HRTF_BINARY_FILE + /* Load HRTF tables */ + ivas_binaural_hrtf_open( &st_ivas->hHrtfFastConv ); +#endif + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && ( st_ivas->hIntSetup.is_loudspeaker_setup == 0 ) ) { IVAS_OUTPUT_SETUP out_setup; /* Allocate memories and buffers needed for convolutional module in CICP19 */ +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, + st_ivas->renderer_type, + 1, + AUDIO_CONFIG_7_1_4, + st_ivas->hRenderConfig, + st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, 1, AUDIO_CONFIG_7_1_4, st_ivas->hRenderConfig ) ) != IVAS_ERR_OK ) +#endif { return error; } ivas_output_init( &out_setup, AUDIO_CONFIG_7_1_4 ); -#ifdef BRATE_SWITCHING_RENDERING if ( st_ivas->hoa_dec_mtx == NULL ) -#endif { if ( ( error = ivas_sba_get_hoa_dec_matrix( out_setup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK ) { @@ -564,30 +666,94 @@ ivas_error ivas_binRenderer_open( } hBinRenderer->hoa_dec_mtx = st_ivas->hoa_dec_mtx; +#ifdef HRTF_BINARY_FILE + st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_BRIR_latency_s * 1000000000.f ); +#else st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_BRIR_latency_s * 1000000000.f ); +#endif } else { /* Allocate memories and buffers needed for convolutional module */ +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, + st_ivas->renderer_type, + st_ivas->hIntSetup.is_loudspeaker_setup, + st_ivas->hIntSetup.output_config, + st_ivas->hRenderConfig, + st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, st_ivas->hIntSetup.is_loudspeaker_setup, st_ivas->hIntSetup.output_config, st_ivas->hRenderConfig ) ) != IVAS_ERR_OK ) +#endif { return error; } +#ifdef FIX_FIX_I59 + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + if ( hBinRenderer->ivas_format == MC_FORMAT ) + { +#ifdef HRTF_BINARY_FILE + st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HRIR_latency_s * 1000000000.f ); +#else + st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HRIR_latency_s * 1000000000.f ); +#endif + } + else + { +#ifdef HRTF_BINARY_FILE + st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f ); +#else + st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f ); +#endif + } + } + else + { + /* same value for MC or HOA both use MC BRIR*/ +#ifdef HRTF_BINARY_FILE + st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_BRIR_latency_s * 1000000000.f ); +#else + st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_BRIR_latency_s * 1000000000.f ); +#endif + } +#else if ( hBinRenderer->ivas_format == MC_FORMAT ) { +#ifdef HRTF_BINARY_FILE + st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HRIR_latency_s * 1000000000.f ); +#else st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HRIR_latency_s * 1000000000.f ); +#endif } else { +#ifdef HRTF_BINARY_FILE + st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f ); +#else st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f ); +#endif } +#endif } /* Allocate memories needed for reverb module */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) { +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), + hBinRenderer->conv_band, + hBinRenderer->timeSlots, + &( st_ivas->hRenderConfig->roomAcoustics ), + st_ivas->hIntSetup.output_config, + st_ivas->hDecoderConfig->output_Fs, + RENDERER_BINAURAL_FASTCONV_ROOM, + st_ivas->hHrtfFastConv, + st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, RENDERER_BINAURAL_FASTCONV_ROOM ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -658,29 +824,29 @@ static void ivas_binRenderer_convModuleClose( for ( bandIdx = 0; bandIdx < ( *hBinRenderer )->conv_band; bandIdx++ ) { - count_free( hBinRenConvModule->filterTapsLeftReal[bandIdx] ); + free( hBinRenConvModule->filterTapsLeftReal[bandIdx] ); hBinRenConvModule->filterTapsLeftReal[bandIdx] = NULL; - count_free( hBinRenConvModule->filterTapsLeftImag[bandIdx] ); + free( hBinRenConvModule->filterTapsLeftImag[bandIdx] ); hBinRenConvModule->filterTapsLeftImag[bandIdx] = NULL; - count_free( hBinRenConvModule->filterTapsRightReal[bandIdx] ); + free( hBinRenConvModule->filterTapsRightReal[bandIdx] ); hBinRenConvModule->filterTapsRightReal[bandIdx] = NULL; - count_free( hBinRenConvModule->filterTapsRightImag[bandIdx] ); + free( hBinRenConvModule->filterTapsRightImag[bandIdx] ); hBinRenConvModule->filterTapsRightImag[bandIdx] = NULL; } - count_free( hBinRenConvModule->filterTapsLeftReal ); + free( hBinRenConvModule->filterTapsLeftReal ); hBinRenConvModule->filterTapsLeftReal = NULL; - count_free( hBinRenConvModule->filterTapsLeftImag ); + free( hBinRenConvModule->filterTapsLeftImag ); hBinRenConvModule->filterTapsLeftImag = NULL; - count_free( hBinRenConvModule->filterTapsRightReal ); + free( hBinRenConvModule->filterTapsRightReal ); hBinRenConvModule->filterTapsRightReal = NULL; - count_free( hBinRenConvModule->filterTapsRightImag ); + free( hBinRenConvModule->filterTapsRightImag ); hBinRenConvModule->filterTapsRightImag = NULL; @@ -688,28 +854,28 @@ static void ivas_binRenderer_convModuleClose( { for ( chIdx = 0; chIdx < ( *hBinRenderer )->nInChannels; chIdx++ ) { - count_free( hBinRenConvModule->filterStatesLeftReal[bandIdx][chIdx] ); + free( hBinRenConvModule->filterStatesLeftReal[bandIdx][chIdx] ); hBinRenConvModule->filterStatesLeftReal[bandIdx][chIdx] = NULL; - count_free( hBinRenConvModule->filterStatesLeftImag[bandIdx][chIdx] ); + free( hBinRenConvModule->filterStatesLeftImag[bandIdx][chIdx] ); hBinRenConvModule->filterStatesLeftImag[bandIdx][chIdx] = NULL; } - count_free( hBinRenConvModule->filterStatesLeftReal[bandIdx] ); + free( hBinRenConvModule->filterStatesLeftReal[bandIdx] ); hBinRenConvModule->filterStatesLeftReal[bandIdx] = NULL; - count_free( hBinRenConvModule->filterStatesLeftImag[bandIdx] ); + free( hBinRenConvModule->filterStatesLeftImag[bandIdx] ); hBinRenConvModule->filterStatesLeftImag[bandIdx] = NULL; } - count_free( hBinRenConvModule->filterStatesLeftReal ); + free( hBinRenConvModule->filterStatesLeftReal ); hBinRenConvModule->filterStatesLeftReal = NULL; - count_free( hBinRenConvModule->filterStatesLeftImag ); + free( hBinRenConvModule->filterStatesLeftImag ); hBinRenConvModule->filterStatesLeftImag = NULL; - count_free( ( *hBinRenderer )->hBinRenConvModule ); + free( ( *hBinRenderer )->hBinRenConvModule ); ( *hBinRenderer )->hBinRenConvModule = NULL; return; @@ -741,7 +907,7 @@ void ivas_binRenderer_close( ivas_binaural_reverb_close( &( ( *hBinRenderer )->hReverb ) ); } - count_free( *hBinRenderer ); + free( *hBinRenderer ); *hBinRenderer = NULL; return; @@ -774,7 +940,11 @@ void ivas_binaural_add_LFE( if ( render_lfe ) { +#ifdef FIX_197_CREND_INTERFACE + gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE; +#else gain = st_ivas->hHrtf != NULL ? st_ivas->hHrtf->gain_lfe : GAIN_LFE; +#endif for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ ) { v_multc( output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], gain, output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_frame ); @@ -788,8 +958,9 @@ void ivas_binaural_add_LFE( } +#ifdef DEBUGGING /*-------------------------------------------------------------------------* - * ivas_binRenderer_cldfb() + * ivas_binaural_cldfb() * * Perform CLDFB analysis, fastconv binaural rendering and CLDFB synthesis *-------------------------------------------------------------------------*/ @@ -861,6 +1032,7 @@ void ivas_binaural_cldfb( return; } +#endif /*------------------------------------------------------------------------- @@ -881,7 +1053,7 @@ void ivas_binRenderer( int16_t chIdx, k; int16_t numTimeSlots = MAX_PARAM_SPATIAL_SUBFRAMES; - wmops_sub_start( "fastconv_binaural_rendering" ); + push_wmops( "fastconv_binaural_rendering" ); /* Compute Convolution */ /* memory reset for the binaural output */ @@ -959,7 +1131,7 @@ void ivas_binRenderer( } } - wmops_sub_end(); + pop_wmops(); return; } diff --git a/lib_rend/ivas_binaural_reverb.c b/lib_rend/ivas_binaural_reverb.c index db12954a1e95ab01d1cf5dc42a78e2a32d78f252..3d4c9d6fe2626565c0a9e131c3fedac9496389ae 100644 --- a/lib_rend/ivas_binaural_reverb.c +++ b/lib_rend/ivas_binaural_reverb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /* The reverberator structure implemented here is described in detail in: @@ -376,6 +376,11 @@ ivas_error ivas_binaural_reverb_open( const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ const RENDERER_TYPE renderer_type /* i : renderer type */ +#ifdef HRTF_BINARY_FILE + , + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ + const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ +#endif ) { int16_t bin, chIdx, k, len; @@ -384,7 +389,7 @@ ivas_error ivas_binaural_reverb_open( float t60[CLDFB_NO_CHANNELS_MAX]; float ene[CLDFB_NO_CHANNELS_MAX]; - if ( ( *hReverbPr = (REVERB_STRUCT_HANDLE) count_malloc( sizeof( REVERB_STRUCT ) ) ) == NULL ) + if ( ( *hReverbPr = (REVERB_STRUCT_HANDLE) malloc( sizeof( REVERB_STRUCT ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } @@ -408,7 +413,11 @@ ivas_error ivas_binaural_reverb_open( { if ( !roomAcoustics->override ) { +#ifdef HRTF_BINARY_FILE + revTimes = hHrtfFastConv->fastconvReverberationTimes; +#else revTimes = fastconvReverberationTimes; +#endif } else { @@ -417,7 +426,11 @@ ivas_error ivas_binaural_reverb_open( } else { +#ifdef HRTF_BINARY_FILE + revTimes = hHrtfParambin->parametricReverberationTimes; +#else revTimes = parametricReverberationTimes; +#endif } for ( bin = 0; bin < hReverb->numBins; bin++ ) @@ -426,12 +439,12 @@ ivas_error ivas_binaural_reverb_open( hReverb->loopBufLengthMax[bin] = (int16_t) ( 500 / ( 1 + bin ) + ( CLDFB_NO_CHANNELS_MAX - bin ) ); len = hReverb->loopBufLengthMax[bin] + hReverb->blockSize; - if ( ( hReverb->loopBufReal[bin] = (float *) count_malloc( len * sizeof( float ) ) ) == NULL ) + if ( ( hReverb->loopBufReal[bin] = (float *) malloc( len * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } - if ( ( hReverb->loopBufImag[bin] = (float *) count_malloc( len * sizeof( float ) ) ) == NULL ) + if ( ( hReverb->loopBufImag[bin] = (float *) malloc( len * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } @@ -450,29 +463,29 @@ ivas_error ivas_binaural_reverb_open( { len = hReverb->loopBufLength[bin]; - if ( ( hReverb->tapPhaseShiftType[bin][chIdx] = (int16_t *) count_malloc( len * sizeof( int16_t ) ) ) == NULL ) + if ( ( hReverb->tapPhaseShiftType[bin][chIdx] = (int16_t *) malloc( len * sizeof( int16_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } set_s( hReverb->tapPhaseShiftType[bin][chIdx], 0, len ); - if ( ( hReverb->tapPointersReal[bin][chIdx] = (float **) count_malloc( len * sizeof( float * ) ) ) == NULL ) + if ( ( hReverb->tapPointersReal[bin][chIdx] = (float **) malloc( len * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } - if ( ( hReverb->tapPointersImag[bin][chIdx] = (float **) count_malloc( len * sizeof( float * ) ) ) == NULL ) + if ( ( hReverb->tapPointersImag[bin][chIdx] = (float **) malloc( len * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } len = hReverb->blockSize; - if ( ( hReverb->outputBufferReal[bin][chIdx] = (float *) count_malloc( len * sizeof( float ) ) ) == NULL ) + if ( ( hReverb->outputBufferReal[bin][chIdx] = (float *) malloc( len * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } - if ( ( hReverb->outputBufferImag[bin][chIdx] = (float *) count_malloc( len * sizeof( float ) ) ) == NULL ) + if ( ( hReverb->outputBufferImag[bin][chIdx] = (float *) malloc( len * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural Reverberator\n" ) ); } @@ -486,19 +499,31 @@ ivas_error ivas_binaural_reverb_open( { if ( !roomAcoustics->override ) { +#ifdef HRTF_BINARY_FILE + ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections ); +#else ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, fastconvReverberationTimes, fastconvReverberationEneCorrections ); +#endif ivas_binaural_reverb_setPreDelay( hReverb, 10 ); } else { +#ifdef HRTF_BINARY_FILE + ivas_reverb_prepare_cldfb_params( roomAcoustics, hHrtfFastConv, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene ); +#else ivas_reverb_prepare_cldfb_params( roomAcoustics, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene ); +#endif ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, t60, ene ); ivas_binaural_reverb_setPreDelay( hReverb, (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ) ); } } else { +#ifdef HRTF_BINARY_FILE + ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfParambin->parametricReverberationTimes, hHrtfParambin->parametricReverberationEneCorrections ); +#else ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, parametricReverberationTimes, parametricReverberationEneCorrections ); +#endif ivas_binaural_reverb_setPreDelay( hReverb, 10 ); } @@ -527,20 +552,18 @@ void ivas_binaural_reverb_close( { for ( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ ) { - count_free( ( *hReverb )->tapPhaseShiftType[bin][chIdx] ); - count_free( ( *hReverb )->tapPointersReal[bin][chIdx] ); - count_free( ( *hReverb )->tapPointersImag[bin][chIdx] ); - count_free( ( *hReverb )->outputBufferReal[bin][chIdx] ); - count_free( ( *hReverb )->outputBufferImag[bin][chIdx] ); + free( ( *hReverb )->tapPhaseShiftType[bin][chIdx] ); + free( ( *hReverb )->tapPointersReal[bin][chIdx] ); + free( ( *hReverb )->tapPointersImag[bin][chIdx] ); + free( ( *hReverb )->outputBufferReal[bin][chIdx] ); + free( ( *hReverb )->outputBufferImag[bin][chIdx] ); } - count_free( ( *hReverb )->loopBufReal[bin] ); - count_free( ( *hReverb )->loopBufImag[bin] ); + free( ( *hReverb )->loopBufReal[bin] ); + free( ( *hReverb )->loopBufImag[bin] ); } - count_free( ( *hReverb ) ); -#ifdef BRATE_SWITCHING_RENDERING + free( ( *hReverb ) ); ( *hReverb ) = NULL; -#endif return; } diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index f63d729dc758990a14938286759ee1f09d77137e..cf29f0c98852865f657bc0f51e2cfcab4eda0976 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,12 +39,17 @@ #include "ivas_stat_dec.h" #include #include "ivas_rom_binaural_crend_head.h" +#ifdef FIX_197_CREND_INTERFACE +#include "ivas_stat_rend.h" +#include "lib_rend.h" +#else #include "lib_rend.h" #include "ivas_lib_rend_internal.h" +#endif #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- @@ -108,7 +113,7 @@ static ivas_error ivas_hrtf_open( if ( *hHrtf_out == NULL ) { - if ( ( hHrtf = (HRTFS_HANDLE) count_malloc( sizeof( HRTFS_DATA ) ) ) == NULL ) + if ( ( hHrtf = (HRTFS_HANDLE) malloc( sizeof( HRTFS_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR decoder\n" ); } @@ -141,13 +146,14 @@ static ivas_error ivas_hrtf_close( return IVAS_ERR_WRONG_PARAMS; } - count_free( *hHrtf ); + free( *hHrtf ); *hHrtf = NULL; return IVAS_ERR_OK; } +#ifndef FIX_197_CREND_INTERFACE /*------------------------------------------------------------------------- * ivas_crend_init_from_rom() * @@ -163,7 +169,12 @@ ivas_error ivas_crend_init_from_rom( AUDIO_CONFIG intern_config; HRTFS_HANDLE hHrtf; +#ifdef FIX_197_CREND_INTERFACE + hHrtf = st_ivas->hCrendWrapper->hHrtfCrend; +#else hHrtf = st_ivas->hHrtf; +#endif + output_Fs = st_ivas->hDecoderConfig->output_Fs; intern_config = st_ivas->intern_config; @@ -211,7 +222,8 @@ ivas_error ivas_crend_init_from_rom( if ( output_Fs == 48000 ) { - hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_48kHz; + hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_48kHz; @@ -225,7 +237,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 32000 ) { - hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_32kHz; + hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_32kHz; @@ -239,7 +252,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 16000 ) { - hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_16kHz; + hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_16kHz; @@ -329,7 +343,8 @@ ivas_error ivas_crend_init_from_rom( { if ( output_Fs == 48000 ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_48kHz; + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_48kHz; @@ -355,7 +370,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 32000 ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_32kHz; + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_32kHz; @@ -382,7 +398,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 16000 ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_16kHz; + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_16kHz; @@ -423,7 +440,8 @@ ivas_error ivas_crend_init_from_rom( if ( output_Fs == 48000 ) { - hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_48kHz; + hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_48kHz; @@ -437,7 +455,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 32000 ) { - hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_32kHz; + hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_32kHz; @@ -451,7 +470,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 16000 ) { - hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_16kHz; + hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_16kHz; @@ -541,7 +561,8 @@ ivas_error ivas_crend_init_from_rom( { if ( output_Fs == 48000 ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_48kHz; + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_48kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_48kHz; @@ -568,7 +589,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 32000 ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_32kHz; + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_32kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_32kHz; @@ -595,7 +617,8 @@ ivas_error ivas_crend_init_from_rom( } else if ( output_Fs == 16000 ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_16kHz; + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_16kHz; hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_16kHz; @@ -635,12 +658,302 @@ ivas_error ivas_crend_init_from_rom( return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); } +#ifdef FIX_197_CREND_INTERFACE + st_ivas->hCrendWrapper->hHrtfCrend = hHrtf; +#else st_ivas->hHrtf = hHrtf; +#endif + + return IVAS_ERR_OK; +} +#endif + +#ifndef FIX_197_CREND_INTERFACE +#ifdef HRTF_BINARY_FILE +/*------------------------------------------------------------------------- + * ivas_crend_init_from_hrtf_handle() + * + * Allocate and initialize Crend HRTF handle from external file + *------------------------------------------------------------------------*/ + +ivas_error ivas_crend_init_from_hrtf_handle( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + HRTFS_HANDLE hrtf ) +{ + int16_t i, j, as_lfe_filter; + const int16_t *hchannelIndex = NULL; + AUDIO_CONFIG transport_config; + + if ( st_ivas == NULL ) + { + return IVAS_ERR_INTERNAL; + } + + if ( hrtf == NULL ) + { + return IVAS_ERR_INVALID_HRTF; + } + + if ( st_ivas->hHrtf != NULL ) + { + ivas_hrtf_close( &st_ivas->hHrtf ); + } + + if ( ivas_hrtf_open( &( st_ivas->hHrtf ) ) != IVAS_ERR_OK ) + { + return IVAS_ERR_INTERNAL; + } + + if ( st_ivas->hHrtf != NULL ) + { + st_ivas->hHrtf->latency_s = hrtf->latency_s; + // st_ivas->hHrtf->max_num_ir->max_ir_len = hrtf->max_ir_len; + st_ivas->hHrtf->max_num_iterations = hrtf->max_num_iterations; + st_ivas->hHrtf->gain_lfe = hrtf->gain_lfe; + // st_ivas->hHrtf->crend_hr_gain_foa_to_bin = hrtf->crend_hr_gain_foa_to_bin; + st_ivas->hHrtf->max_num_ir = 0; + st_ivas->hIntSetup.nchan_out_woLFE = 0; + st_ivas->hIntSetup.num_lfe = 0; + st_ivas->hIntSetup.nchan_out_woLFE = 0; + + transport_config = st_ivas->intern_config == AUDIO_CONFIG_INVALID ? st_ivas->transport_config : st_ivas->intern_config; + + switch ( transport_config ) + { + case AUDIO_CONFIG_5_1: + st_ivas->hHrtf->max_num_ir = 5; + st_ivas->hHrtf->gain_lfe = GAIN_LFE; + st_ivas->hIntSetup.nchan_out_woLFE = st_ivas->hHrtf->max_num_ir; + st_ivas->hIntSetup.num_lfe = 1; + hchannelIndex = (const int16_t *) &channelIndex_CICP6; + break; + case AUDIO_CONFIG_7_1: + st_ivas->hHrtf->max_num_ir = 7; + st_ivas->hHrtf->gain_lfe = GAIN_LFE; + st_ivas->hIntSetup.nchan_out_woLFE = st_ivas->hHrtf->max_num_ir; + st_ivas->hIntSetup.num_lfe = 1; + hchannelIndex = (const int16_t *) &channelIndex_CICP12; + break; + case AUDIO_CONFIG_5_1_2: + st_ivas->hHrtf->max_num_ir = 7; + st_ivas->hHrtf->gain_lfe = GAIN_LFE; + st_ivas->hIntSetup.nchan_out_woLFE = st_ivas->hHrtf->max_num_ir; + st_ivas->hIntSetup.num_lfe = 1; + hchannelIndex = (const int16_t *) &channelIndex_CICP14; + break; + case AUDIO_CONFIG_5_1_4: + st_ivas->hHrtf->max_num_ir = 9; + st_ivas->hHrtf->gain_lfe = GAIN_LFE; + st_ivas->hIntSetup.nchan_out_woLFE = st_ivas->hHrtf->max_num_ir; + st_ivas->hIntSetup.num_lfe = 1; + hchannelIndex = (const int16_t *) &channelIndex_CICP16; + break; + case AUDIO_CONFIG_7_1_4: + st_ivas->hHrtf->max_num_ir = 11; + st_ivas->hHrtf->gain_lfe = GAIN_LFE; + st_ivas->hIntSetup.nchan_out_woLFE = st_ivas->hHrtf->max_num_ir; + st_ivas->hIntSetup.num_lfe = 1; + hchannelIndex = (const int16_t *) &channelIndex_CICP19; + break; + case AUDIO_CONFIG_FOA: + st_ivas->hIntSetup.ambisonics_order = 1; + st_ivas->hHrtf->max_num_ir = 4; + break; + case AUDIO_CONFIG_HOA2: + st_ivas->hIntSetup.ambisonics_order = 2; + st_ivas->hHrtf->max_num_ir = 9; + break; + case AUDIO_CONFIG_HOA3: + st_ivas->hIntSetup.ambisonics_order = 3; + st_ivas->hHrtf->max_num_ir = 16; + break; + default: + break; + } + + as_lfe_filter = 0; + if ( ( st_ivas->hHrtf->max_num_ir != hrtf->max_num_ir ) && ( st_ivas->hHrtf->max_num_ir + 1 == hrtf->max_num_ir ) ) + { + as_lfe_filter = 1; + hchannelIndex = NULL; + } + + if ( st_ivas->hHrtf->max_num_ir == 0 ) + { + return IVAS_ERR_INTERNAL; + } + + for ( i = 0; i < st_ivas->hHrtf->max_num_ir; i++ ) + { + int16_t tmp = i; + if ( hchannelIndex != NULL ) + { + tmp = hchannelIndex[i]; + } + if ( as_lfe_filter ) + { + if ( tmp > 2 ) + { + tmp++; + } + } + + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + st_ivas->hHrtf->pOut_to_bin_re[i][j] = hrtf->pOut_to_bin_re[tmp][j]; + st_ivas->hHrtf->pOut_to_bin_im[i][j] = hrtf->pOut_to_bin_im[tmp][j]; + st_ivas->hHrtf->num_iterations[i][j] = hrtf->num_iterations[tmp][j]; + st_ivas->hHrtf->pIndex_frequency_max[i][j] = hrtf->pIndex_frequency_max[tmp][j]; + } + st_ivas->hHrtf->inv_diffuse_weight[i] = hrtf->inv_diffuse_weight[tmp]; + } + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + st_ivas->hHrtf->pOut_to_bin_diffuse_re[j] = hrtf->pOut_to_bin_diffuse_re[j]; + st_ivas->hHrtf->pOut_to_bin_diffuse_im[j] = hrtf->pOut_to_bin_diffuse_im[j]; + st_ivas->hHrtf->num_iterations_diffuse[j] = hrtf->num_iterations_diffuse[j]; + st_ivas->hHrtf->pIndex_frequency_max_diffuse[j] = hrtf->pIndex_frequency_max_diffuse[j]; + } + st_ivas->hHrtf->index_frequency_max_diffuse = hrtf->index_frequency_max_diffuse; + } + return IVAS_ERR_OK; +} +#endif + +#ifdef HRTF_BINARY_FILE +/*------------------------------------------------------------------------- + * ivas_crend_init_from_setofhrtf() + * + * Allocate and initialize crend renderer handle + *------------------------------------------------------------------------*/ + +ivas_error ivas_crend_init_from_setofhrtf( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +) +{ + ivas_error error; + AUDIO_CONFIG transport_config; + + transport_config = st_ivas->intern_config == AUDIO_CONFIG_INVALID ? st_ivas->transport_config : st_ivas->intern_config; + switch ( transport_config ) + { + case AUDIO_CONFIG_5_1: + case AUDIO_CONFIG_5_1_2: + case AUDIO_CONFIG_5_1_4: + case AUDIO_CONFIG_7_1: + case AUDIO_CONFIG_7_1_4: + if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + if ( ( error = ivas_crend_init_from_hrtf_handle( st_ivas, st_ivas->hSetOfHRTF->hHRTF_brir_combined ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + if ( ( error = ivas_crend_init_from_hrtf_handle( st_ivas, st_ivas->hSetOfHRTF->hHRTF_hrir_combined ) ) != IVAS_ERR_OK ) + { + return error; + } + } + break; + case AUDIO_CONFIG_FOA: + case AUDIO_CONFIG_HOA2: + case AUDIO_CONFIG_HOA3: + if ( ( error = ivas_crend_init_from_hrtf_handle( st_ivas, st_ivas->hSetOfHRTF->hHRTF_hrir_hoa3 ) ) != IVAS_ERR_OK ) + { + return error; + } + break; + default: + return IVAS_ERR_INTERNAL; + } + + return IVAS_ERR_OK; +} + +#endif +#endif + +/*---------------------------------------------------------------------* + * destroy_HRTF() + * + * Destroy the HRTF CRend handle + *---------------------------------------------------------------------*/ + +static ivas_error destroy_HRTF( + HRTFS_HANDLE *hHRTF /* i/o: HRTF CRend handle */ +) +{ + uint16_t i, j; + + if ( *hHRTF != NULL && hHRTF != NULL ) + { + for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) + { + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( ( *hHRTF )->pIndex_frequency_max[i][j] != NULL ) + { + free( ( *hHRTF )->pIndex_frequency_max[i][j] ); + } + if ( ( *hHRTF )->pOut_to_bin_re[i][j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_re[i][j] ); + } + if ( ( *hHRTF )->pOut_to_bin_im[i][j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_im[i][j] ); + } + } + } + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] != NULL ) + { + free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] ); + } + if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] ); + } + if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] ); + } + } + + free( *hHRTF ); + *hHRTF = NULL; + } + + return IVAS_ERR_OK; +} + +#ifdef HRTF_BINARY_FILE +/*---------------------------------------------------------------------* + * destroy_SetOfHRTF() + * + * Destroy the HRTF data set. + *---------------------------------------------------------------------*/ + +ivas_error destroy_SetOfHRTF( + HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ +) +{ + if ( hSetOfHRTF != NULL ) + { + destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_combined ) ); + destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_hoa3 ) ); + destroy_HRTF( &( hSetOfHRTF->hHRTF_brir_combined ) ); + } return IVAS_ERR_OK; } +#endif +#ifndef FIX_197_CREND_INTERFACE /*------------------------------------------------------------------------- * ivas_crend_open() * @@ -662,13 +975,30 @@ ivas_error ivas_crend_open( if ( ( st_ivas->hHrtf == NULL ) && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) { +#ifdef HRTF_BINARY_FILE + if ( st_ivas->hSetOfHRTF != NULL ) + { + if ( ( error = ivas_crend_init_from_setofhrtf( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + if ( ( error = ivas_crend_init_from_rom( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#else if ( ( error = ivas_crend_init_from_rom( st_ivas ) ) != IVAS_ERR_OK ) { return error; } +#endif } - if ( ( hCrend = (CREND_HANDLE) count_malloc( sizeof( CREND_DATA ) ) ) == NULL ) + if ( ( hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for renderer handle" ); } @@ -704,13 +1034,13 @@ ivas_error ivas_crend_open( for ( i = 0; i < hHrtf->max_num_ir; i++ ) { - if ( ( hCrend->freq_buffer_re[i] = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + if ( ( hCrend->freq_buffer_re[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } set_f( hCrend->freq_buffer_re[i], 0, max_total_ir_len ); - if ( ( hCrend->freq_buffer_im[i] = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + if ( ( hCrend->freq_buffer_im[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } @@ -719,7 +1049,7 @@ ivas_error ivas_crend_open( for ( i = 0; i < BINAURAL_CHANNELS; i++ ) { - if ( ( hCrend->prev_out_buffer[i] = (float *) count_malloc( sizeof( float ) * subframe_length ) ) == NULL ) + if ( ( hCrend->prev_out_buffer[i] = (float *) malloc( sizeof( float ) * subframe_length ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } @@ -730,13 +1060,13 @@ ivas_error ivas_crend_open( if ( max_total_ir_len > 0 ) { - if ( ( hCrend->freq_buffer_re_diffuse = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + if ( ( hCrend->freq_buffer_re_diffuse = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } set_f( hCrend->freq_buffer_re_diffuse, 0, max_total_ir_len ); - if ( ( hCrend->freq_buffer_im_diffuse = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + if ( ( hCrend->freq_buffer_im_diffuse = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } @@ -751,7 +1081,7 @@ ivas_error ivas_crend_open( max_total_ir_len = (int16_t) ( hHrtf->latency_s * st_ivas->hDecoderConfig->output_Fs + 0.5f ) + subframe_length; if ( max_total_ir_len > 0 ) { - if ( ( hCrend->lfe_delay_line = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + if ( ( hCrend->lfe_delay_line = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } @@ -764,7 +1094,7 @@ ivas_error ivas_crend_open( if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { - if ( ( hCrend->hTrack = (ivas_orient_trk_state_t *) count_malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) + if ( ( hCrend->hTrack = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); } @@ -803,7 +1133,9 @@ ivas_error ivas_crend_open( return error; } +#endif +#ifndef FIX_197_CREND_INTERFACE /*------------------------------------------------------------------------- * ivas_crend_close() @@ -830,12 +1162,12 @@ ivas_error ivas_crend_close( { if ( st_ivas->hCrend->freq_buffer_re[i] != NULL ) { - count_free( st_ivas->hCrend->freq_buffer_re[i] ); + free( st_ivas->hCrend->freq_buffer_re[i] ); st_ivas->hCrend->freq_buffer_re[i] = NULL; } if ( st_ivas->hCrend->freq_buffer_im[i] != NULL ) { - count_free( st_ivas->hCrend->freq_buffer_im[i] ); + free( st_ivas->hCrend->freq_buffer_im[i] ); st_ivas->hCrend->freq_buffer_im[i] = NULL; } } @@ -844,45 +1176,47 @@ ivas_error ivas_crend_close( { if ( st_ivas->hCrend->prev_out_buffer[i] != NULL ) { - count_free( st_ivas->hCrend->prev_out_buffer[i] ); + free( st_ivas->hCrend->prev_out_buffer[i] ); st_ivas->hCrend->prev_out_buffer[i] = NULL; } } if ( st_ivas->hCrend->lfe_delay_line != NULL ) { - count_free( st_ivas->hCrend->lfe_delay_line ); + free( st_ivas->hCrend->lfe_delay_line ); st_ivas->hCrend->lfe_delay_line = NULL; } if ( st_ivas->hCrend->freq_buffer_re_diffuse != NULL ) { - count_free( st_ivas->hCrend->freq_buffer_re_diffuse ); + free( st_ivas->hCrend->freq_buffer_re_diffuse ); st_ivas->hCrend->freq_buffer_re_diffuse = NULL; } if ( st_ivas->hCrend->freq_buffer_im_diffuse != NULL ) { - count_free( st_ivas->hCrend->freq_buffer_im_diffuse ); + free( st_ivas->hCrend->freq_buffer_im_diffuse ); st_ivas->hCrend->freq_buffer_im_diffuse = NULL; } if ( st_ivas->hCrend->hTrack != NULL ) { - count_free( st_ivas->hCrend->hTrack ); + free( st_ivas->hCrend->hTrack ); st_ivas->hCrend->hTrack = NULL; } } ivas_reverb_close( &st_ivas->hCrend->hReverb ); - count_free( st_ivas->hCrend ); + free( st_ivas->hCrend ); st_ivas->hCrend = NULL; } return IVAS_ERR_OK; } +#endif +#ifndef FIX_197_CREND_INTERFACE /*-----------------------------------------------------------------------------------------* * Function ivas_crend_convolver() @@ -1020,7 +1354,9 @@ static ivas_error ivas_crend_convolver( return IVAS_ERR_OK; } +#endif +#ifndef FIX_197_CREND_INTERFACE /*-----------------------------------------------------------------------------------------* * Function ivas_crend_process() @@ -1039,7 +1375,7 @@ ivas_error ivas_crend_process( AUDIO_CONFIG intern_config; ivas_error error; - wmops_sub_start( "ivas_crend_process" ); + push_wmops( "ivas_crend_process" ); intern_config = st_ivas->intern_config; nchan_out = st_ivas->hDecoderConfig->nchan_out; @@ -1117,558 +1453,764 @@ ivas_error ivas_crend_process( mvr2r( pcm_tmp[i], output[i], output_frame ); } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } +#endif /*------------------------------------------------------------------------- - * ivas_rend_openCrend() + * initCrend_from_rom() * * Allocate and initialize crend renderer handle *------------------------------------------------------------------------*/ -ivas_error ivas_rend_openCrend( +ivas_error ivas_rend_initCrend( CREND_WRAPPER *pCrend, const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, +#ifdef HRTF_BINARY_FILE + HRTFS_CREND_HANDLE hSetOfHRTF, +#endif const int32_t output_Fs ) { - /* TODO tmu : Based on ivas_crend_open() - could be harmonized / refactored */ - int16_t i, subframe_length; - int16_t max_total_ir_len; + int16_t i, j, tmp; + int16_t nchan_in; + bool use_brir; + IVAS_REND_AudioConfigType inConfigType; HRTFS_HANDLE hHrtf; - CREND_HANDLE hCrend; ivas_error error; - error = IVAS_ERR_OK; - subframe_length = (int16_t) ( output_Fs / FRAMES_PER_SEC ) / MAX_PARAM_SPATIAL_SUBFRAMES; + inConfigType = getAudioConfigType( inConfig ); + hHrtf = pCrend->hHrtfCrend; - if ( pCrend->hHrtfCrend == NULL ) + /* Do all error checks up front so that the nested if later is easier */ + if ( inConfigType != IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED && inConfigType != IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Encountered unsupported input config in Crend" ); + } + if ( outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL && outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Encountered unsupported output type in Crend" ); + } + if ( hHrtf == NULL ) { - if ( ( error = ivas_rend_initCrend( pCrend, inConfig, outConfig, hRendCfg, output_Fs ) ) != IVAS_ERR_OK ) + if ( ivas_hrtf_open( &hHrtf ) != IVAS_ERR_OK ) { - return error; + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for HRTF handle" ); } } - if ( ( hCrend = (CREND_HANDLE) count_malloc( sizeof( CREND_DATA ) ) ) == NULL ) + /* set BRIR flag */ + use_brir = false; +#ifdef FIX_197_CREND_INTERFACE + if ( ( ( hRendCfg != NULL ) && hRendCfg->roomAcoustics.use_brir ) || ( ( hRendCfg == NULL ) && ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) ) ) { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for renderer handle" ); + use_brir = true; + } +#else + if ( ( hRendCfg != NULL && hRendCfg->roomAcoustics.use_brir ) || outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) + { + use_brir = true; } +#endif - hCrend->lfe_delay_line = NULL; - for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) + if ( ( error = getAudioConfigNumChannels( inConfig, &nchan_in ) ) != IVAS_ERR_OK ) { - hCrend->freq_buffer_re[i] = NULL; - hCrend->freq_buffer_im[i] = NULL; + return error; } + hHrtf->max_num_ir = nchan_in; - for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + if ( hHrtf->max_num_ir <= 0 ) { - hCrend->prev_out_buffer[i] = NULL; + return IVAS_ERR_INTERNAL_FATAL; } - hCrend->freq_buffer_re_diffuse = NULL; - hCrend->freq_buffer_im_diffuse = NULL; - hCrend->hReverb = NULL; - hCrend->delay_line_rw_index = 0; - hCrend->diffuse_delay_line_rw_index = 0; - hCrend->hTrack = NULL; - hCrend->m_fYaw = 0; - hCrend->m_fPitch = 0; - hCrend->m_fRoll = 0; - - hHrtf = pCrend->hHrtfCrend; - - if ( hHrtf != NULL ) +#ifdef HRTF_BINARY_FILE + if ( hSetOfHRTF == NULL ) { - max_total_ir_len = hHrtf->max_num_iterations * subframe_length; - - for ( i = 0; i < hHrtf->max_num_ir; i++ ) +#endif + if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) { - if ( ( hCrend->freq_buffer_re[i] = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); - } - set_zero( hCrend->freq_buffer_re[i], max_total_ir_len ); + hHrtf->max_num_ir -= 1; /* subtract LFE */ + hHrtf->gain_lfe = GAIN_LFE; - if ( ( hCrend->freq_buffer_im[i] = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + if ( output_Fs == 48000 ) { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); - } - set_zero( hCrend->freq_buffer_im[i], max_total_ir_len ); - } + if ( use_brir ) + { + hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_48kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_48kHz; + } + else + { + hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_48kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_48kHz; + } - for ( i = 0; i < BINAURAL_CHANNELS; i++ ) - { - if ( ( hCrend->prev_out_buffer[i] = (float *) count_malloc( sizeof( float ) * subframe_length ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); - } - set_zero( hCrend->prev_out_buffer[i], subframe_length ); - } - - max_total_ir_len = hHrtf->num_iterations_diffuse[0] * subframe_length; - - if ( max_total_ir_len > 0 ) - { - if ( ( hCrend->freq_buffer_re_diffuse = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( use_brir ) + { + hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_BRIR_num_iterations_diffuse_48kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_BRIR_pIndex_frequency_max_diffuse_48kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_BRIR_coeff_diffuse_re_48kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_BRIR_coeff_diffuse_im_48kHz[j]; + } + else + { + hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_HRIR_num_iterations_diffuse_48kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_HRIR_pIndex_frequency_max_diffuse_48kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_HRIR_coeff_diffuse_re_48kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_HRIR_coeff_diffuse_im_48kHz[j]; + } + } } - set_zero( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); - - if ( ( hCrend->freq_buffer_im_diffuse = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + else if ( output_Fs == 32000 ) { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); - } - set_zero( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); - } - else - { - hCrend->freq_buffer_re_diffuse = NULL; - hCrend->freq_buffer_im_diffuse = NULL; - } + if ( use_brir ) + { + hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_32kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_32kHz; + } + else + { + hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_32kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_32kHz; + } - max_total_ir_len = (int16_t) ( hHrtf->latency_s * output_Fs + 0.5f ) + subframe_length; - if ( max_total_ir_len > 0 ) - { - if ( ( hCrend->lfe_delay_line = (float *) count_malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( use_brir ) + { + hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_BRIR_num_iterations_diffuse_32kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_BRIR_pIndex_frequency_max_diffuse_32kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_BRIR_coeff_diffuse_re_32kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_BRIR_coeff_diffuse_im_32kHz[j]; + } + else + { + hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_HRIR_num_iterations_diffuse_32kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_HRIR_pIndex_frequency_max_diffuse_32kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_HRIR_coeff_diffuse_re_32kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_HRIR_coeff_diffuse_im_32kHz[j]; + } + } } - set_zero( hCrend->lfe_delay_line, max_total_ir_len ); - } - else - { - hCrend->lfe_delay_line = NULL; - } - - if ( false ) /* TODO tmu : check renderer headrotation flag */ - { - if ( ( hCrend->hTrack = (ivas_orient_trk_state_t *) count_malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) + else if ( output_Fs == 16000 ) { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); - } - - ivas_orient_trk_Init( hCrend->hTrack ); - } - else - { - hCrend->hTrack = NULL; - } + if ( use_brir ) + { + hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_16kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_16kHz; + } + else + { + hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_16kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_16kHz; + } - if ( ( hRendCfg != NULL ) && ( hRendCfg->roomAcoustics.late_reverb_on ) ) - { - if ( ( error = ivas_reverb_open( &( hCrend->hReverb ), - getIvasAudioConfigFromRendAudioConfig( inConfig ), - pCrend->hHrtfCrend, - hRendCfg, - output_Fs ) ) != IVAS_ERR_OK ) + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( use_brir ) + { + hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_BRIR_num_iterations_diffuse_16kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_BRIR_pIndex_frequency_max_diffuse_16kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_BRIR_coeff_diffuse_re_16kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_BRIR_coeff_diffuse_im_16kHz[j]; + } + else + { + hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_HRIR_num_iterations_diffuse_16kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_HRIR_pIndex_frequency_max_diffuse_16kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_HRIR_coeff_diffuse_re_16kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_HRIR_coeff_diffuse_im_16kHz[j]; + } + } + } + else { - return error; + return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Encountered Unsupported sampling rate in Crend" ); } - } - else - { - hCrend->hReverb = NULL; - } - - pCrend->binaural_latency_ns = (int32_t) ( pCrend->hHrtfCrend->latency_s * 1000000000.f ); - } - pCrend->hCrend = hCrend; - return IVAS_ERR_OK; -} + for ( i = 0; i < hHrtf->max_num_ir; i++ ) + { + if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1 ) + { + tmp = channelIndex_CICP6[i]; + } + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_7_1 ) + { + tmp = channelIndex_CICP12[i]; + } + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1_2 ) + { + tmp = channelIndex_CICP14[i]; + } + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1_4 ) + { + tmp = channelIndex_CICP16[i]; + } + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_7_1_4 ) + { + tmp = channelIndex_CICP19[i]; + } + else + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: Channel configuration not specified!\n\n" ); + } -/*------------------------------------------------------------------------- - * initCrend_from_rom() - * - * Allocate and initialize crend renderer handle - *------------------------------------------------------------------------*/ + if ( output_Fs == 48000 ) + { + if ( use_brir ) + { + hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_BRIR_inv_diffuse_weight_48kHz[tmp]; + } + else + { + hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_HRIR_inv_diffuse_weight_48kHz[tmp]; + } -ivas_error ivas_rend_initCrend( - CREND_WRAPPER *pCrend, - const IVAS_REND_AudioConfig inConfig, - const IVAS_REND_AudioConfig outConfig, - RENDER_CONFIG_DATA *hRendCfg, - const int32_t output_Fs ) -{ - int16_t i, j, tmp; - int16_t nchan_in; - bool use_brir; - IVAS_REND_AudioConfigType inConfigType; - HRTFS_HANDLE hHrtf; - ivas_error error; + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( use_brir ) + { + hHrtf->num_iterations[i][j] = CRendBin_Combined_BRIR_num_iterations_48kHz[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_BRIR_pIndex_frequency_max_48kHz[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_BRIR_coeff_re_48kHz[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_BRIR_coeff_im_48kHz[tmp][j]; + } + else + { + hHrtf->num_iterations[i][j] = CRendBin_Combined_HRIR_num_iterations_48kHz[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_HRIR_pIndex_frequency_max_48kHz[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_HRIR_coeff_re_48kHz[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_HRIR_coeff_im_48kHz[tmp][j]; + } + } + } + else if ( output_Fs == 32000 ) + { + if ( use_brir ) + { + hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_BRIR_inv_diffuse_weight_32kHz[tmp]; + } + else + { + hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_HRIR_inv_diffuse_weight_32kHz[tmp]; + } - inConfigType = getAudioConfigType( inConfig ); - hHrtf = pCrend->hHrtfCrend; + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( use_brir ) + { + hHrtf->num_iterations[i][j] = CRendBin_Combined_BRIR_num_iterations_32kHz[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_BRIR_pIndex_frequency_max_32kHz[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_BRIR_coeff_re_32kHz[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_BRIR_coeff_im_32kHz[tmp][j]; + } + else + { + hHrtf->num_iterations[i][j] = CRendBin_Combined_HRIR_num_iterations_32kHz[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_HRIR_pIndex_frequency_max_32kHz[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_HRIR_coeff_re_32kHz[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_HRIR_coeff_im_32kHz[tmp][j]; + } + } + } + else if ( output_Fs == 16000 ) + { + if ( use_brir ) + { + hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_BRIR_inv_diffuse_weight_16kHz[tmp]; + } + else + { + hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_HRIR_inv_diffuse_weight_16kHz[tmp]; + } - /* Do all error checks up front so that the nested if later is easier */ - if ( inConfigType != IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED && inConfigType != IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) - { - return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Encountered unsupported input config in Crend" ); - } - if ( outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL && outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Encountered unsupported output type in Crend" ); - } - if ( hHrtf == NULL ) - { - if ( ivas_hrtf_open( &hHrtf ) != IVAS_ERR_OK ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for HRTF handle" ); + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( use_brir ) + { + hHrtf->num_iterations[i][j] = CRendBin_Combined_BRIR_num_iterations_16kHz[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_BRIR_pIndex_frequency_max_16kHz[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_BRIR_coeff_re_16kHz[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_BRIR_coeff_im_16kHz[tmp][j]; + } + else + { + hHrtf->num_iterations[i][j] = CRendBin_Combined_HRIR_num_iterations_16kHz[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_HRIR_pIndex_frequency_max_16kHz[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_HRIR_coeff_re_16kHz[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_HRIR_coeff_im_16kHz[tmp][j]; + } + } + } + else + { + return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Encountered Unsupported sampling rate in Crend" ); + } + } } - } - - /* set BRIR flag */ - use_brir = false; - if ( ( hRendCfg != NULL && hRendCfg->roomAcoustics.use_brir ) || outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) - { - use_brir = true; - } - - - if ( ( error = getAudioConfigNumChannels( inConfig, &nchan_in ) ) != IVAS_ERR_OK ) - { - return error; - } - hHrtf->max_num_ir = nchan_in; - - if ( hHrtf->max_num_ir <= 0 ) - { - return IVAS_ERR_INTERNAL_FATAL; - } - - - if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) - { - hHrtf->max_num_ir -= 1; /* subtract LFE */ - hHrtf->gain_lfe = GAIN_LFE; - - if ( output_Fs == 48000 ) + else if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) { - if ( use_brir ) - { - hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_48kHz; - hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_48kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_48kHz; - } - else + if ( output_Fs == 48000 ) { - hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_48kHz; - hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_48kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_48kHz; - } + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_48kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_48kHz; - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) - { - if ( use_brir ) + for ( i = 0; i < hHrtf->max_num_ir; i++ ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_BRIR_num_iterations_diffuse_48kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_BRIR_pIndex_frequency_max_diffuse_48kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_BRIR_coeff_diffuse_re_48kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_BRIR_coeff_diffuse_im_48kHz[j]; + hHrtf->inv_diffuse_weight[i] = CRendBin_HOA3_HRIR_inv_diffuse_weight_48kHz[i]; + + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + hHrtf->num_iterations[i][j] = CRendBin_HOA3_HRIR_num_iterations_48kHz[i][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_48kHz[i][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_HOA3_HRIR_coeff_re_48kHz[i][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_HOA3_HRIR_coeff_im_48kHz[i][j]; + } } - else + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_HRIR_num_iterations_diffuse_48kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_HRIR_pIndex_frequency_max_diffuse_48kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_HRIR_coeff_diffuse_re_48kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_HRIR_coeff_diffuse_im_48kHz[j]; + hHrtf->num_iterations_diffuse[j] = CRendBin_HOA3_HRIR_num_iterations_diffuse_48kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_diffuse_48kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_HOA3_HRIR_coeff_diffuse_re_48kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_HOA3_HRIR_coeff_diffuse_im_48kHz[j]; } } - } - else if ( output_Fs == 32000 ) - { - if ( use_brir ) + else if ( output_Fs == 32000 ) { - hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_32kHz; - hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_32kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_32kHz; + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_32kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_32kHz; + + for ( i = 0; i < hHrtf->max_num_ir; i++ ) + { + hHrtf->inv_diffuse_weight[i] = CRendBin_HOA3_HRIR_inv_diffuse_weight_32kHz[i]; + + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + hHrtf->num_iterations[i][j] = CRendBin_HOA3_HRIR_num_iterations_32kHz[i][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_32kHz[i][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_HOA3_HRIR_coeff_re_32kHz[i][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_HOA3_HRIR_coeff_im_32kHz[i][j]; + } + } + + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + hHrtf->num_iterations_diffuse[j] = CRendBin_HOA3_HRIR_num_iterations_diffuse_32kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_diffuse_32kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_HOA3_HRIR_coeff_diffuse_re_32kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_HOA3_HRIR_coeff_diffuse_im_32kHz[j]; + } } - else + else if ( output_Fs == 16000 ) { - hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_32kHz; - hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_32kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_32kHz; - } + hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s; + hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_16kHz; + hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_16kHz; - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) - { - if ( use_brir ) + for ( i = 0; i < hHrtf->max_num_ir; i++ ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_BRIR_num_iterations_diffuse_32kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_BRIR_pIndex_frequency_max_diffuse_32kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_BRIR_coeff_diffuse_re_32kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_BRIR_coeff_diffuse_im_32kHz[j]; + hHrtf->inv_diffuse_weight[i] = CRendBin_HOA3_HRIR_inv_diffuse_weight_16kHz[i]; + + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + hHrtf->num_iterations[i][j] = CRendBin_HOA3_HRIR_num_iterations_16kHz[i][j]; + hHrtf->pIndex_frequency_max[i][j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_16kHz[i][j]; + hHrtf->pOut_to_bin_re[i][j] = CRendBin_HOA3_HRIR_coeff_re_16kHz[i][j]; + hHrtf->pOut_to_bin_im[i][j] = CRendBin_HOA3_HRIR_coeff_im_16kHz[i][j]; + } } - else + + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_HRIR_num_iterations_diffuse_32kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_HRIR_pIndex_frequency_max_diffuse_32kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_HRIR_coeff_diffuse_re_32kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_HRIR_coeff_diffuse_im_32kHz[j]; + hHrtf->num_iterations_diffuse[j] = CRendBin_HOA3_HRIR_num_iterations_diffuse_16kHz[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_diffuse_16kHz[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_HOA3_HRIR_coeff_diffuse_re_16kHz[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_HOA3_HRIR_coeff_diffuse_im_16kHz[j]; } } + else + { + return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Encountered Unsupported sampling rate in Crend" ); + } + } + else + { + return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); } - else if ( output_Fs == 16000 ) +#ifdef HRTF_BINARY_FILE + } + else + { + if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) { + hHrtf->max_num_ir -= 1; /* subtract LFE */ + hHrtf->gain_lfe = GAIN_LFE; + if ( use_brir ) { - hHrtf->latency_s = CRendBin_Combined_BRIR_latency_s_16kHz; - hHrtf->max_num_iterations = CRendBin_Combined_BRIR_max_num_iterations_16kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_Combined_BRIR_index_frequency_max_diffuse_16kHz; + hHrtf->latency_s = hSetOfHRTF->hHRTF_brir_combined->latency_s; + hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_brir_combined->max_num_iterations; + hHrtf->index_frequency_max_diffuse = hSetOfHRTF->hHRTF_brir_combined->index_frequency_max_diffuse; } else { - hHrtf->latency_s = CRendBin_Combined_HRIR_latency_s_16kHz; - hHrtf->max_num_iterations = CRendBin_Combined_HRIR_max_num_iterations_16kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_Combined_HRIR_index_frequency_max_diffuse_16kHz; + hHrtf->latency_s = hSetOfHRTF->hHRTF_hrir_combined->latency_s; + hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_hrir_combined->max_num_iterations; + hHrtf->index_frequency_max_diffuse = hSetOfHRTF->hHRTF_hrir_combined->index_frequency_max_diffuse; } for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( use_brir ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_BRIR_num_iterations_diffuse_16kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_BRIR_pIndex_frequency_max_diffuse_16kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_BRIR_coeff_diffuse_re_16kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_BRIR_coeff_diffuse_im_16kHz[j]; + hHrtf->num_iterations_diffuse[j] = hSetOfHRTF->hHRTF_brir_combined->num_iterations_diffuse[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = hSetOfHRTF->hHRTF_brir_combined->pIndex_frequency_max_diffuse[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = hSetOfHRTF->hHRTF_brir_combined->pOut_to_bin_diffuse_re[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = hSetOfHRTF->hHRTF_brir_combined->pOut_to_bin_diffuse_im[j]; } else { - hHrtf->num_iterations_diffuse[j] = CRendBin_Combined_HRIR_num_iterations_diffuse_16kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_Combined_HRIR_pIndex_frequency_max_diffuse_16kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_Combined_HRIR_coeff_diffuse_re_16kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_Combined_HRIR_coeff_diffuse_im_16kHz[j]; + hHrtf->num_iterations_diffuse[j] = hSetOfHRTF->hHRTF_hrir_combined->num_iterations_diffuse[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = hSetOfHRTF->hHRTF_hrir_combined->pIndex_frequency_max_diffuse[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = hSetOfHRTF->hHRTF_hrir_combined->pOut_to_bin_diffuse_re[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = hSetOfHRTF->hHRTF_hrir_combined->pOut_to_bin_diffuse_im[j]; } } - } - else - { - return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Encountered Unsupported sampling rate in Crend" ); - } - - for ( i = 0; i < hHrtf->max_num_ir; i++ ) - { - if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1 ) - { - tmp = channelIndex_CICP6[i]; - } - else if ( inConfig == IVAS_REND_AUDIO_CONFIG_7_1 ) - { - tmp = channelIndex_CICP12[i]; - } - else if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1_2 ) - { - tmp = channelIndex_CICP14[i]; - } - else if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1_4 ) - { - tmp = channelIndex_CICP16[i]; - } - else if ( inConfig == IVAS_REND_AUDIO_CONFIG_7_1_4 ) - { - tmp = channelIndex_CICP19[i]; - } - else - { - return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: Channel configuration not specified!\n\n" ); - } - if ( output_Fs == 48000 ) + for ( i = 0; i < hHrtf->max_num_ir; i++ ) { - if ( use_brir ) + if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1 ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_BRIR_inv_diffuse_weight_48kHz[tmp]; + tmp = channelIndex_CICP6[i]; } - else + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_7_1 ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_HRIR_inv_diffuse_weight_48kHz[tmp]; + tmp = channelIndex_CICP12[i]; } - - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1_2 ) { - if ( use_brir ) - { - hHrtf->num_iterations[i][j] = CRendBin_Combined_BRIR_num_iterations_48kHz[tmp][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_BRIR_pIndex_frequency_max_48kHz[tmp][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_BRIR_coeff_re_48kHz[tmp][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_BRIR_coeff_im_48kHz[tmp][j]; - } - else - { - hHrtf->num_iterations[i][j] = CRendBin_Combined_HRIR_num_iterations_48kHz[tmp][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_HRIR_pIndex_frequency_max_48kHz[tmp][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_HRIR_coeff_re_48kHz[tmp][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_HRIR_coeff_im_48kHz[tmp][j]; - } + tmp = channelIndex_CICP14[i]; } - } - else if ( output_Fs == 32000 ) - { - if ( use_brir ) + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1_4 ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_BRIR_inv_diffuse_weight_32kHz[tmp]; + tmp = channelIndex_CICP16[i]; } - else + else if ( inConfig == IVAS_REND_AUDIO_CONFIG_7_1_4 ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_HRIR_inv_diffuse_weight_32kHz[tmp]; + tmp = channelIndex_CICP19[i]; } - - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + else { - if ( use_brir ) - { - hHrtf->num_iterations[i][j] = CRendBin_Combined_BRIR_num_iterations_32kHz[tmp][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_BRIR_pIndex_frequency_max_32kHz[tmp][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_BRIR_coeff_re_32kHz[tmp][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_BRIR_coeff_im_32kHz[tmp][j]; - } - else - { - hHrtf->num_iterations[i][j] = CRendBin_Combined_HRIR_num_iterations_32kHz[tmp][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_HRIR_pIndex_frequency_max_32kHz[tmp][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_HRIR_coeff_re_32kHz[tmp][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_HRIR_coeff_im_32kHz[tmp][j]; - } + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error: Channel configuration not specified!\n\n" ); } - } - else if ( output_Fs == 16000 ) - { + if ( use_brir ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_BRIR_inv_diffuse_weight_16kHz[tmp]; + hHrtf->inv_diffuse_weight[i] = hSetOfHRTF->hHRTF_brir_combined->inv_diffuse_weight[tmp]; } else { - hHrtf->inv_diffuse_weight[i] = CRendBin_Combined_HRIR_inv_diffuse_weight_16kHz[tmp]; + hHrtf->inv_diffuse_weight[i] = hSetOfHRTF->hHRTF_hrir_combined->inv_diffuse_weight[tmp]; } for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( use_brir ) { - hHrtf->num_iterations[i][j] = CRendBin_Combined_BRIR_num_iterations_16kHz[tmp][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_BRIR_pIndex_frequency_max_16kHz[tmp][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_BRIR_coeff_re_16kHz[tmp][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_BRIR_coeff_im_16kHz[tmp][j]; + hHrtf->num_iterations[i][j] = hSetOfHRTF->hHRTF_brir_combined->num_iterations[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = hSetOfHRTF->hHRTF_brir_combined->pIndex_frequency_max[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = hSetOfHRTF->hHRTF_brir_combined->pOut_to_bin_re[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = hSetOfHRTF->hHRTF_brir_combined->pOut_to_bin_im[tmp][j]; } else { - hHrtf->num_iterations[i][j] = CRendBin_Combined_HRIR_num_iterations_16kHz[tmp][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_Combined_HRIR_pIndex_frequency_max_16kHz[tmp][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_Combined_HRIR_coeff_re_16kHz[tmp][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_Combined_HRIR_coeff_im_16kHz[tmp][j]; + hHrtf->num_iterations[i][j] = hSetOfHRTF->hHRTF_hrir_combined->num_iterations[tmp][j]; + hHrtf->pIndex_frequency_max[i][j] = hSetOfHRTF->hHRTF_hrir_combined->pIndex_frequency_max[tmp][j]; + hHrtf->pOut_to_bin_re[i][j] = hSetOfHRTF->hHRTF_hrir_combined->pOut_to_bin_re[tmp][j]; + hHrtf->pOut_to_bin_im[i][j] = hSetOfHRTF->hHRTF_hrir_combined->pOut_to_bin_im[tmp][j]; } } } - else - { - return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Encountered Unsupported sampling rate in Crend" ); - } } - } - else if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) - { - if ( output_Fs == 48000 ) + else if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_48kHz; - hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_48kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_48kHz; + hHrtf->latency_s = hSetOfHRTF->hHRTF_hrir_hoa3->latency_s; + hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_hrir_hoa3->max_num_iterations; + hHrtf->index_frequency_max_diffuse = hSetOfHRTF->hHRTF_hrir_hoa3->index_frequency_max_diffuse; for ( i = 0; i < hHrtf->max_num_ir; i++ ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_HOA3_HRIR_inv_diffuse_weight_48kHz[i]; + hHrtf->inv_diffuse_weight[i] = hSetOfHRTF->hHRTF_hrir_hoa3->inv_diffuse_weight[i]; for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { - hHrtf->num_iterations[i][j] = CRendBin_HOA3_HRIR_num_iterations_48kHz[i][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_48kHz[i][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_HOA3_HRIR_coeff_re_48kHz[i][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_HOA3_HRIR_coeff_im_48kHz[i][j]; + hHrtf->num_iterations[i][j] = hSetOfHRTF->hHRTF_hrir_hoa3->num_iterations[i][j]; + hHrtf->pIndex_frequency_max[i][j] = hSetOfHRTF->hHRTF_hrir_hoa3->pIndex_frequency_max[i][j]; + hHrtf->pOut_to_bin_re[i][j] = hSetOfHRTF->hHRTF_hrir_hoa3->pOut_to_bin_re[i][j]; + hHrtf->pOut_to_bin_im[i][j] = hSetOfHRTF->hHRTF_hrir_hoa3->pOut_to_bin_im[i][j]; } } for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_HOA3_HRIR_num_iterations_diffuse_48kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_diffuse_48kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_HOA3_HRIR_coeff_diffuse_re_48kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_HOA3_HRIR_coeff_diffuse_im_48kHz[j]; + hHrtf->num_iterations_diffuse[j] = hSetOfHRTF->hHRTF_hrir_hoa3->num_iterations_diffuse[j]; + hHrtf->pIndex_frequency_max_diffuse[j] = hSetOfHRTF->hHRTF_hrir_hoa3->pIndex_frequency_max_diffuse[j]; + hHrtf->pOut_to_bin_diffuse_re[j] = hSetOfHRTF->hHRTF_hrir_hoa3->pOut_to_bin_diffuse_re[j]; + hHrtf->pOut_to_bin_diffuse_im[j] = hSetOfHRTF->hHRTF_hrir_hoa3->pOut_to_bin_diffuse_im[j]; } } - else if ( output_Fs == 32000 ) + else { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_32kHz; - hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_32kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_32kHz; + return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); + } + } +#endif - for ( i = 0; i < hHrtf->max_num_ir; i++ ) + pCrend->hHrtfCrend = hHrtf; + + return IVAS_ERR_OK; +} + +/*------------------------------------------------------------------------- + * ivas_rend_openCrend() + * + * Allocate and initialize crend renderer handle + *------------------------------------------------------------------------*/ + +ivas_error ivas_rend_openCrend( +#ifdef FIX_197_CREND_INTERFACE + CREND_WRAPPER_HANDLE *pCrend, +#else + CREND_WRAPPER *pCrend, +#endif + const IVAS_REND_AudioConfig inConfig, + const IVAS_REND_AudioConfig outConfig, + RENDER_CONFIG_DATA *hRendCfg, +#ifdef FIX_197_CREND_INTERFACE + int16_t Opt_Headrotation, +#endif +#ifdef HRTF_BINARY_FILE + HRTFS_CREND_HANDLE hSetOfHRTF, +#endif + const int32_t output_Fs ) +{ + /* TODO tmu : Based on ivas_crend_open() - could be harmonized / refactored */ + int16_t i, subframe_length; + int16_t max_total_ir_len; + HRTFS_HANDLE hHrtf; + CREND_HANDLE hCrend; + ivas_error error; + + error = IVAS_ERR_OK; + +#ifdef FIX_197_CREND_INTERFACE + if ( pCrend == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend Wrapper\n" ); + } + + if ( *pCrend == NULL ) + { + if ( ( *pCrend = (CREND_WRAPPER_HANDLE) malloc( sizeof( CREND_WRAPPER ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend Wrapper\n" ); + } + ( *pCrend )->binaural_latency_ns = 0; + ( *pCrend )->hCrend = NULL; + ( *pCrend )->hHrtfCrend = NULL; + } +#endif + + subframe_length = (int16_t) ( output_Fs / FRAMES_PER_SEC ) / MAX_PARAM_SPATIAL_SUBFRAMES; + +#ifdef FIX_197_CREND_INTERFACE + if ( ( *pCrend )->hHrtfCrend == NULL ) + { +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_rend_initCrend( *pCrend, inConfig, outConfig, hRendCfg, hSetOfHRTF, output_Fs ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_rend_initCrend( *pCrend, inConfig, outConfig, hRendCfg, output_Fs ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } + } +#else + if ( pCrend->hHrtfCrend == NULL ) + { + if ( ( error = ivas_rend_initCrend( pCrend, inConfig, outConfig, hRendCfg, +#ifdef HRTF_BINARY_FILE + hSetOfHRTF, +#endif + output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif + + if ( ( hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for renderer handle" ); + } + + hCrend->lfe_delay_line = NULL; + + for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) + { + hCrend->freq_buffer_re[i] = NULL; + hCrend->freq_buffer_im[i] = NULL; + } + + for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + { + hCrend->prev_out_buffer[i] = NULL; + } + + hCrend->freq_buffer_re_diffuse = NULL; + hCrend->freq_buffer_im_diffuse = NULL; + hCrend->hReverb = NULL; + hCrend->delay_line_rw_index = 0; + hCrend->diffuse_delay_line_rw_index = 0; + hCrend->hTrack = NULL; + hCrend->m_fYaw = 0; + hCrend->m_fPitch = 0; + hCrend->m_fRoll = 0; + +#ifdef FIX_197_CREND_INTERFACE + hHrtf = ( *pCrend )->hHrtfCrend; +#else + hHrtf = pCrend->hHrtfCrend; +#endif + + if ( hHrtf != NULL ) + { + max_total_ir_len = hHrtf->max_num_iterations * subframe_length; + + for ( i = 0; i < hHrtf->max_num_ir; i++ ) + { + if ( ( hCrend->freq_buffer_re[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_HOA3_HRIR_inv_diffuse_weight_32kHz[i]; + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); + } + set_zero( hCrend->freq_buffer_re[i], max_total_ir_len ); - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) - { - hHrtf->num_iterations[i][j] = CRendBin_HOA3_HRIR_num_iterations_32kHz[i][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_32kHz[i][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_HOA3_HRIR_coeff_re_32kHz[i][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_HOA3_HRIR_coeff_im_32kHz[i][j]; - } + if ( ( hCrend->freq_buffer_im[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } + set_zero( hCrend->freq_buffer_im[i], max_total_ir_len ); + } - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + { + if ( ( hCrend->prev_out_buffer[i] = (float *) malloc( sizeof( float ) * subframe_length ) ) == NULL ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_HOA3_HRIR_num_iterations_diffuse_32kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_diffuse_32kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_HOA3_HRIR_coeff_diffuse_re_32kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_HOA3_HRIR_coeff_diffuse_im_32kHz[j]; + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } + set_zero( hCrend->prev_out_buffer[i], subframe_length ); } - else if ( output_Fs == 16000 ) + + max_total_ir_len = hHrtf->num_iterations_diffuse[0] * subframe_length; + + if ( max_total_ir_len > 0 ) { - hHrtf->latency_s = CRendBin_HOA3_HRIR_latency_s_16kHz; - hHrtf->max_num_iterations = CRendBin_HOA3_HRIR_max_num_iterations_16kHz; - hHrtf->index_frequency_max_diffuse = CRendBin_HOA3_HRIR_index_frequency_max_diffuse_16kHz; + if ( ( hCrend->freq_buffer_re_diffuse = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); + } + set_zero( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); - for ( i = 0; i < hHrtf->max_num_ir; i++ ) + if ( ( hCrend->freq_buffer_im_diffuse = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { - hHrtf->inv_diffuse_weight[i] = CRendBin_HOA3_HRIR_inv_diffuse_weight_16kHz[i]; + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); + } + set_zero( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); + } + else + { + hCrend->freq_buffer_re_diffuse = NULL; + hCrend->freq_buffer_im_diffuse = NULL; + } - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) - { - hHrtf->num_iterations[i][j] = CRendBin_HOA3_HRIR_num_iterations_16kHz[i][j]; - hHrtf->pIndex_frequency_max[i][j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_16kHz[i][j]; - hHrtf->pOut_to_bin_re[i][j] = CRendBin_HOA3_HRIR_coeff_re_16kHz[i][j]; - hHrtf->pOut_to_bin_im[i][j] = CRendBin_HOA3_HRIR_coeff_im_16kHz[i][j]; - } + max_total_ir_len = (int16_t) ( hHrtf->latency_s * output_Fs + 0.5f ) + subframe_length; + if ( max_total_ir_len > 0 ) + { + if ( ( hCrend->lfe_delay_line = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); + } + set_zero( hCrend->lfe_delay_line, max_total_ir_len ); + } + else + { + hCrend->lfe_delay_line = NULL; + } +#ifdef FIX_197_CREND_INTERFACE + if ( Opt_Headrotation ) +#else + if ( false ) /* TODO tmu : check renderer headrotation flag */ +#endif + { + if ( ( hCrend->hTrack = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); } - for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + ivas_orient_trk_Init( hCrend->hTrack ); + } + else + { + hCrend->hTrack = NULL; + } + + if ( ( hRendCfg != NULL ) && ( hRendCfg->roomAcoustics.late_reverb_on ) ) + { + if ( ( error = ivas_reverb_open( &( hCrend->hReverb ), + getIvasAudioConfigFromRendAudioConfig( inConfig ), +#ifdef FIX_197_CREND_INTERFACE + ( *pCrend )->hHrtfCrend, +#else + pCrend->hHrtfCrend, +#endif + hRendCfg, + output_Fs ) ) != IVAS_ERR_OK ) { - hHrtf->num_iterations_diffuse[j] = CRendBin_HOA3_HRIR_num_iterations_diffuse_16kHz[j]; - hHrtf->pIndex_frequency_max_diffuse[j] = CRendBin_HOA3_HRIR_pIndex_frequency_max_diffuse_16kHz[j]; - hHrtf->pOut_to_bin_diffuse_re[j] = CRendBin_HOA3_HRIR_coeff_diffuse_re_16kHz[j]; - hHrtf->pOut_to_bin_diffuse_im[j] = CRendBin_HOA3_HRIR_coeff_diffuse_im_16kHz[j]; + return error; } } else { - return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Encountered Unsupported sampling rate in Crend" ); + hCrend->hReverb = NULL; } - } - else - { - return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); +#ifdef FIX_197_CREND_INTERFACE + ( *pCrend )->binaural_latency_ns = (int32_t) ( ( *pCrend )->hHrtfCrend->latency_s * 1000000000.f ); +#else + pCrend->binaural_latency_ns = (int32_t) ( pCrend->hHrtfCrend->latency_s * 1000000000.f ); +#endif } - pCrend->hHrtfCrend = hHrtf; - +#ifdef FIX_197_CREND_INTERFACE + ( *pCrend )->hCrend = hCrend; +#else + pCrend->hCrend = hCrend; +#endif return IVAS_ERR_OK; } @@ -1678,11 +2220,91 @@ ivas_error ivas_rend_initCrend( * Deallocate Crend renderer handle *------------------------------------------------------------------------*/ +#ifdef FIX_197_CREND_INTERFACE +void ivas_rend_closeCrend( + CREND_WRAPPER_HANDLE *pCrend ) +#else ivas_error ivas_rend_closeCrend( CREND_WRAPPER *pCrend ) +#endif { int16_t i; +#ifdef FIX_197_CREND_INTERFACE + if ( pCrend == NULL ) + { + return; + } + + if ( *pCrend == NULL ) + { + return; + } + + if ( ( *pCrend )->hHrtfCrend != NULL ) + { + ivas_hrtf_close( &( *pCrend )->hHrtfCrend ); + } + + if ( ( *pCrend )->hCrend != NULL ) + { + + for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) + { + if ( ( *pCrend )->hCrend->freq_buffer_re[i] != NULL ) + { + free( ( *pCrend )->hCrend->freq_buffer_re[i] ); + ( *pCrend )->hCrend->freq_buffer_re[i] = NULL; + } + if ( ( *pCrend )->hCrend->freq_buffer_im[i] != NULL ) + { + free( ( *pCrend )->hCrend->freq_buffer_im[i] ); + ( *pCrend )->hCrend->freq_buffer_im[i] = NULL; + } + } + + for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + { + if ( ( *pCrend )->hCrend->prev_out_buffer[i] != NULL ) + { + free( ( *pCrend )->hCrend->prev_out_buffer[i] ); + ( *pCrend )->hCrend->prev_out_buffer[i] = NULL; + } + } + + if ( ( *pCrend )->hCrend->lfe_delay_line != NULL ) + { + free( ( *pCrend )->hCrend->lfe_delay_line ); + ( *pCrend )->hCrend->lfe_delay_line = NULL; + } + + if ( ( *pCrend )->hCrend->freq_buffer_re_diffuse != NULL ) + { + free( ( *pCrend )->hCrend->freq_buffer_re_diffuse ); + ( *pCrend )->hCrend->freq_buffer_re_diffuse = NULL; + } + + if ( ( *pCrend )->hCrend->freq_buffer_im_diffuse != NULL ) + { + free( ( *pCrend )->hCrend->freq_buffer_im_diffuse ); + ( *pCrend )->hCrend->freq_buffer_im_diffuse = NULL; + } + + if ( ( *pCrend )->hCrend->hTrack != NULL ) + { + free( ( *pCrend )->hCrend->hTrack ); + ( *pCrend )->hCrend->hTrack = NULL; + } + + ivas_reverb_close( &( *pCrend )->hCrend->hReverb ); + + free( ( *pCrend )->hCrend ); + ( *pCrend )->hCrend = NULL; + free( *pCrend ); + *pCrend = NULL; + } + return; +#else if ( pCrend->hHrtfCrend != NULL ) { ivas_hrtf_close( &pCrend->hHrtfCrend ); @@ -1695,12 +2317,12 @@ ivas_error ivas_rend_closeCrend( { if ( pCrend->hCrend->freq_buffer_re[i] != NULL ) { - count_free( pCrend->hCrend->freq_buffer_re[i] ); + free( pCrend->hCrend->freq_buffer_re[i] ); pCrend->hCrend->freq_buffer_re[i] = NULL; } if ( pCrend->hCrend->freq_buffer_im[i] != NULL ) { - count_free( pCrend->hCrend->freq_buffer_im[i] ); + free( pCrend->hCrend->freq_buffer_im[i] ); pCrend->hCrend->freq_buffer_im[i] = NULL; } } @@ -1709,44 +2331,201 @@ ivas_error ivas_rend_closeCrend( { if ( pCrend->hCrend->prev_out_buffer[i] != NULL ) { - count_free( pCrend->hCrend->prev_out_buffer[i] ); + free( pCrend->hCrend->prev_out_buffer[i] ); pCrend->hCrend->prev_out_buffer[i] = NULL; } } if ( pCrend->hCrend->lfe_delay_line != NULL ) { - count_free( pCrend->hCrend->lfe_delay_line ); + free( pCrend->hCrend->lfe_delay_line ); pCrend->hCrend->lfe_delay_line = NULL; } if ( pCrend->hCrend->freq_buffer_re_diffuse != NULL ) { - count_free( pCrend->hCrend->freq_buffer_re_diffuse ); + free( pCrend->hCrend->freq_buffer_re_diffuse ); pCrend->hCrend->freq_buffer_re_diffuse = NULL; } if ( pCrend->hCrend->freq_buffer_im_diffuse != NULL ) { - count_free( pCrend->hCrend->freq_buffer_im_diffuse ); + free( pCrend->hCrend->freq_buffer_im_diffuse ); pCrend->hCrend->freq_buffer_im_diffuse = NULL; } if ( pCrend->hCrend->hTrack != NULL ) { - count_free( pCrend->hCrend->hTrack ); + free( pCrend->hCrend->hTrack ); pCrend->hCrend->hTrack = NULL; } ivas_reverb_close( &pCrend->hCrend->hReverb ); - count_free( pCrend->hCrend ); + free( pCrend->hCrend ); pCrend->hCrend = NULL; } + return IVAS_ERR_OK; +#endif +} + +#ifdef FIX_197_CREND_INTERFACE + +/*-----------------------------------------------------------------------------------------* + * Function ivas_crend_convolver() + * + * Convolver block + *-----------------------------------------------------------------------------------------*/ + +static ivas_error ivas_rend_crendConvolver( + const CREND_WRAPPER *pCrend, + IVAS_REND_AudioConfig inConfig, + IVAS_REND_AudioConfig outConfig, + float pcm_in[][L_FRAME48k], + float pcm_out[][L_FRAME48k], + const int32_t output_Fs, + const int16_t i_ts ) +{ + int16_t i, j, k, m; + int16_t subframe_length, idx_in; + int16_t lfe_idx_in; + int16_t offset, offset_in, offset_diffuse; + int16_t nchan_in, nchan_out; + float *pIn; + float *pFreq_buf_re, *pFreq_buf_im; + float *pFreq_filt_re, *pFreq_filt_im; + float pOut[L_FRAME48k * 2]; + float tmp_out_re[L_FRAME48k], tmp_out_im[L_FRAME48k]; + + getAudioConfigNumChannels( inConfig, &nchan_in ); + getAudioConfigNumChannels( outConfig, &nchan_out ); + + subframe_length = (int16_t) ( output_Fs / FRAMES_PER_SEC ) / MAX_PARAM_SPATIAL_SUBFRAMES; + + lfe_idx_in = -1; + if ( getAudioConfigType( inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) + { + if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) + { + lfe_idx_in = LFE_CHANNEL; + } + else + { + assert( 0 && "Custom LS not supported in CRend" ); + } + } + + offset = pCrend->hCrend->delay_line_rw_index * subframe_length; /* subframe_length * ( pCrend->hHrtfCrend->max_num_iterations - 1 ); */ + offset_diffuse = pCrend->hCrend->diffuse_delay_line_rw_index * subframe_length; /* subframe_length *( pCrend->hHrtfCrend->num_iterations_diffuse[0] - 1 ); */ + + if ( pCrend->hHrtfCrend->num_iterations_diffuse[0] > 0 ) + { + set_zero( &pCrend->hCrend->freq_buffer_re_diffuse[offset_diffuse], subframe_length ); + set_zero( &pCrend->hCrend->freq_buffer_im_diffuse[offset_diffuse], subframe_length ); + } + + i = 0; + for ( idx_in = 0; idx_in < nchan_in; idx_in++ ) + { + pIn = &pcm_in[idx_in][i_ts * subframe_length]; + if ( idx_in != lfe_idx_in ) + { + if ( pCrend->hHrtfCrend->num_iterations_diffuse[0] > 0 ) + { + pFreq_buf_re = &pCrend->hCrend->freq_buffer_re_diffuse[offset_diffuse]; + pFreq_buf_im = &pCrend->hCrend->freq_buffer_im_diffuse[offset_diffuse]; + pFreq_filt_re = &pCrend->hCrend->freq_buffer_re[i][offset]; + pFreq_filt_im = &pCrend->hCrend->freq_buffer_im[i][offset]; + + for ( k = 0; k < pCrend->hHrtfCrend->index_frequency_max_diffuse; k++ ) + { + pFreq_buf_re[k] += pFreq_filt_re[k] * pCrend->hHrtfCrend->inv_diffuse_weight[i]; + pFreq_buf_im[k] += pFreq_filt_im[k] * pCrend->hHrtfCrend->inv_diffuse_weight[i]; + } + } + + pFreq_buf_re = &pCrend->hCrend->freq_buffer_re[i][offset]; + pFreq_buf_im = &pCrend->hCrend->freq_buffer_im[i][offset]; + + ivas_mdft( pIn, pFreq_buf_re, pFreq_buf_im, subframe_length, subframe_length ); + i++; + } + } + + for ( j = 0; j < nchan_out; j++ ) + { + set_zero( tmp_out_re, subframe_length ); + set_zero( tmp_out_im, subframe_length ); + + i = 0; + for ( idx_in = 0; idx_in < nchan_in; idx_in++ ) + { + if ( idx_in != lfe_idx_in ) + { + offset = 0; + for ( m = 0; m < pCrend->hHrtfCrend->num_iterations[i][j]; m++ ) + { + offset_in = ( pCrend->hCrend->delay_line_rw_index + pCrend->hHrtfCrend->max_num_iterations - pCrend->hHrtfCrend->num_iterations[i][j] + m + 1 ); + offset_in = offset_in % ( pCrend->hHrtfCrend->max_num_iterations ); + offset_in = offset_in * subframe_length; + pFreq_buf_re = &pCrend->hCrend->freq_buffer_re[i][offset_in]; + pFreq_buf_im = &pCrend->hCrend->freq_buffer_im[i][offset_in]; + pFreq_filt_re = &pCrend->hHrtfCrend->pOut_to_bin_re[i][j][offset]; + pFreq_filt_im = &pCrend->hHrtfCrend->pOut_to_bin_im[i][j][offset]; + + for ( k = 0; k < pCrend->hHrtfCrend->pIndex_frequency_max[i][j][m]; k++ ) + { + tmp_out_re[k] += pFreq_buf_re[k] * pFreq_filt_re[k] - pFreq_buf_im[k] * pFreq_filt_im[k]; + tmp_out_im[k] += pFreq_buf_re[k] * pFreq_filt_im[k] + pFreq_buf_im[k] * pFreq_filt_re[k]; + } + offset = offset + k; + } + i++; + } + } + + offset = 0; + for ( m = 0; m < pCrend->hHrtfCrend->num_iterations_diffuse[j]; m++ ) + { + offset_diffuse = ( pCrend->hCrend->diffuse_delay_line_rw_index + m + 1 ); + offset_diffuse = offset_diffuse % pCrend->hHrtfCrend->num_iterations_diffuse[0]; + offset_diffuse = offset_diffuse * subframe_length; + pFreq_buf_re = &pCrend->hCrend->freq_buffer_re_diffuse[offset_diffuse]; + pFreq_buf_im = &pCrend->hCrend->freq_buffer_im_diffuse[offset_diffuse]; + pFreq_filt_re = &pCrend->hHrtfCrend->pOut_to_bin_diffuse_re[j][offset]; + pFreq_filt_im = &pCrend->hHrtfCrend->pOut_to_bin_diffuse_im[j][offset]; + + for ( k = 0; k < pCrend->hHrtfCrend->pIndex_frequency_max_diffuse[j][m]; k++ ) + { + tmp_out_re[k] += pFreq_buf_re[k] * pFreq_filt_re[k] - pFreq_buf_im[k] * pFreq_filt_im[k]; + tmp_out_im[k] += pFreq_buf_re[k] * pFreq_filt_im[k] + pFreq_buf_im[k] * pFreq_filt_re[k]; + } + offset = offset + k; + } + + ivas_imdft( tmp_out_re, tmp_out_im, pOut, subframe_length ); + + pFreq_buf_re = &pcm_out[j][i_ts * subframe_length]; + for ( k = 0; k < subframe_length; k++ ) + { + pFreq_buf_re[k] = pOut[k] + pCrend->hCrend->prev_out_buffer[j][k]; + pCrend->hCrend->prev_out_buffer[j][k] = pOut[k + subframe_length]; + } + } + + pCrend->hCrend->delay_line_rw_index++; + pCrend->hCrend->delay_line_rw_index = pCrend->hCrend->delay_line_rw_index % ( pCrend->hHrtfCrend->max_num_iterations ); + if ( pCrend->hHrtfCrend->num_iterations_diffuse[0] > 0 ) + { + pCrend->hCrend->diffuse_delay_line_rw_index++; + pCrend->hCrend->diffuse_delay_line_rw_index = pCrend->hCrend->diffuse_delay_line_rw_index % ( pCrend->hHrtfCrend->num_iterations_diffuse[0] ); + } return IVAS_ERR_OK; } +#endif + /*-----------------------------------------------------------------------------------------* * Function ivas_rend_crend_Process() * @@ -1757,25 +2536,75 @@ ivas_error ivas_rend_crendProcess( const CREND_WRAPPER *pCrend, const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, +#ifdef FIX_197_CREND_INTERFACE + DECODER_CONFIG_HANDLE hDecoderConfig, + HEAD_TRACK_DATA_HANDLE hHeadTrackData, + IVAS_OUTPUT_SETUP_HANDLE hIntSetup, + EFAP_HANDLE hEFAPdata, +#endif float output[][L_FRAME48k], /* i/o: input/output audio channels */ const int32_t output_Fs ) { +#ifdef FIX_197_CREND_INTERFACE + int16_t i, subframe_idx, output_frame, subframe_len; +#else int16_t i, subframe_idx, output_frame; +#endif int16_t nchan_out; float pcm_tmp[BINAURAL_CHANNELS][L_FRAME48k]; AUDIO_CONFIG in_config; IVAS_REND_AudioConfigType inConfigType; ivas_error error; - wmops_sub_start( "ivas_rend_crendProcess" ); + push_wmops( "ivas_rend_crendProcess" ); in_config = getIvasAudioConfigFromRendAudioConfig( inConfig ); inConfigType = getAudioConfigType( inConfig ); getAudioConfigNumChannels( outConfig, &nchan_out ); output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); - +#ifdef FIX_197_CREND_INTERFACE + subframe_len = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; +#endif for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { +#ifdef FIX_197_CREND_INTERFACE + if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData && hHeadTrackData->num_quaternions >= 0 ) + { + /* Orientation tracking */ + if ( pCrend->hCrend->hTrack != NULL ) + { + if ( hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_AVG ) + { + ivas_orient_trk_SetTrackingType( pCrend->hCrend->hTrack, OTR_TRACKING_AVG_ORIENT ); + } + else + { + ivas_orient_trk_SetTrackingType( pCrend->hCrend->hTrack, OTR_TRACKING_REF_ORIENT ); + } + + /* get current subframe quaternion and convert to euler angles */ + Quat2Euler( hHeadTrackData->Quaternions[subframe_idx], &( pCrend->hCrend->m_fYaw ), &( pCrend->hCrend->m_fPitch ), &( pCrend->hCrend->m_fRoll ) ); + ivas_orient_trk_SetAbsoluteOrientation( pCrend->hCrend->hTrack, pCrend->hCrend->m_fYaw, pCrend->hCrend->m_fPitch, pCrend->hCrend->m_fRoll ); + ivas_orient_trk_Process( pCrend->hCrend->hTrack ); + ivas_orient_trk_GetTrackedOrientation( pCrend->hCrend->hTrack, &( pCrend->hCrend->m_fYaw ), &( pCrend->hCrend->m_fPitch ), &( pCrend->hCrend->m_fRoll ) ); + } + + /* Rotation in SHD for: + MC with elevation (5_1_2 / 5_1_4 / 7_1_4) -> BINAURAL + SBA SPAR -> BINAURAL or BINAURAL_ROOM + */ + if ( in_config == AUDIO_CONFIG_FOA || in_config == AUDIO_CONFIG_HOA2 || in_config == AUDIO_CONFIG_HOA3 ) + { + rotateFrame_shd( hHeadTrackData, output, subframe_len, *hIntSetup, subframe_idx ); + } + /* Rotation in SD for MC -> BINAURAL_ROOM */ + else if ( ( hIntSetup != NULL ) && hIntSetup->is_loudspeaker_setup ) + { + rotateFrame_sd( hHeadTrackData, output, subframe_len, *hIntSetup, hEFAPdata, subframe_idx ); + } + } +#endif + if ( ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) || ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) ) { if ( ( error = ivas_rend_crendConvolver( pCrend, inConfig, outConfig, output, pcm_tmp, output_Fs, subframe_idx ) ) != IVAS_ERR_OK ) @@ -1803,11 +2632,13 @@ ivas_error ivas_rend_crendProcess( mvr2r( pcm_tmp[i], output[i], output_frame ); } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } +#ifndef FIX_197_CREND_INTERFACE + /*-----------------------------------------------------------------------------------------* * Function ivas_crend_convolver() * @@ -1960,3 +2791,5 @@ ivas_error ivas_rend_crendConvolver( return IVAS_ERR_OK; } + +#endif diff --git a/lib_rend/ivas_efap.c b/lib_rend/ivas_efap.c index 48bfd7b8a0e82333cc4edb4891a09c4b5e0517df..587046082db95dbfaaf3bb3ed5b6e43e847d4c79 100644 --- a/lib_rend/ivas_efap.c +++ b/lib_rend/ivas_efap.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,7 +42,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* * Local constants @@ -163,29 +163,29 @@ ivas_error efap_init_data( *-----------------------------------------------------------------*/ /* Memory Allocations for efap */ - if ( ( efap = (EFAP *) count_malloc( sizeof( EFAP ) ) ) == NULL ) + if ( ( efap = (EFAP *) malloc( sizeof( EFAP ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for EFAP handle\n" ) ); } /* Memory Allocation and update for aziSpk & eleSpk arrays*/ - if ( ( efap->aziSpk = (float *) count_malloc( num_speaker_nodes * sizeof( float ) ) ) == NULL ) + if ( ( efap->aziSpk = (float *) malloc( num_speaker_nodes * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for EFAP speaker azimuths\n" ) ); } - if ( ( efap->eleSpk = (float *) count_malloc( num_speaker_nodes * sizeof( float ) ) ) == NULL ) + if ( ( efap->eleSpk = (float *) malloc( num_speaker_nodes * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for EFAP speaker elevations\n" ) ); } /* Memory Allocation for vertexArray */ - if ( ( efap->vtxData.vertexArray = (EFAP_VERTEX *) count_malloc( ( num_speaker_nodes + EFAP_MAX_GHOST_LS ) * sizeof( EFAP_VERTEX ) ) ) == NULL ) + if ( ( efap->vtxData.vertexArray = (EFAP_VERTEX *) malloc( ( num_speaker_nodes + EFAP_MAX_GHOST_LS ) * sizeof( EFAP_VERTEX ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for EFAP Vertex Array\n" ) ); } /* Memory allocation for the tmp buffer short */ - if ( ( efap->bufferShort = (float *) count_malloc( num_speaker_nodes * sizeof( float ) ) ) == NULL ) + if ( ( efap->bufferShort = (float *) malloc( num_speaker_nodes * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for EFAP bufferS\n" ) ); } @@ -214,7 +214,7 @@ ivas_error efap_init_data( /* Memory allocation for the tmp buffer long */ - if ( ( efap->bufferLong = (float *) count_malloc( efap->vtxData.numVtx * sizeof( float ) ) ) == NULL ) + if ( ( efap->bufferLong = (float *) malloc( efap->vtxData.numVtx * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for EFAP bufferL\n" ) ); } @@ -322,33 +322,33 @@ void efap_free_data( dim1 = ( *hEFAPdata )->numTot; /* instance buffer members */ - count_free( ( *hEFAPdata )->aziSpk ); + free( ( *hEFAPdata )->aziSpk ); ( *hEFAPdata )->aziSpk = NULL; - count_free( ( *hEFAPdata )->eleSpk ); + free( ( *hEFAPdata )->eleSpk ); ( *hEFAPdata )->eleSpk = NULL; - count_free( ( *hEFAPdata )->vtxData.vertexArray ); + free( ( *hEFAPdata )->vtxData.vertexArray ); ( *hEFAPdata )->vtxData.vertexArray = NULL; - count_free( ( *hEFAPdata )->vtxData.vtxOrder ); + free( ( *hEFAPdata )->vtxData.vtxOrder ); ( *hEFAPdata )->vtxData.vtxOrder = NULL; - count_free( ( *hEFAPdata )->bufferLong ); + free( ( *hEFAPdata )->bufferLong ); ( *hEFAPdata )->bufferLong = NULL; - count_free( ( *hEFAPdata )->bufferShort ); + free( ( *hEFAPdata )->bufferShort ); ( *hEFAPdata )->bufferShort = NULL; p_dmTranspose = (void **) ( *hEFAPdata )->dmTranspose; for ( i = 0; i < dim1; i++ ) { - count_free( p_dmTranspose[i] ); + free( p_dmTranspose[i] ); } - count_free( p_dmTranspose ); + free( p_dmTranspose ); /* instance */ - count_free( *hEFAPdata ); + free( *hEFAPdata ); *hEFAPdata = NULL; return; @@ -533,7 +533,7 @@ static ivas_error sphere_triangulation( add_ghost_speakers( vtxData->vertexArray, &vtxData->numVtx, efip_flag ); /* Sort the vertices according to their index */ - if ( ( vtxData->vtxOrder = (int16_t *) count_malloc( vtxData->numVtx * sizeof( int16_t ) ) ) == NULL ) + if ( ( vtxData->vtxOrder = (int16_t *) malloc( vtxData->numVtx * sizeof( int16_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for EFAP Vertex Order\n" ) ); } @@ -552,7 +552,7 @@ static ivas_error sphere_triangulation( assert( polyData->numTri != 0 && "EFAP: failed to construct convex hull!" ); /* Allocate the DM matrix transpose */ - if ( ( p_dmTranspose = count_malloc( vtxData->numVtx * sizeof( float * ) ) ) == NULL ) + if ( ( p_dmTranspose = malloc( vtxData->numVtx * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "EFAP: can not allocate memory for dmTranspose\n" ) ); } @@ -562,7 +562,7 @@ static ivas_error sphere_triangulation( for ( i = 0; i < vtxData->numVtx; i++ ) { - if ( ( p_dmTranspose[i] = count_malloc( numSpk * sizeof( float ) ) ) == NULL ) + if ( ( p_dmTranspose[i] = malloc( numSpk * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "EFAP: can not allocate memory for dmTranspose\n" ) ); } diff --git a/lib_rend/ivas_hrtf.c b/lib_rend/ivas_hrtf.c index 7c4183b0e8cb0bb0db50bdee7b46fd9558ed6b80..84efa1f13e697915b5dfefb56cbee2b4a4b37509 100644 --- a/lib_rend/ivas_hrtf.c +++ b/lib_rend/ivas_hrtf.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "assert.h" #include "ivas_rom_TdBinauralRenderer.h" #include "ivas_error.h" -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------* @@ -61,8 +61,8 @@ void BSplineModelEvalAlloc( ModelEval_t *modelEval /* i/o: Model evaluation structure */ ) { - modelEval->hrfModL = (float *) count_malloc( model->K * sizeof( float ) ); - modelEval->hrfModR = (float *) count_malloc( model->K * sizeof( float ) ); + modelEval->hrfModL = (float *) malloc( model->K * sizeof( float ) ); + modelEval->hrfModR = (float *) malloc( model->K * sizeof( float ) ); return; } @@ -118,11 +118,11 @@ void DefaultBSplineModel( model->elevKSeq = (const float *) orange53_rom_elevKSeq; model->elevBsShape = (const float *) orange53_rom_elevBsShape; - model->azimBsShape = (const float **) count_malloc( model->num_unique_azim_splines * sizeof( float * ) ); + model->azimBsShape = (const float **) malloc( model->num_unique_azim_splines * sizeof( float * ) ); model->azimBsShape[0] = (const float *) orange53_rom_azimBsShape; - model->azimKSeq = (float **) count_malloc( 18 * sizeof( float * ) ); - model->azimKSeq[0] = (float *) count_malloc( 2 * sizeof( float * ) ); - model->azimKSeq[17] = (float *) count_malloc( 2 * sizeof( float * ) ); + model->azimKSeq = (float **) malloc( 18 * sizeof( float * ) ); + model->azimKSeq[0] = (float *) malloc( 2 * sizeof( float * ) ); + model->azimKSeq[17] = (float *) malloc( 2 * sizeof( float * ) ); model->azimKSeq[0][0] = 0.0f; model->azimKSeq[17][0] = 0.0f; model->azimKSeq[0][1] = 360.0f; @@ -130,7 +130,7 @@ void DefaultBSplineModel( for ( i = 1; i < 17; i++ ) { - model->azimKSeq[i] = (float *) count_malloc( model->azimDim2[i] * sizeof( float * ) ); /* azimDim2[i] = 91, i=2..15 */ + model->azimKSeq[i] = (float *) malloc( model->azimDim2[i] * sizeof( float * ) ); /* azimDim2[i] = 91, i=2..15 */ for ( j = 0; j < model->azimDim2[i]; j++ ) { model->azimKSeq[i][j] = (float) orange53_rom_azimSegSamples[0] * j; @@ -211,6 +211,9 @@ void DefaultBSplineModel( HRTF_model_precalc( model ); +#ifdef FIX_310_TD_REND_DELAY + HrFiltSet_p->latency_s = orange53_rom_latency_s; +#endif HrFiltSet_p->SampleRate = output_Fs; HrFiltSet_p->FiltLength = HrFiltSet_p->ModelParams.K; BSplineModelEvalAlloc( &HrFiltSet_p->ModelParams, &HrFiltSet_p->ModelEval ); @@ -229,7 +232,7 @@ ivas_error ivas_HRTF_binary_open( TDREND_HRFILT_FiltSet_t **hHrtfTD ) { /* Allocate HR filter set for headphones configuration */ - *hHrtfTD = (TDREND_HRFILT_FiltSet_t *) count_malloc( sizeof( TDREND_HRFILT_FiltSet_t ) ); + *hHrtfTD = (TDREND_HRFILT_FiltSet_t *) malloc( sizeof( TDREND_HRFILT_FiltSet_t ) ); if ( *hHrtfTD == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF binary!" ); @@ -253,8 +256,136 @@ void ivas_HRTF_binary_close( return; } - count_free( *hHrtfTD ); + free( *hHrtfTD ); *hHrtfTD = NULL; return; } + + +#ifdef HRTF_BINARY_FILE +/*-----------------------------------------------------------------------* + * ivas_HRTF_CRend_binary_open() + * + * Allocate HRTF binary handle + *-----------------------------------------------------------------------*/ + +ivas_error ivas_HRTF_CRend_binary_open( + HRTFS_CREND **hSetOfHRTF ) +{ + /* Allocate HR filter set for headphones configuration */ + *hSetOfHRTF = (HRTFS_CREND *) malloc( sizeof( HRTFS_CREND ) ); + if ( *hSetOfHRTF == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for set of HRTF binary!" ); + } + + ( *hSetOfHRTF )->hHRTF_hrir_combined = NULL; + ( *hSetOfHRTF )->hHRTF_hrir_hoa3 = NULL; + ( *hSetOfHRTF )->hHRTF_brir_combined = NULL; + + return IVAS_ERR_OK; +} + +/*-------------------------------------------------------------------* + * ivas_HRTF_CRend_binary_close() + * + * Close HRTF CRend binary handle + *-------------------------------------------------------------------*/ + +void ivas_HRTF_CRend_binary_close( + HRTFS_CREND **hSetOfHRTF ) +{ + if ( hSetOfHRTF == NULL || *hSetOfHRTF == NULL ) + { + return; + } + + destroy_SetOfHRTF( *hSetOfHRTF ); + + free( *hSetOfHRTF ); + *hSetOfHRTF = NULL; + + return; +} +#endif + +#ifdef HRTF_BINARY_FILE +/*-----------------------------------------------------------------------* + * ivas_HRTF_fastconv_binary_open() + * + * Allocate HRTF binary handle for FASTCONV renderer + *-----------------------------------------------------------------------*/ + +ivas_error ivas_HRTF_fastconv_binary_open( + HRTFS_FASTCONV **hHrtfFastConv ) +{ + *hHrtfFastConv = (HRTFS_FASTCONV *) malloc( sizeof( HRTFS_FASTCONV ) ); + if ( *hHrtfFastConv == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FASTCONV HRTF tables!" ); + } + + return IVAS_ERR_OK; +} + +/*-----------------------------------------------------------------------* + * ivas_HRTF_fastconv_binary_close() + * + * Close HRTF binary handle for FASTCONV renderer + *-----------------------------------------------------------------------*/ + +void ivas_HRTF_fastconv_binary_close( + HRTFS_FASTCONV **hHrtfFastConv ) +{ + if ( hHrtfFastConv == NULL || *hHrtfFastConv == NULL ) + { + return; + } + + free( *hHrtfFastConv ); + *hHrtfFastConv = NULL; + + return; +} +#endif + +#ifdef HRTF_BINARY_FILE +/*-----------------------------------------------------------------------* + * ivas_HRTF_parambin_binary_open() + * + * Allocate HRTF binary handle for parametric binauralizer + *-----------------------------------------------------------------------*/ + +ivas_error ivas_HRTF_parambin_binary_open( + HRTFS_PARAMBIN **hHrtfParambin ) +{ + *hHrtfParambin = (HRTFS_PARAMBIN *) malloc( sizeof( HRTFS_PARAMBIN ) ); + if ( *hHrtfParambin == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for parametric binauralizer HRTF tables!" ); + } + + return IVAS_ERR_OK; +} + +/*-----------------------------------------------------------------------* + * ivas_HRTF_parambin_binary_close() + * + * Close HRTF binary handle for parametric binauralizer + *-----------------------------------------------------------------------*/ + +void ivas_HRTF_parambin_binary_close( + HRTFS_PARAMBIN **hHrtfParambin ) +{ + if ( hHrtfParambin == NULL || *hHrtfParambin == NULL ) + { + return; + } + + free( *hHrtfParambin ); + *hHrtfParambin = NULL; + + return; +} +#endif diff --git a/lib_rend/ivas_lib_rend_internal.h b/lib_rend/ivas_lib_rend_internal.h index f758bc780a12011e733f81c36b5ef2813ddef435..4d36ecf7f021f085004d6770938ddeed16f1f793 100644 --- a/lib_rend/ivas_lib_rend_internal.h +++ b/lib_rend/ivas_lib_rend_internal.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -31,12 +31,17 @@ *******************************************************************************************************/ #include "ivas_error.h" +#ifdef FIX_197_CREND_INTERFACE +#include "ivas_stat_rend.h" +#else #include "lib_rend.h" +#endif #include "ivas_stat_dec.h" #ifndef IVAS_LIB_REND_INTERNALS_H #define IVAS_LIB_REND_INTERNALS_H +#ifndef FIX_197_CREND_INTERFACE typedef struct { int8_t headRotEnabled; @@ -73,6 +78,9 @@ ivas_error ivas_rend_openCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, +#ifdef HRTF_BINARY_FILE + HRTFS_CREND_HANDLE hSetOfHRTF, +#endif const int32_t output_Fs ); ivas_error ivas_rend_initCrend( @@ -80,6 +88,9 @@ ivas_error ivas_rend_initCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, +#ifdef HRTF_BINARY_FILE + HRTFS_CREND_HANDLE hSetOfHRTF, +#endif const int32_t output_Fs ); ivas_error ivas_rend_closeCrend( @@ -100,6 +111,7 @@ ivas_error ivas_rend_crendConvolver( float pcm_out[][L_FRAME48k], const int32_t output_Fs, const int16_t i_ts ); +#endif ivas_error ivas_rend_TDObjRenderFrame( const TDREND_WRAPPER *pTDRend, /* i : TD Renderer wrapper structure */ @@ -108,10 +120,7 @@ ivas_error ivas_rend_TDObjRenderFrame( const IVAS_REND_HeadRotData *headRotData, /* i : Input head positions */ const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ const int16_t output_frame, /* i : output frame length */ -#ifndef FIX_ITD - const int32_t output_Fs, /* i : output sampling rate */ -#endif - float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ + float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ ); ivas_error ivas_rend_TDObjRendOpen( diff --git a/lib_rend/ivas_limiter.c b/lib_rend/ivas_limiter.c index 56dbb39b070e5e54dbf319fda57532e9c97e53a2..19b1a828b7c7e2b9af57a1c5375cd366a6de1fb5 100644 --- a/lib_rend/ivas_limiter.c +++ b/lib_rend/ivas_limiter.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,7 +36,7 @@ #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include @@ -115,11 +115,11 @@ IVAS_LIMITER_HANDLE ivas_limiter_open( return NULL; } - hLimiter = count_malloc( sizeof( IVAS_LIMITER ) ); + hLimiter = malloc( sizeof( IVAS_LIMITER ) ); hLimiter->max_num_channels = max_num_channels; hLimiter->num_channels = max_num_channels; - hLimiter->channel_ptrs = count_malloc( max_num_channels * sizeof( float * ) ); + hLimiter->channel_ptrs = malloc( max_num_channels * sizeof( float * ) ); hLimiter->sampling_rate = sampling_rate; hLimiter->gain = 1.f; hLimiter->release_heuristic = 0.f; @@ -153,8 +153,8 @@ void ivas_limiter_close( return; } - count_free( ( *phLimiter )->channel_ptrs ); - count_free( *phLimiter ); + free( ( *phLimiter )->channel_ptrs ); + free( *phLimiter ); *phLimiter = NULL; return; diff --git a/lib_rend/ivas_ls_custom_dec.c b/lib_rend/ivas_ls_custom_dec.c index 28bd8c1dd81ff1c7ccb89117c794349f59f16ed2..0e3a4d980120b7629efdf38d71d6fd14642ffb29 100644 --- a/lib_rend/ivas_ls_custom_dec.c +++ b/lib_rend/ivas_ls_custom_dec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -51,7 +51,7 @@ ivas_error ivas_ls_custom_open( ) { /* Allocate handle */ - if ( ( *hLsSetupCustom = (LSSETUP_CUSTOM_HANDLE) count_malloc( sizeof( LSSETUP_CUSTOM_STRUCT ) ) ) == NULL ) + if ( ( *hLsSetupCustom = (LSSETUP_CUSTOM_HANDLE) malloc( sizeof( LSSETUP_CUSTOM_STRUCT ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Custom LS layout memory\n" ) ); } @@ -92,8 +92,8 @@ void ivas_ls_custom_setup( hOutSetup->num_lfe = hLsSetupCustom->num_lfe; hOutSetup->index_lfe[0] = hLsSetupCustom->lfe_idx[0]; /* IVAS_OUTPUT_SETUP only supports 1 LFE */ - hOutSetup->is_loudspeaker_setup = true; - hOutSetup->is_planar_setup = (uint8_t) hLsSetupCustom->is_planar_setup; + hOutSetup->is_loudspeaker_setup = TRUE; + hOutSetup->is_planar_setup = (int8_t) hLsSetupCustom->is_planar_setup; return; } diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index da4c10a888f9a7e1dc54bbae9eb00dac80eb9d49..c313bf2e7955addc08dcd6be5c3c65f8262a7ed4 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #include "prot.h" #include "ivas_prot.h" #include -#include "wmops.h" +#include "wmc_auto.h" #include "ivas_rom_com.h" #include "lib_rend.h" #include "ivas_lib_rend_internal.h" @@ -48,11 +48,7 @@ * Local function prototypes *---------------------------------------------------------------------*/ -#ifdef FIX_ITD static ivas_error TDREND_GetMix( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, float output[][L_FRAME48k], const int16_t subframe_length, const int16_t subframe_idx ); -#else -static ivas_error TDREND_GetMix( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, float output[][L_FRAME48k], const int16_t subframe_length, const int32_t output_Fs, const int16_t subframe_idx ); -#endif static void TDREND_Clear_Update_flags( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd ); static void TDREND_Update_listener_orientation( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, @@ -88,19 +84,19 @@ ivas_error ivas_td_binaural_open( error = IVAS_ERR_OK; - if ( ( hBinRendererTd = count_malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) + if ( ( hBinRendererTd = malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } - if ( ( hBinRendererTd->TdRend_MixSpatSpec_p = count_malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) + if ( ( hBinRendererTd->TdRend_MixSpatSpec_p = malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } - if ( ( hBinRendererTd->DirAtten_p = count_malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) + if ( ( hBinRendererTd->DirAtten_p = malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } - if ( ( hBinRendererTd->Listener_p = count_malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) + if ( ( hBinRendererTd->Listener_p = malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } @@ -128,11 +124,7 @@ ivas_error ivas_td_binaural_open( for ( nS = 0; nS < nchan_rend; nS++ ) { -#ifdef FIX_ITD if ( ( error = TDREND_MIX_AddSrc( hBinRendererTd, &SrcInd[nS], PosType ) ) != IVAS_ERR_OK ) -#else - if ( ( error = TDREND_MIX_AddSrc( hBinRendererTd, &SrcInd[nS], PosType, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -196,8 +188,11 @@ ivas_error ivas_td_binaural_open( } st_ivas->hBinRendererTd = hBinRendererTd; - +#ifdef FIX_310_TD_REND_DELAY + st_ivas->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); +#else st_ivas->binaural_latency_ns = (int32_t) ( BINAURAL_TD_LATENCY_S * 1000000000.f ); +#endif return error; } @@ -218,12 +213,12 @@ void ivas_td_binaural_close( return; } - count_free( ( *hBinRendererTd )->TdRend_MixSpatSpec_p ); - count_free( ( *hBinRendererTd )->DirAtten_p ); + free( ( *hBinRendererTd )->TdRend_MixSpatSpec_p ); + free( ( *hBinRendererTd )->DirAtten_p ); TDREND_MIX_Dealloc( *hBinRendererTd ); - count_free( *hBinRendererTd ); + free( *hBinRendererTd ); *hBinRendererTd = NULL; return; @@ -253,7 +248,11 @@ void ObjRenderIVASFrame( if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on && ( st_ivas->ini_frame == 0 ) ) { +#ifdef FIX_197_CREND_INTERFACE + ivas_reverb_open( &st_ivas->hCrendWrapper->hCrend->hReverb, st_ivas->transport_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); +#else ivas_reverb_open( &st_ivas->hCrend->hReverb, st_ivas->transport_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); +#endif } } @@ -269,15 +268,15 @@ void ObjRenderIVASFrame( if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) { +#ifdef FIX_197_CREND_INTERFACE + ivas_reverb_process( st_ivas->hCrendWrapper->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); +#else ivas_reverb_process( st_ivas->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); +#endif } /* Render subframe */ -#ifdef FIX_ITD TDREND_GetMix( st_ivas->hBinRendererTd, output, subframe_length, subframe_idx ); -#else - TDREND_GetMix( st_ivas->hBinRendererTd, output, subframe_length, st_ivas->hDecoderConfig->output_Fs, subframe_idx ); -#endif } if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ @@ -303,10 +302,7 @@ static ivas_error TDREND_GetMix( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ float output[][L_FRAME48k], /* i/o: ISm object synth / rendered output in 0,1 */ const int16_t subframe_length, /* i/o: subframe length */ -#ifndef FIX_ITD - const int32_t output_Fs, /* i : Output sampling rate */ -#endif - const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ + const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ ) { int16_t i; @@ -315,23 +311,19 @@ static ivas_error TDREND_GetMix( TDREND_SRC_REND_t *SrcRend_p; ivas_error error; float output_buf[2][L_SPATIAL_SUBFR_48k]; /* Temp buffer for left/right rendered signal */ -#ifdef FIX_ITD float hrf_left_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; float hrf_right_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; int16_t intp_count; -#endif error = IVAS_ERR_OK; /* Clear the output buffer to accumulate rendered sources */ set_f( output_buf[0], 0.0f, subframe_length ); set_f( output_buf[1], 0.0f, subframe_length ); -#ifdef FIX_ITD /* Clear interpolation buffers and counter */ set_f( hrf_left_delta, 0.0f, SFX_SPAT_BIN_MAX_FILTER_LENGTH ); set_f( hrf_right_delta, 0.0f, SFX_SPAT_BIN_MAX_FILTER_LENGTH ); intp_count = 0; -#endif /* Create the mix */ /* Loop through the source list and render each source */ @@ -344,26 +336,14 @@ static ivas_error TDREND_GetMix( /* Update rendering params if needed */ if ( hBinRendererTd->Listener_p->PoseUpdated || SrcSpatial_p->Updated ) { -#ifdef FIX_ITD TDREND_SRC_REND_UpdateFiltersFromSpatialParams( hBinRendererTd, SrcRend_p, SrcSpatial_p, Src_p->hrf_left_prev, Src_p->hrf_right_prev, hrf_left_delta, hrf_right_delta, &intp_count, &Src_p->filterlength, &Src_p->itd, &Src_p->Gain, Src_p, subframe_idx ); -#else - TDREND_SRC_REND_UpdateFiltersFromSpatialParams( hBinRendererTd, SrcRend_p, SrcSpatial_p, output_Fs ); -#endif } /* Render source if needed */ if ( ( SrcRend_p->InputAvailable == TRUE ) && ( SrcRend_p->PlayStatus == TDREND_PLAYSTATUS_PLAYING ) ) { -#ifdef FIX_ITD error = TDREND_REND_RenderSourceHRFilt( Src_p, hrf_left_delta, hrf_right_delta, intp_count, output_buf, subframe_length ); -#else -#ifdef TDREND_HRTF_TABLE_METHODS - error = TDREND_REND_RenderSourceHRFilt( Src_p, hBinRendererTd, output_buf, subframe_length, output_Fs ); -#else - error = TDREND_REND_RenderSourceHRFilt( Src_p, output_buf, subframe_length, output_Fs ); -#endif -#endif } } @@ -541,19 +521,19 @@ ivas_error ivas_rend_TDObjRendOpen( error = IVAS_ERR_OK; - if ( ( hBinRendererTd = count_malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) + if ( ( hBinRendererTd = malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } - if ( ( hBinRendererTd->TdRend_MixSpatSpec_p = count_malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) + if ( ( hBinRendererTd->TdRend_MixSpatSpec_p = malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } - if ( ( hBinRendererTd->DirAtten_p = count_malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) + if ( ( hBinRendererTd->DirAtten_p = malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } - if ( ( hBinRendererTd->Listener_p = count_malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) + if ( ( hBinRendererTd->Listener_p = malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } @@ -588,11 +568,7 @@ ivas_error ivas_rend_TDObjRendOpen( for ( nS = 0; nS < nchan_rend; nS++ ) { -#ifdef FIX_ITD if ( ( error = TDREND_MIX_AddSrc( hBinRendererTd, &SrcInd[nS], PosType ) ) != IVAS_ERR_OK ) -#else - if ( ( error = TDREND_MIX_AddSrc( hBinRendererTd, &SrcInd[nS], PosType, outFs ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -657,7 +633,11 @@ ivas_error ivas_rend_TDObjRendOpen( pTDRend->hBinRendererTd = hBinRendererTd; +#ifdef FIX_310_TD_REND_DELAY + pTDRend->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); +#else pTDRend->binaural_latency_ns = (int32_t) ( BINAURAL_TD_LATENCY_S * 1000000000.f ); +#endif return IVAS_ERR_OK; } @@ -677,10 +657,7 @@ ivas_error ivas_rend_TDObjRenderFrame( const IVAS_REND_HeadRotData *headRotData, /* i : Input head positions */ const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ const int16_t output_frame, /* i : output frame length */ -#ifndef FIX_ITD - const int32_t output_Fs, /* i : output sampling rate */ -#endif - float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ + float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ ) { int16_t subframe_length; @@ -693,7 +670,7 @@ ivas_error ivas_rend_TDObjRenderFrame( IVAS_FORMAT ivas_format; IVAS_REND_AudioConfigType inConfigType; - wmops_sub_start( "ivas_rend_TDObjRenderFrame" ); + push_wmops( "ivas_rend_TDObjRenderFrame" ); inConfigType = getAudioConfigType( inConfig ); lfe_idx = LFE_CHANNEL; @@ -714,7 +691,7 @@ ivas_error ivas_rend_TDObjRenderFrame( { ivas_format = ISM_FORMAT; num_src = 1; - hIsmMetaData[0] = count_malloc( sizeof( ISM_METADATA_FRAME ) ); + hIsmMetaData[0] = malloc( sizeof( ISM_METADATA_FRAME ) ); hIsmMetaData[0]->azimuth = currentPos->azimuth; hIsmMetaData[0]->elevation = currentPos->elevation; } @@ -736,7 +713,7 @@ ivas_error ivas_rend_TDObjRenderFrame( /* TODO tmu : needs a refactor / better approach */ if ( ivas_format == ISM_FORMAT ) { - count_free( hIsmMetaData[0] ); + free( hIsmMetaData[0] ); } for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) @@ -751,11 +728,7 @@ ivas_error ivas_rend_TDObjRenderFrame( // } /* Render subframe */ -#ifdef FIX_ITD TDREND_GetMix( pTDRend->hBinRendererTd, output, subframe_length, subframe_idx ); -#else - TDREND_GetMix( pTDRend->hBinRendererTd, output, subframe_length, output_Fs, subframe_idx ); -#endif } /* TODO tmu : pass down renderer config struct */ @@ -769,7 +742,7 @@ ivas_error ivas_rend_TDObjRenderFrame( // } // } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index 5269b580b0d74698d24127459f40265a4a6cbc5f..206cd40e1e96b048f4ac55d4dd02b21b973d4b13 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ #include "ivas_rom_rend.h" #include "ivas_cnst.h" #include "ivas_rom_TdBinauralRenderer.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* @@ -52,289 +52,6 @@ static void GenerateFilter( const float elev, float azim, ModelParams_t *model, static void GenerateITD( const float elev, float azim, ModelParamsITD_t *model, ModelEval_t *modelEval ); static void SkipSmallest_ValueIndex( int16_t *use_inds, const ValueIndex_t *VI, const int16_t N, const int16_t n_smallest ); -#ifdef TDREND_HRTF_TABLE_METHODS -static float GreatCircleAngleDeg( float Az1, float El1, float Az2, float El2 ); -static void GetFilterFromAngle_M( TDREND_HRFILT_FiltSet_t *HrFiltSet_p, const float Elev, float Azim, SFX_SpatBin_Params_t *SfxSpatBinParams_p ); - -/*-------------------------------------------------------------------* - * TDREND_HRFILT_SetFiltSet() - * - * Load table format HR filter set from file. - --------------------------------------------------------------------*/ - -void TDREND_HRFILT_SetFiltSet( - TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR hilter set structure */ - FILE *f_hrtf /* i : File handle for HR filter parameters */ -) -{ - float Scaler_HrfGain; - int16_t n; - - int16_t num_to_read, num_bytes; - double temp; - int16_t temp_s; - double *buffer_p = NULL; - double *temp_p; - double *FiltSetIntLeft_p = NULL, *FiltSetIntRight_p = NULL; - double *FiltIntLeft0_p = NULL, *FiltIntLeft_p = NULL, *FiltIntRight0_p = NULL, *FiltIntRight_p = NULL; - double *LeftFilt_p = NULL, *RightFilt_p = NULL; - float *LeftFiltFlp_p = NULL, *RightFiltFlp_p = NULL; - - int32_t mem_size; - int16_t i; - -#ifdef TDREND_HRTF_TABLE_METHODS - int16_t count, m; -#endif - - /* The setting of Scaler_HrfGain varies among HR filter dataset */ - - Scaler_HrfGain = 1.0f; - - /* read the sampling rate */ - fread( &temp_s, sizeof( int16_t ), 1, f_hrtf ); - - switch ( temp_s ) - { - case 16: - HrFiltSet_p->SampleRate = 16000; - break; - case 32: - HrFiltSet_p->SampleRate = 32000; - break; - case 48: - HrFiltSet_p->SampleRate = 48000; - break; - default: -#ifdef DEBUGGING - IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Error: HR filter file had an unsupported sampling rate (%d kHz).\n\n", temp_s ); -#endif - } - - num_bytes = sizeof( double ); - num_to_read = 1; - - /* read the filter length */ - fread( &temp, num_bytes, num_to_read, f_hrtf ); - HrFiltSet_p->FiltLength = (int16_t) temp; - - /* read the distance */ - fread( &temp, num_bytes, num_to_read, f_hrtf ); - HrFiltSet_p->Dist = (float) temp; - /* read the number of positions */ - fread( &temp, num_bytes, num_to_read, f_hrtf ); - HrFiltSet_p->NumPos = (int16_t) temp; - - if ( HrFiltSet_p->FilterMethod == TDREND_HRFILT_Method_Table_F ) - { - /* Number of elevation angles */ - fread( &temp, num_bytes, num_to_read, f_hrtf ); - HrFiltSet_p->NumElev = (int16_t) temp; - - /* Elevation angles */ - HrFiltSet_p->Elev_p = (float *) count_malloc( HrFiltSet_p->NumElev * sizeof( float ) ); - buffer_p = (double *) count_malloc( HrFiltSet_p->NumElev * sizeof( double ) ); - num_to_read = HrFiltSet_p->NumElev; - fread( (void *) buffer_p, num_bytes, num_to_read, f_hrtf ); - temp_p = buffer_p; - HrFiltSet_p->ElevIncr = (float) ( buffer_p[1] - buffer_p[0] ); - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - HrFiltSet_p->Elev_p[n] = (float) *temp_p++; - if ( n > 0 && fabsf( ( HrFiltSet_p->Elev_p[n] - HrFiltSet_p->Elev_p[n - 1] - HrFiltSet_p->ElevIncr ) ) > 0.01 ) - { -#ifdef DEBUGGING - printf( "Error: HR Filter elevation values had irregular spacing.\n\n" ); -#endif - assert( 0 && "Error: HR Filter elevation values had irregular spacing." ); - } - } - count_free( buffer_p ); - - /* Number of azimuth values, one per elevation */ - HrFiltSet_p->NumAzim_p = (int16_t *) count_malloc( HrFiltSet_p->NumElev * sizeof( int16_t ) ); - buffer_p = (double *) count_malloc( HrFiltSet_p->NumElev * sizeof( double ) ); - fread( (void *) buffer_p, num_bytes, HrFiltSet_p->NumElev, f_hrtf ); - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - HrFiltSet_p->NumAzim_p[n] = (int16_t) buffer_p[n]; - } - count_free( buffer_p ); - - /* Indices to the first azimuth value, one per elevation */ - HrFiltSet_p->AzimStartIdx_p = (int16_t *) count_malloc( HrFiltSet_p->NumElev * sizeof( int16_t ) ); - count = 0; - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - HrFiltSet_p->AzimStartIdx_p[n] = count; - count += HrFiltSet_p->NumAzim_p[n]; - } - if ( count != HrFiltSet_p->NumPos ) - { -#ifdef DEBUGGING - printf( "Error: Inconsistent number of points in HR filter file.\n\n" ); -#endif - assert( 0 && "Error: Inconsistent number of points in HR filter file." ); - } - - /* Azimuth values, one set per elevation, i.e. one per measurement point */ - HrFiltSet_p->Azim_p = (float *) count_malloc( HrFiltSet_p->NumPos * sizeof( float ) ); - buffer_p = (double *) count_malloc( HrFiltSet_p->NumPos * sizeof( double ) ); - HrFiltSet_p->ElevFull_p = (float *) count_malloc( HrFiltSet_p->NumPos * sizeof( float ) ); - fread( (void *) buffer_p, num_bytes, HrFiltSet_p->NumPos, f_hrtf ); - i = 0; - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - for ( m = 0; m < HrFiltSet_p->NumAzim_p[n]; m++ ) - { - HrFiltSet_p->Azim_p[i] = (float) buffer_p[i]; - HrFiltSet_p->ElevFull_p[i] = HrFiltSet_p->Elev_p[n]; - /* Range needs to be (-180, 180] */ - if ( HrFiltSet_p->Azim_p[i] > 180.0 ) - { - HrFiltSet_p->Azim_p[i] -= 360.0; - } - i++; - } - } - count_free( buffer_p ); - } - if ( HrFiltSet_p->FilterMethod == TDREND_HRFILT_Method_Table_S ) - { - /* Number of elevation angles */ - fread( &temp, num_bytes, num_to_read, f_hrtf ); - HrFiltSet_p->NumElev = (int16_t) temp; - - /* Elevation angles */ - HrFiltSet_p->Elev_p = (float *) count_malloc( HrFiltSet_p->NumElev * sizeof( float ) ); - buffer_p = (double *) count_malloc( HrFiltSet_p->NumElev * sizeof( double ) ); - num_to_read = HrFiltSet_p->NumElev; - fread( (void *) buffer_p, num_bytes, num_to_read, f_hrtf ); - temp_p = buffer_p; - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - HrFiltSet_p->Elev_p[n] = (float) *temp_p++; - } - count_free( buffer_p ); - - /* Number of azimuth values, one per elevation */ - HrFiltSet_p->NumAzim_p = (int16_t *) count_malloc( HrFiltSet_p->NumElev * sizeof( int16_t ) ); - buffer_p = (double *) count_malloc( HrFiltSet_p->NumElev * sizeof( double ) ); - fread( (void *) buffer_p, num_bytes, HrFiltSet_p->NumElev, f_hrtf ); - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - HrFiltSet_p->NumAzim_p[n] = (int16_t) buffer_p[n]; - } - count_free( buffer_p ); - - /* Indices to the first azimuth value, one per elevation */ - HrFiltSet_p->AzimStartIdx_p = (int16_t *) count_malloc( HrFiltSet_p->NumElev * sizeof( int16_t ) ); - count = 0; - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - HrFiltSet_p->AzimStartIdx_p[n] = count; - count += HrFiltSet_p->NumAzim_p[n]; - } - if ( count != HrFiltSet_p->NumPos ) - { -#ifdef DEBUGGING - printf( "Inconsistent number of points in HR filter file.\n\n" ); -#endif - assert( 0 && "Inconsistent number of points in HR filter file." ); - } - - /* Azimuth values, one set per elevation, i.e. one per measurement point */ - HrFiltSet_p->Azim_p = (float *) count_malloc( HrFiltSet_p->NumPos * sizeof( float ) ); - buffer_p = (double *) count_malloc( HrFiltSet_p->NumPos * sizeof( double ) ); - HrFiltSet_p->ElevFull_p = (float *) count_malloc( HrFiltSet_p->NumPos * sizeof( float ) ); - fread( (void *) buffer_p, num_bytes, HrFiltSet_p->NumPos, f_hrtf ); - i = 0; - for ( n = 0; n < HrFiltSet_p->NumElev; n++ ) - { - for ( m = 0; m < HrFiltSet_p->NumAzim_p[n]; m++ ) - { - HrFiltSet_p->Azim_p[i] = (float) buffer_p[i]; - HrFiltSet_p->ElevFull_p[i] = HrFiltSet_p->Elev_p[n]; - /* Range needs to be (-180, 180] */ - if ( HrFiltSet_p->Azim_p[i] > 180.0 ) - { - HrFiltSet_p->Azim_p[i] -= 360.0; - } - i++; - } - } - count_free( buffer_p ); - } - - /* allocate memory to LeftFilt and RightFilt */ - mem_size = ( HrFiltSet_p->NumPos * HrFiltSet_p->FiltLength * sizeof( double ) ); - - FiltSetIntRight_p = (double *) count_malloc( mem_size ); - FiltSetIntLeft_p = (double *) count_malloc( mem_size ); - RightFilt_p = FiltSetIntRight_p; - LeftFilt_p = FiltSetIntLeft_p; - - /* read the HR filters */ - for ( i = 0; i < HrFiltSet_p->NumPos; i++ ) - { - /* read the left filter */ - fread( (void *) LeftFilt_p, num_bytes, HrFiltSet_p->FiltLength, f_hrtf ); - /* read the right filter */ - fread( (void *) RightFilt_p, num_bytes, HrFiltSet_p->FiltLength, f_hrtf ); - - LeftFilt_p += HrFiltSet_p->FiltLength; - RightFilt_p += HrFiltSet_p->FiltLength; - } - - /* Check that the whole file was read. */ - getc( f_hrtf ); - if ( !feof( f_hrtf ) ) - { -#ifdef DEBUGGING - printf( "Error: The HRTF filter file size was larger than expected.\n\n" ); -#endif - assert( 0 && "Error: The HRTF filter file size was larger than expected." ); - } - - /* IMPORTANT: We are now using reversed FIR filters as they */ - /* result in better SIMD (neon) optimization */ - /* Copy, and reverse the filter sets */ - - mem_size = ( HrFiltSet_p->NumPos * HrFiltSet_p->FiltLength * sizeof( float ) ); - RightFiltFlp_p = (float *) count_malloc( mem_size ); - LeftFiltFlp_p = (float *) count_malloc( mem_size ); - HrFiltSet_p->RightFiltSet_p = RightFiltFlp_p; - HrFiltSet_p->LeftFiltSet_p = LeftFiltFlp_p; - - FiltIntRight0_p = FiltSetIntRight_p + (int16_t) HrFiltSet_p->FiltLength - 1; - FiltIntLeft0_p = FiltSetIntLeft_p + (int16_t) HrFiltSet_p->FiltLength - 1; - - for ( i = 0; i < HrFiltSet_p->NumPos; i++ ) - { - /* Copy right filter */ - FiltIntRight_p = FiltIntRight0_p; - for ( n = 0; n < HrFiltSet_p->FiltLength; n++ ) - { - *RightFiltFlp_p++ = Scaler_HrfGain * (float) ( *FiltIntRight_p-- ); - } - FiltIntRight0_p += HrFiltSet_p->FiltLength; - - /* Copy left filter */ - FiltIntLeft_p = FiltIntLeft0_p; - for ( n = 0; n < HrFiltSet_p->FiltLength; n++ ) - { - *LeftFiltFlp_p++ = Scaler_HrfGain * (float) ( *FiltIntLeft_p-- ); - } - FiltIntLeft0_p += HrFiltSet_p->FiltLength; - } - - count_free( FiltSetIntLeft_p ); - count_free( FiltSetIntRight_p ); - - return; -} -#endif - /*-------------------------------------------------------------------* * TDREND_REND_RenderSourceHRFilt() @@ -343,56 +60,20 @@ void TDREND_HRFILT_SetFiltSet( --------------------------------------------------------------------*/ ivas_error TDREND_REND_RenderSourceHRFilt( - TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ -#ifdef FIX_ITD - const float *hrf_left_delta, /* i: Left filter interpolation delta */ - const float *hrf_right_delta, /* i: Right filter interpolation delta */ - const int16_t intp_count, /* i: Interpolation count */ -#else -#ifdef TDREND_HRTF_TABLE_METHODS - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ -#endif -#endif + TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ + const float *hrf_left_delta, /* i: Left filter interpolation delta */ + const float *hrf_right_delta, /* i: Right filter interpolation delta */ + const int16_t intp_count, /* i: Interpolation count */ float output_buf[][L_SPATIAL_SUBFR_48k], /* o : Output buffer */ -#ifdef FIX_ITD - const int16_t subframe_length /* i : Subframe length in use */ -#else - const int16_t subframe_length, /* i : Subframe length in use */ - const int32_t output_Fs /* i : Output sample rate */ -#endif + const int16_t subframe_length /* i : Subframe length in use */ ) { -#ifndef FIX_ITD - TDREND_SRC_REND_t *SrcRend_p; - const float *InFrame_nIC_p; - int16_t NoOfUsedInputSamples, NoOfDeliveredOutputSamples; -#endif float LeftOutputFrame[L_SPATIAL_SUBFR_48k]; float RightOutputFrame[L_SPATIAL_SUBFR_48k]; -#ifdef FIX_ITD TDREND_Apply_ITD( Src_p->InputFrame_p, LeftOutputFrame, RightOutputFrame, &Src_p->previtd, Src_p->itd, Src_p->mem_itd, subframe_length ); TDREND_firfilt( LeftOutputFrame, Src_p->hrf_left_prev, hrf_left_delta, intp_count, Src_p->mem_hrf_left, subframe_length, Src_p->filterlength ); TDREND_firfilt( RightOutputFrame, Src_p->hrf_right_prev, hrf_right_delta, intp_count, Src_p->mem_hrf_right, subframe_length, Src_p->filterlength ); -#else - - /* Input channel rendering loop */ - InFrame_nIC_p = Src_p->InputFrame_p; - SrcRend_p = Src_p->SrcRend_p; - - /* Gain not currently encoded/used */ - /* SrcGain = Mix_p->Gain * ( *SrcRend_p->SrcGain_p ); */ - /* SrcGain *= ( *SrcRend_p->DirGain_p ) * ( *SrcRend_p->DistGain_p ); */ - - TDREND_SFX_SpatBin_Execute_Main( SrcRend_p->SfxSpatBin_p, InFrame_nIC_p, subframe_length, LeftOutputFrame, RightOutputFrame, &NoOfUsedInputSamples, &NoOfDeliveredOutputSamples, output_Fs ); - -#ifdef TDREND_HRTF_TABLE_METHODS - if ( hBinRendererTd->HrFiltSet_p->FilterMethod != TDREND_HRFILT_Method_BSplineModel ) - { - SrcRend_p->SfxSpatBin_p->HrFilterInterpOn = 1; /* Turn on after first frame is rendered. */ - } -#endif -#endif /* Copy to accumulative output frame */ v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length ); v_add( RightOutputFrame, output_buf[1], output_buf[1], subframe_length ); @@ -404,305 +85,6 @@ ivas_error TDREND_REND_RenderSourceHRFilt( } -#ifdef TDREND_HRTF_TABLE_METHODS -/*-------------------------------------------------------------------* - * GetFilterFromAngle_F() - * - * Obtain an HR filter corresponding to the input angle pair. - * This version is for FABIAN format. - --------------------------------------------------------------------*/ - -static void GetFilterFromAngle_F( - TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure */ - const float Elev, /* i : Elevation, degrees */ - float Azim, /* i : Azimuth, degrees */ - SFX_SpatBin_Params_t *SfxSpatBinParams_p /* i/o: Currently used HR filter */ -) -{ - int16_t AzimInd, ElevInd, n; - int16_t ElevIndLo; - int16_t ElevIndHi; - int16_t flipped = 0; - float AzimMod; - float AzimLo, AzimHi; - uint32_t HrFiltInd; - int32_t CandidateIndices[100]; /* Stores the indices of the candidate points. */ - float CandidateAngles[100]; /* Stores the angular distance between the candidate and the test point. */ - int16_t c = 0; - int16_t test; - float CandidateAzim, CandidateElev, min; - - /* Note need to support azimuth range [-180,180] since this is what is returned by atan2f. AzimMod is on the */ - /* range (-180,180]. This should be faster than doing a full mod(360) etc. */ - if ( Azim == -180.0f ) - { - AzimMod = 180.0f; - } - else - { - AzimMod = Azim; - } - - /* Use the nearest filter point. Since the azimuth is not assumed to be the same for */ - /* different elevations, make a shortlist of rows to check, and a range azimuth to check. */ - ElevInd = (int16_t) roundf( ( Elev - HrFiltSet_p->Elev_p[0] ) / HrFiltSet_p->ElevIncr ); /* Regular elevation spacing */ - if ( ElevInd < 0 ) - { - ElevInd = 0; - } - else if ( ElevInd >= HrFiltSet_p->NumElev ) - { - ElevInd = HrFiltSet_p->NumElev - 1; - } - ElevIndLo = max( 0, ElevInd - 2 ); - ElevIndHi = min( HrFiltSet_p->NumElev - 1, ElevInd + 2 ); - - AzimLo = AzimMod - 15; - if ( AzimLo <= -180.0 ) - { - AzimLo += 360.0; - } - AzimHi = AzimMod + 15; - if ( AzimHi > 360.0 ) - { - AzimHi -= 360.0; - } - - if ( AzimHi < AzimLo ) - { - flipped = 1; - } - - /* Check each candidate elevation row, and each azimuth value in that row, to make a list of candidate points. */ - for ( ElevInd = ElevIndLo; ElevInd <= ElevIndHi; ElevInd++ ) - { - for ( AzimInd = HrFiltSet_p->AzimStartIdx_p[ElevInd]; - AzimInd < HrFiltSet_p->AzimStartIdx_p[ElevInd] + HrFiltSet_p->NumAzim_p[ElevInd]; - AzimInd++ ) - { - if ( flipped == 0 ) - { - test = HrFiltSet_p->Azim_p[AzimInd] >= AzimLo && HrFiltSet_p->Azim_p[AzimInd] <= AzimHi; - } - else - { - /* This is the case where the limits straddle the +/- 180 discontinuity */ - test = HrFiltSet_p->Azim_p[AzimInd] >= AzimLo || HrFiltSet_p->Azim_p[AzimInd] <= AzimHi; - } - if ( test ) - { - /* Azim value is within range, store it */ - CandidateIndices[c] = AzimInd; - c++; - } - } - } - - for ( n = 0; n < c; n++ ) - { - CandidateAzim = HrFiltSet_p->Azim_p[CandidateIndices[n]]; - CandidateElev = HrFiltSet_p->ElevFull_p[CandidateIndices[n]]; - CandidateAngles[n] = GreatCircleAngleDeg( AzimMod, Elev, CandidateAzim, CandidateElev ); - } - - /* Find the candidate with the minimum angle/distance */ - min = CandidateAngles[0]; - HrFiltInd = CandidateIndices[0]; - for ( n = 1; n < c; n++ ) - { - if ( CandidateAngles[n] < min ) - { - min = CandidateAngles[n]; - HrFiltInd = CandidateIndices[n]; - } - } - - HrFiltInd *= HrFiltSet_p->FiltLength; - - /* 3. No extracted ITD. */ - SfxSpatBinParams_p->Itd = 0; - - /* 4. Copy the filter over */ - for ( n = 0; n < HrFiltSet_p->FiltLength; n++ ) - { - SfxSpatBinParams_p->LeftFilter_p[n] = HrFiltSet_p->LeftFiltSet_p[HrFiltInd + n]; - SfxSpatBinParams_p->RightFilter_p[n] = HrFiltSet_p->RightFiltSet_p[HrFiltInd + n]; - } - - return; -} - - -/*-------------------------------------------------------------------* - * GetFilterFromAngle_S() - * - * Obtain an HR filter corresponding to the input angle pair. - * This version is for SADIE format. - --------------------------------------------------------------------*/ - -static void GetFilterFromAngle_S( - TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure */ - const float Elev, /* i : Elevation, degrees */ - float Azim, /* i : Azimuth, degrees */ - SFX_SpatBin_Params_t *SfxSpatBinParams_p /* i/o: Currently used HR filter */ -) -{ - int16_t AzimInd, n; - int16_t ElevInd = -1; - int16_t ElevIndLo; - int16_t ElevIndHi; - int16_t flipped = 0; - float ElevDiff = 200.f; - float AzimMod, AzimLo, AzimHi; - uint32_t HrFiltInd; - int32_t CandidateIndices[400]; /* Stores the indices of the candidate points. */ - float CandidateAngles[400]; /* Stores the angular distance between the candidate and the test point. */ - int16_t c; - int16_t test; - float CandidateAzim, CandidateElev, min; - - /* Note need to support azimuth range [-180,180] since this is what is returned by atan2f. AzimMod is on the */ - /* range (-180,180]. This should be faster than doing a full mod(360) etc. */ - if ( Azim == -180.0f ) - { - AzimMod = 180.0f; - } - else - { - AzimMod = Azim; - } - - /* Use the nearest filter point. Since the azimuth is not assumed to be the same for */ - /* different elevations, make a shortlist of rows to check, and a range azimuth to check. */ - for ( c = 0; c < HrFiltSet_p->NumElev; c++ ) - { - if ( fabsf( Elev - HrFiltSet_p->Elev_p[c] ) < ElevDiff ) - { - ElevDiff = fabsf( Elev - HrFiltSet_p->Elev_p[c] ); - ElevInd = c; - } - } - - if ( ElevInd < 0 ) - { - ElevInd = 0; - } - else if ( ElevInd >= HrFiltSet_p->NumElev ) - { - ElevInd = HrFiltSet_p->NumElev - 1; - } - ElevIndLo = max( 0, ElevInd - 2 ); - ElevIndHi = min( HrFiltSet_p->NumElev - 1, ElevInd + 2 ); - - AzimLo = AzimMod - 15; - if ( AzimLo <= -180.0 ) - { - AzimLo += 360.0; - } - AzimHi = AzimMod + 15; - if ( AzimHi > 360.0 ) - { - AzimHi -= 360.0; - } - - if ( AzimHi < AzimLo ) - { - flipped = 1; - } - - /* Check each candidate elevation row, and each azimuth value in that row, to make a list of candidate points. */ - c = 0; - for ( ElevInd = ElevIndLo; ElevInd <= ElevIndHi; ElevInd++ ) - { - for ( AzimInd = HrFiltSet_p->AzimStartIdx_p[ElevInd]; - AzimInd < HrFiltSet_p->AzimStartIdx_p[ElevInd] + HrFiltSet_p->NumAzim_p[ElevInd]; - AzimInd++ ) - { - if ( flipped == 0 ) - { - test = HrFiltSet_p->Azim_p[AzimInd] >= AzimLo && HrFiltSet_p->Azim_p[AzimInd] <= AzimHi; - } - else - { - /* This is the case where the limits straddle the +/- 180 discontinuity */ - test = HrFiltSet_p->Azim_p[AzimInd] >= AzimLo || HrFiltSet_p->Azim_p[AzimInd] <= AzimHi; - } - if ( test ) - { - /* Azim value is within range, store it */ - CandidateIndices[c] = AzimInd; - c++; - } - } - } - - for ( n = 0; n < c; n++ ) - { - CandidateAzim = HrFiltSet_p->Azim_p[CandidateIndices[n]]; - CandidateElev = HrFiltSet_p->ElevFull_p[CandidateIndices[n]]; - CandidateAngles[n] = GreatCircleAngleDeg( AzimMod, Elev, CandidateAzim, CandidateElev ); - } - - /* Find the candidate with the minimum angle/distance */ - min = CandidateAngles[0]; - HrFiltInd = CandidateIndices[0]; - for ( n = 1; n < c; n++ ) - { - if ( CandidateAngles[n] < min ) - { - min = CandidateAngles[n]; - HrFiltInd = CandidateIndices[n]; - } - } - - HrFiltInd *= HrFiltSet_p->FiltLength; - - /* 3. No extracted ITD. */ - SfxSpatBinParams_p->Itd = 0; - - /* 4. Copy the filter over */ - for ( n = 0; n < HrFiltSet_p->FiltLength; n++ ) - { - SfxSpatBinParams_p->LeftFilter_p[n] = HrFiltSet_p->LeftFiltSet_p[HrFiltInd + n]; - SfxSpatBinParams_p->RightFilter_p[n] = HrFiltSet_p->RightFiltSet_p[HrFiltInd + n]; - } - - return; -} - - -/*-------------------------------------------------------------------* - * GetFilterFromAngle() - * - * Obtain an HR filter corresponding to the input angle pair. - * This version is a controller that switches between the available - * methods (table, model) according to HrFiltSet_p->FilterMethod - --------------------------------------------------------------------*/ - -void GetFilterFromAngle( - TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure */ - const float Elev, /* i : Elevation, degrees */ - float Azim, /* i : Azimuth, degrees */ - SFX_SpatBin_Params_t *SfxSpatBinParams_p /* i/o: Currently used HR filter */ -) -{ - switch ( HrFiltSet_p->FilterMethod ) - { - case TDREND_HRFILT_Method_BSplineModel: - GetFilterFromAngle_M( HrFiltSet_p, Elev, Azim, SfxSpatBinParams_p ); - break; - case TDREND_HRFILT_Method_Table_F: - GetFilterFromAngle_F( HrFiltSet_p, Elev, Azim, SfxSpatBinParams_p ); - break; - case TDREND_HRFILT_Method_Table_S: - GetFilterFromAngle_S( HrFiltSet_p, Elev, Azim, SfxSpatBinParams_p ); - break; - } - - return; -} -#endif - /*-------------------------------------------------------------------* * GetFilterFromAngle() * @@ -710,59 +92,29 @@ void GetFilterFromAngle( * This version uses the HR filter model. --------------------------------------------------------------------*/ -#ifdef TDREND_HRTF_TABLE_METHODS -static void GetFilterFromAngle_M( -#else void GetFilterFromAngle( -#endif TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure */ const float Elev, /* i : Elevation, degrees */ float Azim, /* i : Azimuth, degrees */ -#ifdef FIX_ITD - float *hrf_left, /* o : Left HR filter */ - float *hrf_right, /* o : Right HR filter */ - int16_t *itd /* o : ITD value */ -#else - SFX_SpatBin_Params_t *SfxSpatBinParams_p /* i/o: Currently used HR filter */ -#endif + float *hrf_left, /* o : Left HR filter */ + float *hrf_right, /* o : Right HR filter */ + int16_t *itd /* o : ITD value */ ) { -#ifndef FIX_ITD - int16_t count, ii; -#endif GenerateFilter( Elev, Azim, &HrFiltSet_p->ModelParams, &HrFiltSet_p->ModelEval ); -#ifdef FIX_ITD mvr2r( HrFiltSet_p->ModelEval.hrfModL, hrf_left, HrFiltSet_p->ModelParams.K ); mvr2r( HrFiltSet_p->ModelEval.hrfModR, hrf_right, HrFiltSet_p->ModelParams.K ); -#else - /* Renderer requires filter in reversed order: */ - count = 0; - for ( ii = ( HrFiltSet_p->ModelParams.K - 1 ); ii >= 0; ii-- ) - { - SfxSpatBinParams_p->LeftFilter_p[ii] = HrFiltSet_p->ModelEval.hrfModL[count]; - SfxSpatBinParams_p->RightFilter_p[ii] = HrFiltSet_p->ModelEval.hrfModR[count]; - count++; - } -#endif /* 4. Evaluate the ITD */ if ( HrFiltSet_p->ModelParams.UseItdModel ) { GenerateITD( Elev, Azim, &HrFiltSet_p->ModelParamsITD, &HrFiltSet_p->ModelEval ); -#ifdef FIX_ITD *itd = (int16_t) HrFiltSet_p->ModelEval.itdMod; -#else - SfxSpatBinParams_p->Itd = HrFiltSet_p->ModelEval.itdMod; -#endif } else { -#ifdef FIX_ITD *itd = 0; -#else - SfxSpatBinParams_p->Itd = 0; /* No extracted ITD */ -#endif } return; @@ -1127,13 +479,7 @@ void HRTF_model_precalc( ) { int16_t sec_length; - int16_t i, k, j; - float *pEL; - float *pER; - const float *pAlphaL; - const float *pAlphaR; - float tmp; - int16_t AlphaN; + int16_t i; sec_length = model->K / HRTF_MODEL_N_SECTIONS; @@ -1149,47 +495,10 @@ void HRTF_model_precalc( maximum_s( model->azimDim3, model->elevDim3, &model->azimDim3Max ); - if ( !model->modelROM ) - { - AlphaN = model->AlphaN; - - /* Precalculated energies for each section and each row of the alpha matrices */ - model->EL_dyn = (float *) count_malloc( HRTF_MODEL_N_SECTIONS * AlphaN * sizeof( float ) ); - model->ER_dyn = (float *) count_malloc( HRTF_MODEL_N_SECTIONS * AlphaN * sizeof( float ) ); - pEL = model->EL_dyn; - pER = model->ER_dyn; - for ( i = 0; i < HRTF_MODEL_N_SECTIONS; i++ ) - { - for ( j = 0; j < AlphaN; j++ ) /* rows of Alpha matrices */ - { - *pEL = 0.0f; - *pER = 0.0f; - - pAlphaL = &model->AlphaL[model->iSecFirst[i] * AlphaN + j]; - pAlphaR = &model->AlphaR[model->iSecFirst[i] * AlphaN + j]; - - for ( k = model->iSecFirst[i]; k < model->iSecLast[i]; k++ ) /* k within the sections */ - { - /* Energy calculation */ - tmp = *pAlphaL; - *pEL += tmp * tmp; - tmp = *pAlphaR; - *pER += tmp * tmp; - pAlphaL += AlphaN; - pAlphaR += AlphaN; - } - pEL++; - pER++; - } - } - model->EL = (const float *) model->EL_dyn; - model->ER = (const float *) model->ER_dyn; - } return; } - /*-------------------------------------------------------------------* * BSplineModelEvalDealloc() * @@ -1203,66 +512,25 @@ void BSplineModelEvalDealloc( { /* Allocated in LoadBSplineBinary() */ int16_t i; - - if ( !model->modelROM ) + if ( model->modelROM ) { - count_free( model->elevKSeq_dyn ); - count_free( model->azim_start_idx_dyn ); - count_free( model->azimDim2_dyn ); - count_free( model->azimDim3_dyn ); - count_free( model->AlphaL_dyn ); - count_free( model->AlphaR_dyn ); - count_free( model->azimSegSamples_dyn ); - - count_free( model->azimShapeIdx_dyn ); - count_free( model->azimShapeSampFactor_dyn ); - count_free( model->elevBsShape_dyn ); - - count_free( model->EL_dyn ); - count_free( model->ER_dyn ); - - for ( i = 0; i < model->num_unique_azim_splines; i++ ) + free( (void *) model->azimBsShape ); /* void* cast needed to please both gcc and Visual studio compilers. Deallocating const float** should be fine and gcc agrees, but Visual studio complains. */ + for ( i = 0; i < model->elevDim3; i++ ) { - count_free( model->azimBsShape_dyn[i] ); + free( model->azimKSeq[i] ); + } + free( model->azimKSeq ); + if ( modelEval != NULL ) + { + free( modelEval->hrfModL ); + free( modelEval->hrfModR ); } - count_free( model->azimBsShape_dyn ); - } - count_free( (void *) model->azimBsShape ); /* void* cast needed to please both gcc and Visual studio compilers. Deallocating const float** should be fine and gcc agrees, but Visual studio complains. */ - for ( i = 0; i < model->elevDim3; i++ ) - { - count_free( model->azimKSeq[i] ); - } - count_free( model->azimKSeq ); - if ( modelEval != NULL ) - { - count_free( modelEval->hrfModL ); - count_free( modelEval->hrfModR ); } return; } -/*-------------------------------------------------------------------* - * BSplineModelEvalITDDealloc() - * - * Deallocates the ITD model. - --------------------------------------------------------------------*/ - -void BSplineModelEvalITDDealloc( - ModelParamsITD_t *model /* i : Model parameters */ -) -{ - count_free( model->elevKSeq_dyn ); - count_free( model->azimKSeq_dyn ); - count_free( model->W_dyn ); - count_free( model->azimBsShape_dyn ); - count_free( model->elevBsShape_dyn ); - - return; -} - - /*-------------------------------------------------------------------* * SkipSmallest_ValueIndex() * @@ -1341,27 +609,3 @@ static void SkipSmallest_ValueIndex( return; } - - -#ifdef TDREND_HRTF_TABLE_METHODS -/*-------------------------------------------------------------------* - * GreatCircleAngleDeg() - * - * Returns the great-circle angle between two (azimuth, elevation) - * pairs - --------------------------------------------------------------------*/ - -/*! r: Angle between the two points on the sphere, degrees */ -static float GreatCircleAngleDeg( - float Az1, /* i : Azimuth angle, degrees, point 1 */ - float El1, /* i : Elevation angle, degrees, point 1 */ - float Az2, /* i : Azimuth angle, degrees, point 2 */ - float El2 /* i : Elevation angle, degrees, point 2 */ -) -{ - return acosf( sinf( El1 * PI_OVER_180 ) * sinf( El2 * PI_OVER_180 ) + - cosf( El1 * PI_OVER_180 ) * cosf( El2 * PI_OVER_180 ) * - cosf( fabsf( Az1 - Az2 ) * PI_OVER_180 ) ) * - PI_OVER_180; -} -#endif diff --git a/lib_rend/ivas_objectRenderer_mix.c b/lib_rend/ivas_objectRenderer_mix.c index c8e75cfd0451e19cc236d8abad9533e0367d53e6..456bd4cd33370ea1a637420548c2af6a8ee7a8ec 100644 --- a/lib_rend/ivas_objectRenderer_mix.c +++ b/lib_rend/ivas_objectRenderer_mix.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -34,7 +34,7 @@ #include "options.h" #include "prot.h" #include "ivas_prot.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" #endif @@ -122,7 +122,7 @@ void TDREND_MIX_Dealloc( /* Deallocate Listener and RendListener */ if ( hBinRendererTd->Listener_p != NULL ) { - count_free( hBinRendererTd->Listener_p ); + free( hBinRendererTd->Listener_p ); hBinRendererTd->Listener_p = NULL; } /* Dealloc HR filter set */ @@ -130,54 +130,33 @@ void TDREND_MIX_Dealloc( { if ( hBinRendererTd->HrFiltSet_p->FilterMethod == TDREND_HRFILT_Method_BSplineModel ) { - if ( hBinRendererTd->HrFiltSet_p->ModelParams.UseItdModel && !hBinRendererTd->HrFiltSet_p->ModelParams.modelROM ) - { - BSplineModelEvalITDDealloc( &hBinRendererTd->HrFiltSet_p->ModelParamsITD ); - } BSplineModelEvalDealloc( &hBinRendererTd->HrFiltSet_p->ModelParams, &hBinRendererTd->HrFiltSet_p->ModelEval ); } else { if ( hBinRendererTd->HrFiltSet_p->Elev_p != NULL ) { - count_free( hBinRendererTd->HrFiltSet_p->Elev_p ); + free( hBinRendererTd->HrFiltSet_p->Elev_p ); hBinRendererTd->HrFiltSet_p->Elev_p = NULL; } if ( hBinRendererTd->HrFiltSet_p->Azim_p != NULL ) { - count_free( hBinRendererTd->HrFiltSet_p->Azim_p ); + free( hBinRendererTd->HrFiltSet_p->Azim_p ); hBinRendererTd->HrFiltSet_p->Azim_p = NULL; } if ( hBinRendererTd->HrFiltSet_p->LeftFiltSet_p != NULL ) { - count_free( hBinRendererTd->HrFiltSet_p->LeftFiltSet_p ); + free( hBinRendererTd->HrFiltSet_p->LeftFiltSet_p ); hBinRendererTd->HrFiltSet_p->LeftFiltSet_p = NULL; } if ( hBinRendererTd->HrFiltSet_p->RightFiltSet_p != NULL ) { - count_free( hBinRendererTd->HrFiltSet_p->RightFiltSet_p ); + free( hBinRendererTd->HrFiltSet_p->RightFiltSet_p ); hBinRendererTd->HrFiltSet_p->RightFiltSet_p = NULL; } -#ifdef TDREND_HRTF_TABLE_METHODS - if ( hBinRendererTd->HrFiltSet_p->NumAzim_p != NULL ) - { - count_free( hBinRendererTd->HrFiltSet_p->NumAzim_p ); - hBinRendererTd->HrFiltSet_p->NumAzim_p = NULL; - } - if ( hBinRendererTd->HrFiltSet_p->AzimStartIdx_p != NULL ) - { - count_free( hBinRendererTd->HrFiltSet_p->AzimStartIdx_p ); - hBinRendererTd->HrFiltSet_p->AzimStartIdx_p = NULL; - } - if ( hBinRendererTd->HrFiltSet_p->ElevFull_p != NULL ) - { - count_free( hBinRendererTd->HrFiltSet_p->ElevFull_p ); - hBinRendererTd->HrFiltSet_p->ElevFull_p = NULL; - } -#endif } - count_free( hBinRendererTd->HrFiltSet_p ); + free( hBinRendererTd->HrFiltSet_p ); hBinRendererTd->HrFiltSet_p = NULL; } @@ -225,7 +204,7 @@ ivas_error TDREND_MIX_Init( /* Init HR filter set */ if ( *hHrtfTD == NULL ) { - if ( ( hBinRendererTd->HrFiltSet_p = (TDREND_HRFILT_FiltSet_t *) count_malloc( sizeof( TDREND_HRFILT_FiltSet_t ) ) ) == NULL ) + if ( ( hBinRendererTd->HrFiltSet_p = (TDREND_HRFILT_FiltSet_t *) malloc( sizeof( TDREND_HRFILT_FiltSet_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Binaural TD renderer\n" ) ); } @@ -290,12 +269,7 @@ ivas_error TDREND_MIX_SetDistAttenModel( ivas_error TDREND_MIX_AddSrc( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ int16_t *SrcInd, /* o : Source index */ -#ifdef FIX_ITD - const TDREND_PosType_t PosType /* i : Position type (absolute/relative) */ -#else - const TDREND_PosType_t PosType, /* i : Position type (absolute/relative) */ - const int32_t output_Fs /* i : Output sampling rate */ -#endif + const TDREND_PosType_t PosType /* i : Position type (absolute/relative) */ ) { TDREND_SRC_t *Src_p; @@ -327,11 +301,7 @@ ivas_error TDREND_MIX_AddSrc( return error; } -#ifdef FIX_ITD TDREND_SRC_Init( Src_p, PosType ); -#else - TDREND_SRC_Init( Src_p, PosType, output_Fs ); -#endif /* Special OpenAL initialization due to a common distance attenuation model */ if ( hBinRendererTd->DistAttenModel != 0 ) diff --git a/lib_rend/ivas_objectRenderer_sfx.c b/lib_rend/ivas_objectRenderer_sfx.c index a5f3b58e7a9545696157a16efe98a6675a643163..7a9ddd6b85bb7a101b1917b179085159190901c7 100644 --- a/lib_rend/ivas_objectRenderer_sfx.c +++ b/lib_rend/ivas_objectRenderer_sfx.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,1428 +36,20 @@ #include "ivas_prot.h" #include "ivas_rom_rend.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*---------------------------------------------------------------------* * Local constants *---------------------------------------------------------------------*/ -#ifndef FIX_ITD -/* Sinc constants */ -#define SFX_SPAT_BIN_SINC_M 5 -#define SFX_SPAT_BIN_NUM_SUBSAMPLES_BITS 6 -#define SFX_SPAT_BIN_NUM_SUBSAMPLES ( 1 << SFX_SPAT_BIN_NUM_SUBSAMPLES_BITS ) -#endif /*---------------------------------------------------------------------* * Local function prototypes *---------------------------------------------------------------------*/ -#ifndef FIX_ITD -static void TDREND_SFX_SpatBin_SetParamsInitializeOn( SFX_SpatBin_t *SfxSpatBin_p, const SFX_SpatBin_Params_t *NewParam_p, const int32_t output_Fs ); -static void TDREND_SFX_SpatBin_SetParamsInitializeOff( SFX_SpatBin_t *SfxSpatBin_p, const SFX_SpatBin_Params_t *NewParam_p, const int32_t output_Fs ); -static void TDREND_SFX_SpatBin_SetParamsOn( SFX_SpatBin_t *SfxSpatBin_p, const SFX_SpatBin_Params_t *NewParam_p, const int32_t output_Fs ); -static void TDREND_SFX_SpatBin_SetParamsOff( SFX_SpatBin_t *const SfxSpatBin_p, const int32_t output_Fs ); -static void TDREND_SFX_SpatBin_Execute( SFX_SpatBin_t *SfxSpatBin_p, const float *InBuffer_p, -#ifdef DEBUGGING - const int16_t NoOfInputSamples, -#endif - const int16_t NoOfRequestedOutputSamples, - float *LeftOutBuffer_p, - float *RightOutBuffer_p, - int16_t *NoOfUsedInputSamples_p, - int16_t *NoOfDeliveredOutputSamples_p, - const int32_t output_Fs ); -static void TDREND_FirFilterRev( float *OutputFrame_p, float *FirFilterRev_p, const int16_t FirFilterLength, float *InputFrame_p, const int16_t NumOfSamples ); -#ifdef TDREND_HRTF_TABLE_METHODS -static void TDREND_FirFilterRevInterp( float *OutputFrame_p, float *FirFilterRev_p, const int16_t FirFilterLength, float *InputFrame_p, const int16_t NumOfSamples, float *FilterStored ); -#endif -static void TDREND_SFX_SpatBin_Clear( SFX_SpatBin_t *SfxSpatBin_p, const int32_t output_Fs ); -#else static void sincResample( const float *input, float *output, const int16_t length_in, const int16_t length_out ); -#endif -#ifndef FIX_ITD -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_Resampling() - * - * Resamples input data with a given resampling factor and returns the - * resampled data. - * - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_Resampling( - const float *const InputBuffer_p, /* i : The input buffer with audio samples. */ - const int16_t NoOfInputSamples, /* i : Length of input buffer */ - float *const ResampleOutBuffer_p, /* o : Resampled output */ - const int16_t NoOfResampledSamples, /* i : Length of resampled output */ - float *const OldBuffer_p, /* i/o: Samples from previous input buffer (in case of buffer surplus) */ - int16_t *const NoOfOldBufferSamples_p, /* i/o: Length of OldBuffer_p */ - const float Alpha, /* i : Resampling factor */ - float *const Tf_p /* i/o: Old fractional time value / updated time value 0.0 <= Tf < 1.0 */ -) -{ - int16_t i, k, n, n0; - float AlphaInv; - float T; - int16_t nt, snc0, SubsamplesSteps; - const float *SamplePointer_p, *SincPointer_p; - float Temp; - int16_t NoOfSamplesToCopy, MaximumIndInOldBuffer, Ind; - - T = *Tf_p; - - /* The inverse of the resampling factor */ - AlphaInv = 1 / Alpha; - - /* Check how many input samples we have */ - if ( NoOfInputSamples < 2 * SFX_SPAT_BIN_SINC_M ) - { - NoOfSamplesToCopy = NoOfInputSamples; - MaximumIndInOldBuffer = *NoOfOldBufferSamples_p - ( 2 * SFX_SPAT_BIN_SINC_M - NoOfInputSamples ); - } - else - { - NoOfSamplesToCopy = 2 * SFX_SPAT_BIN_SINC_M; - MaximumIndInOldBuffer = *NoOfOldBufferSamples_p; - } - - /* 1. Append min(2M,N_input) samples from input buffer to old buffer */ - for ( i = 0; i < NoOfSamplesToCopy; i++ ) - { - OldBuffer_p[*NoOfOldBufferSamples_p + i] = InputBuffer_p[i]; - } - - /* 2. Resampling */ - nt = 0; - n0 = SFX_SPAT_BIN_SINC_M - 1; - k = 0; - if ( Alpha <= 1.0 ) - { - /* 2.1 Resample (without scaling) old buffer */ - while ( nt <= MaximumIndInOldBuffer ) - { - /* Calculate the sinc-index for the center value of the sinc */ - snc0 = (int16_t) ( ( T + EPSILON - nt ) * SFX_SPAT_BIN_NUM_SUBSAMPLES + 0.5 ); - - /* The convolution of the sinc and the data */ - SamplePointer_p = &OldBuffer_p[n0 + nt - ( SFX_SPAT_BIN_SINC_M - 1 )]; - SincPointer_p = &SincTable[snc0 - SFX_SPAT_BIN_NUM_SUBSAMPLES * ( -( SFX_SPAT_BIN_SINC_M - 1 ) )]; - - Temp = *SamplePointer_p * *SincPointer_p; - for ( i = -( SFX_SPAT_BIN_SINC_M - 2 ); i <= 0; i++ ) - { - SamplePointer_p++; - SincPointer_p -= SFX_SPAT_BIN_NUM_SUBSAMPLES; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - - SamplePointer_p++; - SincPointer_p = &SincTable[SFX_SPAT_BIN_NUM_SUBSAMPLES - snc0]; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - for ( i = 2; i <= SFX_SPAT_BIN_SINC_M; i++ ) - { - SamplePointer_p++; - SincPointer_p += SFX_SPAT_BIN_NUM_SUBSAMPLES; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - - ResampleOutBuffer_p[k] = Temp; - - /* Update the time index */ - T = T + Alpha; - /* Update the time index for the old buffer data */ - nt = (int16_t) ( T + EPSILON ); - /* Update the resampled buffer index */ - k++; - - /* Make sure we don't process too many samples. This check is needed for the cases */ - /* when all resampled samples are obtained from the old buffer. */ - if ( k >= NoOfResampledSamples ) - { - /* We have processed enough data. Jump out of the while-loop! */ - break; - } - } - - /* 2.2 Resample (without scaling) input buffer */ - n0 = ( SFX_SPAT_BIN_SINC_M - 1 ) - *NoOfOldBufferSamples_p; - for ( n = k; n < NoOfResampledSamples; n++ ) - { - /* Calculate the sinc-index for the center value of the sinc */ - snc0 = (int16_t) ( ( T + EPSILON - nt ) * SFX_SPAT_BIN_NUM_SUBSAMPLES + 0.5 ); - - /* The convolution of the sinc and the data */ - SamplePointer_p = &InputBuffer_p[n0 + nt - ( SFX_SPAT_BIN_SINC_M - 1 )]; - SincPointer_p = &SincTable[snc0 - SFX_SPAT_BIN_NUM_SUBSAMPLES * ( -( SFX_SPAT_BIN_SINC_M - 1 ) )]; - - Temp = *SamplePointer_p * *SincPointer_p; - for ( i = -( SFX_SPAT_BIN_SINC_M - 2 ); i <= 0; i++ ) - { - SamplePointer_p++; - SincPointer_p -= SFX_SPAT_BIN_NUM_SUBSAMPLES; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - - SamplePointer_p++; - SincPointer_p = &SincTable[SFX_SPAT_BIN_NUM_SUBSAMPLES - snc0]; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - for ( i = 2; i <= SFX_SPAT_BIN_SINC_M; i++ ) - { - SamplePointer_p++; - SincPointer_p += SFX_SPAT_BIN_NUM_SUBSAMPLES; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - ResampleOutBuffer_p[n] = Temp; - - /* Update the time index */ - T = T + Alpha; - /* Update the time index for the input buffer data */ - nt = (int16_t) ( T + EPSILON ); - } - } - else - { - /* Calculate the constant step length in subsamples for the sinc */ - SubsamplesSteps = (int16_t) ( AlphaInv * SFX_SPAT_BIN_NUM_SUBSAMPLES ); - - /* 2.3 Resample (with scaling) old buffer */ - while ( nt <= MaximumIndInOldBuffer ) - { - /* Calculate the sinc-index for the center value of the sinc */ - snc0 = (int16_t) ( ( T + EPSILON - nt ) * SubsamplesSteps + 0.5f ); - - /* The convolution of the sinc and the data */ - - SamplePointer_p = &OldBuffer_p[n0 + nt - ( SFX_SPAT_BIN_SINC_M - 1 )]; - SincPointer_p = &SincTable[snc0 - SubsamplesSteps * ( -( SFX_SPAT_BIN_SINC_M - 1 ) )]; - - Temp = *SamplePointer_p * *SincPointer_p; - for ( i = -( SFX_SPAT_BIN_SINC_M - 2 ); i <= 0; i++ ) - { - SamplePointer_p++; - SincPointer_p -= SubsamplesSteps; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - - SamplePointer_p++; - SincPointer_p = &SincTable[SubsamplesSteps - snc0]; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - for ( i = 2; i <= SFX_SPAT_BIN_SINC_M; i++ ) - { - SamplePointer_p++; - SincPointer_p += SubsamplesSteps; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - /* Multiply by the inverse of the resampling factor */ - Temp = Temp * AlphaInv; - ResampleOutBuffer_p[k] = Temp; - - /* Update the time index */ - T = T + Alpha; - /* Update the time index for the input buffer data */ - nt = (int16_t) ( T + EPSILON ); - /* Update the resampled buffer index */ - k++; - - /* Make sure we don't process too many samples. This check is needed for the cases */ - /* when all resampled samples are obtained from the old buffer. */ - if ( k >= NoOfResampledSamples ) - { - /* We have processed enough data. Jump out of the while-loop! */ - break; - } - } - - /* 2.4 Resample (with scaling) input buffer */ - n0 = ( SFX_SPAT_BIN_SINC_M - 1 ) - *NoOfOldBufferSamples_p; - for ( n = k; n < NoOfResampledSamples; n++ ) - { - /* Calculate the sinc-index for the center value of the sinc */ - snc0 = (int16_t) ( ( T + EPSILON - nt ) * SubsamplesSteps + 0.5 ); - - /* The convolution of the sinc and the data */ - - SamplePointer_p = &InputBuffer_p[n0 + nt - ( SFX_SPAT_BIN_SINC_M - 1 )]; - SincPointer_p = &SincTable[snc0 - SubsamplesSteps * ( -( SFX_SPAT_BIN_SINC_M - 1 ) )]; - - Temp = *SamplePointer_p * *SincPointer_p; - for ( i = -( SFX_SPAT_BIN_SINC_M - 2 ); i <= 0; i++ ) - { - SamplePointer_p++; - SincPointer_p -= SubsamplesSteps; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - - SamplePointer_p++; - SincPointer_p = &SincTable[SubsamplesSteps - snc0]; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - for ( i = 2; i <= SFX_SPAT_BIN_SINC_M; i++ ) - { - SamplePointer_p++; - SincPointer_p += SubsamplesSteps; - Temp = Temp + *SamplePointer_p * *SincPointer_p; - } - /* Multiply by the inverse of the resampling factor */ - Temp = Temp * AlphaInv; - ResampleOutBuffer_p[n] = Temp; - - /* Update the time index */ - T = T + Alpha; - /* Update the time index for the input buffer data */ - nt = (int16_t) ( T + EPSILON ); - } - } - - /* 3. Update old buffer */ - Ind = (int16_t) ( n0 + nt - ( SFX_SPAT_BIN_SINC_M - 1 ) ); - if ( Ind < 0 ) - { - /* Must save some samples from the old buffer */ - for ( i = 0; i < -Ind; i++ ) - { - OldBuffer_p[i] = OldBuffer_p[i + *NoOfOldBufferSamples_p + Ind]; - } - /* Copy the input samples */ - for ( i = 0; i < NoOfInputSamples; i++ ) - { - OldBuffer_p[i - Ind] = InputBuffer_p[i]; - } - *NoOfOldBufferSamples_p = NoOfInputSamples - Ind; - } - else - { - *NoOfOldBufferSamples_p = NoOfInputSamples - (int16_t) ( n0 + nt - ( SFX_SPAT_BIN_SINC_M - 1 ) ); - - SamplePointer_p = &InputBuffer_p[n0 + nt - ( SFX_SPAT_BIN_SINC_M - 1 )]; - for ( i = 0; i < *NoOfOldBufferSamples_p; i++ ) - { - OldBuffer_p[i] = *( SamplePointer_p + i ); - } - } - - /* 4. Update Tf_p */ - *Tf_p = T - nt; - /* Due to the EPSILON factor and rounding problems t_new may be a little negative, ~ -10^-7. This should in theory not be possible so we need to */ - /* make sure that Tf_p is greater than or equal to 0. This problem is not present for fix-code, though. */ - if ( *Tf_p < 0 ) - { - *Tf_p = 0; - } - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_SetParams() - * - * Updates the ITD increment, HR-filters increments - * and volumes increments that are used by SFX_SPAT_BIN_UpdateParams(). - * - --------------------------------------------------------------------*/ - -void TDREND_SFX_SpatBin_SetParams( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct to be updated */ - const SFX_SpatBin_Params_t *NewParam_p, /* i : New parameters struct */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - if ( NewParam_p->Reset == TRUE ) - { - /* Calling TDREND_SFX_SpatBin_Clear will clear buffers and sets SfxSpatBin_p->InitializeParams = TRUE, which forces all */ - /* rendering parameters to be set directly without any transition period. */ - TDREND_SFX_SpatBin_Clear( SfxSpatBin_p, output_Fs ); - } - - if ( NewParam_p->TurnOn == TRUE ) - { - /* Turn on the effect if it is not already on. */ - if ( SfxSpatBin_p->InitializeParams == TRUE ) - { - TDREND_SFX_SpatBin_SetParamsInitializeOn( SfxSpatBin_p, NewParam_p, output_Fs ); - } - else - { - TDREND_SFX_SpatBin_SetParamsOn( SfxSpatBin_p, NewParam_p, output_Fs ); - } - - SfxSpatBin_p->OpMode = SFX_TRANSIENT; - } - else - { - /* Turn off the effect if it is not already off. */ - if ( SfxSpatBin_p->InitializeParams == TRUE ) - { - TDREND_SFX_SpatBin_SetParamsInitializeOff( SfxSpatBin_p, NewParam_p, output_Fs ); - } - else - { - /* Turn off the effect */ - - TDREND_SFX_SpatBin_SetParamsOff( SfxSpatBin_p, output_Fs ); - } - - SfxSpatBin_p->OpMode = SFX_OFF; - } - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_SetParamsInitializeOn() - * - * Initialize spatial parameters and turn the effect on - * - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_SetParamsInitializeOn( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const SFX_SpatBin_Params_t *NewParam_p, /* i : New parameters struct */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - int16_t i; - float ItdAbs; - float *LeftFilter_p, *RightFilter_p, *LeftFilterIncr_p, *RightFilterIncr_p; - int16_t mem_size; - - SfxSpatBin_p->InitializeParams = FALSE; - /* The first parameter update */ - SfxSpatBin_p->FirstUpdate = TRUE; - SfxSpatBin_p->TargetTime = 0; - - SfxSpatBin_p->ItdIncrForResampling = 0.0; - - /* Copy the HR-filters */ - SfxSpatBin_p->FilterLength = NewParam_p->FilterLength; - - mem_size = (int16_t) SfxSpatBin_p->FilterLength * sizeof( float ); - LeftFilter_p = (float *) count_malloc( mem_size ); - RightFilter_p = (float *) count_malloc( mem_size ); - LeftFilterIncr_p = (float *) count_malloc( mem_size ); - RightFilterIncr_p = (float *) count_malloc( mem_size ); - - SfxSpatBin_p->LeftFilter_p = LeftFilter_p; - SfxSpatBin_p->RightFilter_p = RightFilter_p; - SfxSpatBin_p->LeftFilterIncr_p = LeftFilterIncr_p; - SfxSpatBin_p->RightFilterIncr_p = RightFilterIncr_p; - - for ( i = 0; i < SfxSpatBin_p->FilterLength; i++ ) - { - *LeftFilter_p++ = NewParam_p->LeftVolume * ( NewParam_p->LeftFilter_p[i] ); - *RightFilter_p++ = NewParam_p->RightVolume * ( NewParam_p->RightFilter_p[i] ); - - /* Set initial increments to 0 */ - *LeftFilterIncr_p++ = 0.0; - *RightFilterIncr_p++ = 0.0; - } - - SfxSpatBin_p->TotNoOfOutputSamples = 0; - - switch ( output_Fs ) - { - case 16000: - i = 0; - break; - case 32000: - i = 1; - break; - case 48000: - i = 2; - break; - } - - /* Initialize ITD */ - if ( NewParam_p->Itd > 0.0 ) - { - SfxSpatBin_p->NoOfLeftOldBufferSamples = SFX_SPAT_BIN_SINC_M - 1 + TDREND_MaxITD[i] - (int16_t) floor( NewParam_p->Itd ); - SfxSpatBin_p->Left_Tf = ( NewParam_p->Itd ) - floorf( NewParam_p->Itd ); - SfxSpatBin_p->NoOfRightOldBufferSamples = SFX_SPAT_BIN_SINC_M - 1 + TDREND_MaxITD[i]; - } - else - { - ItdAbs = -NewParam_p->Itd; - SfxSpatBin_p->NoOfLeftOldBufferSamples = SFX_SPAT_BIN_SINC_M - 1 + TDREND_MaxITD[i] + (int16_t) ceil( ItdAbs ); - SfxSpatBin_p->Left_Tf = ceilf( ItdAbs ) - ( ItdAbs ); - SfxSpatBin_p->NoOfRightOldBufferSamples = SFX_SPAT_BIN_SINC_M - 1 + TDREND_MaxITD[i]; - } - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_SetParamsInitializeOff() - * - * Initialize spatial parameters and turn the effect off - * - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_SetParamsInitializeOff( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const SFX_SpatBin_Params_t *NewParam_p, /* i : New parameters struct */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - int16_t i; - float *LeftFilter_p, *RightFilter_p, *LeftFilterIncr_p, *RightFilterIncr_p; - int16_t mem_size; - - SfxSpatBin_p->InitializeParams = FALSE; - /* The first parameter update */ - SfxSpatBin_p->FirstUpdate = TRUE; - SfxSpatBin_p->TargetTime = 0; - SfxSpatBin_p->ItdIncrForResampling = 0.0; - - /* Set the HR-filters */ - SfxSpatBin_p->FilterLength = NewParam_p->FilterLength; - - mem_size = (int16_t) SfxSpatBin_p->FilterLength * sizeof( float ); - LeftFilter_p = (float *) count_malloc( mem_size ); - RightFilter_p = (float *) count_malloc( mem_size ); - LeftFilterIncr_p = (float *) count_malloc( mem_size ); - RightFilterIncr_p = (float *) count_malloc( mem_size ); - - SfxSpatBin_p->LeftFilter_p = LeftFilter_p; - SfxSpatBin_p->RightFilter_p = RightFilter_p; - SfxSpatBin_p->LeftFilterIncr_p = LeftFilterIncr_p; - SfxSpatBin_p->RightFilterIncr_p = RightFilterIncr_p; - - *LeftFilter_p++ = 0.5; - *RightFilter_p++ = 0.5; - /* Set initial increments to 0 */ - *LeftFilterIncr_p++ = 0.0; - *RightFilterIncr_p++ = 0.0; - - for ( i = 1; i < SfxSpatBin_p->FilterLength; i++ ) - { - *LeftFilter_p++ = 0.0; - *RightFilter_p++ = 0.0; - /* Set initial increments to 0 */ - *LeftFilterIncr_p++ = 0.0; - *RightFilterIncr_p++ = 0.0; - } - - SfxSpatBin_p->TotNoOfOutputSamples = 0; - - /* Initialize ITD to 0 */ - switch ( output_Fs ) - { - case 16000: - i = 0; - break; - case 32000: - i = 1; - break; - case 48000: - i = 2; - break; - } - SfxSpatBin_p->NoOfLeftOldBufferSamples = SFX_SPAT_BIN_SINC_M - 1 + TDREND_MaxITD[i]; - SfxSpatBin_p->NoOfRightOldBufferSamples = SFX_SPAT_BIN_SINC_M - 1 + TDREND_MaxITD[i]; - SfxSpatBin_p->Left_Tf = 0.0; - - return; -} - - -/*-------------------------------------------------------------------* - * void TDREND_SFX_SpatBin_SetParamsOn() - * - * Turn the effect on - * - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_SetParamsOn( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const SFX_SpatBin_Params_t *NewParam_p, /* i : New parameters struct */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - int16_t i; - float *LeftFilterIncr_p, *RightFilterIncr_p; - float MaxITDIncr = TDREND_MaxITD_Incr[2]; - /* Set FirstUpdate to FALSE, which makes SFX_SPAT_BIN_UpdateParams to start */ - /* updating the parameters. */ - SfxSpatBin_p->FirstUpdate = FALSE; - - /* Update TargetTime */ - if ( SfxSpatBin_p->OpMode == SFX_OFF ) - { - /* Start turning on the effect */ - SfxSpatBin_p->TurningOnEffect = TRUE; - /* Stop turning off the effect */ - SfxSpatBin_p->TurningOffEffect = FALSE; - /* Use the transient time instead of the target time */ - SfxSpatBin_p->TargetTime = (int16_t) SfxSpatBin_p->MaxTargetTime; - } - else - { - if ( SfxSpatBin_p->TurningOnEffect == FALSE ) - { - /* The effect is already on. Use the target time. */ - SfxSpatBin_p->TargetTime = (int16_t) SfxSpatBin_p->TotNoOfOutputSamples; - } - else if ( SfxSpatBin_p->TotNoOfOutputSamples > SfxSpatBin_p->TargetTime ) - { - /* The effect has already been turned on or will be turned on now. */ - /* If SfxSpatBin_p->TargetTime > SfxSpatBin_p->TotNoOfOutputSamples then continue with SfxSpatBin_p->TargetTime. */ - SfxSpatBin_p->TargetTime = (int16_t) SfxSpatBin_p->TotNoOfOutputSamples; - SfxSpatBin_p->TurningOnEffect = FALSE; - } - } - - /* Restart the counting of output samples */ - SfxSpatBin_p->TotNoOfOutputSamples = 0; - - /* 1. Calculate the new ITD increment. Here the half ITD increment is calculated due to that */ - /* half of it should be applied on the left channel and half on the right channel. */ - /* However, since doppler is not supported anymore resampling is only applied to the left */ - /* channel so the division by 2 could now be removed. */ - if ( SfxSpatBin_p->TargetTime > 0 ) - { - SfxSpatBin_p->ItdIncrForResampling = ( NewParam_p->Itd - ( SfxSpatBin_p->NoOfRightOldBufferSamples - ( SfxSpatBin_p->NoOfLeftOldBufferSamples - SfxSpatBin_p->Left_Tf ) ) ) / SfxSpatBin_p->TargetTime / 2; - } - - switch ( output_Fs ) - { - case 16000: - MaxITDIncr = TDREND_MaxITD_Incr[0]; - break; - case 32000: - MaxITDIncr = TDREND_MaxITD_Incr[1]; - break; - case 48000: - MaxITDIncr = TDREND_MaxITD_Incr[2]; - break; - } - /* Check that ItdIncrForResampling is within limits */ - if ( SfxSpatBin_p->ItdIncrForResampling > MaxITDIncr ) - { -#ifdef DEBUGGING - printf( "ItdIncrForResampling too large: %f > %f\n", SfxSpatBin_p->ItdIncrForResampling, MaxITDIncr ); - printf( " ParamsOn : TargetTime = %5d\n", SfxSpatBin_p->TargetTime ); -#endif - SfxSpatBin_p->ItdIncrForResampling = MaxITDIncr; - } - else if ( SfxSpatBin_p->ItdIncrForResampling < ( -MaxITDIncr ) ) - { -#ifdef DEBUGGING - printf( "ItdIncrForResampling too small: %f < %f\n", SfxSpatBin_p->ItdIncrForResampling, ( -MaxITDIncr ) ); -#endif - SfxSpatBin_p->ItdIncrForResampling = ( -MaxITDIncr ); - } - - /* 2. Calculate the HR-filter increments. Includes the left and right volume. */ - LeftFilterIncr_p = SfxSpatBin_p->LeftFilterIncr_p; - RightFilterIncr_p = SfxSpatBin_p->RightFilterIncr_p; - - for ( i = 0; i < SfxSpatBin_p->FilterLength; i++ ) - { - *LeftFilterIncr_p++ = ( NewParam_p->LeftFilter_p[i] * NewParam_p->LeftVolume - SfxSpatBin_p->LeftFilter_p[i] ) / SfxSpatBin_p->TargetTime; - *RightFilterIncr_p++ = ( NewParam_p->RightFilter_p[i] * NewParam_p->RightVolume - SfxSpatBin_p->RightFilter_p[i] ) / SfxSpatBin_p->TargetTime; - } - - return; -} - - -/*-------------------------------------------------------------------* - * void TDREND_SFX_SpatBin_SetParamsOff() - * - * Turn the effect off - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_SetParamsOff( - SFX_SpatBin_t *const SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - int16_t i; - float *LeftFilterIncr_p, *RightFilterIncr_p; - - int16_t MaxITD = TDREND_MaxITD[2]; - float MaxITDIncr = TDREND_MaxITD_Incr[2]; - switch ( output_Fs ) - { - case 16000: - MaxITD = TDREND_MaxITD[0]; - MaxITDIncr = TDREND_MaxITD_Incr[0]; - break; - case 32000: - MaxITD = TDREND_MaxITD[1]; - MaxITDIncr = TDREND_MaxITD_Incr[1]; - break; - case 48000: - MaxITD = TDREND_MaxITD[2]; - MaxITDIncr = TDREND_MaxITD_Incr[2]; - break; - } - - if ( SfxSpatBin_p->OpMode == SFX_TRANSIENT ) - { - /* The number of samples after which the ITD and HR-filters should have been reset. */ - SfxSpatBin_p->TransientTime = (int16_t) SfxSpatBin_p->MaxTargetTime; - } - - /* Set FirstUpdate to FALSE, which makes SFX_SPAT_BIN_UpdateParams to start updating the parameters. */ - SfxSpatBin_p->FirstUpdate = FALSE; - - /* Update TargetTime */ - if ( SfxSpatBin_p->OpMode == SFX_TRANSIENT ) - { - /* Start turning off the effect */ - SfxSpatBin_p->TurningOffEffect = TRUE; - /* Stop turning on the effect */ - SfxSpatBin_p->TurningOnEffect = FALSE; - /* Use the transient time instead of the target time */ - SfxSpatBin_p->TargetTime = (int16_t) SfxSpatBin_p->MaxTargetTime; - } - else - { - if ( SfxSpatBin_p->TurningOffEffect == FALSE ) - { - /* The effect is already off. Use the target time. */ - SfxSpatBin_p->TargetTime = (int16_t) SfxSpatBin_p->TotNoOfOutputSamples; - } - else if ( SfxSpatBin_p->TotNoOfOutputSamples > SfxSpatBin_p->TargetTime ) - { - /* The effect has already been turned off or will be turned off now. */ - /* If SfxSpatBin_p->TargetTime > SfxSpatBin_p->TotNoOfOutputSamples then continue */ - /* with SfxSpatBin_p->TargetTime. */ - SfxSpatBin_p->TargetTime = (int16_t) SfxSpatBin_p->TotNoOfOutputSamples; - } - } - - /* Restart the counting of output samples */ - SfxSpatBin_p->TotNoOfOutputSamples = 0; - - /* 1. Calculate the new ITD increment. Here the half ITD increment is calculated due to that */ - /* half of it should be applied on the left channel and half on the right channel. */ - /* if (SfxSpatBin_p->TurnedOn == FALSE) */ - if ( SfxSpatBin_p->OpMode == SFX_OFF ) - { - /* The effect has already been turned off */ - SfxSpatBin_p->ItdIncrForResampling = ( 0.0f - ( SfxSpatBin_p->NoOfRightOldBufferSamples - - ( SfxSpatBin_p->NoOfLeftOldBufferSamples - SfxSpatBin_p->Left_Tf ) ) ) / - SfxSpatBin_p->TargetTime / 2.0f; - - /* Check that ItdIncrForResampling is within limits */ - if ( SfxSpatBin_p->ItdIncrForResampling > MaxITDIncr ) - { -#ifdef DEBUGGING - printf( "ItdIncrForResampling too large: %f > %f\n", SfxSpatBin_p->ItdIncrForResampling, MaxITDIncr ); - printf( " ParamsOff : TargetTime = %5d\n", SfxSpatBin_p->TargetTime ); -#endif - SfxSpatBin_p->ItdIncrForResampling = MaxITDIncr; - } - else if ( SfxSpatBin_p->ItdIncrForResampling < ( -MaxITDIncr ) ) - { -#ifdef DEBUGGING - printf( "ItdIncrForResampling too small: %f < %f\n", SfxSpatBin_p->ItdIncrForResampling, ( -MaxITDIncr ) ); -#endif - SfxSpatBin_p->ItdIncrForResampling = ( -MaxITDIncr ); - } - } - else /*if (SfxSpatBin_p->TurnedOn == TRUE && NewParam_p->TurnOn == FALSE) */ - { - /* The effect is about to be turned off */ - SfxSpatBin_p->ItdIncrForResampling = ( 0.0f - ( SfxSpatBin_p->NoOfRightOldBufferSamples - - ( SfxSpatBin_p->NoOfLeftOldBufferSamples - SfxSpatBin_p->Left_Tf ) ) ) / - SfxSpatBin_p->TransientTime / 2.0f; - - /* Check that ItdIncrForResampling is within limits */ - if ( SfxSpatBin_p->ItdIncrForResampling > MaxITDIncr ) - { -#ifdef DEBUGGING - printf( "ItdIncrForResampling too large: %f > %f\n", SfxSpatBin_p->ItdIncrForResampling, MaxITDIncr ); - printf( " ParamsOff : TransientTime = %5d\n", SfxSpatBin_p->TransientTime ); -#endif - SfxSpatBin_p->ItdIncrForResampling = MaxITD; - } - else if ( SfxSpatBin_p->ItdIncrForResampling < ( -MaxITDIncr ) ) - { -#ifdef DEBUGGING - printf( "ItdIncrForResampling too small: %f < %f\n", SfxSpatBin_p->ItdIncrForResampling, ( -MaxITDIncr ) ); -#endif - SfxSpatBin_p->ItdIncrForResampling = ( -MaxITDIncr ); - } - - /* 2. Calculate the HR-filter increments. Includes the left and right volume. */ - LeftFilterIncr_p = SfxSpatBin_p->LeftFilterIncr_p; - RightFilterIncr_p = SfxSpatBin_p->RightFilterIncr_p; - - *LeftFilterIncr_p++ = ( 0.5f - SfxSpatBin_p->LeftFilter_p[0] ) / SfxSpatBin_p->TransientTime; - *RightFilterIncr_p++ = ( 0.5f - SfxSpatBin_p->RightFilter_p[0] ) / SfxSpatBin_p->TransientTime; - - for ( i = 1; i < SfxSpatBin_p->FilterLength; i++ ) - { - *LeftFilterIncr_p++ = ( 0.0f - SfxSpatBin_p->LeftFilter_p[i] ) / SfxSpatBin_p->TransientTime; - *RightFilterIncr_p++ = ( 0.0f - SfxSpatBin_p->RightFilter_p[i] ) / SfxSpatBin_p->TransientTime; - } - } - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_UpdateParams() - * - * Updates the ITD, HR-filters and volumes, - * which are to be used when processing the next data - * block. - * - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_UpdateParams( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const int32_t NoOfOutputSamples /* i : Number of output samples */ -) -{ - int16_t i; - float *LeftFilter_p, *RightFilter_p, *LeftFilterIncr_p, *RightFilterIncr_p; - - LeftFilter_p = SfxSpatBin_p->LeftFilter_p; - RightFilter_p = SfxSpatBin_p->RightFilter_p; - LeftFilterIncr_p = SfxSpatBin_p->LeftFilterIncr_p; - RightFilterIncr_p = SfxSpatBin_p->RightFilterIncr_p; - - /* 1. Update the total number of output samples that has been rendered since the */ - /* last ARM update. This value is zeroed in the SetParams function. */ - SfxSpatBin_p->TotNoOfOutputSamples = SfxSpatBin_p->TotNoOfOutputSamples + NoOfOutputSamples; - if ( SfxSpatBin_p->TotNoOfOutputSamples > SfxSpatBin_p->MaxTargetTime ) - { - /* We need to limit TotNoOfOutputSamples in order to avoid wrap around as well */ - /* as when it is used in SetParams its maximum allowed value is MaxTargetTime. */ - SfxSpatBin_p->TotNoOfOutputSamples = SfxSpatBin_p->MaxTargetTime; - } - - /* No need to update if FirstUpdate is not true. All increments are zero. */ - if ( SfxSpatBin_p->FirstUpdate == FALSE ) - { - SfxSpatBin_p->TargetTime -= (int16_t) NoOfOutputSamples; - if ( SfxSpatBin_p->TargetTime < 0 ) - { - /* This is instead of using sub with saturation in order to */ - /* avoid wrap around. */ - SfxSpatBin_p->TargetTime = -1; - } - - if ( SfxSpatBin_p->TurningOffEffect == TRUE ) - { - SfxSpatBin_p->TransientTime -= (int16_t) NoOfOutputSamples; - if ( SfxSpatBin_p->TransientTime <= 0 ) - { - /* The effect has now been turned off */ - - SfxSpatBin_p->ItdIncrForResampling = 0.0; - - /* Set the default HR-filters */ - /* - SfxSpatBin_p->LeftFilter[0] = 0.5; - SfxSpatBin_p->RightFilter[0] = 0.5; - for (i = 1; i < SfxSpatBin_p->FilterLength; i++) - { - SfxSpatBin_p->LeftFilter[i] = 0.0; - SfxSpatBin_p->RightFilter[i] = 0.0; - }*/ - - *LeftFilter_p++ = 0.5; - *RightFilter_p++ = 0.5; - for ( i = 1; i < SfxSpatBin_p->FilterLength; i++ ) - { - *LeftFilter_p++ = 0.0; - *RightFilter_p++ = 0.0; - } - - /* Put HR-filter increments to zero */ - /* - for (i = 0; i < SfxSpatBin_p->FilterLength; i++) - { - SfxSpatBin_p->LeftFilterIncr[i] = 0.0; - SfxSpatBin_p->RightFilterIncr[i] = 0.0; - }*/ - - for ( i = 0; i < SfxSpatBin_p->FilterLength; i++ ) - { - *LeftFilterIncr_p++ = 0.0; - *RightFilterIncr_p++ = 0.0; - } - - /* The effect is now off */ - SfxSpatBin_p->TurningOffEffect = FALSE; - } - } - - /* 2. Check whether increments should continue to be updated. */ - if ( SfxSpatBin_p->TargetTime < 0 ) - { - /* Put ItdIncrForResampling to zero if TargetTime<0 */ - SfxSpatBin_p->ItdIncrForResampling = 0.0; - /* The effect has been turned on if it was being turned on */ - SfxSpatBin_p->TurningOnEffect = FALSE; - } - else - { - /* 3. Update the HR-filters. */ - /* Don't update if the effect is off. */ - if ( SfxSpatBin_p->OpMode == SFX_TRANSIENT || SfxSpatBin_p->TurningOffEffect == TRUE ) - { - /* - for (i = 0; i < SfxSpatBin_p->FilterLength; i++) - { - SfxSpatBin_p->LeftFilter[i] += SfxSpatBin_p->LeftFilterIncr[i] * NoOfOutputSamples; - SfxSpatBin_p->RightFilter[i] += SfxSpatBin_p->RightFilterIncr[i] * NoOfOutputSamples; - }*/ - - for ( i = 0; i < SfxSpatBin_p->FilterLength; i++ ) - { - *LeftFilter_p++ += ( *LeftFilterIncr_p++ ) * NoOfOutputSamples; - *RightFilter_p++ += ( *RightFilterIncr_p++ ) * NoOfOutputSamples; - } - } - } - } - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_Execute_Main() - * - * The main rendering function that is called from the Audio Mixer. - --------------------------------------------------------------------*/ - -void TDREND_SFX_SpatBin_Execute_Main( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const float *InBuffer_p, /* i : Input buffer */ - const int16_t subframe_length, /* i : subframe length */ - float *LeftOutBuffer_p, /* o : Rendered left channel */ - float *RightOutBuffer_p, /* o : Rendered right channel */ - int16_t *NoOfUsedInputSamples_p, /* o : Number of input samples actually used */ - int16_t *NoOfDeliveredOutputSamples_p, /* o : Number of output samples actually rendered */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - int16_t i; - const float *InBufferPointer_p; - float *LeftOutBufferPointer_p, *RightOutBufferPointer_p; - int16_t TempNoOfRequestedOutputSamples, TempNoOfUsedInputSamples, TempNoOfDeliveredOutputSamples; - int16_t TempNoOfInputSamples; - int16_t NoOfBlocks; - - /* Make sure the blocks are not longer than 6 msec. */ - - NoOfBlocks = 1; - TempNoOfRequestedOutputSamples = subframe_length; - while ( TempNoOfRequestedOutputSamples > SfxSpatBin_p->MaxBlockLength ) - { - NoOfBlocks = NoOfBlocks << 1; - /* Shift with rounding */ - TempNoOfRequestedOutputSamples = ( TempNoOfRequestedOutputSamples >> 1 ) + ( TempNoOfRequestedOutputSamples & 1 ); - } - - /* Divide the output_frame into NoOfBlocks blocks. */ - InBufferPointer_p = InBuffer_p; - LeftOutBufferPointer_p = LeftOutBuffer_p; - RightOutBufferPointer_p = RightOutBuffer_p; - *NoOfUsedInputSamples_p = 0; - *NoOfDeliveredOutputSamples_p = 0; - TempNoOfInputSamples = subframe_length; - - for ( i = 0; i < NoOfBlocks; i++ ) - { - /* The effect is not being turned off or on. Normal rendering. */ - if ( SfxSpatBin_p->TargetTime < TempNoOfRequestedOutputSamples ) - { - /* Put ITD increment to zero. This prevents the ITD to become too large. */ - SfxSpatBin_p->ItdIncrForResampling = 0.0; - } - - TDREND_SFX_SpatBin_Execute( SfxSpatBin_p, InBufferPointer_p, -#ifdef DEBUGGING - TempNoOfInputSamples, -#endif - TempNoOfRequestedOutputSamples, LeftOutBufferPointer_p, RightOutBufferPointer_p, &TempNoOfUsedInputSamples, &TempNoOfDeliveredOutputSamples, output_Fs ); - - /* DSP update */ - TDREND_SFX_SpatBin_UpdateParams( SfxSpatBin_p, TempNoOfDeliveredOutputSamples ); - - /* Update the temp pointers */ - InBufferPointer_p += TempNoOfUsedInputSamples; - LeftOutBufferPointer_p += TempNoOfDeliveredOutputSamples; - RightOutBufferPointer_p += TempNoOfDeliveredOutputSamples; - - *NoOfDeliveredOutputSamples_p = *NoOfDeliveredOutputSamples_p + TempNoOfDeliveredOutputSamples; - if ( i == NoOfBlocks - 2 ) - { - /* The last block should produce the remaining number of samples */ - TempNoOfRequestedOutputSamples = subframe_length - *NoOfDeliveredOutputSamples_p; - } - *NoOfUsedInputSamples_p = *NoOfUsedInputSamples_p + TempNoOfUsedInputSamples; - TempNoOfInputSamples = TempNoOfInputSamples - TempNoOfUsedInputSamples; - } - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_Execute() - * - * Run renderer for one block - * - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_Execute( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const float *InBuffer_p, /* i : Input buffer */ -#ifdef DEBUGGING - const int16_t NoOfInputSamples, /* i : Length of input buffer */ -#endif - const int16_t NoOfRequestedOutputSamples, /* i : Length of output */ - float *LeftOutBuffer_p, /* o : Rendered left channel */ - float *RightOutBuffer_p, /* o : Rendered right channel */ - int16_t *NoOfUsedInputSamples_p, /* o : Number of input samples actually used */ - int16_t *NoOfDeliveredOutputSamples_p, /* o : Number of output samples actually rendered */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - int16_t i = 0; - int16_t NoOfInputSamplesForLeft, NoOfInputSamplesForRight; - float TotalLeftFlp; - int16_t NoOfSamplesToCopy, Ind; - /* 1. Calculate the resampling factors for the left channel. */ - TotalLeftFlp = 1.0f + 2.0f * SfxSpatBin_p->ItdIncrForResampling; - - /* 2. Calculate the number of input samples needed for the left and right channel. */ - NoOfInputSamplesForLeft = 2 * SFX_SPAT_BIN_SINC_M - SfxSpatBin_p->NoOfLeftOldBufferSamples + - (int16_t) ( SfxSpatBin_p->Left_Tf + TotalLeftFlp * ( NoOfRequestedOutputSamples - 1 ) ); - - switch ( output_Fs ) - { - case 16000: - i = 0; - break; - case 32000: - i = 1; - break; - case 48000: - i = 2; - break; - } - NoOfInputSamplesForRight = NoOfRequestedOutputSamples + SFX_SPAT_BIN_SINC_M - 1 + TDREND_MaxITD[i] - - SfxSpatBin_p->NoOfRightOldBufferSamples; - /* Set the number of used Input samples to the maximum. */ - if ( NoOfInputSamplesForLeft > NoOfInputSamplesForRight ) - { - *NoOfUsedInputSamples_p = NoOfInputSamplesForLeft; - } - else - { - *NoOfUsedInputSamples_p = NoOfInputSamplesForRight; - } - /* Set the number of used input samples to zero if it is negative. */ - if ( *NoOfUsedInputSamples_p < 0 ) - { -#ifdef DEBUGGING - printf( "2. *NoOfUsedInputSamples_p < 0\n" ); -#endif - *NoOfUsedInputSamples_p = 0; - } - -#ifdef DEBUGGING - /* The following should never happen */ - if ( *NoOfUsedInputSamples_p > NoOfInputSamples ) - { - printf( "2. *NoOfUsedInputSamples_p > NoInputSamples %d %d \n", *NoOfUsedInputSamples_p, NoOfInputSamples ); - } -#endif - - *NoOfDeliveredOutputSamples_p = NoOfRequestedOutputSamples; - - /* 3. Resample the left channel. */ - TDREND_SFX_SpatBin_Resampling( InBuffer_p, - *NoOfUsedInputSamples_p, - &( SfxSpatBin_p->ResampledBufferLeft[SfxSpatBin_p->FilterLength - 1] ), - *NoOfDeliveredOutputSamples_p, - SfxSpatBin_p->LeftOldBuffer, - &( SfxSpatBin_p->NoOfLeftOldBufferSamples ), - TotalLeftFlp, - &( SfxSpatBin_p->Left_Tf ) ); - - /* 4. Prepare the right input buffer for the HR-filtering. */ - NoOfSamplesToCopy = SfxSpatBin_p->NoOfRightOldBufferSamples - ( SFX_SPAT_BIN_SINC_M - 1 ); - if ( NoOfSamplesToCopy > *NoOfDeliveredOutputSamples_p ) - { - NoOfSamplesToCopy = *NoOfDeliveredOutputSamples_p; - } - - for ( i = 0; i < NoOfSamplesToCopy; i++ ) - { - SfxSpatBin_p->ResampledBufferRight[SfxSpatBin_p->FilterLength - 1 + i] = - SfxSpatBin_p->RightOldBuffer[( SFX_SPAT_BIN_SINC_M - 1 ) + i]; - } - - for ( i = NoOfSamplesToCopy; i < *NoOfDeliveredOutputSamples_p; i++ ) - { - SfxSpatBin_p->ResampledBufferRight[SfxSpatBin_p->FilterLength - 1 + i] = - InBuffer_p[i - SfxSpatBin_p->NoOfRightOldBufferSamples + ( SFX_SPAT_BIN_SINC_M - 1 )]; - } - - /* 5. HR-filtering on the left and right channel. */ -#ifdef TDREND_HRTF_TABLE_METHODS - if ( SfxSpatBin_p->HrFilterInterpOn ) - { - TDREND_FirFilterRevInterp( LeftOutBuffer_p, - SfxSpatBin_p->LeftFilter_p, - SfxSpatBin_p->FilterLength, - SfxSpatBin_p->ResampledBufferLeft, - *NoOfDeliveredOutputSamples_p, - SfxSpatBin_p->LeftFilterStored ); - TDREND_FirFilterRevInterp( RightOutBuffer_p, - SfxSpatBin_p->RightFilter_p, - SfxSpatBin_p->FilterLength, - SfxSpatBin_p->ResampledBufferRight, - *NoOfDeliveredOutputSamples_p, - SfxSpatBin_p->RightFilterStored ); - } - else - { - /* First time - filter without interpolation, and set filter to use as previous. */ - TDREND_FirFilterRev( LeftOutBuffer_p, - SfxSpatBin_p->LeftFilter_p, - SfxSpatBin_p->FilterLength, - SfxSpatBin_p->ResampledBufferLeft, - *NoOfDeliveredOutputSamples_p ); - TDREND_FirFilterRev( RightOutBuffer_p, - SfxSpatBin_p->RightFilter_p, - SfxSpatBin_p->FilterLength, - SfxSpatBin_p->ResampledBufferRight, - *NoOfDeliveredOutputSamples_p ); - for ( i = 0; i < SfxSpatBin_p->FilterLength; i++ ) - { - SfxSpatBin_p->LeftFilterStored[i] = SfxSpatBin_p->LeftFilter_p[i]; - SfxSpatBin_p->RightFilterStored[i] = SfxSpatBin_p->RightFilter_p[i]; - } - } -#else - TDREND_FirFilterRev( LeftOutBuffer_p, - SfxSpatBin_p->LeftFilter_p, - SfxSpatBin_p->FilterLength, - SfxSpatBin_p->ResampledBufferLeft, - *NoOfDeliveredOutputSamples_p ); - TDREND_FirFilterRev( RightOutBuffer_p, - SfxSpatBin_p->RightFilter_p, - SfxSpatBin_p->FilterLength, - SfxSpatBin_p->ResampledBufferRight, - *NoOfDeliveredOutputSamples_p ); -#endif - - /* Store the samples needed for next block */ - Ind = *NoOfDeliveredOutputSamples_p - SfxSpatBin_p->NoOfRightOldBufferSamples; - if ( Ind < 0 ) - { - /* Must store some samples from the OldBuffer */ - for ( i = Ind; i < 0; i++ ) - { - SfxSpatBin_p->RightOldBuffer[i - Ind] = SfxSpatBin_p->RightOldBuffer[i + SfxSpatBin_p->NoOfRightOldBufferSamples]; - } - - /* Store all samples in the InputBuffer that has been used by either channel */ - for ( i = 0; i < *NoOfUsedInputSamples_p; i++ ) - { - SfxSpatBin_p->RightOldBuffer[i - Ind] = InBuffer_p[i]; - } - } - else - { - /* Store samples from the InputBuffer */ - for ( i = Ind; i < *NoOfUsedInputSamples_p; i++ ) - { - SfxSpatBin_p->RightOldBuffer[i - Ind] = InBuffer_p[i]; - } - } - - /* Update number of old samples */ - SfxSpatBin_p->NoOfRightOldBufferSamples = *NoOfUsedInputSamples_p - Ind; - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_Initialize() - * - * Initializes the spatial parameters struct - * - --------------------------------------------------------------------*/ - -ivas_error TDREND_SFX_SpatBin_Initialize( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const int32_t output_Fs /* i : Output sampling rate */ -) -{ - int16_t i; - - SfxSpatBin_p->OpMode = SFX_OFF; - SfxSpatBin_p->TurningOffEffect = FALSE; - SfxSpatBin_p->TurningOnEffect = FALSE; - /* Init during next SetParams-call */ - SfxSpatBin_p->InitializeParams = TRUE; -#ifdef FIX_I81 - SfxSpatBin_p->LeftFilter_p = NULL; - SfxSpatBin_p->LeftFilterIncr_p = NULL; - SfxSpatBin_p->RightFilter_p = NULL; - SfxSpatBin_p->RightFilterIncr_p = NULL; -#endif - - /* Init MaxTargetTime and MaxBlockLength */ - switch ( output_Fs ) - { - case 16000: - SfxSpatBin_p->MaxTargetTime = TDREND_SRC_REND_MaxTargetTimes[0]; - SfxSpatBin_p->MaxBlockLength = TDREND_SRC_REND_MaxBlockLengths[0]; - SfxSpatBin_p->LeftOldBuffer = count_malloc( ( SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[0] ) * sizeof( float ) ); - SfxSpatBin_p->RightOldBuffer = count_malloc( ( SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[0] ) * sizeof( float ) ); - /* Fill old buffers with zeros */ - for ( i = 0; i < SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[0]; i++ ) - { - SfxSpatBin_p->LeftOldBuffer[i] = 0.0f; - SfxSpatBin_p->RightOldBuffer[i] = 0.0f; - } - break; - case 32000: - SfxSpatBin_p->MaxTargetTime = TDREND_SRC_REND_MaxTargetTimes[1]; - SfxSpatBin_p->MaxBlockLength = TDREND_SRC_REND_MaxBlockLengths[1]; - SfxSpatBin_p->LeftOldBuffer = count_malloc( ( SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[1] ) * sizeof( float ) ); - SfxSpatBin_p->RightOldBuffer = count_malloc( ( SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[1] ) * sizeof( float ) ); - /* Fill old buffers with zeros */ - for ( i = 0; i < SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[1]; i++ ) - { - SfxSpatBin_p->LeftOldBuffer[i] = 0.0f; - SfxSpatBin_p->RightOldBuffer[i] = 0.0f; - } - break; - case 48000: - SfxSpatBin_p->MaxTargetTime = TDREND_SRC_REND_MaxTargetTimes[2]; - SfxSpatBin_p->MaxBlockLength = TDREND_SRC_REND_MaxBlockLengths[2]; - SfxSpatBin_p->LeftOldBuffer = count_malloc( ( SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[2] ) * sizeof( float ) ); - SfxSpatBin_p->RightOldBuffer = count_malloc( ( SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[2] ) * sizeof( float ) ); - /* Fill old buffers with zeros */ - for ( i = 0; i < SFX_SPAT_BIN_SINC_M * 4 + 2 * TDREND_MaxITD[2]; i++ ) - { - SfxSpatBin_p->LeftOldBuffer[i] = 0.0f; - SfxSpatBin_p->RightOldBuffer[i] = 0.0f; - } - break; -#ifdef DEBUGGING - default: - IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Error: Unrecognised output_Fs in TDREND_SFX_SpatBin_Initialize()" ); -#endif - } - - /* Fill the beginning of the resampled buffers with zeros */ - for ( i = 0; i < SFX_SPAT_BIN_MAX_FILTER_LENGTH; i++ ) - { - SfxSpatBin_p->ResampledBufferLeft[i] = 0.0f; - SfxSpatBin_p->ResampledBufferRight[i] = 0.0f; - } - - return IVAS_ERR_OK; -} - - -/*-------------------------------------------------------------------* - * TDREND_SFX_SpatBin_Clear() - * - * Clear spatial parameters - * - --------------------------------------------------------------------*/ - -static void TDREND_SFX_SpatBin_Clear( - SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters struct */ - const int32_t output_Fs /* i : Output sample rate */ -) -{ - int16_t i; - int16_t MaxITD = TDREND_MaxITD[2]; - - SfxSpatBin_p->OpMode = SFX_OFF; - SfxSpatBin_p->TurningOffEffect = FALSE; - SfxSpatBin_p->TurningOnEffect = FALSE; - - /* Init during next SetParams-call */ - SfxSpatBin_p->InitializeParams = TRUE; - - /* Fill old buffers with zeros */ - switch ( output_Fs ) - { - case 16000: - MaxITD = TDREND_MaxITD[0]; - break; - case 32000: - MaxITD = TDREND_MaxITD[1]; - break; - case 48000: - MaxITD = TDREND_MaxITD[2]; - break; - } - for ( i = 0; i < SFX_SPAT_BIN_SINC_M * 4 + 2 * MaxITD; i++ ) - { - SfxSpatBin_p->LeftOldBuffer[i] = 0.0f; - SfxSpatBin_p->RightOldBuffer[i] = 0.0f; - } - /* Fill the beginning of the resampled buffers with zeros */ - for ( i = 0; i < SFX_SPAT_BIN_MAX_FILTER_LENGTH; i++ ) - { - SfxSpatBin_p->ResampledBufferLeft[i] = 0.0f; - SfxSpatBin_p->ResampledBufferRight[i] = 0.0f; - } - - return; -} - - -/*-------------------------------------------------------------------* - * TDREND_FirFilterRev() - * - * FIR filtering function with reversed filter sequence. - * The FIR filter seqeunce is reversed, i.e. - * FirFilterRev(n) = FirFilter(N-1-n) for n=0:N-1 - * The first N-1 samples of the input buffer store the last N-1 - * samples from the previous input buffer. - * - --------------------------------------------------------------------*/ - -static void TDREND_FirFilterRev( - float *OutputFrame_p, /* o : Filtered samples */ - float *FirFilterRev_p, /* i/o: Reversed FIR filter */ - const int16_t FirFilterLength, /* i : Filter length */ - float *InputFrame_p, /* i : Input samples */ - const int16_t NumOfSamples /* i : Number of input samples */ -) -{ - /* In this function we assume that the last FirFilterLength-1 samples from */ - /* the previous InputBuffer starts this new InputBuffer. */ - int16_t n, k; - int16_t FirFilterLengthMinusOne; - float Acc; - float *InputBuffer_nk_p, *InputBuffer_n_p, *FirFilterRev_k_p, *OutputBuffer_n_p; - - FirFilterLengthMinusOne = FirFilterLength - 1; - - /* 1. Filter the input buffer. NOTE: Reversed filter sequence */ - InputBuffer_n_p = InputFrame_p; - OutputBuffer_n_p = OutputFrame_p; - - for ( n = NumOfSamples; n > 0; n-- ) - { - - Acc = 0.0f; - FirFilterRev_k_p = FirFilterRev_p; - InputBuffer_nk_p = InputBuffer_n_p; - - for ( k = FirFilterLength; k > 0; k-- ) - { - Acc += *( FirFilterRev_k_p++ ) * *( InputBuffer_nk_p++ ); - } - - InputBuffer_n_p++; - *( OutputBuffer_n_p++ ) = Acc; - } - - /* 2. Copy the last FirFilterLength-1 samples of the InputFrame to the beginning of the InputFrame */ - mvr2r( InputFrame_p + NumOfSamples, InputFrame_p, FirFilterLengthMinusOne ); - - return; -} - -#ifdef TDREND_HRTF_TABLE_METHODS -/*-------------------------------------------------------------------* - * TDREND_FirFilterRevInterp() - * - * FIR filtering function with reversed filter sequence. - * The FIR filter seqeunce is reversed, i.e. - * FirFilterRev(n) = FirFilter(N-1-n) for n=0:N-1 - * The first N-1 samples of the input buffer store the last N-1 - * samples from the previous input buffer. - * - --------------------------------------------------------------------*/ - -static void TDREND_FirFilterRevInterp( - float *OutputFrame_p, /* o : Filtered samples */ - float *FirFilterRev_p, /* i/o: Reversed FIR filter */ - const int16_t FirFilterLength, /* i : Filter length */ - float *InputFrame_p, /* i : Input samples */ - const int16_t NumOfSamples, /* i : Number of input samples */ - float *FilterStored /* i/o: Old filter memory for interpolation */ -) -{ - /* In this function we assume that the last FirFilterLength-1 samples from */ - /* the previous InputBuffer starts this new InputBuffer. */ - int16_t n, k; - int16_t FirFilterLengthMinusOne; - float Acc1; - float Acc2; - - float *InputBuffer_nk_p, *InputBuffer_n_p, *FirFilterRev_k_p, *OutputBuffer_n_p; - float interpFactor, interpComplement; - float *FilterStored_n_p; - float inv_NumOfSamples; - - FirFilterLengthMinusOne = FirFilterLength - 1; - inv_NumOfSamples = 1.0f / NumOfSamples; - - /* 1. Filter the input buffer */ - /* NOTE: Reversed filter sequence */ - InputBuffer_n_p = InputFrame_p; - OutputBuffer_n_p = OutputFrame_p; - - interpFactor = 1.0f; - interpComplement = 0.0f; - for ( n = NumOfSamples; n > 0; n-- ) - { - - Acc1 = 0.0f; - Acc2 = 0.0f; - FirFilterRev_k_p = FirFilterRev_p; - FilterStored_n_p = FilterStored; - InputBuffer_nk_p = InputBuffer_n_p; - - for ( k = FirFilterLength; k > 0; k-- ) - { - Acc1 += *( FirFilterRev_k_p++ ) * *( InputBuffer_nk_p ); - Acc2 += *( FilterStored_n_p++ ) * *( InputBuffer_nk_p++ ); - } - - InputBuffer_n_p++; - *( OutputBuffer_n_p++ ) = Acc1 * interpComplement + Acc2 * interpFactor; - interpFactor -= inv_NumOfSamples; - interpComplement += inv_NumOfSamples; - } - - /* Store the old filter for interpolation next time */ - for ( k = 0; k < FirFilterLength; k++ ) - { - FilterStored[k] = FirFilterRev_p[k]; - } - - /* 2. Copy the last FirFilterLength-1 samples of the InputFrame to */ - /* the beginning of the InputFrame */ - mvr2r( InputFrame_p + NumOfSamples, InputFrame_p, FirFilterLengthMinusOne ); - - return; -} -#endif -#endif - -#ifdef FIX_ITD /*---------------------------------------------------------------------* * TDREND_Apply_ITD() * @@ -1486,7 +78,7 @@ void TDREND_Apply_ITD( float *p_input; float *out_buf_A, *out_buf_B; - wmops_sub_start( "TDREND_Apply_ITD" ); + push_wmops( "TDREND_Apply_ITD" ); /* Prepare resampling buffer */ mvr2r( mem_itd, buffer, ITD_MEM_LEN ); /* Retrieve memory */ @@ -1559,7 +151,7 @@ void TDREND_Apply_ITD( mvr2r( pstart3, out_buf_B + transition_len, tlen3 ); *previtd = itd; - wmops_sub_end(); + pop_wmops(); return; } @@ -1677,5 +269,3 @@ void TDREND_firfilt( return; } - -#endif diff --git a/lib_rend/ivas_objectRenderer_sources.c b/lib_rend/ivas_objectRenderer_sources.c index fa645f1492f6d3800f3b76e856d0b4e63e67689c..e56516d45473a6a46fa2b1c409eef7783009a0c8 100644 --- a/lib_rend/ivas_objectRenderer_sources.c +++ b/lib_rend/ivas_objectRenderer_sources.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #include #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" #endif @@ -50,14 +50,7 @@ static void TDREND_SRC_SPATIAL_SetDirAtten( TDREND_SRC_SPATIAL_t *SrcSpatial_p, static float TDREND_SRC_SPATIAL_GetDirGain( const TDREND_DirAtten_t *DirAtten_p, const float *Front_p, const float *RelPos_p ); static float TDREND_SRC_SPATIAL_GetDistGain( const TDREND_DistAtten_t *DistAtten_p, const float Dist ); static ivas_error TDREND_SRC_REND_Alloc( TDREND_SRC_REND_t **SrcRend_pp ); -#ifndef FIX_ITD -static void TDREND_SRC_REND_Dealloc( TDREND_SRC_REND_t *SrcRend_p ); -#endif -#ifdef FIX_ITD static void TDREND_SRC_REND_Init( TDREND_SRC_REND_t *SrcRend_p ); -#else -static void TDREND_SRC_REND_Init( TDREND_SRC_REND_t *SrcRend_p, const int32_t output_Fs ); -#endif /*-------------------------------------------------------------------* * TDREND_MIX_SRC_SetPos() @@ -192,75 +185,16 @@ static ivas_error TDREND_SRC_REND_Alloc( *SrcRend_pp = NULL; /* Allocate the TDREND_SRC_REND_t variable */ - SrcRend_p = (TDREND_SRC_REND_t *) count_malloc( sizeof( TDREND_SRC_REND_t ) ); + SrcRend_p = (TDREND_SRC_REND_t *) malloc( sizeof( TDREND_SRC_REND_t ) ); if ( SrcRend_p == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "SrcRend_p allocation error\n" ) ); } -#ifndef FIX_ITD - /* Allocate the HR filtering structures */ - SrcRend_p->SfxSpatBin_p = (SFX_SpatBin_t *) count_malloc( SPAT_BIN_MAX_INPUT_CHANNELS * sizeof( SFX_SpatBin_t ) ); - if ( SrcRend_p->SfxSpatBin_p == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "SrcRend_p->SfxSpatBin_p allocation error\n" ) ); - } -#endif *SrcRend_pp = SrcRend_p; return IVAS_ERR_OK; } -#ifndef FIX_ITD -/*-------------------------------------------------------------------* - * TDREND_SRC_REND_Dealloc() - * - * Deallocate rendering aspects of source. - --------------------------------------------------------------------*/ - -static void TDREND_SRC_REND_Dealloc( - TDREND_SRC_REND_t *SrcRend_p /* i/o: Source object */ -) -{ - if ( SrcRend_p == NULL ) - { - return; - } - if ( SrcRend_p->SfxSpatBin_p->LeftOldBuffer != NULL ) - { - count_free( SrcRend_p->SfxSpatBin_p->LeftOldBuffer ); - } - if ( SrcRend_p->SfxSpatBin_p->RightOldBuffer != NULL ) - { - count_free( SrcRend_p->SfxSpatBin_p->RightOldBuffer ); - } - if ( SrcRend_p->SfxSpatBin_p->LeftFilter_p != NULL ) - { - count_free( SrcRend_p->SfxSpatBin_p->LeftFilter_p ); - } - if ( SrcRend_p->SfxSpatBin_p->LeftFilterIncr_p != NULL ) - { - count_free( SrcRend_p->SfxSpatBin_p->LeftFilterIncr_p ); - } - if ( SrcRend_p->SfxSpatBin_p->RightFilter_p != NULL ) - { - count_free( SrcRend_p->SfxSpatBin_p->RightFilter_p ); - } - if ( SrcRend_p->SfxSpatBin_p->RightFilterIncr_p != NULL ) - { - count_free( SrcRend_p->SfxSpatBin_p->RightFilterIncr_p ); - } - if ( SrcRend_p->SfxSpatBin_p != NULL ) - { - count_free( SrcRend_p->SfxSpatBin_p ); - } - - /* Free the SrcRend_p variable */ - count_free( SrcRend_p ); - SrcRend_p = NULL; - - return; -} -#endif /*-------------------------------------------------------------------* * TDREND_SRC_REND_Init() @@ -269,12 +203,7 @@ static void TDREND_SRC_REND_Dealloc( --------------------------------------------------------------------*/ static void TDREND_SRC_REND_Init( -#ifdef FIX_ITD TDREND_SRC_REND_t *SrcRend_p /* i/o: Source object */ -#else - TDREND_SRC_REND_t *SrcRend_p, /* i/o: Source object */ - const int32_t output_Fs /* i : Output sampling rate */ -#endif ) { int16_t nC; @@ -283,9 +212,6 @@ static void TDREND_SRC_REND_Init( SrcRend_p->InputAvailable = FALSE; SrcRend_p->PlayStatus = TDREND_PLAYSTATUS_INITIAL; -#ifdef TDREND_HRTF_TABLE_METHODS - SrcRend_p->SfxSpatBin_p->HrFilterInterpOn = 0; /* Disabled for first frame */ -#endif /* SrcGain */ for ( nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ ) { @@ -302,13 +228,6 @@ static void TDREND_SRC_REND_Init( SrcRend_p->DistGain_p[nC] = 1.0f; } -#ifndef FIX_ITD - /* Init the SfxSpatBin structs. One per channel. Default is effect turned off. */ - for ( nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ ) - { - TDREND_SFX_SpatBin_Initialize( SrcRend_p->SfxSpatBin_p + nC, output_Fs ); - } -#endif return; } @@ -324,62 +243,32 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ TDREND_SRC_REND_t *SrcRend_p, /* i/o: Source object */ TDREND_SRC_SPATIAL_t *SrcSpatial_p, /* i : Spatial aspects of source */ -#ifdef FIX_ITD - float *hrf_left_prev, /* o: Left filter */ - float *hrf_right_prev, /* o: Right filter */ - float *hrf_left_delta, /* o: Left filter interpolation delta */ - float *hrf_right_delta, /* o: Right filter interpolation delta */ - int16_t *intp_count, /* o: Interpolation count */ - int16_t *filterlength, /* o: Length of filters */ - int16_t *itd, /* o: ITD value */ - float *Gain, /* o: Gain value */ - TDREND_SRC_t *Src_p, /* i/o: Source pointer */ - const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ -#else - const int32_t output_Fs /* i : Output sampling rate */ -#endif + float *hrf_left_prev, /* o: Left filter */ + float *hrf_right_prev, /* o: Right filter */ + float *hrf_left_delta, /* o: Left filter interpolation delta */ + float *hrf_right_delta, /* o: Right filter interpolation delta */ + int16_t *intp_count, /* o: Interpolation count */ + int16_t *filterlength, /* o: Length of filters */ + int16_t *itd, /* o: ITD value */ + float *Gain, /* o: Gain value */ + TDREND_SRC_t *Src_p, /* i/o: Source pointer */ + const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ ) { TDREND_MIX_Listener_t *Listener_p; TDREND_HRFILT_FiltSet_t *HrFiltSet_p; -#ifndef FIX_ITD - SFX_SpatBin_t *SfxSpatBin_p; - SFX_SpatBin_Params_t SfxSpatBinParams; -#endif float ListRelPos[3], ListRelDist; -#ifndef FIX_ITD - float Gain; -#endif float Azim, Elev; -#ifndef FIX_ITD - int16_t mem_size; -#else float hrf_left[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; float hrf_right[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; float azim_delta; float elev_delta; -#endif /* Evaluate the HR filters from the source and listener positions and orientations */ Listener_p = hBinRendererTd->Listener_p; HrFiltSet_p = hBinRendererTd->HrFiltSet_p; -#ifdef FIX_ITD *filterlength = HrFiltSet_p->FiltLength; -#else - SfxSpatBinParams.LeftFilter_p = NULL; - SfxSpatBinParams.RightFilter_p = NULL; - - mem_size = (int16_t) ( HrFiltSet_p->FiltLength * sizeof( float ) ); - - SfxSpatBin_p = SrcRend_p->SfxSpatBin_p; - SfxSpatBinParams.TurnOn = TRUE; - SfxSpatBinParams.Reset = FALSE; - - SfxSpatBinParams.FilterLength = HrFiltSet_p->FiltLength; - SfxSpatBinParams.LeftFilter_p = (float *) count_malloc( mem_size ); - SfxSpatBinParams.RightFilter_p = (float *) count_malloc( mem_size ); -#endif /* 1. Map source pos to the coordinate system of the listener */ switch ( SrcSpatial_p->PosType ) @@ -416,11 +305,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( Azim = -1.0f * _180_OVER_PI * (float) atan2f( ListRelPos[1], ListRelPos[0] ); } -#ifdef FIX_ITD GetFilterFromAngle( HrFiltSet_p, Elev, Azim, hrf_left, hrf_right, itd ); -#else - GetFilterFromAngle( HrFiltSet_p, Elev, Azim, &SfxSpatBinParams ); -#endif /* 6. Evaluate the directional and distance gains */ /* Directional gain */ @@ -449,7 +334,6 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( } /* Update total gains */ -#ifdef FIX_ITD *Gain = ( *SrcRend_p->SrcGain_p ) * ( *SrcRend_p->DirGain_p ) * ( *SrcRend_p->DistGain_p ) * hBinRendererTd->Gain; /* Delta for interpolation, in case the angular step exceeds MAX_ANGULAR_STEP */ @@ -477,27 +361,6 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( set_f( hrf_left_delta, 0.0f, *filterlength ); set_f( hrf_right_delta, 0.0f, *filterlength ); } -#else - Gain = ( *SrcRend_p->SrcGain_p ) * ( *SrcRend_p->DirGain_p ) * ( *SrcRend_p->DistGain_p ) * hBinRendererTd->Gain; - SfxSpatBinParams.LeftVolume = Gain; - SfxSpatBinParams.RightVolume = Gain; - - /* Reset source gain update flag (That update is now included in the total gain update) */ - SrcRend_p->SrcGainUpdated = FALSE; - - /* Update the rendering parameters of the SFX effect */ - TDREND_SFX_SpatBin_SetParams( SfxSpatBin_p, &SfxSpatBinParams, output_Fs ); - - if ( SfxSpatBinParams.LeftFilter_p != NULL ) - { - count_free( SfxSpatBinParams.LeftFilter_p ); - } - - if ( SfxSpatBinParams.RightFilter_p != NULL ) - { - count_free( SfxSpatBinParams.RightFilter_p ); - } -#endif return; } @@ -518,7 +381,7 @@ static ivas_error TDREND_SRC_SPATIAL_Alloc( *SrcSpatial_pp = NULL; /* Allocate the TDREND_SRC_t variable */ - SrcSpatial_p = (TDREND_SRC_SPATIAL_t *) count_malloc( sizeof( TDREND_SRC_SPATIAL_t ) ); + SrcSpatial_p = (TDREND_SRC_SPATIAL_t *) malloc( sizeof( TDREND_SRC_SPATIAL_t ) ); if ( SrcSpatial_p == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "TDREND_SRC_SPATIAL_t allocation error\n" ) ); @@ -545,7 +408,7 @@ static void TDREND_SRC_SPATIAL_Dealloc( return; } /* Free the SrcSpatial_p variable */ - count_free( SrcSpatial_p ); + free( SrcSpatial_p ); SrcSpatial_p = NULL; return; @@ -730,7 +593,7 @@ ivas_error TDREND_SRC_Alloc( *Src_pp = NULL; /* Allocate the TDREND_SRC_t variable */ - Src_p = (TDREND_SRC_t *) count_malloc( sizeof( TDREND_SRC_t ) ); + Src_p = (TDREND_SRC_t *) malloc( sizeof( TDREND_SRC_t ) ); if ( Src_p == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, " TDREND_SRC_Alloc: Allocation error\n" ) ); @@ -772,15 +635,11 @@ void TDREND_SRC_Dealloc( TDREND_SRC_SPATIAL_Dealloc( Src_p->SrcSpatial_p ); /* Delloc the TDREND_SRC_REND__t variable */ -#ifdef FIX_ITD - count_free( Src_p->SrcRend_p ); + free( Src_p->SrcRend_p ); Src_p->SrcRend_p = NULL; -#else - TDREND_SRC_REND_Dealloc( Src_p->SrcRend_p ); -#endif /* Free the Src_p variable */ - count_free( Src_p ); + free( Src_p ); Src_p = NULL; return; @@ -794,13 +653,8 @@ void TDREND_SRC_Dealloc( --------------------------------------------------------------------*/ void TDREND_SRC_Init( - TDREND_SRC_t *Src_p, /* i/o: Source to initialize */ -#ifdef FIX_ITD + TDREND_SRC_t *Src_p, /* i/o: Source to initialize */ const TDREND_PosType_t PosType /* i : Position type specifier */ -#else - const TDREND_PosType_t PosType, /* i : Position type specifier */ - const int32_t output_Fs /* i : Output sampling rate */ -#endif ) { /* Init the TDREND_SRC_Spatial_t variable */ @@ -810,13 +664,8 @@ void TDREND_SRC_Init( } /* Init the TDREND_SRC_REND_t variable */ -#ifdef FIX_ITD TDREND_SRC_REND_Init( Src_p->SrcRend_p ); -#else - TDREND_SRC_REND_Init( Src_p->SrcRend_p, output_Fs ); -#endif -#ifdef FIX_ITD /* Reset memory buffers */ Src_p->itd = 0; Src_p->previtd = 0; @@ -832,7 +681,6 @@ void TDREND_SRC_Init( Src_p->azim_prev = 0.0f; Src_p->elev_prev = 0.0f; -#endif return; } diff --git a/lib_rend/ivas_objectRenderer_vec.c b/lib_rend/ivas_objectRenderer_vec.c index 11c5d31ea874dadc13d804a571619658d5e25d97..68d50bc55931785f66cc963b14114571ccee01bf 100644 --- a/lib_rend/ivas_objectRenderer_vec.c +++ b/lib_rend/ivas_objectRenderer_vec.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -35,7 +35,7 @@ #include #include "ivas_prot.h" #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" #endif diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 4754062b561520c46c0516fc1a51beb0be5c1fe0..df7d80bf60cfbff9109ddcc5be16b1b6cd107903 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #endif #include #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_output_init.c b/lib_rend/ivas_output_init.c index e5407abff4320d6dab71106886fbf797b74f217a..2dfaa6da6857cfddd5f28c1d82f77f8ebe1ee173 100644 --- a/lib_rend/ivas_output_init.c +++ b/lib_rend/ivas_output_init.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #include "debug.h" #include #endif -#include "wmops.h" +#include "wmc_auto.h" /*-------------------------------------------------------------------------* * audioCfg2channels() @@ -542,27 +542,9 @@ void ivas_renderer_select( { *renderer_type = RENDERER_DISABLE; } - else if ( st_ivas->ivas_format == SBA_FORMAT ) + else if ( st_ivas->ivas_format == SBA_FORMAT && output_config == AUDIO_CONFIG_MONO ) { - int16_t nchan_max; - - if ( ( output_config == AUDIO_CONFIG_MONO ) || ( output_config == AUDIO_CONFIG_STEREO ) ) - { - nchan_max = st_ivas->hDecoderConfig->nchan_out; - } - else if ( st_ivas->hOutSetup.ambisonics_order > 0 ) - { - nchan_max = ivas_sba_get_nchan( st_ivas->hOutSetup.ambisonics_order, st_ivas->sba_planar ); - } - else - { - nchan_max = ivas_sba_get_nchan( 3, st_ivas->sba_planar ); - } - - if ( st_ivas->nchan_transport >= nchan_max ) - { - *renderer_type = RENDERER_SBA_LINEAR_DEC; - } + *renderer_type = RENDERER_SBA_LINEAR_DEC; } } else if ( st_ivas->ivas_format == MC_FORMAT ) diff --git a/lib_rend/ivas_render_config.c b/lib_rend/ivas_render_config.c index 7e8caec0923edf621f999fddf75cc29a954c049c..a27fc58f2dfefef6a77c44074ee4c813c19ee262 100644 --- a/lib_rend/ivas_render_config.c +++ b/lib_rend/ivas_render_config.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,15 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" + + +/*-----------------------------------------------------------------------* + * Local constants + *-----------------------------------------------------------------------*/ + +#define IVAS_REVERB_DEFAULT_PRE_DELAY 0.016f +#define IVAS_REVERB_DEFAULT_INPUT_DELAY 0.1f /*-----------------------------------------------------------------------* @@ -53,7 +61,7 @@ ivas_error ivas_render_config_open( ) { /* Allocate HR filter set for headphones configuration */ - *hRenderConfig = (RENDER_CONFIG_HANDLE) count_malloc( sizeof( RENDER_CONFIG_DATA ) ); + *hRenderConfig = (RENDER_CONFIG_HANDLE) malloc( sizeof( RENDER_CONFIG_DATA ) ); if ( *hRenderConfig == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for renderer configuration!" ); @@ -78,7 +86,7 @@ void ivas_render_config_close( return; } - count_free( *hRenderConfig ); + free( *hRenderConfig ); *hRenderConfig = NULL; return; @@ -104,7 +112,7 @@ ivas_error ivas_render_config_init_from_rom( #ifdef DEBUGGING ( *hRenderConfig )->renderer_type_override = RENDER_TYPE_OVERRIDE_NONE; #endif - ( *hRenderConfig )->roomAcoustics.override = false; + ( *hRenderConfig )->roomAcoustics.override = FALSE; ( *hRenderConfig )->roomAcoustics.use_brir = room_flag_on; ( *hRenderConfig )->roomAcoustics.late_reverb_on = room_flag_on; ( *hRenderConfig )->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_N_BANDS; diff --git a/lib_rend/ivas_reverb.c b/lib_rend/ivas_reverb.c index 22265c03c13eff76eb90dc40f570670a0c10b174..09e482234135a1e02c34b9aee1a6374563ac293d 100644 --- a/lib_rend/ivas_reverb.c +++ b/lib_rend/ivas_reverb.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -41,7 +41,7 @@ #include "math.h" #include "ivas_rom_rend.h" #include -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* @@ -965,7 +965,7 @@ ivas_error ivas_reverb_open( nr_fc_input = hRenderConfig->roomAcoustics.nBands; /* Allocate main reverb. handle */ - if ( ( pState = (REVERB_HANDLE) count_malloc( sizeof( REVERB_DATA ) ) ) == NULL ) + if ( ( pState = (REVERB_HANDLE) malloc( sizeof( REVERB_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend Reverberator " ); } @@ -978,14 +978,14 @@ ivas_error ivas_reverb_open( /* Allocate memory for feedback delay lines */ for ( loop_idx = 0; loop_idx < IVAS_REV_MAX_NR_BRANCHES; loop_idx++ ) { - if ( ( pState->loop_delay_buffer[loop_idx] = (float *) count_malloc( params.pLoop_delays[loop_idx] * sizeof( float ) ) ) == NULL ) + if ( ( pState->loop_delay_buffer[loop_idx] = (float *) malloc( params.pLoop_delays[loop_idx] * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CREND Reverberator" ); } } /* Allocate memory for the pre-delay delay line */ - if ( ( pState->pPredelay_buffer = (float *) count_malloc( output_frame * sizeof( float ) ) ) == NULL ) + if ( ( pState->pPredelay_buffer = (float *) malloc( output_frame * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CREND Reverberator" ); } @@ -1120,15 +1120,15 @@ void ivas_reverb_close( { if ( hReverb->loop_delay_buffer[loop_idx] != NULL ) { - count_free( hReverb->loop_delay_buffer[loop_idx] ); + free( hReverb->loop_delay_buffer[loop_idx] ); hReverb->loop_delay_buffer[loop_idx] = NULL; } } - count_free( hReverb->pPredelay_buffer ); + free( hReverb->pPredelay_buffer ); hReverb->pPredelay_buffer = NULL; - count_free( hReverb ); + free( hReverb ); hReverb = NULL; } diff --git a/lib_rend/ivas_reverb_delay_line.c b/lib_rend/ivas_reverb_delay_line.c index 9ad1a03bf98b81623c1b0b70eb67981436ba3b5d..ef0ca8b6c19792d6b705b9fa97db91c9bc51f39b 100644 --- a/lib_rend/ivas_reverb_delay_line.c +++ b/lib_rend/ivas_reverb_delay_line.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_reverb_fft_filter.c b/lib_rend/ivas_reverb_fft_filter.c index 7a304aaf7c3df0b460aded859dcb66da947e2fef..2c6a77ec2bd80dcd12bd1e3fb9897ff72bebaa96 100644 --- a/lib_rend/ivas_reverb_fft_filter.c +++ b/lib_rend/ivas_reverb_fft_filter.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #endif #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_reverb_filter_design.c b/lib_rend/ivas_reverb_filter_design.c index 0654dbfa8ae25bebb31a0c3b70eaf4b25e1bb006..80044e3e653d960f239321c833c6248fb7fba4f2 100644 --- a/lib_rend/ivas_reverb_filter_design.c +++ b/lib_rend/ivas_reverb_filter_design.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #include #include #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_reverb_iir_filter.c b/lib_rend/ivas_reverb_iir_filter.c index b633f8e82cbe0c9bc86955e72135340457dfacd2..db3534ee8aea722b87e4af35cfed7b22e52b0eb6 100644 --- a/lib_rend/ivas_reverb_iir_filter.c +++ b/lib_rend/ivas_reverb_iir_filter.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ #include "debug.h" #endif #include -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_reverb_utils.c b/lib_rend/ivas_reverb_utils.c index 31a559bd2c001cc138578b42fcbfdce842bd296d..20a3e2ac47b215545141867d6563bdc1a9fe6d13 100644 --- a/lib_rend/ivas_reverb_utils.c +++ b/lib_rend/ivas_reverb_utils.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------------------------* @@ -52,6 +52,8 @@ #define CLDFB_CONVOLVER_NTAPS_MAX ( 16 ) #define FFT_SPECTRUM_SIZE ( 1 + ( RV_FILTER_MAX_FFT_SIZE / 2 ) ) +#define N_INITIAL_IGNORED_FRAMES 4 +#define NUM_CLDFB_TAPES 7 /*-----------------------------------------------------------------------------------------* * Local function prototypes @@ -67,7 +69,11 @@ typedef struct cldfb_convolver_state float filter_states_im[BINAURAL_CONVBANDS][CLDFB_CONVOLVER_NTAPS_MAX]; } cldfb_convolver_state; +#ifdef HRTF_BINARY_FILE +static void ivas_reverb_get_fastconv_hrtf_set_energies( const HRTFS_FASTCONV_HANDLE hHrtfFastConv, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, float *avg_pwr_right ); +#else static void ivas_reverb_get_fastconv_hrtf_set_energies( const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, float *avg_pwr_right ); +#endif /*-----------------------------------------------------------------------------------------* @@ -78,6 +84,9 @@ static void ivas_reverb_get_fastconv_hrtf_set_energies( const AUDIO_CONFIG input void ivas_reverb_prepare_cldfb_params( ivas_roomAcoustics_t *pInput_params, +#ifdef HRTF_BINARY_FILE + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, +#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t output_Fs, @@ -112,7 +121,11 @@ void ivas_reverb_prepare_cldfb_params( pOutput_ene[idx] *= expf( exp_argument ); } +#ifdef HRTF_BINARY_FILE + ivas_reverb_get_fastconv_hrtf_set_energies( hHrtfFastConv, input_audio_config, use_brir, output_Fs, avg_pwr_left, avg_pwr_right ); +#else ivas_reverb_get_fastconv_hrtf_set_energies( input_audio_config, use_brir, output_Fs, avg_pwr_left, avg_pwr_right ); +#endif for ( idx = 0; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) { @@ -196,6 +209,9 @@ static void ivas_cldfb_convolver( *-----------------------------------------------------------------------------------------*/ static void get_IR_from_filter_taps( +#ifdef HRTF_BINARY_FILE + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, +#endif const int16_t hrtf_idx, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, @@ -204,11 +220,7 @@ static void get_IR_from_filter_taps( float *pOut_l, float *pOut_r ) { - const int16_t n_initial_ignored_frames = 4; - const int16_t num_cldfb_taps = 7; - int16_t i, j, band_idx, block_idx, block_len, block_count, input_sample_idx, output_sample_idx, array_idx; - int16_t is_ambisonics; HANDLE_CLDFB_FILTER_BANK handle_cldfb_analysis, handle_cldfb_synthesis_l, handle_cldfb_synthesis_r; cldfb_convolver_state convolver_state; float real_buffer_in[CLDFB_NO_CHANNELS_MAX]; @@ -217,17 +229,8 @@ static void get_IR_from_filter_taps( float out_CLDFB_imag[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; /* o : imag part of Binaural signals */ float dirac_pls[CLDFB_NO_CHANNELS_MAX + 1]; - if ( ( input_audio_config == AUDIO_CONFIG_FOA ) || ( input_audio_config == AUDIO_CONFIG_HOA2 ) || ( input_audio_config == AUDIO_CONFIG_HOA3 ) ) - { - is_ambisonics = true; - } - else - { - is_ambisonics = false; - } - block_len = (int16_t) ( sampling_rate * INV_CLDFB_BANDWIDTH ); - block_count = n_initial_ignored_frames + ( pulse_length / block_len ); + block_count = N_INITIAL_IGNORED_FRAMES + ( pulse_length / block_len ); set_f( dirac_pls, 0, block_len + 1 ); dirac_pls[0] = 1.0f; @@ -235,14 +238,21 @@ static void get_IR_from_filter_taps( output_sample_idx = 0; /* Assign CLDFB taps */ - if ( is_ambisonics ) + if ( input_audio_config == AUDIO_CONFIG_FOA || input_audio_config == AUDIO_CONFIG_HOA2 || input_audio_config == AUDIO_CONFIG_HOA3 ) { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { +#ifdef HRTF_BINARY_FILE + convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftHRIRReal_HOA3[band_idx][hrtf_idx]; + convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftHRIRImag_HOA3[band_idx][hrtf_idx]; + convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightHRIRReal_HOA3[band_idx][hrtf_idx]; + convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightHRIRImag_HOA3[band_idx][hrtf_idx]; +#else convolver_state.filter_taps_left_re[band_idx] = leftHRIRReal_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_left_im[band_idx] = leftHRIRImag_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_right_re[band_idx] = rightHRIRReal_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_right_im[band_idx] = rightHRIRImag_HOA3[band_idx][hrtf_idx]; +#endif } } else @@ -273,20 +283,34 @@ static void get_IR_from_filter_taps( { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { +#ifdef HRTF_BINARY_FILE + convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftBRIRReal[band_idx][array_idx]; + convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftBRIRImag[band_idx][array_idx]; + convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightBRIRReal[band_idx][array_idx]; + convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightBRIRImag[band_idx][array_idx]; +#else convolver_state.filter_taps_left_re[band_idx] = leftBRIRReal[band_idx][array_idx]; convolver_state.filter_taps_left_im[band_idx] = leftBRIRImag[band_idx][array_idx]; convolver_state.filter_taps_right_re[band_idx] = rightBRIRReal[band_idx][array_idx]; convolver_state.filter_taps_right_im[band_idx] = rightBRIRImag[band_idx][array_idx]; +#endif } } else { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { +#ifdef HRTF_BINARY_FILE + convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftHRIRReal[band_idx][array_idx]; + convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftHRIRImag[band_idx][array_idx]; + convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightHRIRReal[band_idx][array_idx]; + convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightHRIRImag[band_idx][array_idx]; +#else convolver_state.filter_taps_left_re[band_idx] = leftHRIRReal[band_idx][array_idx]; convolver_state.filter_taps_left_im[band_idx] = leftHRIRImag[band_idx][array_idx]; convolver_state.filter_taps_right_re[band_idx] = rightHRIRReal[band_idx][array_idx]; convolver_state.filter_taps_right_im[band_idx] = rightHRIRImag[band_idx][array_idx]; +#endif } } } @@ -323,7 +347,7 @@ static void get_IR_from_filter_taps( } } - ivas_cldfb_convolver( &convolver_state, out_CLDFB_real, out_CLDFB_imag, real_buffer_in, imag_buffer_in, BINAURAL_CONVBANDS, num_cldfb_taps ); + ivas_cldfb_convolver( &convolver_state, out_CLDFB_real, out_CLDFB_imag, real_buffer_in, imag_buffer_in, BINAURAL_CONVBANDS, NUM_CLDFB_TAPES ); ppRealBuf[0] = out_CLDFB_real[0]; ppImagBuf[0] = out_CLDFB_imag[0]; @@ -338,7 +362,7 @@ static void get_IR_from_filter_taps( input_sample_idx = 1; } - if ( block_idx >= n_initial_ignored_frames ) + if ( block_idx >= N_INITIAL_IGNORED_FRAMES ) { output_sample_idx += block_len; } @@ -362,6 +386,9 @@ static void get_IR_from_filter_taps( static void ivas_reverb_get_cldfb_hrtf_set_properties( AUDIO_CONFIG input_audio_config, +#ifdef HRTF_BINARY_FILE + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, +#endif const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, @@ -405,7 +432,11 @@ static void ivas_reverb_get_cldfb_hrtf_set_properties( Loop over all the HRTFs available */ for ( hrtf_idx = 0; hrtf_idx < hrtf_count; hrtf_idx++ ) { +#ifdef HRTF_BINARY_FILE + get_IR_from_filter_taps( hHrtfFastConv, hrtf_idx, input_audio_config, use_brir, sampling_rate, IR_length, current_HRTF_data_L, current_HRTF_data_R ); +#else get_IR_from_filter_taps( hrtf_idx, input_audio_config, use_brir, sampling_rate, IR_length, current_HRTF_data_L, current_HRTF_data_R ); +#endif /* Perform forward FFT on both L/R channels */ fft_rel( current_HRTF_data_L, (int16_t) fft_size, (int16_t) log2_fft_size ); @@ -454,6 +485,9 @@ static void ivas_reverb_get_cldfb_hrtf_set_properties( *-----------------------------------------------------------------------------------------*/ static void ivas_reverb_get_fastconv_hrtf_set_energies( +#ifdef HRTF_BINARY_FILE + const HRTFS_FASTCONV_HANDLE hHrtfFastConv, +#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, @@ -477,7 +511,11 @@ static void ivas_reverb_get_fastconv_hrtf_set_energies( output_fc[freq_idx] = (float) ( ( 2 * freq_idx + 1 ) * cldfb_freq_halfstep ); } +#ifdef HRTF_BINARY_FILE + ivas_reverb_get_cldfb_hrtf_set_properties( input_audio_config, hHrtfFastConv, use_brir, sampling_rate, avg_pwr_left_fft, avg_pwr_right_fft ); +#else ivas_reverb_get_cldfb_hrtf_set_properties( input_audio_config, use_brir, sampling_rate, avg_pwr_left_fft, avg_pwr_right_fft ); +#endif ivas_reverb_interpolate_acoustic_data( FFT_SPECTRUM_SIZE, input_fc, avg_pwr_left_fft, avg_pwr_right_fft, CLDFB_NO_CHANNELS_MAX, output_fc, avg_pwr_left, avg_pwr_right ); diff --git a/lib_rend/ivas_rom_TdBinauralRenderer.c b/lib_rend/ivas_rom_TdBinauralRenderer.c index 34263ea8f3d9ce8e23ff5abab66c5cdc898e6d65..50de3f253b7ad0a60eca5f6bfb22ca237760b018 100644 --- a/lib_rend/ivas_rom_TdBinauralRenderer.c +++ b/lib_rend/ivas_rom_TdBinauralRenderer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,13 +39,16 @@ #endif #include "cnst.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /*------------------------------------------------------------------------- * TD Binaural rendering related ROM tables *------------------------------------------------------------------------*/ /* TD renderer HRTF default model Orange53 */ +#ifdef FIX_310_TD_REND_DELAY +const float orange53_rom_latency_s = 0.000020834f; +#endif const int16_t orange53_rom_azimDim2[18] = { 1, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 1, }; diff --git a/lib_rend/ivas_rom_TdBinauralRenderer.h b/lib_rend/ivas_rom_TdBinauralRenderer.h index 7aeff4f0ff222fc08587775056a43a71bb882ec4..bbe970869be805c343a66b4bc668de9850944bbe 100644 --- a/lib_rend/ivas_rom_TdBinauralRenderer.h +++ b/lib_rend/ivas_rom_TdBinauralRenderer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -42,6 +42,9 @@ * TD Binaural rendering related ROM tables *------------------------------------------------------------------------*/ /* TD renderer HRTF default model Orange53 */ +#ifdef FIX_310_TD_REND_DELAY +extern const float orange53_rom_latency_s; +#endif extern const int16_t orange53_rom_azimDim2[18]; extern const int16_t orange53_rom_azimDim3[18]; extern const int16_t orange53_rom_azim_start_idx[18]; diff --git a/lib_rend/ivas_rom_binauralRenderer.c b/lib_rend/ivas_rom_binauralRenderer.c index bfd2da9fb496a741a7698ce00d1fdbfdd919c66c..9d6bbd543eb7dbca0534ce84263bd49a9649298a 100644 --- a/lib_rend/ivas_rom_binauralRenderer.c +++ b/lib_rend/ivas_rom_binauralRenderer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,7 +37,7 @@ #endif #include "cnst.h" #include "ivas_cnst.h" -#include "wmops.h" +#include "wmc_auto.h" /* clang-format off */ @@ -52,7 +52,11 @@ * Generated with Matlab version 9.3.0.713579 (R2017b) by MUXE6256 */ const float FASTCONV_HOA3_latency_s = 0.001979167f; +#ifdef HRTF_BINARY_FILE +const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= +#else const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= +#endif { { {-0.004181f, +0.093228f, +0.655506f, +0.048565f, -0.005834f, -0.005472f, -0.000066f}, @@ -956,7 +960,11 @@ const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= } }; +#ifdef HRTF_BINARY_FILE +const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= +#else const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= +#endif { { {-0.007849f, -0.189662f, +0.310868f, +0.002657f, -0.000617f, -0.002064f, +0.000079f}, @@ -1860,7 +1868,11 @@ const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= } }; +#ifdef HRTF_BINARY_FILE +const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= +#else const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= +#endif { { {-0.004181f, +0.093228f, +0.655506f, +0.048565f, -0.005834f, -0.005472f, -0.000066f}, @@ -2764,7 +2776,11 @@ const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= } }; +#ifdef HRTF_BINARY_FILE +const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= +#else const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= +#endif { { {-0.007849f, -0.189662f, +0.310868f, +0.002657f, -0.000617f, -0.002064f, +0.000079f}, @@ -3669,7 +3685,11 @@ const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= }; const float FASTCONV_HRIR_latency_s = 0.000666667f; +#ifdef HRTF_BINARY_FILE +const float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= +#else const float leftHRIRReal[BINAURAL_CONVBANDS][15][7]= +#endif { { {+0.331798f, +0.500334f, +0.042057f, -0.000623f, -0.000260f}, @@ -4523,7 +4543,11 @@ const float leftHRIRReal[BINAURAL_CONVBANDS][15][7]= } }; +#ifdef HRTF_BINARY_FILE +const float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= +#else const float leftHRIRImag[BINAURAL_CONVBANDS][15][7]= +#endif { { {-0.346479f, +0.553523f, -0.074098f, +0.001288f, +0.000309f}, @@ -5377,7 +5401,11 @@ const float leftHRIRImag[BINAURAL_CONVBANDS][15][7]= } }; +#ifdef HRTF_BINARY_FILE +const float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= +#else const float rightHRIRReal[BINAURAL_CONVBANDS][15][7]= +#endif { { {+0.065097f, +0.755993f, -0.042308f, -0.016140f, -0.000353f}, @@ -6231,7 +6259,11 @@ const float rightHRIRReal[BINAURAL_CONVBANDS][15][7]= } }; +#ifdef HRTF_BINARY_FILE +const float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= +#else const float rightHRIRImag[BINAURAL_CONVBANDS][15][7]= +#endif { { {-0.179291f, +0.196331f, +0.055128f, -0.017382f, +0.000411f}, @@ -7617,7 +7649,11 @@ const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]= /* Binaural rendering data set based on BRIRs */ /* Tables derived from Mozart IIS BRIRs.*/ const float FASTCONV_BRIR_latency_s = 0.000937500f; +#ifdef HRTF_BINARY_FILE +const float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= +#else const float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= +#endif { { { @@ -16721,7 +16757,11 @@ const float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; +#ifdef HRTF_BINARY_FILE +const float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= +#else const float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= +#endif { { { @@ -25825,7 +25865,11 @@ const float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; +#ifdef HRTF_BINARY_FILE +const float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= +#else const float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= +#endif { { { @@ -34929,7 +34973,11 @@ const float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; +#ifdef HRTF_BINARY_FILE +const float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= +#else const float rightBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= +#endif { { { diff --git a/lib_rend/ivas_rom_binauralRenderer.h b/lib_rend/ivas_rom_binauralRenderer.h index c597847a0f90dc6651d7e35ac816494557ac14f9..f97883f9c37f1163fc03c79c13a9d170013709e9 100644 --- a/lib_rend/ivas_rom_binauralRenderer.h +++ b/lib_rend/ivas_rom_binauralRenderer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -44,15 +44,29 @@ /* Binaural rendering data set based on HRIRs */ extern const float FASTCONV_HRIR_latency_s; +#ifdef HRTF_BINARY_FILE +extern float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; +extern float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; +extern float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; +extern float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; +#else extern float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]; extern float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]; extern float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]; extern float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]; +#endif +#ifdef HRTF_BINARY_FILE +extern float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; +extern float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; +extern float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; +extern float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; +#else extern float leftHRIRReal[BINAURAL_CONVBANDS][15][7]; extern float leftHRIRImag[BINAURAL_CONVBANDS][15][7]; extern float rightHRIRReal[BINAURAL_CONVBANDS][15][7]; extern float rightHRIRImag[BINAURAL_CONVBANDS][15][7]; +#endif extern float FASTCONV_HOA3_latency_s; extern float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; @@ -61,10 +75,17 @@ extern float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; /* Binaural rendering data set based on BRIRs */ extern const float FASTCONV_BRIR_latency_s; +#ifdef HRTF_BINARY_FILE +extern float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; +extern float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; +extern float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; +extern float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; +#else extern float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; extern float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; extern float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; extern float rightBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; +#endif /* Reverberation parameters based on BRIRs for fastconv */ extern float fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX]; diff --git a/lib_rend/ivas_rom_binaural_crend_head.c b/lib_rend/ivas_rom_binaural_crend_head.c index ac4216ef77e21c2ed351dfdb88a5652f62920c24..082a29c3910c73da00178b5e9bb0d2ff3ba7abfc 100644 --- a/lib_rend/ivas_rom_binaural_crend_head.c +++ b/lib_rend/ivas_rom_binaural_crend_head.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,17 +40,18 @@ /* Tables generated by the exe at "scripts/binauralRenderer_interface/generate_cren_ivas_tables*.* */ /* Can be replaced by your own generated HRIR or BRIRI tables */ - - #include #include #include "cnst.h" #include "ivas_cnst.h" -/********************** Sample Rate = 48000 **********************/ +/********************** CRendBin_Combined_HRIR **********************/ + +const float CRendBin_Combined_HRIR_latency_s = 0.000020833333110f; + +/* Sample Rate = 48000 */ -const float CRendBin_Combined_HRIR_latency_s_48kHz = 0.000020833333110f; const int16_t CRendBin_Combined_HRIR_max_num_iterations_48kHz = 1; const uint16_t CRendBin_Combined_HRIR_num_iterations_48kHz[15][BINAURAL_CHANNELS]={{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1} }; const uint16_t CRendBin_Combined_HRIR_num_iterations_diffuse_48kHz[BINAURAL_CHANNELS] = {0, 0}; @@ -305,9 +306,8 @@ const float CRendBin_Combined_HRIR_coeff_im_48kHz[15][BINAURAL_CHANNELS][240]={ const float *CRendBin_Combined_HRIR_coeff_diffuse_re_48kHz[BINAURAL_CHANNELS]={NULL,NULL}; const float *CRendBin_Combined_HRIR_coeff_diffuse_im_48kHz[BINAURAL_CHANNELS]={NULL,NULL}; -/********************** Sample Rate = 32000 **********************/ +/* Sample Rate = 32000 */ -const float CRendBin_Combined_HRIR_latency_s_32kHz = 0.000020833333110f; const int16_t CRendBin_Combined_HRIR_max_num_iterations_32kHz = 1; const uint16_t CRendBin_Combined_HRIR_num_iterations_32kHz[15][BINAURAL_CHANNELS]={{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1} }; const uint16_t CRendBin_Combined_HRIR_num_iterations_diffuse_32kHz[BINAURAL_CHANNELS] = {0, 0}; @@ -502,9 +502,8 @@ const float CRendBin_Combined_HRIR_coeff_im_32kHz[15][BINAURAL_CHANNELS][160]={ const float *CRendBin_Combined_HRIR_coeff_diffuse_re_32kHz[BINAURAL_CHANNELS]={NULL,NULL}; const float *CRendBin_Combined_HRIR_coeff_diffuse_im_32kHz[BINAURAL_CHANNELS]={NULL,NULL}; -/********************** Sample Rate = 16000 **********************/ +/* Sample Rate = 16000 */ -const float CRendBin_Combined_HRIR_latency_s_16kHz = 0.000020833333110f; const int16_t CRendBin_Combined_HRIR_max_num_iterations_16kHz = 1; const uint16_t CRendBin_Combined_HRIR_num_iterations_16kHz[15][BINAURAL_CHANNELS]={{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1} }; const uint16_t CRendBin_Combined_HRIR_num_iterations_diffuse_16kHz[BINAURAL_CHANNELS] = {0, 0}; @@ -639,9 +638,12 @@ const float CRendBin_Combined_HRIR_coeff_im_16kHz[15][BINAURAL_CHANNELS][80]={ const float *CRendBin_Combined_HRIR_coeff_diffuse_re_16kHz[BINAURAL_CHANNELS]={NULL,NULL}; const float *CRendBin_Combined_HRIR_coeff_diffuse_im_16kHz[BINAURAL_CHANNELS]={NULL,NULL}; -/********************** Sample Rate = 48000 **********************/ +/********************** CRendBin_HOA3_HRIR **********************/ + +const float CRendBin_HOA3_HRIR_latency_s = 0.001333333319053f; + +/* Sample Rate = 48000 */ -const float CRendBin_HOA3_HRIR_latency_s_48kHz = 0.001333333319053f; const int16_t CRendBin_HOA3_HRIR_max_num_iterations_48kHz = 2; const uint16_t CRendBin_HOA3_HRIR_num_iterations_48kHz[16][BINAURAL_CHANNELS]={{2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2} }; const uint16_t CRendBin_HOA3_HRIR_num_iterations_diffuse_48kHz[BINAURAL_CHANNELS] = {0, 0}; @@ -1040,9 +1042,8 @@ const float CRendBin_HOA3_HRIR_coeff_im_48kHz[16][BINAURAL_CHANNELS][480]={ const float *CRendBin_HOA3_HRIR_coeff_diffuse_re_48kHz[BINAURAL_CHANNELS]={NULL,NULL}; const float *CRendBin_HOA3_HRIR_coeff_diffuse_im_48kHz[BINAURAL_CHANNELS]={NULL,NULL}; -/********************** Sample Rate = 32000 **********************/ +/* Sample Rate = 32000 */ -const float CRendBin_HOA3_HRIR_latency_s_32kHz = 0.001333333319053f; const int16_t CRendBin_HOA3_HRIR_max_num_iterations_32kHz = 2; const uint16_t CRendBin_HOA3_HRIR_num_iterations_32kHz[16][BINAURAL_CHANNELS]={{2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2} }; const uint16_t CRendBin_HOA3_HRIR_num_iterations_diffuse_32kHz[BINAURAL_CHANNELS] = {0, 0}; @@ -1377,9 +1378,8 @@ const float CRendBin_HOA3_HRIR_coeff_im_32kHz[16][BINAURAL_CHANNELS][320]={ const float *CRendBin_HOA3_HRIR_coeff_diffuse_re_32kHz[BINAURAL_CHANNELS]={NULL,NULL}; const float *CRendBin_HOA3_HRIR_coeff_diffuse_im_32kHz[BINAURAL_CHANNELS]={NULL,NULL}; -/********************** Sample Rate = 16000 **********************/ +/* Sample Rate = 16000 */ -const float CRendBin_HOA3_HRIR_latency_s_16kHz = 0.001333333319053f; const int16_t CRendBin_HOA3_HRIR_max_num_iterations_16kHz = 2; const uint16_t CRendBin_HOA3_HRIR_num_iterations_16kHz[16][BINAURAL_CHANNELS]={{2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2} }; const uint16_t CRendBin_HOA3_HRIR_num_iterations_diffuse_16kHz[BINAURAL_CHANNELS] = {0, 0}; @@ -1586,9 +1586,12 @@ const float CRendBin_HOA3_HRIR_coeff_im_16kHz[16][BINAURAL_CHANNELS][160]={ const float *CRendBin_HOA3_HRIR_coeff_diffuse_re_16kHz[BINAURAL_CHANNELS]={NULL,NULL}; const float *CRendBin_HOA3_HRIR_coeff_diffuse_im_16kHz[BINAURAL_CHANNELS]={NULL,NULL}; -/********************** Sample Rate = 48000 **********************/ +/********************** CRendBin_Combined_BRIR **********************/ + +const float CRendBin_Combined_BRIR_latency_s = 0.000145833328133f; + +/* Sample Rate = 48000 */ -const float CRendBin_Combined_BRIR_latency_s_48kHz = 0.000145833328133f; const int16_t CRendBin_Combined_BRIR_max_num_iterations_48kHz = 22; const uint16_t CRendBin_Combined_BRIR_num_iterations_48kHz[15][BINAURAL_CHANNELS]={{22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22} }; const uint16_t CRendBin_Combined_BRIR_num_iterations_diffuse_48kHz[BINAURAL_CHANNELS] = {40, 40}; @@ -3623,9 +3626,8 @@ const float CRendBin_Combined_BRIR_coeff_diffuse_im_48kHz[BINAURAL_CHANNELS][288 0.008540f, 0.000569f, 0.002267f, -0.000988f, 0.001342f} }; -/********************** Sample Rate = 32000 **********************/ +/* Sample Rate = 32000 */ -const float CRendBin_Combined_BRIR_latency_s_32kHz = 0.000145833328133f; const int16_t CRendBin_Combined_BRIR_max_num_iterations_32kHz = 22; const uint16_t CRendBin_Combined_BRIR_num_iterations_32kHz[15][BINAURAL_CHANNELS]={{22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22}, {22, 22} }; const uint16_t CRendBin_Combined_BRIR_num_iterations_diffuse_32kHz[BINAURAL_CHANNELS] = {40, 40}; @@ -5584,9 +5586,8 @@ const float CRendBin_Combined_BRIR_coeff_diffuse_im_32kHz[BINAURAL_CHANNELS][287 -0.030519f, 0.027258f, -0.004872f, -0.024412f, -0.025958f, 0.005865f, -0.034537f, -0.048705f, 0.008013f, -0.011347f, -0.010463f, -0.010480f, 0.009340f, -0.029039f, 0.030517f, -0.017776f, 0.020717f, -0.014466f, -0.013902f, 0.000316f, 0.016725f, -0.023690f, -0.022640f, 0.012110f, -0.004311f, 0.033404f, -0.014684f, 0.019133f, 0.028780f, 0.013672f, -0.010535f, -0.004820f, -0.003049f, 0.023610f, -0.008334f, 0.015840f, 0.031862f, -0.026837f, -0.046802f, -0.018449f, 0.015820f, 0.019420f, -0.022107f, 0.036264f, -0.011732f, -0.013165f, -0.004432f, -0.004019f, -0.011290f, -0.029439f, -0.012475f, -0.030418f, -0.029136f, -0.018067f, 0.021415f, 0.005020f, -0.005215f, 0.001915f, 0.033137f, 0.031128f, 0.002152f, -0.014470f, 0.005893f, -0.003315f, 0.013612f, 0.004239f, -0.006009f, -0.013786f, -0.001289f, -0.002803f, -0.021865f, -0.005694f, 0.008246f, 0.022588f, -0.010185f, -0.000025f, 0.008581f, -0.012767f, -0.000458f, -0.000932f, 0.000324f, -0.006676f, 0.008426f, 0.000455f, 0.002150f, -0.001106f} }; -/********************** Sample Rate = 16000 **********************/ +/* Sample Rate = 16000 */ -const float CRendBin_Combined_BRIR_latency_s_16kHz = 0.000145833328133f; const int16_t CRendBin_Combined_BRIR_max_num_iterations_16kHz = 23; const uint16_t CRendBin_Combined_BRIR_num_iterations_16kHz[15][BINAURAL_CHANNELS]={{23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23}, {23, 23} }; const uint16_t CRendBin_Combined_BRIR_num_iterations_diffuse_16kHz[BINAURAL_CHANNELS] = {40, 40}; diff --git a/lib_rend/ivas_rom_binaural_crend_head.h b/lib_rend/ivas_rom_binaural_crend_head.h index af012e7fa62c0321b636bae715f2a28239b8a4cb..4a9570f23f47c9d7cfa96579bb21c9f530194b9e 100644 --- a/lib_rend/ivas_rom_binaural_crend_head.h +++ b/lib_rend/ivas_rom_binaural_crend_head.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -50,9 +50,12 @@ #include "ivas_cnst.h" -/********************** Sample Rate = 48000 **********************/ +/********************** CRendBin_Combined_HRIR **********************/ + +extern float CRendBin_Combined_HRIR_latency_s; + +/* Sample Rate = 48000 */ -extern float CRendBin_Combined_HRIR_latency_s_48kHz; extern int16_t CRendBin_Combined_HRIR_max_num_iterations_48kHz; extern uint16_t CRendBin_Combined_HRIR_num_iterations_48kHz[15][BINAURAL_CHANNELS]; extern uint16_t CRendBin_Combined_HRIR_num_iterations_diffuse_48kHz[BINAURAL_CHANNELS]; @@ -65,9 +68,8 @@ extern float CRendBin_Combined_HRIR_coeff_im_48kHz[15][BINAURAL_CHANNELS][240]; extern float *CRendBin_Combined_HRIR_coeff_diffuse_re_48kHz[BINAURAL_CHANNELS]; extern float *CRendBin_Combined_HRIR_coeff_diffuse_im_48kHz[BINAURAL_CHANNELS]; -/********************** Sample Rate = 32000 **********************/ +/* Sample Rate = 32000 */ -extern float CRendBin_Combined_HRIR_latency_s_32kHz; extern int16_t CRendBin_Combined_HRIR_max_num_iterations_32kHz; extern uint16_t CRendBin_Combined_HRIR_num_iterations_32kHz[15][BINAURAL_CHANNELS]; extern uint16_t CRendBin_Combined_HRIR_num_iterations_diffuse_32kHz[BINAURAL_CHANNELS]; @@ -80,9 +82,8 @@ extern float CRendBin_Combined_HRIR_coeff_im_32kHz[15][BINAURAL_CHANNELS][160]; extern float *CRendBin_Combined_HRIR_coeff_diffuse_re_32kHz[BINAURAL_CHANNELS]; extern float *CRendBin_Combined_HRIR_coeff_diffuse_im_32kHz[BINAURAL_CHANNELS]; -/********************** Sample Rate = 16000 **********************/ +/* Sample Rate = 16000 */ -extern float CRendBin_Combined_HRIR_latency_s_16kHz; extern int16_t CRendBin_Combined_HRIR_max_num_iterations_16kHz; extern uint16_t CRendBin_Combined_HRIR_num_iterations_16kHz[15][BINAURAL_CHANNELS]; extern uint16_t CRendBin_Combined_HRIR_num_iterations_diffuse_16kHz[BINAURAL_CHANNELS]; @@ -95,9 +96,12 @@ extern float CRendBin_Combined_HRIR_coeff_im_16kHz[15][BINAURAL_CHANNELS][80]; extern float *CRendBin_Combined_HRIR_coeff_diffuse_re_16kHz[BINAURAL_CHANNELS]; extern float *CRendBin_Combined_HRIR_coeff_diffuse_im_16kHz[BINAURAL_CHANNELS]; -/********************** Sample Rate = 48000 **********************/ +/********************** CRendBin_HOA3_HRIR **********************/ + +extern float CRendBin_HOA3_HRIR_latency_s; + +/* Sample Rate = 48000 */ -extern float CRendBin_HOA3_HRIR_latency_s_48kHz; extern int16_t CRendBin_HOA3_HRIR_max_num_iterations_48kHz; extern uint16_t CRendBin_HOA3_HRIR_num_iterations_48kHz[16][BINAURAL_CHANNELS]; extern uint16_t CRendBin_HOA3_HRIR_num_iterations_diffuse_48kHz[BINAURAL_CHANNELS]; @@ -110,9 +114,8 @@ extern float CRendBin_HOA3_HRIR_coeff_im_48kHz[16][BINAURAL_CHANNELS][480]; extern float *CRendBin_HOA3_HRIR_coeff_diffuse_re_48kHz[BINAURAL_CHANNELS]; extern float *CRendBin_HOA3_HRIR_coeff_diffuse_im_48kHz[BINAURAL_CHANNELS]; -/********************** Sample Rate = 32000 **********************/ +/* Sample Rate = 32000 */ -extern float CRendBin_HOA3_HRIR_latency_s_32kHz; extern int16_t CRendBin_HOA3_HRIR_max_num_iterations_32kHz; extern uint16_t CRendBin_HOA3_HRIR_num_iterations_32kHz[16][BINAURAL_CHANNELS]; extern uint16_t CRendBin_HOA3_HRIR_num_iterations_diffuse_32kHz[BINAURAL_CHANNELS]; @@ -125,9 +128,8 @@ extern float CRendBin_HOA3_HRIR_coeff_im_32kHz[16][BINAURAL_CHANNELS][320]; extern float *CRendBin_HOA3_HRIR_coeff_diffuse_re_32kHz[BINAURAL_CHANNELS]; extern float *CRendBin_HOA3_HRIR_coeff_diffuse_im_32kHz[BINAURAL_CHANNELS]; -/********************** Sample Rate = 16000 **********************/ +/* Sample Rate = 16000 */ -extern float CRendBin_HOA3_HRIR_latency_s_16kHz; extern int16_t CRendBin_HOA3_HRIR_max_num_iterations_16kHz; extern uint16_t CRendBin_HOA3_HRIR_num_iterations_16kHz[16][BINAURAL_CHANNELS]; extern uint16_t CRendBin_HOA3_HRIR_num_iterations_diffuse_16kHz[BINAURAL_CHANNELS]; @@ -140,9 +142,12 @@ extern float CRendBin_HOA3_HRIR_coeff_im_16kHz[16][BINAURAL_CHANNELS][160]; extern float *CRendBin_HOA3_HRIR_coeff_diffuse_re_16kHz[BINAURAL_CHANNELS]; extern float *CRendBin_HOA3_HRIR_coeff_diffuse_im_16kHz[BINAURAL_CHANNELS]; -/********************** Sample Rate = 48000 **********************/ +/********************** CRendBin_Combined_BRIR **********************/ + +extern float CRendBin_Combined_BRIR_latency_s; + +/* Sample Rate = 48000 */ -extern float CRendBin_Combined_BRIR_latency_s_48kHz; extern int16_t CRendBin_Combined_BRIR_max_num_iterations_48kHz; extern uint16_t CRendBin_Combined_BRIR_num_iterations_48kHz[15][BINAURAL_CHANNELS]; extern uint16_t CRendBin_Combined_BRIR_num_iterations_diffuse_48kHz[BINAURAL_CHANNELS]; @@ -155,9 +160,8 @@ extern float CRendBin_Combined_BRIR_coeff_im_48kHz[15][BINAURAL_CHANNELS][2955]; extern float CRendBin_Combined_BRIR_coeff_diffuse_re_48kHz[BINAURAL_CHANNELS][2885]; extern float CRendBin_Combined_BRIR_coeff_diffuse_im_48kHz[BINAURAL_CHANNELS][2885]; -/********************** Sample Rate = 32000 **********************/ +/* Sample Rate = 32000 */ -extern float CRendBin_Combined_BRIR_latency_s_32kHz; extern int16_t CRendBin_Combined_BRIR_max_num_iterations_32kHz; extern uint16_t CRendBin_Combined_BRIR_num_iterations_32kHz[15][BINAURAL_CHANNELS]; extern uint16_t CRendBin_Combined_BRIR_num_iterations_diffuse_32kHz[BINAURAL_CHANNELS]; @@ -170,9 +174,8 @@ extern float CRendBin_Combined_BRIR_coeff_im_32kHz[15][BINAURAL_CHANNELS][2819]; extern float CRendBin_Combined_BRIR_coeff_diffuse_re_32kHz[BINAURAL_CHANNELS][2870]; extern float CRendBin_Combined_BRIR_coeff_diffuse_im_32kHz[BINAURAL_CHANNELS][2870]; -/********************** Sample Rate = 16000 **********************/ +/* Sample Rate = 16000 */ -extern float CRendBin_Combined_BRIR_latency_s_16kHz; extern int16_t CRendBin_Combined_BRIR_max_num_iterations_16kHz; extern uint16_t CRendBin_Combined_BRIR_num_iterations_16kHz[15][BINAURAL_CHANNELS]; extern uint16_t CRendBin_Combined_BRIR_num_iterations_diffuse_16kHz[BINAURAL_CHANNELS]; diff --git a/lib_rend/ivas_rom_rend.c b/lib_rend/ivas_rom_rend.c index 4f647922c59e5640e517b9ecf1518e59b89c446b..2a68d832e02d0e9fa30d3a51a22aca3c5894a02e 100644 --- a/lib_rend/ivas_rom_rend.c +++ b/lib_rend/ivas_rom_rend.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -361,7 +361,6 @@ const uint32_t ls_LFE_last_idx_CICP19[12] = { 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, /* Downmix matrices */ const float ls_conversion_cicpX_mono[12][1] = { -#ifdef FIX_REND_MONO_DMX {1.00000000f}, {1.00000000f}, {1.00000000f}, @@ -374,20 +373,6 @@ const float ls_conversion_cicpX_mono[12][1] = {0.849999964f}, {0.849999964f}, {0.849999964f} -#else - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, - {1.00000000f}, -#endif }; const float ls_conversion_cicpX_stereo[12][2] = diff --git a/lib_rend/ivas_rom_rend.h b/lib_rend/ivas_rom_rend.h index aaf7fa7113af789ac565ba75b15823386d0cac80..cba0fffb1bfcb2e1f8e2a17a4a3f815f95e24d08 100644 --- a/lib_rend/ivas_rom_rend.h +++ b/lib_rend/ivas_rom_rend.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 1a7cd8b830bbcf123b5d305bbed4fdf6956dcff2..ff9eeebf2f97e66338e2ccd3bdeccdf7569accc9 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -43,7 +43,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -59,7 +59,7 @@ ivas_error ivas_headTrack_open( int16_t i; /* Allocate Head-Tracking handle */ - if ( ( *hHeadTrackData = (HEAD_TRACK_DATA_HANDLE) count_malloc( sizeof( HEAD_TRACK_DATA ) ) ) == NULL ) + if ( ( *hHeadTrackData = (HEAD_TRACK_DATA_HANDLE) malloc( sizeof( HEAD_TRACK_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for head-tracking memory\n" ) ); } @@ -157,10 +157,10 @@ void QuatToRotMat( *------------------------------------------------------------------------*/ void Quat2Euler( - const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ - float *yaw, /* o : yaw */ - float *pitch, /* o : pitch */ - float *roll /* o : roll */ + const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ + float *yaw, /* o : yaw */ + float *pitch, /* o : pitch */ + float *roll /* o : roll */ ) { if ( quat.w != -3.0 ) @@ -251,7 +251,7 @@ void rotateAziEle_DirAC( float dv_r_0, dv_r_1, dv_r_2; float w; - wmops_sub_start( "rotateAziEle_DirAC" ); + push_wmops( "rotateAziEle_DirAC" ); for ( b = band1; b < band2; b++ ) { @@ -271,7 +271,7 @@ void rotateAziEle_DirAC( ele[b] = (int16_t) ( atan2f( dv_r_2, sqrtf( dv_r_0 * dv_r_0 + dv_r_1 * dv_r_1 ) ) * _180_OVER_PI ); } - wmops_sub_end(); + pop_wmops(); return; } @@ -407,7 +407,7 @@ void rotateFrame_sd( float output_tmp[MAX_CICP_CHANNELS][L_FRAME48k]; float cross_fade[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; - wmops_sub_start( "rotateFrame_sd" ); + push_wmops( "rotateFrame_sd" ); nchan = hTransSetup.nchan_out_woLFE + hTransSetup.num_lfe; index_lfe = hTransSetup.index_lfe[0]; @@ -509,7 +509,7 @@ void rotateFrame_sd( mvr2r( &output_tmp[ch_out][subframe_idx * subframe_len], &output[ch_out][subframe_idx * subframe_len], subframe_len ); } - wmops_sub_end(); + pop_wmops(); return; } @@ -635,7 +635,7 @@ void rotateFrame_sd_cldfb( int16_t nInChannels; int16_t isPlanar; - wmops_sub_start( "rotateFrame_sd_cldfb" ); + push_wmops( "rotateFrame_sd_cldfb" ); nInChannels = hOutputSetup->nchan_out_woLFE; isPlanar = 1; @@ -714,7 +714,7 @@ void rotateFrame_sd_cldfb( } } } - wmops_sub_end(); + pop_wmops(); return; } @@ -785,14 +785,13 @@ static float SHrot_v( float R_lm1[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM] ) { - float d = 0.0f; - float p0 = 0.0f, p1 = 0.0f; + float result, d, p0, p1; if ( m == 0 ) { p0 = SHrot_p( 1, l, 1, n, SHrotmat, R_lm1 ); p1 = SHrot_p( -1, l, -1, n, SHrotmat, R_lm1 ); - return p0 + p1; + result = p0 + p1; } else { @@ -801,16 +800,18 @@ static float SHrot_v( d = ( m == 1 ) ? 1.0f : 0.0f; p0 = SHrot_p( 1, l, m - 1, n, SHrotmat, R_lm1 ); p1 = SHrot_p( -1, l, -m + 1, n, SHrotmat, R_lm1 ); - return p0 * sqrtf( 1.0f + d ) - p1 * ( 1.0f - d ); + result = p0 * sqrtf( 1.0f + d ) - p1 * ( 1.0f - d ); } else { d = ( m == -1 ) ? 1.0f : 0.0f; p0 = SHrot_p( 1, l, m + 1, n, SHrotmat, R_lm1 ); p1 = SHrot_p( -1, l, -m - 1, n, SHrotmat, R_lm1 ); - return p0 * ( 1.0f - d ) + p1 * sqrtf( 1.0f + d ); + result = p0 * ( 1.0f - d ) + p1 * sqrtf( 1.0f + d ); } } + + return result; } static float SHrot_w( @@ -820,13 +821,12 @@ static float SHrot_w( float SHrotmat[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM], float R_lm1[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM] ) { - float p0 = 0.0f; - float p1 = 0.0f; + float result, p0, p1; if ( m == 0 ) { printf( "ERROR should not be called\n" ); - return 0.0; + return 0.0f; } else { @@ -834,17 +834,26 @@ static float SHrot_w( { p0 = SHrot_p( 1, l, m + 1, n, SHrotmat, R_lm1 ); p1 = SHrot_p( -1, l, -m - 1, n, SHrotmat, R_lm1 ); - return p0 + p1; + result = p0 + p1; } else { p0 = SHrot_p( 1, l, m - 1, n, SHrotmat, R_lm1 ); p1 = SHrot_p( -1, l, -m + 1, n, SHrotmat, R_lm1 ); - return p0 - p1; + result = p0 - p1; } } + + return result; } + +/*------------------------------------------------------------------------- + * rotateFrame_sd_cldfb() + * + * + *------------------------------------------------------------------------*/ + void SHrotmatgen( float SHrotmat[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM], /* o : rotation matrix in SHD */ float Rmat[3][3], /* i : real-space rotation matrix */ diff --git a/lib_rend/ivas_sba_rendering.c b/lib_rend/ivas_sba_rendering.c old mode 100755 new mode 100644 index 0c28a3d4324e2862cbf3be85def952d6950ecfd9..316792951704e054099b2cea3edeb4fa70dd87c2 --- a/lib_rend/ivas_sba_rendering.c +++ b/lib_rend/ivas_sba_rendering.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,7 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif -#include "wmops.h" +#include "wmc_auto.h" /*-----------------------------------------------------------------------* @@ -157,7 +157,7 @@ void ivas_sba2mc_cldfb( float *p_real, *p_imag, *p_realOut, *p_imagOut; int16_t nb_channels_in; - wmops_sub_start( "ivas_sba2mc_cldfb" ); + push_wmops( "ivas_sba2mc_cldfb" ); nb_channels_in = hInSetup.nchan_out_woLFE; assert( ( nb_channels_in == 16 ) && ( nb_channels_out == 11 ) && "ivas_sba2mc_cldfb; only HOA3 to CICP19 is for now supported!" ); @@ -203,7 +203,7 @@ void ivas_sba2mc_cldfb( } } - wmops_sub_end(); + pop_wmops(); return; } @@ -305,35 +305,22 @@ void ivas_ism2sba( for ( i = 0; i < num_objects; i++ ) { -#ifdef FIX_REND_ISM_POS_ROUNDING // TODO tmu review when #215 is resolved azimuth = (int16_t) floorf( hIsmMetaData[i]->azimuth + 0.5f ); elevation = (int16_t) floorf( hIsmMetaData[i]->elevation + 0.5f ); -#else - azimuth = (int16_t) ( hIsmMetaData[i]->azimuth + 0.5f ); - elevation = (int16_t) ( hIsmMetaData[i]->elevation + 0.5f ); -#endif /*get HOA gets for direction (ACN/SN3D)*/ ivas_dirac_dec_get_response( azimuth, elevation, gains, sba_order ); for ( j = 0; j < sba_num_chans; j++ ) { -#ifdef FIX_REND_ISM_XFADE g1 = 1.f; -#endif g2 = 0.f; for ( k = 0; k < output_frame; k++ ) { -#ifdef FIX_REND_ISM_XFADE buffer_tmp[j][k] += ( g2 * gains[j] + g1 * hIsmRendererData->prev_gains[i][j] ) * buffer_td[i][k]; g2 += 1.f / ( output_frame - 1 ); g1 = 1.0f - g2; -#else - g2 += 1.f / output_frame; - g1 = 1.0f - g2; - buffer_tmp[j][k] += ( g2 * gains[j] + g1 * hIsmRendererData->prev_gains[i][j] ) * buffer_td[i][k]; -#endif } hIsmRendererData->prev_gains[i][j] = gains[j]; } @@ -509,7 +496,7 @@ void ivas_sba_upmixer_renderer( int16_t i, nchan_internal; float temp; - wmops_sub_start( "ivas_sba_upmixer_renderer" ); + push_wmops( "ivas_sba_upmixer_renderer" ); nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); @@ -532,7 +519,7 @@ void ivas_sba_upmixer_renderer( ivas_sba_linear_renderer( output, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); } - wmops_sub_end(); + pop_wmops(); return; } @@ -624,7 +611,7 @@ void ivas_sba_prototype_renderer( int16_t firstSlot, slotEnd, firstInCh, inChEnd, firstOutCh, outChEnd; int16_t sf_idx; - wmops_sub_start( "ivas_sba_prototype_renderer" ); + push_wmops( "ivas_sba_prototype_renderer" ); hSpar = st_ivas->hSpar; hDecoderConfig = st_ivas->hDecoderConfig; @@ -753,7 +740,48 @@ void ivas_sba_prototype_renderer( } } - wmops_sub_end(); + pop_wmops(); return; } + +#ifdef DEBUG_MODE_DIRAC +/*-----------------------------------------------------------------------* + * Debugging function + *-----------------------------------------------------------------------*/ + +static void debug_mode_dirac( + float output[MAX_OUTPUT_CHANNELS][L_FRAME48k], + const int16_t nchan_transport, + const int16_t output_frame ) +{ + int16_t i, n; + int16_t tmp[L_FRAME48k]; + char file_name[50] = { 0 }; + +#ifdef DEBUG_MODE_DIRAC_NOCORE + for ( n = 0; n < nchan_transport; n++ ) + { + sprintf( file_name, "./res/ivas_dirac_enc_%d.%d.pcm", n, (int16_t) ( output_frame * 0.05 ) ); + dbgread( tmp, sizeof( int16_t ), output_frame, file_name ); + for ( i = 0; i < output_frame; i++ ) + { + output[n][i] = (float) ( tmp[i] ); + } + } +#else + for ( n = 0; n < nchan_transport; n++ ) + { + for ( i = 0; i < output_frame; i++ ) + { + tmp[i] = (int16_t) ( output[n][i] + 0.5f ); + } + + sprintf( file_name, "./res/ivas_dirac_dec_%d.%d.pcm", n, (int16_t) ( output_frame * 0.05 ) ); + dbgwrite( tmp, sizeof( int16_t ), output_frame, 1, file_name ); + } +#endif + + return; +} +#endif diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index a38b8d96c1f428dcb1d4d858639fdda1de8d74b8..abb0bb12a77a89206e6dfa7b1b7bf53eb8cbd43c 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -34,10 +34,1033 @@ #define IVAS_STAT_REND_H #include +#ifdef FIX_197_CREND_INTERFACE +#include "cnst.h" #include "ivas_cnst.h" +#include "ivas_stat_com.h" +#include "common_api_types.h" // VE2AT: don't we want to avoid this include in the library? I admit that the rules hefre are not 100% clear to me but introducing it just for IVAS_QUATERNION is not necessry I think +#endif #define MAX_SPEAKERS 12 /* Max number of speakers (including LFE) in a channel-based config */ + +#ifdef FIX_197_CREND_INTERFACE + +#define RENDERER_HEAD_POSITIONS_PER_FRAME 4 // todo (Marc) -> renanr IVAS_RENDERER_HEAD_POSITIONS_PER_FRAME ? + +typedef float IVAS_REND_LfePanMtx[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS]; +typedef struct +{ + int16_t numSamplesPerChannel; + int16_t numChannels; +} IVAS_REND_AudioBufferConfig; + +typedef struct +{ + IVAS_REND_AudioBufferConfig config; + float *data; +} IVAS_REND_AudioBuffer; + +typedef struct +{ + IVAS_REND_AudioBufferConfig config; + const float *data; +} IVAS_REND_ReadOnlyAudioBuffer; + +typedef struct +{ + float azimuth; + float elevation; +} IVAS_REND_AudioObjectPosition; + +typedef struct IVAS_REND *IVAS_REND_HANDLE; +typedef struct IVAS_REND const *IVAS_REND_CONST_HANDLE; + +typedef enum +{ + IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED = 0, + IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS, + IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED, + IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL, + IVAS_REND_AUDIO_CONFIG_TYPE_MASA, + IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN, +} IVAS_REND_AudioConfigType; + +/* TODO(sgi): Harmonize with AUDIO_CONFIG */ +/* + Note: numerical values carry specific information here. + + MSB LSB + -------------------------------------------------------------------------------- + ... unused (assumed all 0) ... | config type (1 byte) | config variant (1 byte) | + -------------------------------------------------------------------------------- + + Where "config type" is the general type from the following list: + - unknown + - channel-based + - ambisonics + - object-based + - binaural + - MASA + + Config variants are concrete configs of each type. + */ +typedef enum +{ + IVAS_REND_AUDIO_CONFIG_MONO = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 0, + IVAS_REND_AUDIO_CONFIG_STEREO = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 1, + IVAS_REND_AUDIO_CONFIG_5_1 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 2, + IVAS_REND_AUDIO_CONFIG_7_1 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 3, + IVAS_REND_AUDIO_CONFIG_5_1_2 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 4, + IVAS_REND_AUDIO_CONFIG_5_1_4 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 5, + IVAS_REND_AUDIO_CONFIG_7_1_4 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 6, + IVAS_REND_AUDIO_CONFIG_LS_CUSTOM = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 255, + + IVAS_REND_AUDIO_CONFIG_FOA = IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS << 8 | 0, + IVAS_REND_AUDIO_CONFIG_HOA2 = IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS << 8 | 1, + IVAS_REND_AUDIO_CONFIG_HOA3 = IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS << 8 | 2, + + IVAS_REND_AUDIO_CONFIG_OBJECT = IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED << 8 | 0, + + IVAS_REND_AUDIO_CONFIG_BINAURAL = IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL << 8 | 0, + IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM = IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL << 8 | 1, + + IVAS_REND_AUDIO_CONFIG_MASA1 = IVAS_REND_AUDIO_CONFIG_TYPE_MASA << 8 | 0, + IVAS_REND_AUDIO_CONFIG_MASA2 = IVAS_REND_AUDIO_CONFIG_TYPE_MASA << 8 | 1, + + IVAS_REND_AUDIO_CONFIG_UNKNOWN = IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN << 8 | 0, +} IVAS_REND_AudioConfig; + +typedef uint16_t IVAS_REND_InputId; + +typedef struct +{ + int16_t numLfeChannels; + float lfeOutputGains[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS]; +} IVAS_REND_LfeRouting; + +typedef struct +{ + int8_t headRotEnabled; + IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; + float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; +} IVAS_REND_HeadRotData; + +/*----------------------------------------------------------------------------------* + * Binaural Rendering structure + *----------------------------------------------------------------------------------*/ +// VE2AT: move to ivas_rom_rend.h ? +/* Binaural reverberator structure */ +typedef struct ivas_binaural_reverb_struct +{ + float *loopBufReal[CLDFB_NO_CHANNELS_MAX]; + float *loopBufImag[CLDFB_NO_CHANNELS_MAX]; + float preDelayBufferReal[REVERB_PREDELAY_MAX + 1][CLDFB_NO_CHANNELS_MAX]; + float preDelayBufferImag[REVERB_PREDELAY_MAX + 1][CLDFB_NO_CHANNELS_MAX]; + float **tapPointersReal[CLDFB_NO_CHANNELS_MAX][BINAURAL_CHANNELS]; + float **tapPointersImag[CLDFB_NO_CHANNELS_MAX][BINAURAL_CHANNELS]; + + float binauralCoherenceCrossmixGains[CLDFB_NO_CHANNELS_MAX]; + float binauralCoherenceDirectGains[CLDFB_NO_CHANNELS_MAX]; + float reverbEqGains[CLDFB_NO_CHANNELS_MAX]; + float loopAttenuationFactor[CLDFB_NO_CHANNELS_MAX]; + + float *outputBufferReal[CLDFB_NO_CHANNELS_MAX][BINAURAL_CHANNELS]; + float *outputBufferImag[CLDFB_NO_CHANNELS_MAX][BINAURAL_CHANNELS]; + + int16_t numBins; + + int16_t useBinauralCoherence; + int16_t loopBufLength[CLDFB_NO_CHANNELS_MAX]; + int16_t loopBufLengthMax[CLDFB_NO_CHANNELS_MAX]; + int16_t preDelayBufferIndex; + int16_t preDelayBufferLength; + + int16_t taps[CLDFB_NO_CHANNELS_MAX][BINAURAL_CHANNELS]; + int16_t *tapPhaseShiftType[CLDFB_NO_CHANNELS_MAX][BINAURAL_CHANNELS]; + + int16_t blockSize; + uint32_t binRend_RandNext; + int16_t highestBinauralCoherenceBin; + + float dmxmtx[BINAURAL_CHANNELS][MAX_OUTPUT_CHANNELS]; + float foa_enc[MAX_OUTPUT_CHANNELS][FOA_CHANNELS]; + +} REVERB_STRUCT, *REVERB_STRUCT_HANDLE; + +/* AGC structure */ +typedef struct ivas_agc_dec_chan_state_t +{ + float lastGain; + int16_t gainExpVal; + +} ivas_agc_dec_chan_state_t; + +typedef struct ivas_agc_dec_state_t +{ + ivas_agc_com_state_t agc_com; + ivas_agc_dec_chan_state_t *gain_state; + ivas_agc_chan_data_t *gain_data; + +} ivas_agc_dec_state_t; + +/* TD decorr */ +typedef struct ivas_td_decorr_APD_filt_state_t +{ + int16_t order[IVAS_MAX_DECORR_APD_SECTIONS]; + int16_t idx[IVAS_MAX_DECORR_APD_SECTIONS]; + float coeffs[IVAS_MAX_DECORR_APD_SECTIONS]; + float *state[IVAS_MAX_DECORR_APD_SECTIONS]; + +} ivas_td_decorr_APD_filt_state_t; + +typedef struct ivas_td_decorr_state_t +{ + ivas_trans_det_state_t *pTrans_det; + float *look_ahead_buf; + ivas_td_decorr_APD_filt_state_t APD_filt_state[IVAS_MAX_DECORR_CHS]; + + int16_t num_apd_outputs; + int16_t num_apd_sections; + int16_t ducking_flag; + +} ivas_td_decorr_state_t; + +/* Parametric binaural data structure */ +typedef struct ivas_dirac_dec_binaural_data_structure +{ + float ChEnePrev[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + float ChCrossRePrev[CLDFB_NO_CHANNELS_MAX]; + float ChCrossImPrev[CLDFB_NO_CHANNELS_MAX]; + float ChEne[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + float ChCrossRe[CLDFB_NO_CHANNELS_MAX]; + float ChCrossIm[CLDFB_NO_CHANNELS_MAX]; + float ChEneOutPrev[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + float ChCrossReOutPrev[CLDFB_NO_CHANNELS_MAX]; + float ChCrossImOutPrev[CLDFB_NO_CHANNELS_MAX]; + float ChEneOut[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + float ChCrossReOut[CLDFB_NO_CHANNELS_MAX]; + float ChCrossImOut[CLDFB_NO_CHANNELS_MAX]; + float processMtxRe[BINAURAL_CHANNELS][BINAURAL_CHANNELS + 1][CLDFB_NO_CHANNELS_MAX]; /* +1 refers to SeparateChannel */ + float processMtxIm[BINAURAL_CHANNELS][BINAURAL_CHANNELS + 1][CLDFB_NO_CHANNELS_MAX]; + float processMtxDecRe[BINAURAL_CHANNELS][BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + float processMtxDecIm[BINAURAL_CHANNELS][BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + float diffuseFieldCoherence[CLDFB_NO_CHANNELS_MAX]; + float diffuseFieldCoherenceX[BINAURAL_COHERENCE_DIFFERENCE_BINS]; + float diffuseFieldCoherenceY[BINAURAL_COHERENCE_DIFFERENCE_BINS]; + float diffuseFieldCoherenceZ[BINAURAL_COHERENCE_DIFFERENCE_BINS]; + float earlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; + REVERB_STRUCT_HANDLE hReverb; + uint8_t renderStereoOutputInsteadOfBinaural; + float frameMeanDiffuseness[CLDFB_NO_CHANNELS_MAX]; + float processMtxRePrev[BINAURAL_CHANNELS][BINAURAL_CHANNELS + 1][CLDFB_NO_CHANNELS_MAX]; + float processMtxImPrev[BINAURAL_CHANNELS][BINAURAL_CHANNELS + 1][CLDFB_NO_CHANNELS_MAX]; + float processMtxDecRePrev[BINAURAL_CHANNELS][BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + float processMtxDecImPrev[BINAURAL_CHANNELS][BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; + uint16_t useSubframeMode; /* 0 = process in 20 ms frames, 1 = process in 5 ms subframes */ + uint16_t useTdDecorr; + ivas_td_decorr_state_t *hTdDecorr; + +} DIRAC_DEC_BIN_DATA, *DIRAC_DEC_BIN_HANDLE; + +typedef struct ivas_binaural_rendering_conv_module_struct +{ + float ***filterTapsLeftReal; + float ***filterTapsLeftImag; + float ***filterTapsRightReal; + float ***filterTapsRightImag; + + float ***filterStatesLeftReal; + float ***filterStatesLeftImag; + + int16_t numTapsArray[BINAURAL_CONVBANDS]; + int16_t numTaps; + +} BINRENDERER_CONV_MODULE, *BINRENDERER_CONV_MODULE_HANDLE; + +/*----------------------------------------------------------------------------------* + * Output configuration for renderer (e.g. DirAC, MASA, Binaural Renderer...) + *----------------------------------------------------------------------------------*/ +typedef struct ivas_output_setup_structure +{ + AUDIO_CONFIG output_config; + int16_t nchan_out_woLFE; /* number of output audio channels without LFE */ + int16_t ambisonics_order; + int8_t is_loudspeaker_setup; + int8_t is_planar_setup; + int8_t is_binaural_setup; + + int16_t num_lfe; + int16_t index_lfe[1]; + const float *ls_azimuth; + const float *ls_elevation; + + uint8_t separateChannelEnabled; + int16_t separateChannelIndex; + +} IVAS_OUTPUT_SETUP, *IVAS_OUTPUT_SETUP_HANDLE; + +/*----------------------------------------------------------------------------------* + * EFAP structures + *----------------------------------------------------------------------------------*/ +// VE2AT: move to ivas_rom_rend.h ? +typedef struct EFAP_VERTEX +{ + float azi; /* azimuth of the loudspeaker */ + float ele; /* elevation of the loudspeaker */ + float pos[3]; /* [x y z] cartesian coordinate vector */ + int16_t idx; /* integer, that corresponds to the first index for the LS in the 1D output */ + int16_t isNaN; /* used to indicate if the vertex is a virtual speaker */ + EFAP_VTX_DMX_TYPE dmxType; /* virtual speaker downmix type */ + +} EFAP_VERTEX; + +typedef struct EFAP_VERTEX_DATA +{ + EFAP_VERTEX *vertexArray; /* Array of vertices */ + int16_t numVtx; /* Number of vertices */ + int16_t *vtxOrder; /* Array that indicates the order of the vertex ranked by increasing azimuth */ + +} EFAP_VERTEX_DATA; + +typedef struct EFAP_POLYSET +{ + int16_t chan[EFAP_MAX_CHAN_NUM]; /* An array indicating the loudspeaker index of the polygon vertices */ + int16_t isNaN[EFAP_MAX_CHAN_NUM]; /* Indicates if one of the vertices isNaN */ + int16_t numChan; /* An integer between 0 and EFAP_MAX_CHAN_NUM corresponding to the number of vertices of the polygon */ + float polyAzi[EFAP_MAX_CHAN_NUM]; /* An array (same length as "chan"), with the azimuth of the channels */ + float polyEle[EFAP_MAX_CHAN_NUM]; /* An array (same length as "chan"), with the elevation of the channels */ + +} EFAP_POLYSET; + +typedef struct EFAP_LS_TRIANGLE +{ + int16_t LS[3]; /* Array indicating the loudspeaker index of the triangle vertices */ + +} EFAP_LS_TRIANGLE; + +typedef struct EFAP_POLYSET_DATA +{ + EFAP_POLYSET polysetArray[EFAP_MAX_POLY_SET]; /* Array of polygons */ + int16_t numPoly; /* Number of polygons */ + EFAP_LS_TRIANGLE triArray[EFAP_MAX_POLY_SET]; /* Array of triangles */ + int16_t numTri; /* Number of triangles */ + +} EFAP_POLYSET_DATA; + +typedef struct EFAP +{ + int16_t numSpk; /* Number of loudspeakers */ + float *aziSpk; /* Loudspeaker azimuths */ + float *eleSpk; /* Loudspeaker elevations */ + EFAP_VERTEX_DATA vtxData; /* Vertex Data, contains all the data concerning the vertex */ + EFAP_POLYSET_DATA polyData; /* Polygon data */ + float **dmTranspose; /* Downmix Matrix used for redistributing the energy of ghosts LS and its transpose */ + float *bufferLong; /* tmp buffer that will be given as a parameter for computing the gain; this is a 1D array of length numVtx */ + float *bufferShort; /* tmp buffer that will be given as a parameter for computing the gain; this is the result of downMixMatrix*bufferLong, length is numSpk */ + int16_t numTot; /* Total number of real + ghost loudspeakers, used later for freeing memory */ + +} EFAP, *EFAP_HANDLE; + + +/*----------------------------------------------------------------------------------* + * VBAP structures + *----------------------------------------------------------------------------------*/ +// VE2AT: move to ivas_rom_rend.h ? +enum SpeakerNodeGroup +{ + SPEAKER_NODE_BOTTOM_HALF, + SPEAKER_NODE_HORIZONTAL, + SPEAKER_NODE_TOP_HALF, + SPEAKER_NODE_BACK, + SPEAKER_NODE_ALL +}; + +/* Defines a single virtual surface triplet of loudspeakers + * with a precalculated inverse matrix */ +typedef struct vbap_vs_triplet_structure +{ + uint8_t speaker_node[3]; + float inverse_matrix[3][3]; + +} VBAP_VS_TRIPLET; + +/* Defines a single speaker node */ +typedef struct vbap_speaker_node_structure +{ + float azi_deg; + float ele_deg; + float unit_vec[3]; + enum SpeakerNodeGroup group; + +} VBAP_SPEAKER_NODE; + +/* Storage structure for fast runtime triplet search */ +typedef struct triplet_search_structure +{ + VBAP_VS_TRIPLET *triplets; + int16_t num_triplets; + int16_t initial_search_indices[VBAP_NUM_SEARCH_SECTORS]; + +} VBAP_SEARCH_STRUCT; + +/* VBAP data structure. Contains the formed virtual surface arrangement * and supporting data. */ +typedef struct vbap_data_structure +{ + VBAP_SEARCH_STRUCT search_struct[2]; /* Default to max two groups in this implementation */ + int16_t num_search_structs; + int16_t num_speaker_nodes; + int16_t num_speaker_nodes_internal; + int16_t top_virtual_speaker_node_index; /* These indices can be negative */ + int16_t bottom_virtual_speaker_node_index; + int16_t back_virtual_speaker_node_index; + float *bottom_virtual_speaker_node_division_gains; + float *top_virtual_speaker_node_division_gains; + float *back_virtual_speaker_node_division_gains; + +} VBAP_DATA, *VBAP_HANDLE; + + +/*----------------------------------------------------------------------------------* + * renderer structures + *----------------------------------------------------------------------------------*/ +// VE2AT: move to ivas_rom_rend.h ? +typedef struct renderer_struct +{ + float prev_gains[MAX_CICP_CHANNELS - 1][MAX_OUTPUT_CHANNELS]; + float interpolator[L_FRAME48k]; + +} ISM_RENDERER_DATA, *ISM_RENDERER_HANDLE; + +/* Fastconv binaural data structure */ +typedef struct ivas_binaural_rendering_struct +{ + /* Common variables for all modules */ + IVAS_OUTPUT_SETUP_HANDLE hInputSetup; /* pointer to input spatial format for binaural renderer*/ + EFAP_HANDLE hEFAPdata; /* EFAP structure*/ + float *hoa_dec_mtx; /* pointer to HOA decoder mtx */ + int8_t rotInCldfb; /* Flag to enable rotation within bin Renderer in CLDFB*/ + int16_t max_band; /* band upto which rendering is performed */ + int16_t conv_band; /* band upto which convolution in cldfb domain is performed */ + int16_t timeSlots; /* number of time slots of binaural renderer */ + int16_t nInChannels; /* number input channels */ + int8_t render_lfe; /* Flag to render LFE in binaural rendering*/ + IVAS_FORMAT ivas_format; /* format; corresponds to st_ivas->ivas_format, unless the signal gets transormed to a different domain for rendering */ + + /* Convolution module structure */ + BINRENDERER_CONV_MODULE_HANDLE hBinRenConvModule; + + /* Variables related to reverb module */ + float earlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; + REVERB_STRUCT_HANDLE hReverb; + +} BINAURAL_RENDERER, *BINAURAL_RENDERER_HANDLE; + + +/*----------------------------------------------------------------------------------* + * Head tracking data structure + *----------------------------------------------------------------------------------*/ +// VE2AT: move to ivas_rom_rend.h ? + +typedef struct ivas_binaural_head_track_struct +{ + int16_t num_quaternions; + IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; + float Rmat[3][3]; + float Rmat_prev[3][3]; + + uint8_t lrSwitchedNext; + uint8_t lrSwitchedCurrent; + float lrSwitchInterpVal; + + int16_t shd_rot_max_order; + +} HEAD_TRACK_DATA, *HEAD_TRACK_DATA_HANDLE; + +/* Reverberator structures */ + + +typedef struct ivas_roomAcoustics_t +{ + int16_t override; + int16_t use_brir; + int16_t late_reverb_on; + int16_t nBands; /* Number of frequency bands for which reverb properties are provided, integer, range [2..256] */ + float pFc_input[CLDFB_NO_CHANNELS_MAX]; /* Center frequencies for which following values are provided: */ + float pAcoustic_rt60[CLDFB_NO_CHANNELS_MAX]; /* - The room's T60 per center frequency */ + float pAcoustic_dsr[CLDFB_NO_CHANNELS_MAX]; /* - The room's Diffuse to Source Ratio per center frequency */ + float acousticPreDelay; /* Time elapsed between input signal and late reverberation start, float, range [0.001..10] */ + float inputPreDelay; /* Offset in seconds from where DSR is computed in the RIR (0 = at source), float, range [0.001..10] */ + +} ivas_roomAcoustics_t; + +typedef struct ivas_render_config_t +{ +#ifdef DEBUGGING + ivas_renderTypeOverride renderer_type_override; +#endif + ivas_roomAcoustics_t roomAcoustics; + +} RENDER_CONFIG_DATA, *RENDER_CONFIG_HANDLE; + + +typedef struct ivas_rev_delay_line_t +{ + float *pBuffer; + uint16_t MaxDelay; + int16_t Delay; + uint16_t BufferPos; + float Gain; + +} ivas_rev_delay_line_t; + +typedef struct ivas_rev_iir_filter_t +{ + uint16_t MaxTaps; + uint16_t nr_taps; + uint16_t isFIR; + float Output; + float CoefA[IVAS_REV_MAX_IIR_FILTER_LENGTH]; + float CoefB[IVAS_REV_MAX_IIR_FILTER_LENGTH]; + float pBuffer[IVAS_REV_MAX_IIR_FILTER_LENGTH]; + +} ivas_rev_iir_filter_t; + + +typedef float rv_fftwf_type_complex[2]; /* complex type of fftwf library */ + +/* Convertion block for FFT filter: from time domain to frequency domain (with OLS) and back */ +typedef struct ivas_reverb_t2f_f2t_t +{ + int16_t fft_size; + int16_t log2_fft_size; + int16_t block_size; + int16_t hist_size; /* rv_fft_size - rv_block_size */ + float fft_history_L[RV_FILTER_MAX_HISTORY]; + float fft_history_R[RV_FILTER_MAX_HISTORY]; + +} ivas_reverb_t2f_f2t_t; + +/* FFT filter with its frequency response coefficients */ +typedef struct ivas_reverb_fft_filter_t +{ + int16_t fft_size; + float fft_spectrum[RV_FILTER_MAX_FFT_SIZE]; + +} ivas_reverb_fft_filter_t; + + +typedef struct ivas_reverb_state_t +{ + RENDER_CONFIG_DATA pConfig; + + /* input downmixer: */ + float dmx_gain; /* downmix gain */ + + /* predelay: */ + ivas_rev_delay_line_t predelay_line; + float *pPredelay_buffer; + + /* jot reverberator: */ + uint16_t nr_of_branches; /* number of feedback loops */ + ivas_rev_delay_line_t delay_line[IVAS_REV_MAX_NR_BRANCHES]; /* feedback loop delays */ + float *loop_delay_buffer[IVAS_REV_MAX_NR_BRANCHES]; /* feedback loop delay sample buffers */ + ivas_rev_iir_filter_t t60[IVAS_REV_MAX_NR_BRANCHES]; /* feedback loop filters */ + float gain_matrix[IVAS_REV_MAX_NR_BRANCHES][IVAS_REV_MAX_NR_BRANCHES]; /* feedback matrix */ + float mixer[BINAURAL_CHANNELS][IVAS_REV_MAX_NR_BRANCHES]; /* output mixer matrix */ + + /* binauralization filters: */ + int16_t do_corr_filter; + ivas_reverb_t2f_f2t_t fft_filter_ols; + ivas_reverb_fft_filter_t fft_filter_correl_0; + ivas_reverb_fft_filter_t fft_filter_correl_1; + ivas_reverb_fft_filter_t fft_filter_color_0; + ivas_reverb_fft_filter_t fft_filter_color_1; + uint16_t fft_size; /* fft processing size */ + uint16_t fft_subblock_size; /* fft block processing size */ + uint16_t num_fft_subblocks; /* number of fft subblocks */ + uint16_t full_block_size; /* full block processing size */ + +} REVERB_DATA, *REVERB_HANDLE; + + +typedef struct ivas_orient_trk_state_t +{ + OTR_TRACKING_T trackingType; + float centerAdaptationRate; + float offCenterAdaptationRate; + float adaptationAngle; + + float alpha; + + float absYaw; /* absolute orientation */ + float absPitch; + float absRoll; + + float absAvgYaw; /* average absolute orientation */ + float absAvgPitch; + float absAvgRoll; + + float refYaw; /* reference orientation */ + float refPitch; + float refRoll; + + float trkYaw; /* tracked orientation */ + float trkPitch; + float trkRoll; + +} ivas_orient_trk_state_t; + + +/*----------------------------------------------------------------------------------* + * TD ISm Object Renderer structure + *----------------------------------------------------------------------------------*/ + + +typedef struct +{ + int16_t modelROM; /* Flag that indicates that the model resides in ROM (controls init/dealloc). */ + int16_t UseItdModel; /* Controls whether ITD model is used. */ + int16_t SplineDegree; /* Degree of the spline functions */ + int16_t K; /* Length of filter */ + int16_t elevDim2; + int16_t elevDim3; + int16_t AlphaN; /* Number of rows in Alpha matrices */ + int16_t num_unique_azim_splines; + int16_t elevSegSamples; + + int16_t elevBsLen[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + int16_t elevBsStart[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + const int16_t *azimDim2; + const int16_t *azimDim3; + const int16_t *azim_start_idx; + const int16_t *azimSegSamples; + const int16_t *azimShapeIdx; + const int16_t *azimShapeSampFactor; + + const float *elevKSeq; /* Array, N x elevDim2 x elevDim3 */ + const float *AlphaL; /* Array, size AlphaN x K */ + const float *AlphaR; /* Array, size AlphaN x K */ + const float *elevBsShape; + float **azimKSeq; /* Array, length azimDim3+1 */ + const float **azimBsShape; + + int16_t azimDim3Max; + int16_t iSecFirst[HRTF_MODEL_N_SECTIONS]; /* Indices for start of sections */ + int16_t iSecLast[HRTF_MODEL_N_SECTIONS]; /* Indices for end of sections */ + const float *EL; /* Array, size (AlphaN*HRTF_MODEL_N_SECTIONS) */ + const float *ER; /* Array, size (AlphaN*HRTF_MODEL_N_SECTIONS) */ + + /* Pointers for allocation of dynamic memory */ + float *AlphaL_dyn; + float *AlphaR_dyn; + float *EL_dyn; + float *ER_dyn; + float *elevBsShape_dyn; + float *elevKSeq_dyn; + int16_t *azimDim2_dyn; + int16_t *azimDim3_dyn; + int16_t *azim_start_idx_dyn; + int16_t *azimSegSamples_dyn; + int16_t *azimShapeIdx_dyn; + int16_t *azimShapeSampFactor_dyn; + float **azimBsShape_dyn; + +} ModelParams_t; + +typedef struct +{ + int16_t N; /* Polynomial degree */ + + int16_t elevDim2; + int16_t elevDim3; + const float *elevKSeq; /* Array, length elevDim3-2 */ + int16_t azimDim2; + int16_t azimDim3; + const float *azimKSeq; /* Array, length azimDim3-2 */ + const float *W; /* Array, size (elevDim3*azimDim3) x K */ + + int16_t azimBsLen[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + int16_t azimBsStart[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + const float *azimBsShape; + int16_t azimSegSamples; + + int16_t elevBsLen[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + int16_t elevBsStart[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + const float *elevBsShape; + int16_t elevSegSamples; + float resamp_factor; + + /* Pointers for allocation of dynamic memory */ + float *elevKSeq_dyn; + float *azimKSeq_dyn; + float *W_dyn; + float *azimBsShape_dyn; + float *elevBsShape_dyn; + +} ModelParamsITD_t; + +typedef struct +{ + float val; + int16_t i; + +} ValueIndex_t; + +/* Shared memory for use when evaluating BSpline HR filter model*/ +typedef struct +{ + float BM[HRTF_MODEL_BSPLINE_NUM_COEFFS_SQ]; + ValueIndex_t BMEnergiesL[HRTF_MODEL_BSPLINE_NUM_COEFFS_SQ]; + ValueIndex_t BMEnergiesR[HRTF_MODEL_BSPLINE_NUM_COEFFS_SQ]; + int16_t UseIndsL[HRTF_MODEL_BSPLINE_NUM_COEFFS_SQ]; + int16_t UseIndsR[HRTF_MODEL_BSPLINE_NUM_COEFFS_SQ]; + float *hrfModL; + float *hrfModR; + float elevBfVec[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + float azimBfVec[HRTF_MODEL_BSPLINE_NUM_COEFFS][HRTF_MODEL_BSPLINE_NUM_COEFFS]; + float BM_ITD[HRTF_MODEL_BSPLINE_NUM_COEFFS_SQ]; + float elevBfVecITD[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + float azimBfVecITD[HRTF_MODEL_BSPLINE_NUM_COEFFS]; + float itdMod; + +} ModelEval_t; + +/* Mixer listener */ +typedef struct +{ + int16_t PoseUpdated; + float Pos[3]; + float Front[3]; + float Up[3]; + float Right[3]; + + int16_t VelUpdated; + float Vel[3]; + +} TDREND_MIX_Listener_t; + +/* HR filter */ +typedef struct TDREND_HRFILT_FiltSet_struct +{ + int32_t SampleRate; /* Sample rate of the HR filter */ + int16_t NumPos; + int16_t NumElev; + float Dist; + float *ItdSet_p; + int16_t FiltLength; + float *Azim_p; + float *Elev_p; + float *ItdSetNominal_p; + float *LeftFiltSet_p; + float *RightFiltSet_p; + ModelParams_t ModelParams; + ModelEval_t ModelEval; + ModelParamsITD_t ModelParamsITD; + TDREND_HRFILT_Method_t FilterMethod; /* HR filtering method */ +#ifdef FIX_310_TD_REND_DELAY + float latency_s; +#endif + +} TDREND_HRFILT_FiltSet_t; + + +/* Distance attenuation */ +typedef struct +{ + TDREND_DistAttenModel_t DistAttenModel; + float RefDist; + float MaxDist; + float RollOffFactor; + +} TDREND_DistAtten_t; + +/* Directional attenuation */ +typedef struct +{ + float ConeInnerAngle; + float ConeOuterAngle; + float ConeOuterGain; + +} TDREND_DirAtten_t; + +/* Mixer spatial specification */ +typedef struct +{ + int16_t UseCommonDistAttenModel; /* Common distance attenuation model flag */ + TDREND_DistAttenModel_t DistAttenModel; /* Distance attenuation model */ + +} TDREND_MixSpatSpec_t; + + +typedef struct TDREND_SRC_REND_s +{ + int16_t InputAvailable; + TDREND_PlayStatus_t PlayStatus; + + /* Gains */ + int16_t SrcGainUpdated; + float SrcGain_p[SPAT_BIN_MAX_INPUT_CHANNELS]; + float SrcGainMin_p[SPAT_BIN_MAX_INPUT_CHANNELS]; + float SrcGainMax_p[SPAT_BIN_MAX_INPUT_CHANNELS]; + float DirGain_p[SPAT_BIN_MAX_INPUT_CHANNELS]; + float DistGain_p[SPAT_BIN_MAX_INPUT_CHANNELS]; +} TDREND_SRC_REND_t; + + +/* Source spatial parameters */ +typedef struct +{ + int16_t Updated; + TDREND_PosType_t PosType; + float Pos_p[3 * SPAT_BIN_MAX_INPUT_CHANNELS]; + float Front_p[3 * SPAT_BIN_MAX_INPUT_CHANNELS]; + int16_t DirAttenEnabled; + TDREND_DirAtten_t DirAtten; + int16_t DistAttenEnabled; + TDREND_DistAtten_t DistAtten; + +} TDREND_SRC_SPATIAL_t; + +typedef struct +{ + float *InputFrame_p; /* Input frame pointer */ + TDREND_SRC_SPATIAL_t *SrcSpatial_p; + TDREND_SRC_REND_t *SrcRend_p; + int16_t itd; + int16_t previtd; + int16_t filterlength; + float mem_itd[ITD_MEM_LEN]; + float hrf_left_prev[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; /* Todo: Should we allocate these buffers with malloc() instead of the maximum length? */ + float hrf_right_prev[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; + float azim_prev; + float elev_prev; + float mem_hrf_left[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; + float mem_hrf_right[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; + float Gain; +} TDREND_SRC_t; + +/* Top level TD binaural renderer handle */ +typedef struct ivas_binaural_td_rendering_struct +{ + TDREND_MixSpatSpec_t *TdRend_MixSpatSpec_p; + TDREND_DirAtten_t *DirAtten_p; + int16_t NumOfSrcs; + int16_t MaxSrcInd; + + TDREND_SRC_t *Sources[MAX_NUM_TDREND_CHANNELS]; + + float Gain; /* Mixer gain */ + TDREND_MIX_Listener_t *Listener_p; /* The virtual listener */ + TDREND_HRFILT_FiltSet_t *HrFiltSet_p; /* HR filter set */ + + int16_t UseCommonDistAttenModel; /* Use common dist atten model (TRUE/FALSE) */ + int16_t DistAttenEnabled; /* (TRUE/FALSE) */ + TDREND_DistAttenModel_t DistAttenModel; /* Common distance attenuation model */ + +} BINAURAL_TD_OBJECT_RENDERER, *BINAURAL_TD_OBJECT_RENDERER_HANDLE; + +/*------------------------------------------------------------------------------------------* + * Crend structures + *------------------------------------------------------------------------------------------*/ +// VE2AT: move to ivas_rom_rend.h ? +typedef struct ivas_hrtfs_structure +{ + float *pOut_to_bin_re[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; + float *pOut_to_bin_im[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; + float *pOut_to_bin_diffuse_re[BINAURAL_CHANNELS]; + float *pOut_to_bin_diffuse_im[BINAURAL_CHANNELS]; + float latency_s; + uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; + uint16_t num_iterations_diffuse[BINAURAL_CHANNELS]; + uint16_t *pIndex_frequency_max[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; + uint16_t *pIndex_frequency_max_diffuse[BINAURAL_CHANNELS]; + uint16_t index_frequency_max_diffuse; + int16_t max_num_ir; + int16_t max_num_iterations; + float inv_diffuse_weight[MAX_INTERN_CHANNELS]; /* inverse diffuse weights array, access one inverse weight by pInvDiffuseWeight[channel] */ + float gain_lfe; + +} HRTFS_DATA, *HRTFS_HANDLE; + + +/* Main Crend structure */ +typedef struct ivas_crend_state_t +{ + float *freq_buffer_re[MAX_INTERN_CHANNELS]; + float *freq_buffer_im[MAX_INTERN_CHANNELS]; + float *freq_buffer_re_diffuse; + float *freq_buffer_im_diffuse; + float *prev_out_buffer[BINAURAL_CHANNELS]; + float *lfe_delay_line; + float m_fYaw; + float m_fPitch; + float m_fRoll; + ivas_orient_trk_state_t *hTrack; + REVERB_HANDLE hReverb; + int16_t delay_line_rw_index; + int16_t diffuse_delay_line_rw_index; + +} CREND_DATA, *CREND_HANDLE; + +/* Main Crend wrapper structure */ +typedef struct ivas_binaural_crend_wrapper_struct +{ + int32_t binaural_latency_ns; + CREND_HANDLE hCrend; + HRTFS_HANDLE hHrtfCrend; +} CREND_WRAPPER, *CREND_WRAPPER_HANDLE; + + +#ifdef HRTF_BINARY_FILE + +/* htrfs from binary files. */ + +typedef struct ivas_hrtfs_crend_structure +{ + HRTFS_DATA *hHRTF_hrir_combined; + HRTFS_DATA *hHRTF_hrir_hoa3; + HRTFS_DATA *hHRTF_brir_combined; + +} HRTFS_CREND, *HRTFS_CREND_HANDLE; + +typedef struct ivas_hrtfs_header_t +{ + int32_t rend_type; + int32_t input_cfg; + int32_t frequency; + uint32_t data_size; + +} ivas_hrtfs_header_t; + +typedef struct ivas_hrtfs_file_header_t +{ + char identifier[8]; + int32_t file_size; + int16_t nb_hrtf; + int32_t max_data_size; + +} ivas_hrtfs_file_header_t; + +#endif + +#ifdef HRTF_BINARY_FILE +typedef struct ivas_hrtfs_fastconv_struct +{ + float FASTCONV_HRIR_latency_s; + float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][7]; + + float FASTCONV_HOA3_latency_s; + float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][7]; + + float FASTCONV_BRIR_latency_s; + float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; + + float fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX]; + float fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; +} HRTFS_FASTCONV, *HRTFS_FASTCONV_HANDLE; + +#endif + +#ifdef HRTF_BINARY_FILE +typedef struct ivas_hrtfs_parambin_struct +{ + float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; + float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; + + float parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX]; + float parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; + float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; +} HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE; + +#endif + +/*----------------------------------------------------------------------------------* + * LFE decoder structure + *----------------------------------------------------------------------------------*/ + +typedef struct ivas_lfe_dec_data_structure +{ + ivas_filters_process_state_t filter_state; + LFE_WINDOW_HANDLE pWindow_state; + const uint16_t *cum_freq_models[IVAS_MAX_NUM_QUANT_STRATS][IVAS_MAX_NUM_DCT_COEF_GROUPS]; + int16_t lfe_dec_indices_coeffs_tbl[IVAS_MAX_NUM_QUANT_STRATS][IVAS_MAX_NUM_DCT_COEF_GROUPS]; + float lfe_block_delay_s; + int16_t lfe_prior_buf_len; + float *prior_out_buffer; + + float *prevsynth_buf; + float *lfe_delay_buf; + int16_t lfe_addl_delay; + int16_t bfi_count; + +} LFE_DEC_DATA, *LFE_DEC_HANDLE; + + +/*----------------------------------------------------------------------------------* + * Limiter structure + *----------------------------------------------------------------------------------*/ + +typedef struct +{ + int16_t max_num_channels; + int16_t num_channels; + float **channel_ptrs; + int32_t sampling_rate; + float gain; + float release_heuristic; + float attack_constant; + int16_t strong_saturation_count; +#ifdef DEBUGGING + int32_t cnt_frames_limited; /* counter of frames in which the limiter is applied */ +#endif + +} IVAS_LIMITER, *IVAS_LIMITER_HANDLE; + + +/*----------------------------------------------------------------------------------* + * Decoder configuration structure + *----------------------------------------------------------------------------------*/ + +typedef struct decoder_config_structure +{ + int32_t ivas_total_brate; /* IVAS total bitrate in bps */ + int32_t last_ivas_total_brate; /* last IVAS total bitrate in bps */ + int32_t output_Fs; /* output signal sampling frequency in Hz */ + int16_t nchan_out; /* number of output audio channels */ + AUDIO_CONFIG output_config; /* output audio configuration */ + int16_t Opt_LsCustom; /* indicates whether loudspeaker custom setup is used */ + int16_t Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ + int16_t Opt_Headrotation; /* indicates whether head-rotation is used */ + int16_t orientation_tracking; /* indicates orientation tracking type */ + float no_diegetic_pan; + int16_t Opt_AMR_WB; /* flag indicating AMR-WB IO mode */ + + /* temp. development parameters */ +#ifdef DEBUGGING + int16_t forceSubframeBinauralization; /* Flag for forcing Parametric binauralizer to subframe mode */ + int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */ +#endif + +} DECODER_CONFIG, *DECODER_CONFIG_HANDLE; + +typedef struct +{ + int32_t binaural_latency_ns; + BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd; + TDREND_HRFILT_FiltSet_t *hHrtfTD; +} TDREND_WRAPPER, *TDREND_WRAPPER_HANDLE; +#endif + /*----------------------------------------------------------------------------------* * Loudspeaker Configuration Conversion structure *----------------------------------------------------------------------------------*/ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 179b8214b58a531a40a312459f3de508b9dcac11..a6fb9c7cd58a02ee913d7f96e2617012ae3990c7 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,8 +38,11 @@ #include "ivas_rom_dec.h" #include "ivas_rom_rend.h" #include "ivas_lib_rend_internal.h" +#ifdef FIX_197_CREND_INTERFACE +#include "lib_rend.h" +#endif #include "prot.h" -#include "wmops.h" +#include "wmc_auto.h" #include #include @@ -111,10 +114,24 @@ typedef struct IVAS_REND_AudioObjectPosition currentPos; IVAS_REND_AudioObjectPosition previousPos; TDREND_WRAPPER tdRendWrapper; +#ifdef FIX_197_CREND_INTERFACE + CREND_WRAPPER_HANDLE crendWrapper; +#else CREND_WRAPPER crendWrapper; +#endif rotation_matrix rot_mat_prev; } input_ism; +typedef struct +{ + int16_t numLfeChannels; + bool pan_lfe; + float lfeInputGain; + float lfeOutputAzimuth; + float lfeOutputElevation; + IVAS_REND_LfePanMtx lfePanMtx; +} lfe_routing; + typedef struct { input_base base; @@ -126,16 +143,24 @@ typedef struct LSSETUP_CUSTOM_STRUCT customLsInput; EFAP_WRAPPER efapInWrapper; TDREND_WRAPPER tdRendWrapper; +#ifdef FIX_197_CREND_INTERFACE + CREND_WRAPPER_HANDLE crendWrapper; +#else CREND_WRAPPER crendWrapper; +#endif rotation_gains rot_gains_prev; - IVAS_REND_LfeRouting lfeRouting; + lfe_routing lfeRouting; } input_mc; typedef struct { input_base base; pan_matrix hoaDecMtx; +#ifdef FIX_197_CREND_INTERFACE + CREND_WRAPPER_HANDLE crendWrapper; +#else CREND_WRAPPER crendWrapper; +#endif rotation_gains rot_gains_prev; } input_sba; @@ -287,7 +312,11 @@ static int32_t limitRendererOutput( return numClipping; } +#ifdef FIX_197_CREND_INTERFACE +AUDIO_CONFIG getIvasAudioConfigFromRendAudioConfig( +#else static AUDIO_CONFIG rendAudioConfigToIvasAudioConfig( // VE2AT: similar is defined again at line 397, why? +#endif IVAS_REND_AudioConfig rendConfig ) { switch ( rendConfig ) @@ -433,11 +462,46 @@ ivas_error getAudioConfigNumChannels( return IVAS_ERR_OK; } +#ifdef FIX_197_CREND_INTERFACE +IVAS_REND_AudioConfig getRendAudioConfigFromIvasAudioConfig( + AUDIO_CONFIG config ) +#else AUDIO_CONFIG getIvasAudioConfigFromRendAudioConfig( IVAS_REND_AudioConfig config ) +#endif { switch ( config ) { +#ifdef FIX_197_CREND_INTERFACE + case AUDIO_CONFIG_MONO: + return IVAS_REND_AUDIO_CONFIG_MONO; + case AUDIO_CONFIG_STEREO: + return IVAS_REND_AUDIO_CONFIG_STEREO; + case AUDIO_CONFIG_BINAURAL: + return IVAS_REND_AUDIO_CONFIG_BINAURAL; + case AUDIO_CONFIG_BINAURAL_ROOM: + return IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM; + case AUDIO_CONFIG_5_1: + return IVAS_REND_AUDIO_CONFIG_5_1; + case AUDIO_CONFIG_7_1: + return IVAS_REND_AUDIO_CONFIG_7_1; + case AUDIO_CONFIG_5_1_2: + return IVAS_REND_AUDIO_CONFIG_5_1_2; + case AUDIO_CONFIG_5_1_4: + return IVAS_REND_AUDIO_CONFIG_5_1_4; + case AUDIO_CONFIG_7_1_4: + return IVAS_REND_AUDIO_CONFIG_7_1_4; + case AUDIO_CONFIG_FOA: + return IVAS_REND_AUDIO_CONFIG_FOA; + case AUDIO_CONFIG_HOA2: + return IVAS_REND_AUDIO_CONFIG_HOA2; + case AUDIO_CONFIG_HOA3: + return IVAS_REND_AUDIO_CONFIG_HOA3; + default: + break; + } + return IVAS_REND_AUDIO_CONFIG_UNKNOWN; +#else case IVAS_REND_AUDIO_CONFIG_MONO: return AUDIO_CONFIG_MONO; case IVAS_REND_AUDIO_CONFIG_STEREO: @@ -463,8 +527,10 @@ AUDIO_CONFIG getIvasAudioConfigFromRendAudioConfig( case IVAS_REND_AUDIO_CONFIG_HOA3: return AUDIO_CONFIG_HOA3; default: - return AUDIO_CONFIG_INVALID; + break; } + return AUDIO_CONFIG_INVALID; +#endif } static ivas_error initLimiter( @@ -604,6 +670,26 @@ static ivas_error getAmbisonicsOrder( return IVAS_ERR_OK; } +static int16_t getNumLfeChannels( + input_mc *inputMc ) +{ + switch ( inputMc->base.inConfig ) + { + case IVAS_REND_AUDIO_CONFIG_5_1: + case IVAS_REND_AUDIO_CONFIG_7_1: + case IVAS_REND_AUDIO_CONFIG_5_1_2: + case IVAS_REND_AUDIO_CONFIG_5_1_4: + case IVAS_REND_AUDIO_CONFIG_7_1_4: + return 1; + case IVAS_REND_AUDIO_CONFIG_LS_CUSTOM: + return inputMc->customLsInput.num_lfe; + default: + break; + } + + return 0; +} + static ivas_error getNumNonLfeChannelsInSpeakerLayout( IVAS_REND_AudioConfig config, int16_t *numNonLfeChannels ) @@ -962,7 +1048,11 @@ static ivas_error setRendInputActiveIsm( inputIsm->currentPos = defaultObjectPosition(); inputIsm->previousPos = defaultObjectPosition(); +#ifdef FIX_197_CREND_INTERFACE + inputIsm->crendWrapper = NULL; +#else inputIsm->crendWrapper = defaultCrendWrapper(); +#endif inputIsm->tdRendWrapper = defaultTdRendWrapper(); initRotMatrix( inputIsm->rot_mat_prev ); @@ -977,6 +1067,12 @@ static ivas_error setRendInputActiveIsm( IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, +#ifdef FIX_197_CREND_INTERFACE + 0, +#endif +#ifdef HRTF_BINARY_FILE + NULL, +#endif *rendCtx.pOutSampleRate ); } if ( error != IVAS_ERR_OK ) @@ -997,7 +1093,11 @@ static void clearInputIsm( initRendInputBase( &inputIsm->base, IVAS_REND_AUDIO_CONFIG_UNKNOWN, 0, rendCtx ); /* Free input's internal handles */ +#ifdef FIX_197_CREND_INTERFACE + if ( inputIsm->crendWrapper != NULL ) +#else if ( inputIsm->crendWrapper.hCrend != NULL ) +#endif { ivas_rend_closeCrend( &inputIsm->crendWrapper ); } @@ -1072,8 +1172,13 @@ static ivas_error initMcPanGainsWithConversionMapping( AUDIO_CONFIG ivasConfigIn, ivasConfigOut; int16_t i; +#ifdef FIX_197_CREND_INTERFACE + ivasConfigIn = getIvasAudioConfigFromRendAudioConfig( inputMc->base.inConfig ); + ivasConfigOut = getIvasAudioConfigFromRendAudioConfig( outConfig ); +#else ivasConfigIn = rendAudioConfigToIvasAudioConfig( inputMc->base.inConfig ); ivasConfigOut = rendAudioConfigToIvasAudioConfig( outConfig ); +#endif /* Find conversion mapping for current I/O config pair. * Stay with default panning matrix if conversion_matrix is NULL */ @@ -1198,11 +1303,9 @@ static ivas_error initMcPanGainsWithMonoOut( { int16_t i; int16_t numInChannels; -#ifdef FIX_REND_MONO_DMX int16_t readIdx; int16_t writeIdx; bool skipSideSpeakers; -#endif ivas_error error; if ( ( error = getRendInputNumChannels( inputMc, &numInChannels ) ) != IVAS_ERR_OK ) @@ -1210,7 +1313,6 @@ static ivas_error initMcPanGainsWithMonoOut( return error; } -#ifdef FIX_REND_MONO_DMX if ( inputMc->base.inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { for ( i = 0; i < numInChannels; ++i ) @@ -1246,14 +1348,6 @@ static ivas_error initMcPanGainsWithMonoOut( inputMc->panGains[writeIdx][0] = ls_conversion_cicpX_mono[readIdx][0]; } } -#else - for ( i = 0; i < numInChannels; ++i ) - { - /* It's OK to also set gain 1 for LFE input channels here. - * Correct LFE handling will be applied within updateMcPanGains() */ - inputMc->panGains[i][0] = 1.f; - } -#endif return IVAS_ERR_OK; } @@ -1352,6 +1446,95 @@ static bool configsAreEqual( return configA == configB; } +static ivas_error updateLfePanGainsForMcOut( + input_mc *inputMc, + const IVAS_REND_AudioConfig outConfig ) +{ + int16_t i, numLfeIn, numOutChannels; + ivas_error error; + error = IVAS_ERR_OK; + + /* If panning is not required, simply return */ + if ( !inputMc->lfeRouting.pan_lfe ) + { + return error; + } + + numLfeIn = getNumLfeChannels( inputMc ); + + if ( outConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) + { + numOutChannels = inputMc->base.ctx.pCustomLsOut->num_spk + inputMc->base.ctx.pCustomLsOut->num_lfe; + } + else + { + if ( ( error = getAudioConfigNumChannels( outConfig, &numOutChannels ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + for ( i = 0; i < numLfeIn; i++ ) + { + /* panning gains */ + if ( ( error = getEfapGains( *inputMc->base.ctx.pEfapOutWrapper, + inputMc->lfeRouting.lfeOutputAzimuth, + inputMc->lfeRouting.lfeOutputElevation, + inputMc->lfeRouting.lfePanMtx[i] ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* linear input gain */ + v_multc( inputMc->lfeRouting.lfePanMtx[i], + inputMc->lfeRouting.lfeInputGain, + inputMc->lfeRouting.lfePanMtx[i], + numOutChannels ); + } + + return error; +} + +static ivas_error updateLfePanGainsForAmbiOut( + input_mc *inputMc, + const IVAS_REND_AudioConfig outConfig ) +{ + int16_t i; + int16_t numLfeIn, outAmbiOrder; + ivas_error error; + error = IVAS_ERR_OK; + + /* If panning is not required, simply return */ + if ( !inputMc->lfeRouting.pan_lfe ) + { + return error; + } + + if ( ( error = getAmbisonicsOrder( outConfig, &outAmbiOrder ) ) != IVAS_ERR_OK ) + { + return error; + } + + numLfeIn = getNumLfeChannels( inputMc ); + + for ( i = 0; i < numLfeIn; i++ ) + { + /* panning gains */ + ivas_dirac_dec_get_response( (int16_t) inputMc->lfeRouting.lfeOutputAzimuth, + (int16_t) inputMc->lfeRouting.lfeOutputElevation, + inputMc->lfeRouting.lfePanMtx[i], + outAmbiOrder ); + + /* linear input gain */ + v_multc( inputMc->lfeRouting.lfePanMtx[i], + inputMc->lfeRouting.lfeInputGain, + inputMc->lfeRouting.lfePanMtx[i], + IVAS_MAX_OUTPUT_CHANNELS ); + } + + return error; +} + static ivas_error updateMcPanGainsForMcOut( input_mc *inputMc, const IVAS_REND_AudioConfig outConfig ) @@ -1393,6 +1576,15 @@ static ivas_error updateMcPanGainsForMcOut( error = initMcPanGainsWithConversionMapping( inputMc, outConfig ); } + /* check for errors from above block */ + if ( error != IVAS_ERR_OK ) + { + return error; + } + + /* update LFE panning */ + error = updateLfePanGainsForMcOut( inputMc, outConfig ); + return error; } @@ -1455,6 +1647,12 @@ static ivas_error updateMcPanGainsForAmbiOut( } } + /* update LFE panning */ + if ( ( error = updateLfePanGainsForAmbiOut( inputMc, outConfig ) ) != IVAS_ERR_OK ) + { + return error; + } + return IVAS_ERR_OK; } @@ -1504,39 +1702,18 @@ static ivas_error updateMcPanGains( { for ( i = 0; i < inputMc->customLsInput.num_lfe; ++i ) { - mvr2r( inputMc->lfeRouting.lfeOutputGains[i], inputMc->panGains[inputMc->customLsInput.lfe_idx[i]], IVAS_MAX_OUTPUT_CHANNELS ); + mvr2r( inputMc->lfeRouting.lfePanMtx[i], inputMc->panGains[inputMc->customLsInput.lfe_idx[i]], IVAS_MAX_OUTPUT_CHANNELS ); } } else { /* For code simplicity, always copy LFE gains. If config has no LFE, gains will be zero anyway. */ - mvr2r( inputMc->lfeRouting.lfeOutputGains[0], inputMc->panGains[LFE_CHANNEL], IVAS_MAX_OUTPUT_CHANNELS ); + mvr2r( inputMc->lfeRouting.lfePanMtx[0], inputMc->panGains[LFE_CHANNEL], IVAS_MAX_OUTPUT_CHANNELS ); } return IVAS_ERR_OK; } -#ifndef FIX_ITD -#ifndef FIX_I81 -/* Fixes initialization issues in TD renderer. Fix to be merged with branch. - See issue: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/issues/81 */ -static void tmpFixBuggyTdBinRendInit( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd ) -{ - int16_t i, j; - - for ( i = 0; i < hBinRendererTd->NumOfSrcs; ++i ) - { - for ( j = 0; j < SPAT_BIN_MAX_INPUT_CHANNELS; ++j ) - { - hBinRendererTd->Sources[i]->SrcRend_p->SfxSpatBin_p[j].LeftFilter_p = NULL; - hBinRendererTd->Sources[i]->SrcRend_p->SfxSpatBin_p[j].LeftFilterIncr_p = NULL; - hBinRendererTd->Sources[i]->SrcRend_p->SfxSpatBin_p[j].RightFilter_p = NULL; - hBinRendererTd->Sources[i]->SrcRend_p->SfxSpatBin_p[j].RightFilterIncr_p = NULL; - } - } -} -#endif -#endif static ivas_error initMcBinauralRendering( input_mc *inputMc, @@ -1553,16 +1730,18 @@ static ivas_error initMcBinauralRendering( ivas_td_binaural_close( &inputMc->tdRendWrapper.hBinRendererTd ); inputMc->tdRendWrapper.hHrtfTD = NULL; } +#ifdef FIX_197_CREND_INTERFACE + if ( inputMc->crendWrapper != NULL ) +#else if ( inputMc->crendWrapper.hCrend != NULL ) +#endif { ivas_rend_closeCrend( &inputMc->crendWrapper ); } -#ifdef FIX_REND_ROT_MC_BIN if ( inputMc->efapInWrapper.hEfap != NULL ) { efap_free_data( &inputMc->efapInWrapper.hEfap ); } -#endif outSampleRate = *inputMc->base.ctx.pOutSampleRate; @@ -1588,11 +1767,6 @@ static ivas_error initMcBinauralRendering( { return error; } -#ifndef FIX_ITD -#ifndef FIX_I81 - tmpFixBuggyTdBinRendInit( inputMc->tdRendWrapper.hBinRendererTd ); -#endif -#endif } { @@ -1600,39 +1774,46 @@ static ivas_error initMcBinauralRendering( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) ? IVAS_REND_AUDIO_CONFIG_7_1_4 : inConfig, outConfig, hRendCfg, +#ifdef FIX_197_CREND_INTERFACE + 0, +#endif +#ifdef HRTF_BINARY_FILE + NULL, +#endif outSampleRate ) ) != IVAS_ERR_OK ) { return error; } } -#ifdef FIX_REND_ROT_MC_BIN /* Initialise the EFAP handle for rotation on input layout */ if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM && inputMc->base.ctx.pHeadRotData->headRotEnabled ) { initEfap( &inputMc->efapInWrapper, inConfig, NULL ); } -#endif return error; } -static IVAS_REND_LfeRouting defaultLfeRouting( +static lfe_routing defaultLfeRouting( IVAS_REND_AudioConfig inConfig, LSSETUP_CUSTOM_STRUCT customLsIn, IVAS_REND_AudioConfig outConfig, LSSETUP_CUSTOM_STRUCT customLsOut ) { int32_t i; - IVAS_REND_LfeRouting routing; + lfe_routing routing; /* Set all output gains to zero, then route each input LFE consecutively to the next available output LFE. */ for ( i = 0; i < IVAS_MAX_INPUT_LFE_CHANNELS; ++i ) { - set_zero( routing.lfeOutputGains[i], IVAS_MAX_OUTPUT_CHANNELS ); + set_zero( routing.lfePanMtx[i], IVAS_MAX_OUTPUT_CHANNELS ); } + routing.pan_lfe = false; + routing.lfeInputGain = 1.0f; + switch ( inConfig ) { case IVAS_REND_AUDIO_CONFIG_5_1: @@ -1656,12 +1837,12 @@ static IVAS_REND_LfeRouting defaultLfeRouting( case IVAS_REND_AUDIO_CONFIG_5_1_4: case IVAS_REND_AUDIO_CONFIG_7_1: case IVAS_REND_AUDIO_CONFIG_7_1_4: - routing.lfeOutputGains[0][LFE_CHANNEL] = 1.0f; + routing.lfePanMtx[0][LFE_CHANNEL] = 1.0f; break; case IVAS_REND_AUDIO_CONFIG_LS_CUSTOM: for ( i = 0; i < routing.numLfeChannels && i < customLsOut.num_lfe; ++i ) { - routing.lfeOutputGains[i][customLsOut.lfe_idx[i]] = 1.0f; + routing.lfePanMtx[i][customLsOut.lfe_idx[i]] = 1.0f; } break; default: @@ -1691,7 +1872,11 @@ static ivas_error setRendInputActiveMc( setZeroPanMatrix( inputMc->panGains ); inputMc->customLsInput = defaultCustomLs(); inputMc->tdRendWrapper = defaultTdRendWrapper(); +#ifdef FIX_197_CREND_INTERFACE + inputMc->crendWrapper = NULL; +#else inputMc->crendWrapper = defaultCrendWrapper(); +#endif initRotGains( inputMc->rot_gains_prev ); inputMc->lfeRouting = defaultLfeRouting( inConfig, inputMc->customLsInput, outConfig, *inputMc->base.ctx.pCustomLsOut ); @@ -1725,7 +1910,11 @@ static void clearInputMc( { efap_free_data( &inputMc->efapInWrapper.hEfap ); } +#ifdef FIX_197_CREND_INTERFACE + if ( inputMc->crendWrapper != NULL ) +#else if ( inputMc->crendWrapper.hCrend != NULL ) +#endif { ivas_rend_closeCrend( &inputMc->crendWrapper ); } @@ -1765,7 +1954,11 @@ static ivas_error initSbaPanGainsForMcOut( case IVAS_REND_AUDIO_CONFIG_MONO: hOutSetup.ls_azimuth = ls_azimuth_CICP1; hOutSetup.ls_elevation = ls_elevation_CICP1; +#ifdef FIX_197_CREND_INTERFACE + ivas_output_init( &hOutSetup, getIvasAudioConfigFromRendAudioConfig( outConfig ) ); +#else ivas_output_init( &hOutSetup, rendAudioConfigToIvasAudioConfig( outConfig ) ); +#endif break; case IVAS_REND_AUDIO_CONFIG_STEREO: case IVAS_REND_AUDIO_CONFIG_5_1: @@ -1773,7 +1966,11 @@ static ivas_error initSbaPanGainsForMcOut( case IVAS_REND_AUDIO_CONFIG_5_1_2: case IVAS_REND_AUDIO_CONFIG_5_1_4: case IVAS_REND_AUDIO_CONFIG_7_1_4: +#ifdef FIX_197_CREND_INTERFACE + ivas_output_init( &hOutSetup, getIvasAudioConfigFromRendAudioConfig( outConfig ) ); +#else ivas_output_init( &hOutSetup, rendAudioConfigToIvasAudioConfig( outConfig ) ); +#endif break; case IVAS_REND_AUDIO_CONFIG_LS_CUSTOM: ivas_ls_custom_setup( &hOutSetup, outSetupCustom ); @@ -1803,7 +2000,7 @@ static ivas_error initSbaPanGainsForMcOut( } } - count_free( tmpDecMtx ); + free( tmpDecMtx ); return IVAS_ERR_OK; } @@ -1853,14 +2050,38 @@ static ivas_error updateSbaPanGains( switch ( outConfig ) { case IVAS_REND_AUDIO_CONFIG_BINAURAL: - error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, *rendCtx.pOutSampleRate ); +#ifdef FIX_197_CREND_INTERFACE + error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, 0, +#ifdef HRTF_BINARY_FILE + NULL, +#endif + *rendCtx.pOutSampleRate ); +#else + error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, +#ifdef HRTF_BINARY_FILE + NULL, +#endif + *rendCtx.pOutSampleRate ); +#endif break; case IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM: if ( ( error = initSbaPanGainsForMcOut( inputSba, IVAS_REND_AUDIO_CONFIG_7_1_4, NULL ) ) != IVAS_ERR_OK ) { return error; } - error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, *rendCtx.pOutSampleRate ); +#ifdef FIX_197_CREND_INTERFACE + error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, 0, +#ifdef HRTF_BINARY_FILE + NULL, +#endif + *rendCtx.pOutSampleRate ); +#else + error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, +#ifdef HRTF_BINARY_FILE + NULL, +#endif + *rendCtx.pOutSampleRate ); +#endif break; default: return IVAS_ERR_INVALID_OUTPUT_FORMAT; @@ -1895,7 +2116,11 @@ static ivas_error setRendInputActiveSba( initRendInputBase( &inputSba->base, inConfig, id, rendCtx ); setZeroPanMatrix( inputSba->hoaDecMtx ); +#ifdef FIX_197_CREND_INTERFACE + inputSba->crendWrapper = NULL; +#else inputSba->crendWrapper = defaultCrendWrapper(); +#endif initRotGains( inputSba->rot_gains_prev ); if ( ( error = updateSbaPanGains( inputSba, outConfig, hRendCfg ) ) != IVAS_ERR_OK ) @@ -1916,7 +2141,11 @@ static void clearInputSba( initRendInputBase( &inputSba->base, IVAS_REND_AUDIO_CONFIG_UNKNOWN, 0, rendCtx ); /* Free input's internal handles */ +#ifdef FIX_197_CREND_INTERFACE + if ( inputSba->crendWrapper != NULL ) +#else if ( inputSba->crendWrapper.hCrend != NULL ) +#endif { ivas_rend_closeCrend( &inputSba->crendWrapper ); } @@ -1934,7 +2163,11 @@ static ivas_error initMasaDummyDecForMcOut( input_masa *inputMasa, IVAS_REND_Aud DecoderDummy *decDummy; decDummy = inputMasa->decDummy; +#ifdef FIX_197_CREND_INTERFACE + output_config = getIvasAudioConfigFromRendAudioConfig( outConfig ); +#else output_config = rendAudioConfigToIvasAudioConfig( outConfig ); +#endif decDummy->hDecoderConfig->output_config = output_config; decDummy->hDecoderConfig->ivas_total_brate = IVAS_512k; /* Todo Nokia: This is preventing initialization of 2TC as 1TC, should be fixed properly in ivas_dirac_dec_config() */ @@ -1967,10 +2200,17 @@ static ivas_error initMasaDummyDecForMcOut( input_masa *inputMasa, IVAS_REND_Aud if ( decDummy->renderer_type == RENDERER_STEREO_PARAMETRIC ) { +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy, NULL ) ) != IVAS_ERR_OK ) + { + return error; + } +#else if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy ) ) != IVAS_ERR_OK ) { return error; } +#endif decDummy->hDiracDecBin->useSubframeMode = 0; /* Todo Nokia: This will disappear in later work but needs to be this now. */ } @@ -2015,7 +2255,11 @@ static ivas_error initMasaDummyDecForSbaOut( input_masa *inputMasa, IVAS_REND_Au decDummy = inputMasa->decDummy; +#ifdef FIX_197_CREND_INTERFACE + output_config = getIvasAudioConfigFromRendAudioConfig( outConfig ); +#else output_config = rendAudioConfigToIvasAudioConfig( outConfig ); +#endif decDummy->hDecoderConfig->output_config = output_config; decDummy->hDecoderConfig->ivas_total_brate = IVAS_512k; /* Todo Nokia: This is preventing initialization of 2TC as 1TC, should be fixed properly in ivas_dirac_dec_config() */ @@ -2080,7 +2324,11 @@ static ivas_error initMasaDummyDecForBinauralOut( input_masa *inputMasa, IVAS_RE decDummy = inputMasa->decDummy; +#ifdef FIX_197_CREND_INTERFACE + output_config = getIvasAudioConfigFromRendAudioConfig( outConfig ); +#else output_config = rendAudioConfigToIvasAudioConfig( outConfig ); +#endif decDummy->hDecoderConfig->output_config = output_config; output_config = decDummy->hDecoderConfig->output_config; @@ -2108,10 +2356,22 @@ static ivas_error initMasaDummyDecForBinauralOut( input_masa *inputMasa, IVAS_RE { return error; } +#ifdef HRTF_BINARY_FILE + if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &decDummy->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy, decDummy->hHrtfParambin ) ) != IVAS_ERR_OK ) + { + return error; + } +#else if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy ) ) != IVAS_ERR_OK ) { return error; } +#endif decDummy->hDiracDecBin->useSubframeMode = 0; /* Todo Nokia: This will disappear in later work but needs to be this now. */ @@ -2175,15 +2435,20 @@ static DecoderDummy *initDecoderDummy( int32_t sampleRate, int16_t numTransChann assert( error == IVAS_ERR_OK ); } - decDummy = count_malloc( sizeof( DecoderDummy ) ); - decDummy->hDecoderConfig = count_malloc( sizeof( DECODER_CONFIG ) ); + decDummy = malloc( sizeof( DecoderDummy ) ); + decDummy->hDecoderConfig = malloc( sizeof( DECODER_CONFIG ) ); decDummy->hDecoderConfig->output_Fs = sampleRate; decDummy->hDecoderConfig->nchan_out = (int16_t) numOutChannels; decDummy->hDecoderConfig->Opt_Headrotation = 0; decDummy->hBinRenderer = NULL; decDummy->hEFAPdata = NULL; +#ifdef FIX_197_CREND_INTERFACE + decDummy->hCrendWrapper = NULL; +#else decDummy->hHrtf = NULL; + decDummy->hCrend = NULL; +#endif decDummy->hHrtfTD = NULL; decDummy->hSpar = NULL; decDummy->hoa_dec_mtx = NULL; @@ -2191,12 +2456,16 @@ static DecoderDummy *initDecoderDummy( int32_t sampleRate, int16_t numTransChann decDummy->hMasa = NULL; decDummy->hDiracDecBin = NULL; decDummy->hQMetaData = NULL; +#ifdef FIX_197_CREND_INTERFACE + decDummy->hDecoderConfig->output_config = getIvasAudioConfigFromRendAudioConfig( outConfig ); +#else decDummy->hDecoderConfig->output_config = rendAudioConfigToIvasAudioConfig( outConfig ); +#endif decDummy->nchan_transport = numTransChannels; if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM || outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) { - decDummy->hHeadTrackData = count_malloc( sizeof( HEAD_TRACK_DATA ) ); + decDummy->hHeadTrackData = malloc( sizeof( HEAD_TRACK_DATA ) ); /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) { @@ -2277,11 +2546,11 @@ static void freeDecoderDummy( DecoderDummy **ppDecDummy ) if ( pDecDummy->hDecoderConfig != NULL ) { - count_free( pDecDummy->hDecoderConfig ); + free( pDecDummy->hDecoderConfig ); } if ( pDecDummy->hHeadTrackData != NULL ) { - count_free( pDecDummy->hHeadTrackData ); + free( pDecDummy->hHeadTrackData ); } ivas_render_config_close( &pDecDummy->hRenderConfig ); @@ -2320,14 +2589,14 @@ static void freeDecoderDummy( DecoderDummy **ppDecDummy ) /* HOA decoder matrix */ if ( pDecDummy->hoa_dec_mtx != NULL ) { - count_free( pDecDummy->hoa_dec_mtx ); + free( pDecDummy->hoa_dec_mtx ); pDecDummy->hoa_dec_mtx = NULL; } /* Parametric binaural renderer handle */ ivas_dirac_dec_close_binaural_data( &pDecDummy->hDiracDecBin ); - count_free( pDecDummy ); + free( pDecDummy ); pDecDummy = NULL; } @@ -2368,7 +2637,7 @@ ivas_error IVAS_REND_Open( return error; } - *phIvasRend = (IVAS_REND_HANDLE) count_malloc( sizeof( struct IVAS_REND ) ); + *phIvasRend = (IVAS_REND_HANDLE) malloc( sizeof( struct IVAS_REND ) ); if ( *phIvasRend == NULL ) { return IVAS_ERR_FAILED_ALLOC; @@ -2402,20 +2671,32 @@ ivas_error IVAS_REND_Open( for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { initRendInputBase( &hIvasRend->inputsIsm[i].base, IVAS_REND_AUDIO_CONFIG_UNKNOWN, 0, getRendCtx( hIvasRend ) ); +#ifdef FIX_197_CREND_INTERFACE + hIvasRend->inputsIsm[i].crendWrapper = NULL; +#else hIvasRend->inputsIsm[i].crendWrapper.hCrend = NULL; +#endif hIvasRend->inputsIsm[i].tdRendWrapper.hBinRendererTd = NULL; } for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) { initRendInputBase( &hIvasRend->inputsMc[i].base, IVAS_REND_AUDIO_CONFIG_UNKNOWN, 0, getRendCtx( hIvasRend ) ); hIvasRend->inputsMc[i].efapInWrapper.hEfap = NULL; +#ifdef FIX_197_CREND_INTERFACE + hIvasRend->inputsMc[i].crendWrapper = NULL; +#else hIvasRend->inputsMc[i].crendWrapper.hCrend = NULL; +#endif hIvasRend->inputsMc[i].tdRendWrapper.hBinRendererTd = NULL; } for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i ) { initRendInputBase( &hIvasRend->inputsSba[i].base, IVAS_REND_AUDIO_CONFIG_UNKNOWN, 0, getRendCtx( hIvasRend ) ); +#ifdef FIX_197_CREND_INTERFACE + hIvasRend->inputsSba[i].crendWrapper = NULL; +#else hIvasRend->inputsSba[i].crendWrapper.hCrend = NULL; +#endif } for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) { @@ -2602,7 +2883,7 @@ static IVAS_REND_InputId makeInputId( /* Put config type in second byte (from LSB), put index + 1 in first byte * * Index is incremented here so that a valid ID can never be 0. */ - return (IVAS_REND_InputId) ( ( getAudioConfigType( config ) << 8 ) | ( inputIndex + 1 ) ); + return (IVAS_REND_InputId) ( ( ( (uint32_t) getAudioConfigType( config ) ) << 8 ) | ( inputIndex + 1 ) ); } static ivas_error getInputById( @@ -2923,30 +3204,55 @@ ivas_error IVAS_REND_SetInputGain( return IVAS_ERR_OK; } -static int32_t getNumLfeChannels( - input_mc *inputMc ) +ivas_error IVAS_REND_SetInputLfeMtx( + IVAS_REND_HANDLE hIvasRend, + const IVAS_REND_InputId inputId, + const IVAS_REND_LfePanMtx *lfePanMtx ) { - switch ( inputMc->base.inConfig ) + int16_t i; + input_base *pInputBase; + input_mc *pInputMc; + ivas_error error; + + /*-----------------------------------------------------------------* + * Validate function arguments + *-----------------------------------------------------------------*/ + + if ( hIvasRend == NULL ) { - case IVAS_REND_AUDIO_CONFIG_5_1: - case IVAS_REND_AUDIO_CONFIG_7_1: - case IVAS_REND_AUDIO_CONFIG_5_1_2: - case IVAS_REND_AUDIO_CONFIG_5_1_4: - case IVAS_REND_AUDIO_CONFIG_7_1_4: - return 1; - case IVAS_REND_AUDIO_CONFIG_LS_CUSTOM: - return inputMc->customLsInput.num_lfe; - default: - break; + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + if ( ( error = getInputById( hIvasRend, inputId, (void **) &pInputBase ) ) != IVAS_ERR_OK ) + { + return error; } + if ( getAudioConfigType( pInputBase->inConfig ) != IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) + { + /* Custom LFE panning matrix only makes sense with channel-based input */ + return IVAS_ERR_INVALID_INPUT_FORMAT; + } + pInputMc = (input_mc *) pInputBase; - return 0; + /* copy LFE panning matrix */ + for ( i = 0; i < IVAS_MAX_INPUT_LFE_CHANNELS; i++ ) + { + mvr2r( ( *lfePanMtx )[i], pInputMc->lfeRouting.lfePanMtx[i], IVAS_MAX_OUTPUT_CHANNELS ); + } + + if ( ( error = updateMcPanGains( pInputMc, hIvasRend->outputConfig ) ) != IVAS_ERR_OK ) + { + return error; + } + + return IVAS_ERR_OK; } -ivas_error IVAS_REND_SetInputLfeRouting( +ivas_error IVAS_REND_SetInputLfePos( IVAS_REND_HANDLE hIvasRend, const IVAS_REND_InputId inputId, - const IVAS_REND_LfeRouting lfeRouting ) + const float inputGain, + const float outputAzimuth, + const float outputElevation ) { input_base *pInputBase; input_mc *pInputMc; @@ -2971,12 +3277,10 @@ ivas_error IVAS_REND_SetInputLfeRouting( } pInputMc = (input_mc *) pInputBase; - if ( getNumLfeChannels( pInputMc ) != lfeRouting.numLfeChannels ) - { - return IVAS_ERR_WRONG_NUM_CHANNELS; - } - - pInputMc->lfeRouting = lfeRouting; + pInputMc->lfeRouting.pan_lfe = true; + pInputMc->lfeRouting.lfeInputGain = inputGain; + pInputMc->lfeRouting.lfeOutputAzimuth = outputAzimuth; + pInputMc->lfeRouting.lfeOutputElevation = outputElevation; if ( ( error = updateMcPanGains( pInputMc, hIvasRend->outputConfig ) ) != IVAS_ERR_OK ) { return error; @@ -3066,6 +3370,9 @@ ivas_error IVAS_REND_GetDelay( */ int16_t i; int32_t latency_ns; +#ifdef FIX_310_TD_REND_DELAY + int32_t max_latency_ns; +#endif /*-----------------------------------------------------------------* * Validate function arguments @@ -3078,15 +3385,27 @@ ivas_error IVAS_REND_GetDelay( *timeScale = hIvasRend->sampleRateOut; *nSamples = 0; +#ifdef FIX_310_TD_REND_DELAY + max_latency_ns = 0; +#endif /* Compute the maximum delay across all inputs */ for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; i++ ) { if ( hIvasRend->inputsIsm[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { +#ifdef FIX_197_CREND_INTERFACE + latency_ns = max( ( hIvasRend->inputsIsm[i].crendWrapper != NULL ) ? hIvasRend->inputsIsm[i].crendWrapper->binaural_latency_ns : 0, + hIvasRend->inputsIsm[i].tdRendWrapper.binaural_latency_ns ); +#else latency_ns = max( hIvasRend->inputsIsm[i].crendWrapper.binaural_latency_ns, hIvasRend->inputsIsm[i].tdRendWrapper.binaural_latency_ns ); +#endif +#ifdef FIX_310_TD_REND_DELAY + max_latency_ns = max( max_latency_ns, latency_ns ); +#else *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); +#endif } } @@ -3094,9 +3413,18 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsMc[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { +#ifdef FIX_197_CREND_INTERFACE + latency_ns = max( ( hIvasRend->inputsMc[i].crendWrapper != NULL ) ? hIvasRend->inputsMc[i].crendWrapper->binaural_latency_ns : 0, + hIvasRend->inputsMc[i].tdRendWrapper.binaural_latency_ns ); +#else latency_ns = max( hIvasRend->inputsMc[i].crendWrapper.binaural_latency_ns, hIvasRend->inputsMc[i].tdRendWrapper.binaural_latency_ns ); +#endif +#ifdef FIX_310_TD_REND_DELAY + max_latency_ns = max( max_latency_ns, latency_ns ); +#else *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); +#endif } } @@ -3104,8 +3432,16 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsSba[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { +#ifdef FIX_197_CREND_INTERFACE + latency_ns = ( hIvasRend->inputsSba[i].crendWrapper != NULL ) ? hIvasRend->inputsSba[i].crendWrapper->binaural_latency_ns : 0; +#else latency_ns = hIvasRend->inputsSba[i].crendWrapper.binaural_latency_ns; +#endif +#ifdef FIX_310_TD_REND_DELAY + max_latency_ns = max( max_latency_ns, latency_ns ); +#else *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); +#endif } } @@ -3114,10 +3450,18 @@ ivas_error IVAS_REND_GetDelay( if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); +#ifdef FIX_310_TD_REND_DELAY + max_latency_ns = max( max_latency_ns, latency_ns ); +#else *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); +#endif } } +#ifdef FIX_310_TD_REND_DELAY + *nSamples = (int16_t) roundf( (float) max_latency_ns * *timeScale / 1000000000.f ); +#endif + return IVAS_ERR_OK; } @@ -3257,6 +3601,24 @@ ivas_error IVAS_REND_InitConfig( IVAS_REND_HANDLE st, st->rendererConfigEnabled = 0; } +#ifdef FIX_197_CREND_INTERFACE + if ( rendererConfigEnabled ) + { + if ( ( error = ivas_render_config_open( &( st->hRendererConfig ) ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ivas_render_config_init_from_rom( &st->hRendererConfig, st->rendererConfigEnabled ) != IVAS_ERR_OK ) + { + return IVAS_ERR_INTERNAL_FATAL; + } + } + else + { + st->hRendererConfig = NULL; + } +#else if ( ( error = ivas_render_config_open( &( st->hRendererConfig ) ) ) != IVAS_ERR_OK ) { return error; @@ -3266,6 +3628,7 @@ ivas_error IVAS_REND_InitConfig( IVAS_REND_HANDLE st, { return IVAS_ERR_INTERNAL_FATAL; } +#endif return IVAS_ERR_OK; } @@ -3493,7 +3856,7 @@ static ivas_error rotateFrameMc( rotation_gains gains; float tmp_gains[MAX_INPUT_CHANNELS]; - wmops_sub_start( "rotateFrameMc" ); + push_wmops( "rotateFrameMc" ); if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { @@ -3579,7 +3942,7 @@ static ivas_error rotateFrameMc( } } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -3601,7 +3964,7 @@ static ivas_error rotateFrameSba( float tmpRot[2 * HEADROT_ORDER + 1]; rotation_gains gains; - wmops_sub_start( "rotateFrameSba" ); + push_wmops( "rotateFrameSba" ); getAmbisonicsOrder( inConfig, &shd_rot_max_order ); @@ -3677,7 +4040,7 @@ static ivas_error rotateFrameSba( } } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -3689,7 +4052,7 @@ static ivas_error renderIsmToBinaural( float tmpTDRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; ivas_error error; - wmops_sub_start( "renderIsmToBinaural" ); + push_wmops( "renderIsmToBinaural" ); copyBufferTo2dArray( ismInput->base.inputBuffer, tmpTDRendBuffer ); @@ -3700,9 +4063,6 @@ static ivas_error renderIsmToBinaural( ismInput->base.ctx.pHeadRotData, &ismInput->currentPos, outAudio.config.numSamplesPerChannel, -#ifndef FIX_ITD - *ismInput->base.ctx.pOutSampleRate, -#endif tmpTDRendBuffer ) ) != IVAS_ERR_OK ) { return error; @@ -3710,7 +4070,7 @@ static ivas_error renderIsmToBinaural( accumulate2dArrayToBuffer( tmpTDRendBuffer, &outAudio ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -3733,7 +4093,7 @@ static ivas_error renderIsmToBinauralRoom( IVAS_REND_AudioObjectPosition rotatedPos; const IVAS_REND_HeadRotData *headRotData; - wmops_sub_start( "renderIsmToBinauralRoom" ); + push_wmops( "renderIsmToBinauralRoom" ); headRotData = ismInput->base.ctx.pHeadRotData; rotatedPos = defaultObjectPosition(); @@ -3796,20 +4156,24 @@ static ivas_error renderIsmToBinauralRoom( tmpMcBuffer = ismInput->base.inputBuffer; getAudioConfigNumChannels( IVAS_REND_AUDIO_CONFIG_7_1_4, &tmp ); tmpMcBuffer.config.numChannels = tmp; - tmpMcBuffer.data = count_malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); + tmpMcBuffer.data = malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpMcBuffer.data, tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels ); renderBufferChannelLerp( ismInput->base.inputBuffer, 0, currentPanGains, previousPanGains, tmpMcBuffer ); copyBufferTo2dArray( tmpMcBuffer, tmpCrendBuffer ); +#ifdef FIX_197_CREND_INTERFACE + ivas_rend_crendProcess( ismInput->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM, NULL, NULL, NULL, NULL, tmpCrendBuffer, *ismInput->base.ctx.pOutSampleRate ); +#else ivas_rend_crendProcess( &ismInput->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM, tmpCrendBuffer, *ismInput->base.ctx.pOutSampleRate ); +#endif accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); - count_free( tmpMcBuffer.data ); + free( tmpMcBuffer.data ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -3822,10 +4186,9 @@ static ivas_error renderIsmToMc( pan_vector previousPanGains; ivas_error error; - wmops_sub_start( "renderIsmToMc" ); + push_wmops( "renderIsmToMc" ); -/* TODO(sgi): Possible optimization: less processing needed if position didn't change */ -#ifdef FIX_REND_ISM_STEREO_PANNING + /* TODO(sgi): Possible optimization: less processing needed if position didn't change */ if ( *ismInput->base.ctx.pOutConfig == IVAS_REND_AUDIO_CONFIG_STEREO ) { set_zero( currentPanGains, 16 ); @@ -3841,29 +4204,20 @@ static ivas_error renderIsmToMc( &previousPanGains[1] ); } else -#endif { -#ifdef FIX_REND_ISM_POS_ROUNDING // TODO tmu review when #215 is resolved if ( ( error = getEfapGains( *ismInput->base.ctx.pEfapOutWrapper, (int16_t) floorf( ismInput->currentPos.azimuth + 0.5f ), (int16_t) floorf( ismInput->currentPos.elevation + 0.5f ), currentPanGains ) ) != IVAS_ERR_OK ) -#else - if ( ( error = getEfapGains( *ismInput->base.ctx.pEfapOutWrapper, ismInput->currentPos.azimuth, ismInput->currentPos.elevation, currentPanGains ) ) != IVAS_ERR_OK ) -#endif { return error; } -#ifdef FIX_REND_ISM_POS_ROUNDING // TODO tmu review when #215 is resolved if ( ( error = getEfapGains( *ismInput->base.ctx.pEfapOutWrapper, (int16_t) floorf( ismInput->previousPos.azimuth + 0.5f ), (int16_t) floorf( ismInput->previousPos.elevation + 0.5f ), previousPanGains ) ) != IVAS_ERR_OK ) -#else - if ( ( error = getEfapGains( *ismInput->base.ctx.pEfapOutWrapper, ismInput->previousPos.azimuth, ismInput->previousPos.elevation, previousPanGains ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -3872,7 +4226,7 @@ static ivas_error renderIsmToMc( * This should have been validated in IVAS_REND_FeedInputAudio() */ renderBufferChannelLerp( ismInput->base.inputBuffer, 0, currentPanGains, previousPanGains, outAudio ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -3889,7 +4243,7 @@ static ivas_error renderIsmToSba( ivas_error error; error = IVAS_ERR_OK; - wmops_sub_start( "renderIsmToSba" ); + push_wmops( "renderIsmToSba" ); if ( ( error = getAudioConfigNumChannels( outConfig, &numOutChannels ) ) != IVAS_ERR_OK ) { @@ -3900,15 +4254,11 @@ static ivas_error renderIsmToSba( return error; } -#ifdef FIX_REND_ISM_POS_ROUNDING // TODO tmu review when #215 is resolved ivas_dirac_dec_get_response( (int16_t) floorf( ismInput->previousPos.azimuth + 0.5f ), (int16_t) floorf( ismInput->previousPos.elevation + 0.5f ), previousPanGains, ambiOrderOut ); -#else - ivas_dirac_dec_get_response( (int16_t) ismInput->previousPos.azimuth, (int16_t) ismInput->previousPos.elevation, previousPanGains, ambiOrderOut ); -#endif if ( ( ismInput->currentPos.azimuth == ismInput->previousPos.azimuth ) && ( ismInput->currentPos.elevation == ismInput->previousPos.elevation ) ) @@ -3917,22 +4267,18 @@ static ivas_error renderIsmToSba( } else { -#ifdef FIX_REND_ISM_POS_ROUNDING // TODO tmu review when #215 is resolved ivas_dirac_dec_get_response( (int16_t) floorf( ismInput->currentPos.azimuth + 0.5f ), (int16_t) floorf( ismInput->currentPos.elevation + 0.5f ), currentPanGains, ambiOrderOut ); -#else - ivas_dirac_dec_get_response( (int16_t) ismInput->currentPos.azimuth, (int16_t) ismInput->currentPos.elevation, currentPanGains, ambiOrderOut ); -#endif } /* Assume num channels in audio buffer to be 1. * This should have been validated in IVAS_REND_FeedInputAudio() */ renderBufferChannelLerp( ismInput->base.inputBuffer, 0, currentPanGains, previousPanGains, outAudio ); - wmops_sub_end(); + pop_wmops(); return error; } @@ -4026,7 +4372,7 @@ static ivas_error renderLfeToBinaural( assert( ( outAudio.config.numChannels == 2 ) && "Must be binaural output" ); - wmops_sub_start( "renderLfeToBinaural" ); + push_wmops( "renderLfeToBinaural" ); gain = GAIN_LFE; @@ -4059,7 +4405,7 @@ static ivas_error renderLfeToBinaural( *writePtr++ += gain * ( *readPtr++ ); } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4076,7 +4422,7 @@ static ivas_error renderMcToBinaural( ivas_error error; IVAS_REND_AudioBuffer tmpRotBuffer; - wmops_sub_start( "renderMcToBinaural" ); + push_wmops( "renderMcToBinaural" ); headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; inConfig = mcInput->base.inConfig; @@ -4092,9 +4438,6 @@ static ivas_error renderMcToBinaural( mcInput->base.ctx.pHeadRotData, NULL, mcInput->base.inputBuffer.config.numSamplesPerChannel, -#ifndef FIX_ITD - *mcInput->base.ctx.pOutSampleRate, -#endif tmpRendBuffer ) ) != IVAS_ERR_OK ) { return error; @@ -4106,7 +4449,7 @@ static ivas_error renderMcToBinaural( if ( headRotEnabled ) { tmpRotBuffer = mcInput->base.inputBuffer; - tmpRotBuffer.data = count_malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); + tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); rotateFrameMc( mcInput->base.inputBuffer, @@ -4118,7 +4461,7 @@ static ivas_error renderMcToBinaural( tmpRotBuffer ); copyBufferTo2dArray( tmpRotBuffer, tmpRendBuffer ); - count_free( tmpRotBuffer.data ); + free( tmpRotBuffer.data ); } else { @@ -4126,7 +4469,11 @@ static ivas_error renderMcToBinaural( } /* call CREND */ +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, mcInput->base.inConfig, outConfig, NULL, NULL, NULL, NULL, tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( &mcInput->crendWrapper, mcInput->base.inConfig, outConfig, tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -4137,7 +4484,7 @@ static ivas_error renderMcToBinaural( /* TODO tmu : needs delay compensation */ renderLfeToBinaural( mcInput, outAudio ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4152,13 +4499,13 @@ static ivas_error renderMcToBinauralRoom( ivas_error error; IVAS_REND_AudioBuffer tmpRotBuffer; - wmops_sub_start( "renderMcToBinauralRoom" ); + push_wmops( "renderMcToBinauralRoom" ); /* apply rotation */ if ( mcInput->base.ctx.pHeadRotData->headRotEnabled ) { tmpRotBuffer = mcInput->base.inputBuffer; - tmpRotBuffer.data = count_malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); + tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); rotateFrameMc( mcInput->base.inputBuffer, @@ -4170,7 +4517,7 @@ static ivas_error renderMcToBinauralRoom( tmpRotBuffer ); copyBufferTo2dArray( tmpRotBuffer, tmpCrendBuffer ); - count_free( tmpRotBuffer.data ); + free( tmpRotBuffer.data ); } else { @@ -4178,7 +4525,11 @@ static ivas_error renderMcToBinauralRoom( } /* call CREND */ +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, mcInput->base.inConfig, outConfig, NULL, NULL, NULL, NULL, tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( &mcInput->crendWrapper, mcInput->base.inConfig, outConfig, tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -4189,7 +4540,7 @@ static ivas_error renderMcToBinauralRoom( /* TODO tmu : needs delay compensation */ renderLfeToBinaural( mcInput, outAudio ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4208,7 +4559,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( IVAS_REND_AudioBuffer tmpMcBuffer; IVAS_REND_AudioBuffer *tmpBufPtr; - wmops_sub_start( "renderMcCustomLsToBinauralRoom" ); + push_wmops( "renderMcCustomLsToBinauralRoom" ); tmpRotBuffer = outAudio; /* avoid compilation warning */ @@ -4218,7 +4569,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( if ( headRotEnabled ) { tmpRotBuffer = mcInput->base.inputBuffer; - tmpRotBuffer.data = count_malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); + tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); rotateFrameMc( mcInput->base.inputBuffer, @@ -4234,7 +4585,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( tmpMcBuffer = mcInput->base.inputBuffer; getAudioConfigNumChannels( IVAS_REND_AUDIO_CONFIG_7_1_4, &tmp ); tmpMcBuffer.config.numChannels = (int16_t) tmp; - tmpMcBuffer.data = count_malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); + tmpMcBuffer.data = malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpMcBuffer.data, tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels ); tmpBufPtr = ( headRotEnabled ) ? &tmpRotBuffer : &mcInput->base.inputBuffer; @@ -4245,7 +4596,11 @@ static ivas_error renderMcCustomLsToBinauralRoom( copyBufferTo2dArray( tmpMcBuffer, tmpCrendBuffer ); /* call CREND */ +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, NULL, NULL, NULL, NULL, tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( &mcInput->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -4257,11 +4612,11 @@ static ivas_error renderMcCustomLsToBinauralRoom( if ( headRotEnabled ) { - count_free( tmpRotBuffer.data ); + free( tmpRotBuffer.data ); } - count_free( tmpMcBuffer.data ); + free( tmpMcBuffer.data ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4273,7 +4628,7 @@ static ivas_error renderMcToMc( int16_t i; IVAS_REND_AudioBuffer inAudio; - wmops_sub_start( "renderMcToMc" ); + push_wmops( "renderMcToMc" ); inAudio = mcInput->base.inputBuffer; @@ -4282,7 +4637,7 @@ static ivas_error renderMcToMc( renderBufferChannel( inAudio, i, mcInput->panGains[i], outAudio ); } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4294,7 +4649,7 @@ static ivas_error renderMcToSba( int16_t i; IVAS_REND_AudioBuffer inAudio; - wmops_sub_start( "renderMcToSba" ); + push_wmops( "renderMcToSba" ); inAudio = mcInput->base.inputBuffer; @@ -4303,7 +4658,7 @@ static ivas_error renderMcToSba( renderBufferChannel( inAudio, i, mcInput->panGains[i], outAudio ); } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4402,7 +4757,7 @@ static ivas_error renderSbaToMc( int16_t i; IVAS_REND_AudioBuffer inAudio; - wmops_sub_start( "renderSbaToMc" ); + push_wmops( "renderSbaToMc" ); inAudio = sbaInput->base.inputBuffer; @@ -4411,7 +4766,7 @@ static ivas_error renderSbaToMc( renderBufferChannel( inAudio, i, sbaInput->hoaDecMtx[i], outAudio ); } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4423,7 +4778,7 @@ static ivas_error renderSbaToSba( int16_t i; IVAS_REND_AudioBuffer inAudio; - wmops_sub_start( "renderSbaToSba" ); + push_wmops( "renderSbaToSba" ); inAudio = sbaInput->base.inputBuffer; @@ -4432,7 +4787,7 @@ static ivas_error renderSbaToSba( renderBufferChannel( inAudio, i, sbaInput->hoaDecMtx[i], outAudio ); } - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4447,13 +4802,13 @@ static ivas_error renderSbaToBinaural( ivas_error error; IVAS_REND_AudioBuffer tmpRotBuffer; - wmops_sub_start( "renderSbaToBinaural" ); + push_wmops( "renderSbaToBinaural" ); /* apply rotation */ if ( sbaInput->base.ctx.pHeadRotData->headRotEnabled ) { tmpRotBuffer = sbaInput->base.inputBuffer; - tmpRotBuffer.data = count_malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); + tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); /* copy input for in-place rotation */ mvr2r( sbaInput->base.inputBuffer.data, tmpRotBuffer.data, tmpRotBuffer.config.numChannels * tmpRotBuffer.config.numSamplesPerChannel ); @@ -4465,7 +4820,7 @@ static ivas_error renderSbaToBinaural( tmpRotBuffer ); copyBufferTo2dArray( tmpRotBuffer, tmpCrendBuffer ); - count_free( tmpRotBuffer.data ); + free( tmpRotBuffer.data ); } else { @@ -4473,14 +4828,18 @@ static ivas_error renderSbaToBinaural( } /* call CREND */ +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, sbaInput->base.inConfig, outConfig, NULL, NULL, NULL, NULL, tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( &sbaInput->crendWrapper, sbaInput->base.inConfig, outConfig, tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4502,7 +4861,7 @@ static ivas_error renderSbaToBinauralRoom( tmpRotBuffer = outAudio; /* avoid compilation warning */ - wmops_sub_start( "renderSbaToBinauralRoom" ); + push_wmops( "renderSbaToBinauralRoom" ); headRotEnabled = sbaInput->base.ctx.pHeadRotData->headRotEnabled; @@ -4510,7 +4869,7 @@ static ivas_error renderSbaToBinauralRoom( if ( headRotEnabled ) { tmpRotBuffer = sbaInput->base.inputBuffer; - tmpRotBuffer.data = count_malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); + tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); /* copy input for in-place rotation */ mvr2r( sbaInput->base.inputBuffer.data, tmpRotBuffer.data, tmpRotBuffer.config.numChannels * tmpRotBuffer.config.numSamplesPerChannel ); @@ -4521,7 +4880,7 @@ static ivas_error renderSbaToBinauralRoom( tmpMcBuffer = sbaInput->base.inputBuffer; getAudioConfigNumChannels( IVAS_REND_AUDIO_CONFIG_7_1_4, &tmp ); tmpMcBuffer.config.numChannels = (int16_t) tmp; - tmpMcBuffer.data = count_malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); + tmpMcBuffer.data = malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpMcBuffer.data, tmpMcBuffer.config.numChannels * tmpMcBuffer.config.numSamplesPerChannel ); tmpBufPtr = ( headRotEnabled ) ? &tmpRotBuffer : &sbaInput->base.inputBuffer; @@ -4533,7 +4892,11 @@ static ivas_error renderSbaToBinauralRoom( copyBufferTo2dArray( tmpMcBuffer, tmpCrendBuffer ); /* call CREND */ +#ifdef FIX_197_CREND_INTERFACE + if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, NULL, NULL, NULL, NULL, tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( &sbaInput->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -4542,11 +4905,11 @@ static ivas_error renderSbaToBinauralRoom( if ( headRotEnabled ) { - count_free( tmpRotBuffer.data ); + free( tmpRotBuffer.data ); } - count_free( tmpMcBuffer.data ); + free( tmpMcBuffer.data ); - wmops_sub_end(); + pop_wmops(); return IVAS_ERR_OK; } @@ -4912,7 +5275,7 @@ void IVAS_REND_Close( ivas_limiter_close( &hIvasRend->hLimiter ); - count_free( hIvasRend ); + free( hIvasRend ); *phIvasRend = NULL; return; @@ -4936,3 +5299,23 @@ int32_t IVAS_REND_GetCntFramesLimited( return hIvasRend->hLimiter->cnt_frames_limited; } #endif + +#ifdef FIX_197_CREND_INTERFACE +ivas_error ivas_rend_initEfap( + AUDIO_CONFIG outConfig, + EFAP_HANDLE *hEfap ) +{ + ivas_error err; + IVAS_REND_AudioConfig audioCfg; + EFAP_WRAPPER wrap; + LSSETUP_CUSTOM_STRUCT customLsOut; + wrap.hEfap = NULL; + wrap.pCustomLsSetup = NULL; + audioCfg = getRendAudioConfigFromIvasAudioConfig( outConfig ); + memset( &customLsOut, 0, sizeof( LSSETUP_CUSTOM_STRUCT ) ); + err = initEfap( &wrap, audioCfg, &customLsOut ); + *hEfap = wrap.hEfap; + + return err; +} +#endif diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index ea4b84d897ab49108e72e8ad7fd009501bd90619..b2ca45c70c5e877cc5d123d74b8baaf0af112b20 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -40,15 +40,21 @@ #include "options.h" #include "common_api_types.h" #include "ivas_error.h" - +#ifdef FIX_197_CREND_INTERFACE +#include "ivas_stat_rend.h" +#endif #define RENDERER_MAX_ISM_INPUTS 4 #define RENDERER_MAX_MC_INPUTS 1 #define RENDERER_MAX_SBA_INPUTS 1 #define RENDERER_MAX_MASA_INPUTS 1 +#ifndef FIX_197_CREND_INTERFACE + #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 +typedef float IVAS_REND_LfePanMtx[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS]; + typedef struct { int16_t numSamplesPerChannel; @@ -133,11 +139,13 @@ typedef enum typedef uint16_t IVAS_REND_InputId; -typedef struct -{ - int16_t numLfeChannels; - float lfeOutputGains[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS]; -} IVAS_REND_LfeRouting; + +#else + +AUDIO_CONFIG getIvasAudioConfigFromRendAudioConfig( + IVAS_REND_AudioConfig config ); + +#endif /* clang-format off */ /*----------------------------------------------------------------------------------* @@ -191,10 +199,18 @@ ivas_error IVAS_REND_SetInputGain( const float gain /* i : linear gain (not in dB) */ ); -ivas_error IVAS_REND_SetInputLfeRouting( +ivas_error IVAS_REND_SetInputLfeMtx( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_REND_InputId inputId, /* i : ID of the input */ - const IVAS_REND_LfeRouting lfeRouting /* i : custom LFE routing struct */ + const IVAS_REND_LfePanMtx *lfePanMtx /* i : LFE panning matrix */ +); + +ivas_error IVAS_REND_SetInputLfePos( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_REND_InputId inputId, /* i : ID of the input */ + const float inputGain, /* i : Input gain to be applied to the LFE channel(s) */ + const float outputAzimuth, /* i : Output azimuth position */ + const float outputElevation /* i : Output elevation position */ ); ivas_error IVAS_REND_RemoveInput( @@ -275,6 +291,12 @@ int32_t IVAS_REND_GetCntFramesLimited( ); #endif +#ifdef FIX_197_CREND_INTERFACE +ivas_error ivas_rend_initEfap( + AUDIO_CONFIG outConfig, + EFAP_HANDLE *hEfap + ); +#endif /* clang-format on */ #endif diff --git a/lib_util/audio_file_reader.c b/lib_util/audio_file_reader.c index d2c38cbb17327b88784b6880e16a64cc68e03450..9599cff16930e503340e7f3ef894229291234195 100644 --- a/lib_util/audio_file_reader.c +++ b/lib_util/audio_file_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -34,7 +34,7 @@ #include "tinywavein_c.h" #include #include -#include "wmops.h" +#include "wmc_auto.h" struct AudioFileReader { diff --git a/lib_util/audio_file_reader.h b/lib_util/audio_file_reader.h index 0fc9b1f4a1b0c175d4bda22e18ce05cfd3afbc21..46c458e646a79653c316d4805fe5ba723caab8c1 100644 --- a/lib_util/audio_file_reader.h +++ b/lib_util/audio_file_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/audio_file_writer.c b/lib_util/audio_file_writer.c index af9c6ee0e610b85de52574410593524e53d9e7f9..d6cbb1810ed4729e1f749e4ec505435f50cc0e3c 100644 --- a/lib_util/audio_file_writer.c +++ b/lib_util/audio_file_writer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -34,7 +34,7 @@ #include "tinywaveout_c.h" #include #include -#include "wmops.h" +#include "wmc_auto.h" struct AudioFileWriter { diff --git a/lib_util/audio_file_writer.h b/lib_util/audio_file_writer.h index cd7d2ce5d2d1f2e21b685680d2e6d407f7b9ecaf..e2bf1b850d4e48f510be797eacb8b07be627a2a5 100644 --- a/lib_util/audio_file_writer.h +++ b/lib_util/audio_file_writer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/bitstream_reader.c b/lib_util/bitstream_reader.c index caa8b52c59f5e97f0d72667c14dad7a4a3da5113..999332e863dcb9584e557ba3375a91b541a398f7 100644 --- a/lib_util/bitstream_reader.c +++ b/lib_util/bitstream_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/bitstream_reader.h b/lib_util/bitstream_reader.h index 2b750566eb6632143975ff5ff152b5fba6b7a23d..3d6ac06f20eaf74fc57cf0c9af26f6d6f9f2dba8 100644 --- a/lib_util/bitstream_reader.h +++ b/lib_util/bitstream_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/bitstream_writer.c b/lib_util/bitstream_writer.c index c133ceba254b20550435348b4eda91bd74770209..0e0f9af6ae1066e06280bf2437b9d13ec6b313ec 100644 --- a/lib_util/bitstream_writer.c +++ b/lib_util/bitstream_writer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/bitstream_writer.h b/lib_util/bitstream_writer.h index 9a8acc8106a24d54d14aaa4e6da1c05a5003cdd8..19b09907bf0ecc738f2ad4640a33da020418573a 100644 --- a/lib_util/bitstream_writer.h +++ b/lib_util/bitstream_writer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/cmdl_tools.c b/lib_util/cmdl_tools.c index d36112f8a305716af771731437523d206d54fe7d..d9e4d5386ed2fac264b66552698cfb562bb03680 100644 --- a/lib_util/cmdl_tools.c +++ b/lib_util/cmdl_tools.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/cmdl_tools.h b/lib_util/cmdl_tools.h index 52b6e694536c376bea5bff1160d98ecaa09d8ce4..92dba6c1e1e8085c0777f47f9b553c5524a8c052 100644 --- a/lib_util/cmdl_tools.h +++ b/lib_util/cmdl_tools.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/cmdln_parser.c b/lib_util/cmdln_parser.c index 1904f880beffe875eab46023c73d7461ca810533..2a29505a393e6dd603928add74b0863f8d252d12 100644 --- a/lib_util/cmdln_parser.c +++ b/lib_util/cmdln_parser.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/cmdln_parser.h b/lib_util/cmdln_parser.h index 8fecc70d9e6c0149687322c878376764f5a36c66..b5db25c19325be5f8a6b881ae8c9b0edfb00e49a 100644 --- a/lib_util/cmdln_parser.h +++ b/lib_util/cmdln_parser.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/evs_rtp_payload.c b/lib_util/evs_rtp_payload.c index 67dcaa6f36c3bd781aec81dc3e7827fa55276eed..d67aebd4c0f4312f523e17cb74d1549fe5148bb6 100644 --- a/lib_util/evs_rtp_payload.c +++ b/lib_util/evs_rtp_payload.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -141,36 +141,6 @@ static void evsHeaderFullPayload_parseToc( uint8_t toc, bool *isAMRWB_IOmode, bo } } -bool evsPayload_getFrameTypeFromSize( int16_t frameSizeBits, bool *isAMRWB_IOmode, uint16_t *frameTypeIndex ) -{ - int16_t i; - int32_t rate; - rate = frameSizeBits * 50; - if ( rate == 0 ) - { - assert( 0 ); /* VOIP_G192_RTP should not transmit empty frames */ - return false; /* no information available */ - } - for ( i = 0; i <= 9; ++i ) - { - if ( rate == AMRWB_IOmode2rate[i] ) - { - *isAMRWB_IOmode = true; - *frameTypeIndex = i; - return true; - } - } - for ( i = 0; i <= 12; ++i ) - { - if ( rate == PRIMARYmode2rate[i] ) - { - *isAMRWB_IOmode = false; - *frameTypeIndex = i; - return true; - } - } - return false; -} bool evsHeaderFullPayload_unpackFrame( char *payload, uint16_t payloadSizeBytes, uint16_t frameIndex, bool *isAMRWB_IOmode, bool *frameFollowing, uint16_t *frameTypeIndex, bool *qBit, unsigned char **frame, uint16_t *frameSizeInBits ) { diff --git a/lib_util/evs_rtp_payload.h b/lib_util/evs_rtp_payload.h index 55073a7fa5d779b19375525256fbbdb5072715cb..dac5fb0e35cfee6fca7fc2402b75bf6ae94c0f42 100644 --- a/lib_util/evs_rtp_payload.h +++ b/lib_util/evs_rtp_payload.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -160,7 +160,6 @@ extern "C" bool evsPayload_unpackFrame( bool hf_only, char *payload, uint16_t payloadSizeBytes, uint16_t frameIndex, bool *isAMRWB_IOmode, bool *frameFollowing, uint16_t *frameTypeIndex, bool *qBit, unsigned char **framePtr, uint16_t *frameSizeBits ); - bool evsPayload_getFrameTypeFromSize( int16_t frameSizeBits, bool *isAMRWB_IOmode, uint16_t *frameTypeIndex ); bool evsHeaderFullPayload_unpackFrame( char *payload, uint16_t payloadSizeBytes, uint16_t frameIndex, bool *isAMRWB_IOmode, bool *frameFollowing, uint16_t *frameTypeIndex, bool *qBit, unsigned char **frame, uint16_t *frameSizeBits ); diff --git a/lib_util/g192.c b/lib_util/g192.c index 6f708690a0420c85870875596abe0af93ee76590..2105c1d5a87611fc14dce1f2b26e4fdbf748073d 100644 --- a/lib_util/g192.c +++ b/lib_util/g192.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/g192.h b/lib_util/g192.h index c96b5bf7565c384617b212e29fb80407e2194988..f07cc77b227279a28fb984d23133c35d0d60db4f 100644 --- a/lib_util/g192.h +++ b/lib_util/g192.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/head_rotation_file_reader.c b/lib_util/head_rotation_file_reader.c index cd1dd7bcf32904d6ae14682904e5bf14be0c2f3b..4267be7c524c8035d1ae840d6b2bdd0c343213fc 100644 --- a/lib_util/head_rotation_file_reader.c +++ b/lib_util/head_rotation_file_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/head_rotation_file_reader.h b/lib_util/head_rotation_file_reader.h index 6664908b007804df41e74d1f73e7f6e8e3955453..ad993185631f853ac7248a9616e55055b560f973 100644 --- a/lib_util/head_rotation_file_reader.h +++ b/lib_util/head_rotation_file_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 92b0058436446d2bd2fb5c0187ae95b68856caa5..21f2a2988de4ed215aa45978f6eec1bb89f40668 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,9 +33,12 @@ #include "hrtf_file_reader.h" #include #include -#include "prot.h" -#include "ivas_prot.h" +#include "prot.h" // VE: !!!!! +#include "ivas_prot.h" // VE: !!!!! +#ifdef HRTF_BINARY_FILE +#include "lib_dec.h" +#endif struct hrtfFileReader { @@ -50,6 +53,12 @@ struct hrtfFileReader #define RESAMPLE_FACTOR_16_48 ( 16.0f / 48.0f ) #define RESAMPLE_FACTOR_32_48 ( 32.0f / 48.0f ) +/*---------------------------------------------------------------------* + * Local function declarations + *---------------------------------------------------------------------*/ + +static void HRTF_energy_sections_precalc( ModelParams_t *model ); + /*---------------------------------------------------------------------* * hrtfFileReader_open() * @@ -111,6 +120,111 @@ void hrtfFileReader_close( } +#ifdef HRTF_BINARY_FILE + +/*-------------------------------------------------------------------* + * read_and_check_hrtf_binary_file_header() + * + * Check the HRTF file header read from binary file + --------------------------------------------------------------------*/ + +static ivas_error read_and_check_hrtf_binary_file_header( ivas_hrtfs_file_header_t *hrtf_file_header, FILE *f_hrtf ) +{ + int32_t file_size; + + // [Declaration of the binary file] + // File Identifier (8 bytes) + // Size of file in bytes (4 bytes) + // Number of HRTF (2 bytes) + // Max length of HRTF data (4 bytes) + + fseek( f_hrtf, 0, SEEK_END ); + file_size = ftell( f_hrtf ); + fseek( f_hrtf, 0, SEEK_SET ); + + if ( file_size < (int32_t) sizeof( ivas_hrtfs_file_header_t ) ) + { + return IVAS_ERROR( IVAS_ERR_END_OF_FILE, "HRTF binary file not compliant (size of file header)" ); + } + + fread( &( hrtf_file_header->identifier ), 8, 1, f_hrtf ); + if ( strncmp( hrtf_file_header->identifier, "IVASHRTF", 8 ) != 0 ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Header of HRTF binary file not compliant (identifier)" ); + } + + fread( &( hrtf_file_header->file_size ), 4, 1, f_hrtf ); + if ( hrtf_file_header->file_size != file_size ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Header of HRTF binary file not compliant (file size)" ); + } + + fread( &( hrtf_file_header->nb_hrtf ), 2, 1, f_hrtf ); + fread( &( hrtf_file_header->max_data_size ), 4, 1, f_hrtf ); + + return IVAS_ERR_OK; +} + + +/*-------------------------------------------------------------------* + * check_hrtf_binary_header() + * + * Check the HRTF section header - read from binary file + --------------------------------------------------------------------*/ + +static ivas_error check_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header ) +{ + // Check the renderer type + if ( ( hrtf_header->rend_type != RENDERER_BINAURAL_MIXER_CONV ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) && +#ifdef HRTF_BINARY_FILE + ( hrtf_header->rend_type != RENDERER_BINAURAL_FASTCONV ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_FASTCONV_ROOM ) && + ( hrtf_header->rend_type != RENDERER_BINAURAL_PARAMETRIC ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_PARAMETRIC_ROOM ) && +#endif + ( hrtf_header->rend_type != RENDERER_BINAURAL_OBJECTS_TD ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Header of HRTF binary file not compliant (renderer type)" ); + } + + // Check the output format of the decoder + if ( ( hrtf_header->input_cfg != BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) && ( hrtf_header->input_cfg != BINAURAL_INPUT_AUDIO_CONFIG_HOA ) && ( hrtf_header->input_cfg != BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Header of HRTF binary file not compliant (input audio configuration)" ); + } + + // Check the sampling frequency + if ( ( hrtf_header->frequency != 48000 ) && ( hrtf_header->frequency != 32000 ) && ( hrtf_header->frequency != 16000 ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Header of HRTF binary file not compliant (sampling frequency)" ); + } + + return IVAS_ERR_OK; +} + +/*-------------------------------------------------------------------* + * read_hrtf_binary_header() + * + * Read the HRTF header from binary file + --------------------------------------------------------------------*/ + +static ivas_error read_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header, FILE *f_hrtf ) +{ + // HRTF Header + // Renderer type (4 bytes) : See "RENDERER_TYPE" + // Input configuration (4 bytes) : See "BINAURAL_INPUT_AUDIO_CONFIG" + // Sampling Frequency (4 bytes) + // Raw data size (4 bytes) + + if ( ( fread( &( hrtf_header->rend_type ), sizeof( int32_t ), 1, f_hrtf ) == 1 ) && ( fread( &( hrtf_header->input_cfg ), sizeof( int32_t ), 1, f_hrtf ) == 1 ) && ( fread( &( hrtf_header->frequency ), sizeof( int32_t ), 1, f_hrtf ) == 1 ) && ( fread( &( hrtf_header->data_size ), sizeof( int32_t ), 1, f_hrtf ) == 1 ) ) + { + return IVAS_ERR_OK; + } + + return IVAS_ERR_END_OF_FILE; +} + +#endif + + /*-------------------------------------------------------------------* * LoadBSplineBinaryITD() * @@ -126,16 +240,16 @@ static void LoadBSplineBinaryITD( fread( &modelITD->N, sizeof( int16_t ), 1, f_hrtf ); fread( &modelITD->elevDim2, sizeof( int16_t ), 1, f_hrtf ); fread( &modelITD->elevDim3, sizeof( int16_t ), 1, f_hrtf ); - modelITD->elevKSeq_dyn = (float *) count_malloc( ( modelITD->elevDim3 - 2 ) * sizeof( float ) ); + modelITD->elevKSeq_dyn = (float *) malloc( ( modelITD->elevDim3 - 2 ) * sizeof( float ) ); fread( modelITD->elevKSeq_dyn, sizeof( float ), modelITD->elevDim3 - 2, f_hrtf ); fread( &modelITD->azimDim2, sizeof( int16_t ), 1, f_hrtf ); fread( &modelITD->azimDim3, sizeof( int16_t ), 1, f_hrtf ); - modelITD->azimKSeq_dyn = (float *) count_malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( float ) ); /* basis functions are flipped around 180 deg, number of basis functions above/below is (N+1)/2 */ + modelITD->azimKSeq_dyn = (float *) malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( float ) ); /* basis functions are flipped around 180 deg, number of basis functions above/below is (N+1)/2 */ fread( modelITD->azimKSeq_dyn, sizeof( float ), ( modelITD->azimDim3 + 1 ) / 2 - 2, f_hrtf ); fread( &tmp, sizeof( int16_t ), 1, f_hrtf ); - modelITD->W_dyn = (float *) count_malloc( tmp * sizeof( float ) ); + modelITD->W_dyn = (float *) malloc( tmp * sizeof( float ) ); fread( modelITD->W_dyn, sizeof( float ), tmp, f_hrtf ); /* azimuth */ @@ -144,7 +258,7 @@ static void LoadBSplineBinaryITD( fread( &tmp, sizeof( int16_t ), 1, f_hrtf ); - modelITD->azimBsShape_dyn = (float *) count_malloc( tmp * sizeof( float ) ); + modelITD->azimBsShape_dyn = (float *) malloc( tmp * sizeof( float ) ); fread( modelITD->azimBsShape_dyn, sizeof( float ), tmp, f_hrtf ); fread( &modelITD->azimSegSamples, sizeof( int16_t ), 1, f_hrtf ); @@ -155,7 +269,7 @@ static void LoadBSplineBinaryITD( fread( &tmp, sizeof( int16_t ), 1, f_hrtf ); - modelITD->elevBsShape_dyn = (float *) count_malloc( tmp * sizeof( float ) ); + modelITD->elevBsShape_dyn = (float *) malloc( tmp * sizeof( float ) ); fread( modelITD->elevBsShape_dyn, sizeof( float ), tmp, f_hrtf ); fread( &modelITD->elevSegSamples, sizeof( int16_t ), 1, f_hrtf ); @@ -184,6 +298,10 @@ static ivas_error LoadBSplineBinary( ModelParams_t *model; int16_t i, tmp; +#ifdef FIX_310_TD_REND_DELAY + fread( &HrFiltSet_p->latency_s, sizeof( float ), 1, f_hrtf ); +#endif + model = &( HrFiltSet_p->ModelParams ); /* Set ROM flag for correct deallocation */ @@ -224,51 +342,51 @@ static ivas_error LoadBSplineBinary( fread( &model->elevDim2, sizeof( int16_t ), 1, f_hrtf ); fread( &model->elevDim3, sizeof( int16_t ), 1, f_hrtf ); - model->elevKSeq_dyn = (float *) count_malloc( ( model->elevDim3 - 2 ) * sizeof( float ) ); + model->elevKSeq_dyn = (float *) malloc( ( model->elevDim3 - 2 ) * sizeof( float ) ); fread( model->elevKSeq_dyn, sizeof( float ), model->elevDim3 - 2, f_hrtf ); - model->azimDim2_dyn = (int16_t *) count_malloc( model->elevDim3 * sizeof( int16_t ) ); - model->azimDim3_dyn = (int16_t *) count_malloc( model->elevDim3 * sizeof( int16_t ) ); - model->azim_start_idx_dyn = (int16_t *) count_malloc( model->elevDim3 * sizeof( int16_t ) ); - model->azimKSeq = (float **) count_malloc( model->elevDim3 * sizeof( float * ) ); + model->azimDim2_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); + model->azimDim3_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); + model->azim_start_idx_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); + model->azimKSeq = (float **) malloc( model->elevDim3 * sizeof( float * ) ); for ( i = 0; i < model->elevDim3; i++ ) { fread( &model->azimDim2_dyn[i], sizeof( int16_t ), 1, f_hrtf ); fread( &model->azimDim3_dyn[i], sizeof( int16_t ), 1, f_hrtf ); fread( &model->azim_start_idx_dyn[i], sizeof( int16_t ), 1, f_hrtf ); - model->azimKSeq[i] = (float *) count_malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( float ) ); + model->azimKSeq[i] = (float *) malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( float ) ); fread( model->azimKSeq[i], sizeof( float ), ( model->azimDim3_dyn[i] + 1 ), f_hrtf ); } fread( &model->AlphaN, sizeof( int16_t ), 1, f_hrtf ); - model->AlphaL_dyn = (float *) count_malloc( model->AlphaN * model->K * sizeof( float ) ); + model->AlphaL_dyn = (float *) malloc( model->AlphaN * model->K * sizeof( float ) ); fread( model->AlphaL_dyn, sizeof( float ), model->AlphaN * model->K, f_hrtf ); - model->AlphaR_dyn = (float *) count_malloc( model->AlphaN * model->K * sizeof( float ) ); + model->AlphaR_dyn = (float *) malloc( model->AlphaN * model->K * sizeof( float ) ); fread( model->AlphaR_dyn, sizeof( float ), model->AlphaN * model->K, f_hrtf ); /* azimuth */ fread( &model->num_unique_azim_splines, sizeof( int16_t ), 1, f_hrtf ); - model->azimBsShape = (const float **) count_malloc( model->num_unique_azim_splines * sizeof( float * ) ); - model->azimBsShape_dyn = (float **) count_malloc( model->num_unique_azim_splines * sizeof( float * ) ); - model->azimSegSamples_dyn = (int16_t *) count_malloc( model->num_unique_azim_splines * sizeof( int16_t ) ); + model->azimBsShape = (const float **) malloc( model->num_unique_azim_splines * sizeof( float * ) ); + model->azimBsShape_dyn = (float **) malloc( model->num_unique_azim_splines * sizeof( float * ) ); + model->azimSegSamples_dyn = (int16_t *) malloc( model->num_unique_azim_splines * sizeof( int16_t ) ); for ( i = 0; i < model->num_unique_azim_splines; i++ ) { fread( &tmp, sizeof( int16_t ), 1, f_hrtf ); - model->azimBsShape_dyn[i] = (float *) count_malloc( tmp * sizeof( float ) ); + model->azimBsShape_dyn[i] = (float *) malloc( tmp * sizeof( float ) ); fread( model->azimBsShape_dyn[i], sizeof( float ), tmp, f_hrtf ); fread( &model->azimSegSamples_dyn[i], sizeof( int16_t ), 1, f_hrtf ); } - model->azimShapeIdx_dyn = (int16_t *) count_malloc( model->elevDim3 * sizeof( int16_t ) ); + model->azimShapeIdx_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); fread( model->azimShapeIdx_dyn, sizeof( int16_t ), model->elevDim3, f_hrtf ); - model->azimShapeSampFactor_dyn = (int16_t *) count_malloc( model->elevDim3 * sizeof( int16_t ) ); + model->azimShapeSampFactor_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); fread( model->azimShapeSampFactor_dyn, sizeof( int16_t ), model->elevDim3, f_hrtf ); /* elevation */ fread( model->elevBsLen, sizeof( int16_t ), HRTF_MODEL_BSPLINE_NUM_COEFFS, f_hrtf ); fread( model->elevBsStart, sizeof( int16_t ), HRTF_MODEL_BSPLINE_NUM_COEFFS, f_hrtf ); fread( &tmp, sizeof( int16_t ), 1, f_hrtf ); - model->elevBsShape_dyn = (float *) count_malloc( tmp * sizeof( float ) ); + model->elevBsShape_dyn = (float *) malloc( tmp * sizeof( float ) ); fread( model->elevBsShape_dyn, sizeof( float ), tmp, f_hrtf ); fread( &model->elevSegSamples, sizeof( int16_t ), 1, f_hrtf ); @@ -293,9 +411,11 @@ static ivas_error LoadBSplineBinary( } HRTF_model_precalc( model ); + HRTF_energy_sections_precalc( model ); HrFiltSet_p->FiltLength = HrFiltSet_p->ModelParams.K; - BSplineModelEvalAlloc( &HrFiltSet_p->ModelParams, &HrFiltSet_p->ModelEval ); + HrFiltSet_p->ModelEval.hrfModL = (float *) malloc( model->K * sizeof( float ) ); + HrFiltSet_p->ModelEval.hrfModR = (float *) malloc( model->K * sizeof( float ) ); if ( HrFiltSet_p->ModelParams.UseItdModel ) { @@ -305,7 +425,6 @@ static ivas_error LoadBSplineBinary( return IVAS_ERR_OK; } - /*-------------------------------------------------------------------* * TDREND_MIX_LoadHRTF() * @@ -320,36 +439,90 @@ static ivas_error TDREND_MIX_LoadHRTF( int16_t tmp; ivas_error error; +#ifdef HRTF_BINARY_FILE + + bool is_tdrend; + ivas_error header_check_result; + ivas_hrtfs_file_header_t hrtfs_file_header; + int16_t hrtf_id; + ivas_hrtfs_header_t hrtf_header; + int32_t hrtf_data_size_max; + char *hrtf_data; + +#endif + error = IVAS_ERR_OK; - if ( fread( &tmp, sizeof( int16_t ), 1, f_hrtf ) == 0 ) +#ifdef HRTF_BINARY_FILE + + if ( ( header_check_result = read_and_check_hrtf_binary_file_header( &hrtfs_file_header, f_hrtf ) ) != IVAS_ERR_OK ) { - return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); + return header_check_result; } - HrFiltSet_p->FilterMethod = (TDREND_HRFILT_Method_t) tmp; + is_tdrend = FALSE; + hrtf_data_size_max = hrtfs_file_header.max_data_size; + + /* Allocate the memory */ -#ifdef TDREND_HRTF_TABLE_METHODS - switch ( HrFiltSet_p->FilterMethod ) + if ( hrtf_data_size_max == 0 ) { - case TDREND_HRFILT_Method_BSplineModel: - error = LoadBSplineBinary( HrFiltSet_p, f_hrtf ); - break; - case TDREND_HRFILT_Method_Table_F: - case TDREND_HRFILT_Method_Table_S: - TDREND_HRFILT_SetFiltSet( HrFiltSet_p, f_hrtf ); - break; - default: - error = IVAS_ERROR( IVAS_ERR_INVALID_HRTF, "The HR filter set file is not a supported type." ); + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (hrtf_data_size_max)" ); } -#else - if ( HrFiltSet_p->FilterMethod != TDREND_HRFILT_Method_BSplineModel ) + + hrtf_data = (char *) malloc( hrtf_data_size_max ); + if ( hrtf_data == NULL ) { - error = IVAS_ERROR( IVAS_ERR_INVALID_HRTF, "The HR filter set file is not a supported type." ); + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } + + for ( hrtf_id = 0; ( hrtf_id < hrtfs_file_header.nb_hrtf ) && ( !is_tdrend ); hrtf_id++ ) + { + if ( read_hrtf_binary_header( &hrtf_header, f_hrtf ) != IVAS_ERR_OK ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "HRTF binary file not compliant (number of HRTF)" ); + } + + if ( ( header_check_result = check_hrtf_binary_header( &hrtf_header ) ) != IVAS_ERR_OK ) + { + return header_check_result; + } + + is_tdrend = ( hrtf_header.rend_type == RENDERER_BINAURAL_OBJECTS_TD ); + if ( !is_tdrend ) + { + if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); + } + } + } + + free( hrtf_data ); + + if ( is_tdrend ) +#endif + { + if ( fread( &tmp, 1, sizeof( int16_t ), f_hrtf ) == 0 ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); + } + + HrFiltSet_p->FilterMethod = (TDREND_HRFILT_Method_t) tmp; + + if ( HrFiltSet_p->FilterMethod != TDREND_HRFILT_Method_BSplineModel ) + { + error = IVAS_ERROR( IVAS_ERR_INVALID_HRTF, "The HR filter set file is not a supported type." ); + } + else + { + error = LoadBSplineBinary( HrFiltSet_p, f_hrtf ); + } + } +#ifdef HRTF_BINARY_FILE else { - error = LoadBSplineBinary( HrFiltSet_p, f_hrtf ); + return IVAS_ERROR( IVAS_ERR_INVALID_HRTF, "HR filter not found in binary file." ); } #endif @@ -370,7 +543,975 @@ ivas_error load_HRTF_binary( { ivas_error error; +#ifdef HRTF_BINARY_FILE + fseek( hrtfReader->file, 0, SEEK_SET ); +#endif + error = TDREND_MIX_LoadHRTF( hrtfReader->file, hHrtf ); return error; } + +/*---------------------------------------------------------------------* + * HRTF_energy_sections_precalc() + * + * Calculate energies of each section and store in model->EL/model->ER + *---------------------------------------------------------------------*/ + +static void HRTF_energy_sections_precalc( + ModelParams_t *model /* i/o: HRTF model parameters */ +) +{ + int16_t i, k, j; + float *pEL; + float *pER; + const float *pAlphaL; + const float *pAlphaR; + float tmp; + int16_t AlphaN; + + if ( !model->modelROM ) + { + AlphaN = model->AlphaN; + + /* Precalculated energies for each section and each row of the alpha matrices */ + model->EL_dyn = (float *) malloc( HRTF_MODEL_N_SECTIONS * AlphaN * sizeof( float ) ); + model->ER_dyn = (float *) malloc( HRTF_MODEL_N_SECTIONS * AlphaN * sizeof( float ) ); + pEL = model->EL_dyn; + pER = model->ER_dyn; + for ( i = 0; i < HRTF_MODEL_N_SECTIONS; i++ ) + { + for ( j = 0; j < AlphaN; j++ ) /* rows of Alpha matrices */ + { + *pEL = 0.0f; + *pER = 0.0f; + + pAlphaL = &model->AlphaL[model->iSecFirst[i] * AlphaN + j]; + pAlphaR = &model->AlphaR[model->iSecFirst[i] * AlphaN + j]; + + for ( k = model->iSecFirst[i]; k < model->iSecLast[i]; k++ ) /* k within the sections */ + { + /* Energy calculation */ + tmp = *pAlphaL; + *pEL += tmp * tmp; + tmp = *pAlphaR; + *pER += tmp * tmp; + pAlphaL += AlphaN; + pAlphaR += AlphaN; + } + pEL++; + pER++; + } + } + model->EL = (const float *) model->EL_dyn; + model->ER = (const float *) model->ER_dyn; + } + + return; +} + + +/*---------------------------------------------------------------------* + * dealloc_HRTF_binary() + * + * Deallocated memory allocated by load_HRTF_binary + *---------------------------------------------------------------------*/ + +ivas_error dealloc_HRTF_binary( + IVAS_DEC_HRTF_HANDLE hHrtf /* i/o: HRTF handle */ +) +{ + int16_t i; + ivas_error error; + error = IVAS_ERR_OK; + +#ifdef HRTF_BINARY_FILE + if ( hHrtf == NULL ) + { + return error; + } +#endif + + if ( !hHrtf->ModelParams.modelROM ) + { + if ( hHrtf->ModelParams.UseItdModel ) + { + free( hHrtf->ModelParamsITD.elevKSeq_dyn ); + free( hHrtf->ModelParamsITD.azimKSeq_dyn ); + free( hHrtf->ModelParamsITD.W_dyn ); + free( hHrtf->ModelParamsITD.azimBsShape_dyn ); + free( hHrtf->ModelParamsITD.elevBsShape_dyn ); + } + free( hHrtf->ModelParams.elevKSeq_dyn ); + free( hHrtf->ModelParams.azim_start_idx_dyn ); + free( hHrtf->ModelParams.azimDim2_dyn ); + free( hHrtf->ModelParams.azimDim3_dyn ); + free( hHrtf->ModelParams.AlphaL_dyn ); + free( hHrtf->ModelParams.AlphaR_dyn ); + free( hHrtf->ModelParams.azimSegSamples_dyn ); + + free( hHrtf->ModelParams.azimShapeIdx_dyn ); + free( hHrtf->ModelParams.azimShapeSampFactor_dyn ); + free( hHrtf->ModelParams.elevBsShape_dyn ); + + for ( i = 0; i < hHrtf->ModelParams.num_unique_azim_splines; i++ ) + { + free( hHrtf->ModelParams.azimBsShape_dyn[i] ); + free( &hHrtf->ModelParams.azimBsShape_dyn[i] ); + } + + free( (void *) hHrtf->ModelParams.azimBsShape ); /* void* cast needed to please both gcc and Visual studio compilers. Deallocating const float** should be fine and gcc agrees, but Visual studio complains. */ + for ( i = 0; i < hHrtf->ModelParams.elevDim3; i++ ) + { + free( hHrtf->ModelParams.azimKSeq[i] ); + } + free( hHrtf->ModelParams.azimKSeq ); + + free( hHrtf->ModelParams.EL_dyn ); + free( hHrtf->ModelParams.ER_dyn ); + + free( hHrtf->ModelEval.hrfModL ); + free( hHrtf->ModelEval.hrfModR ); + } + + return error; +} + +#ifdef HRTF_BINARY_FILE + +/*------------------------------------------------------------------------- + * ivas_hrtf_init() + * + * Initialize hHRTF handle + *------------------------------------------------------------------------*/ + +static ivas_error ivas_hrtf_init( + HRTFS_DATA *hHRTF /* i/o: HRTF handle */ +) +{ + int16_t i, j; + + if ( hHRTF == NULL ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + hHRTF->latency_s = 0; + hHRTF->max_num_ir = 0; + hHRTF->max_num_iterations = 0; + hHRTF->index_frequency_max_diffuse = 0; + + for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) + { + hHRTF->inv_diffuse_weight[i] = 0; + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + hHRTF->num_iterations[i][j] = 0; + hHRTF->pIndex_frequency_max[i][j] = NULL; + hHRTF->pOut_to_bin_re[i][j] = NULL; + hHRTF->pOut_to_bin_im[i][j] = NULL; + } + } + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + hHRTF->num_iterations_diffuse[j] = 0; + hHRTF->pIndex_frequency_max_diffuse[j] = NULL; + hHRTF->pOut_to_bin_diffuse_re[j] = NULL; + hHRTF->pOut_to_bin_diffuse_im[j] = NULL; + } + + return IVAS_ERR_OK; +} + +/*---------------------------------------------------------------------* + * create_HRTF_from_rawdata() + * + * Create HRTF from the raw data (to the HRTF CRend handle) + *---------------------------------------------------------------------*/ + +static ivas_error create_HRTF_from_rawdata( + HRTFS_HANDLE *hHRTF, /* i/o: HRTF CRend handle */ + char *hrtf_data /* i: pointer to binary file */ +) +{ + int i, j, k; + int16_t max_num_iterations_diffuse; + uint16_t max_total_num_fsamp_per_iteration, max_total_num_fsamp_per_iteration_diff; + uint32_t mem_size; + char *hrtf_data_rptr; + float *pOut_to_bin_wptr; + + if ( *hHRTF == NULL ) + { + if ( ( ( *hHRTF ) = (HRTFS_HANDLE) malloc( sizeof( HRTFS_DATA ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Can not allocate memory for HRTF binary data\n" ); + } + + ivas_hrtf_init( *hHRTF ); + } + else + { + return IVAS_ERR_INTERNAL; + } + + hrtf_data_rptr = hrtf_data; + + // latency_s + ( *hHRTF )->latency_s = *( (float *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( float ); + + // max_num_ir + ( *hHRTF )->max_num_ir = *( (uint16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( uint16_t ); + + // BINAURAL_CHANNELS + if ( BINAURAL_CHANNELS != *( (int16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file format not compliant (BINAURAL_CHANNELS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + // max_num_iterations + ( *hHRTF )->max_num_iterations = *( (int16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( int16_t ); + + // num_iterations + for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ ) + { + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + ( *hHRTF )->num_iterations[i][j] = *( (uint16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( uint16_t ); + } + } + + // pIndex_frequency_max + for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ ) + { + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + mem_size = ( *hHRTF )->max_num_iterations * sizeof( uint16_t ); + ( *hHRTF )->pIndex_frequency_max[i][j] = (uint16_t *) malloc( mem_size ); + if ( ( *hHRTF )->pIndex_frequency_max[i][j] == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for pIndex_frequency_max" ); + } + memcpy( ( *hHRTF )->pIndex_frequency_max[i][j], hrtf_data_rptr, mem_size ); + hrtf_data_rptr += mem_size; + } + } + + // max_num_iterations_diffuse + max_num_iterations_diffuse = *( (int16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( int16_t ); + + if ( max_num_iterations_diffuse != 0 ) + { + // num_iterations_diffuse + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + ( *hHRTF )->num_iterations_diffuse[j] = *( (uint16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( uint16_t ); + } + + // pIndex_frequency_max_diffuse (the size depends on num_iterations_diffuse) + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + mem_size = ( *hHRTF )->num_iterations_diffuse[j] * sizeof( uint16_t ); + ( *hHRTF )->pIndex_frequency_max_diffuse[j] = (uint16_t *) malloc( mem_size ); + if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for pIndex_frequency_max_diffuse" ); + } + memcpy( ( *hHRTF )->pIndex_frequency_max_diffuse[j], hrtf_data_rptr, mem_size ); + hrtf_data_rptr += mem_size; + } + } + + // index_frequency_max_diffuse + ( *hHRTF )->index_frequency_max_diffuse = *( (uint16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( uint16_t ); + + // inv_diffuse_weight + for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ ) + { + ( *hHRTF )->inv_diffuse_weight[i] = *( (float *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( float ); + } + + // max_total_num_fsamp_per_iteration + max_total_num_fsamp_per_iteration = *( (uint16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( uint16_t ); + + // coeff_re (the size depends on pIndex_frequency_max) + for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ ) + { + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + mem_size = max_total_num_fsamp_per_iteration * sizeof( float ); + ( *hHRTF )->pOut_to_bin_re[i][j] = (float *) malloc( mem_size ); + if ( ( *hHRTF )->pOut_to_bin_re[i][j] == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for Out_to_bin_re" ); + } + memset( ( *hHRTF )->pOut_to_bin_re[i][j], 0x00, mem_size ); + + pOut_to_bin_wptr = ( *hHRTF )->pOut_to_bin_re[i][j]; + for ( k = 0; k < ( *hHRTF )->num_iterations[i][j]; k++ ) + { + mem_size = ( *hHRTF )->pIndex_frequency_max[i][j][k] * sizeof( float ); + memcpy( pOut_to_bin_wptr, hrtf_data_rptr, mem_size ); + hrtf_data_rptr += mem_size; + pOut_to_bin_wptr += ( *hHRTF )->pIndex_frequency_max[i][j][k]; + } + } + } + + // coeff_im (the size depends on pIndex_frequency_max) + for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ ) + { + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + mem_size = max_total_num_fsamp_per_iteration * sizeof( float ); + ( *hHRTF )->pOut_to_bin_im[i][j] = (float *) malloc( mem_size ); + if ( ( *hHRTF )->pOut_to_bin_im[i][j] == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for Out_to_bin_im" ); + } + memset( ( *hHRTF )->pOut_to_bin_im[i][j], 0x00, mem_size ); + + pOut_to_bin_wptr = ( *hHRTF )->pOut_to_bin_im[i][j]; + for ( k = 0; k < ( *hHRTF )->num_iterations[i][j]; k++ ) + { + mem_size = ( *hHRTF )->pIndex_frequency_max[i][j][k] * sizeof( float ); + memcpy( pOut_to_bin_wptr, hrtf_data_rptr, mem_size ); + hrtf_data_rptr += mem_size; + pOut_to_bin_wptr += ( *hHRTF )->pIndex_frequency_max[i][j][k]; + } + } + } + + // max_total_num_fsamp_per_iteration_diff + max_total_num_fsamp_per_iteration_diff = *( (uint16_t *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( uint16_t ); + + if ( max_total_num_fsamp_per_iteration_diff != 0 ) + { + // coeff_diffuse_re : The size depends on pIndex_frequency_max_diffuse + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + mem_size = max_total_num_fsamp_per_iteration_diff * sizeof( float ); + ( *hHRTF )->pOut_to_bin_diffuse_re[j] = (float *) malloc( mem_size ); + if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for pOut_to_bin_diffuse_re" ); + } + memset( ( *hHRTF )->pOut_to_bin_diffuse_re[j], 0x00, mem_size ); + + pOut_to_bin_wptr = ( *hHRTF )->pOut_to_bin_diffuse_re[j]; + for ( k = 0; k < ( *hHRTF )->num_iterations_diffuse[j]; k++ ) + { + mem_size = ( *hHRTF )->pIndex_frequency_max_diffuse[j][k] * sizeof( float ); + memcpy( pOut_to_bin_wptr, hrtf_data_rptr, mem_size ); + hrtf_data_rptr += mem_size; + pOut_to_bin_wptr += ( *hHRTF )->pIndex_frequency_max_diffuse[j][k]; + } + } + + // coeff_diffuse_im : The size depends on pIndex_frequency_max_diffuse + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + mem_size = max_total_num_fsamp_per_iteration_diff * sizeof( float ); + ( *hHRTF )->pOut_to_bin_diffuse_im[j] = (float *) malloc( mem_size ); + if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for pOut_to_bin_diffuse_im" ); + } + memset( ( *hHRTF )->pOut_to_bin_diffuse_im[j], 0x00, mem_size ); + + pOut_to_bin_wptr = ( *hHRTF )->pOut_to_bin_diffuse_im[j]; + for ( k = 0; k < ( *hHRTF )->num_iterations_diffuse[j]; k++ ) + { + mem_size = ( *hHRTF )->pIndex_frequency_max_diffuse[j][k] * sizeof( float ); + memcpy( pOut_to_bin_wptr, hrtf_data_rptr, mem_size ); + hrtf_data_rptr += mem_size; + pOut_to_bin_wptr += ( *hHRTF )->pIndex_frequency_max_diffuse[j][k]; + } + } + } + + return IVAS_ERR_OK; +} + +#ifdef HRTF_BINARY_FILE +static ivas_error init_fastconv_HRTF_handle( + HRTFS_FASTCONV *hHrtf /* i/o: HRTF FastConv handle */ +) +{ + int16_t i, j; + + if ( hHrtf == NULL ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + hHrtf->FASTCONV_HRIR_latency_s = 0; + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + set_zero( hHrtf->leftHRIRReal[i][j], BINAURAL_NTAPS ); + set_zero( hHrtf->leftHRIRImag[i][j], BINAURAL_NTAPS ); + set_zero( hHrtf->rightHRIRReal[i][j], BINAURAL_NTAPS ); + set_zero( hHrtf->rightHRIRImag[i][j], BINAURAL_NTAPS ); + } + } + + hHrtf->FASTCONV_HOA3_latency_s = 0; + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + set_zero( hHrtf->leftHRIRReal_HOA3[i][j], BINAURAL_NTAPS ); + set_zero( hHrtf->leftHRIRImag_HOA3[i][j], BINAURAL_NTAPS ); + set_zero( hHrtf->rightHRIRReal_HOA3[i][j], BINAURAL_NTAPS ); + set_zero( hHrtf->rightHRIRImag_HOA3[i][j], BINAURAL_NTAPS ); + } + } + + hHrtf->FASTCONV_BRIR_latency_s = 0; + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + set_zero( hHrtf->leftBRIRReal[i][j], BINAURAL_NTAPS_MAX ); + set_zero( hHrtf->leftBRIRImag[i][j], BINAURAL_NTAPS_MAX ); + set_zero( hHrtf->rightBRIRReal[i][j], BINAURAL_NTAPS_MAX ); + set_zero( hHrtf->rightBRIRImag[i][j], BINAURAL_NTAPS_MAX ); + } + } + + set_zero( hHrtf->fastconvReverberationTimes, CLDFB_NO_CHANNELS_MAX ); + set_zero( hHrtf->fastconvReverberationEneCorrections, CLDFB_NO_CHANNELS_MAX ); + + return IVAS_ERR_OK; +} + +static ivas_error create_fastconv_HRTF_from_rawdata( + HRTFS_FASTCONV_HANDLE *hHRTF, /* i/o: HRTF FastConv handle */ + char *hrtf_data, /* i : pointer to binary file */ + RENDERER_TYPE rend_type, /* i : Renderer type */ + BINAURAL_INPUT_AUDIO_CONFIG input_cfg /* i : Input binaural config */ +) +{ + int i, j; + char *hrtf_data_rptr; + + // if ( hHRTF == NULL ) + // { + // if ( ( ( *hHRTF ) = (HRTFS_FASTCONV_HANDLE) count_malloc( sizeof( HRTFS_FASTCONV ) ) ) == NULL ) + // { + // return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Can not allocate memory for Fastconv HRTF binary\n" ); + // } + + // init_fastconv_HRTF_handle( *hHRTF ); + // } + // else + // { + // return IVAS_ERR_INTERNAL; + // } + + hrtf_data_rptr = hrtf_data; + + // BINAURAL_CONVBANDS + if ( BINAURAL_CONVBANDS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (BINAURAL_CONVBANDS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + // HRIR + if ( rend_type == RENDERER_BINAURAL_FASTCONV && input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) + { + ( *hHRTF )->FASTCONV_HRIR_latency_s = *( (float *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( float ); + + if ( HRTF_LS_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HRTF_LS_CHANNELS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + if ( BINAURAL_NTAPS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (BINAURAL_NTAPS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->leftHRIRReal[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->leftHRIRImag[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->rightHRIRReal[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->rightHRIRImag[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + } + if ( rend_type == RENDERER_BINAURAL_FASTCONV && input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_HOA ) + { + // HRIR_HOA3 + ( *hHRTF )->FASTCONV_HOA3_latency_s = *( (float *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( float ); + + if ( HRTF_SH_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HRTF_SH_CHANNELS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + if ( BINAURAL_NTAPS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (BINAURAL_NTAPS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->leftHRIRReal_HOA3[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->leftHRIRImag_HOA3[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->rightHRIRReal_HOA3[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->rightHRIRImag_HOA3[i][j], hrtf_data_rptr, BINAURAL_NTAPS * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS * sizeof( float ); + } + } + } + // BRIR + if ( rend_type == RENDERER_BINAURAL_FASTCONV_ROOM && input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) + { + ( *hHRTF )->FASTCONV_BRIR_latency_s = *( (float *) ( hrtf_data_rptr ) ); + hrtf_data_rptr += sizeof( float ); + + if ( HRTF_LS_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HRTF_LS_CHANNELS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + if ( BINAURAL_NTAPS_MAX != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (BINAURAL_NTAPS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->leftBRIRReal[i][j], hrtf_data_rptr, BINAURAL_NTAPS_MAX * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS_MAX * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->leftBRIRImag[i][j], hrtf_data_rptr, BINAURAL_NTAPS_MAX * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS_MAX * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->rightBRIRReal[i][j], hrtf_data_rptr, BINAURAL_NTAPS_MAX * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS_MAX * sizeof( float ); + } + } + for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) + { + for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->rightBRIRImag[i][j], hrtf_data_rptr, BINAURAL_NTAPS_MAX * sizeof( float ) ); + hrtf_data_rptr += BINAURAL_NTAPS_MAX * sizeof( float ); + } + } + + // Reverb Parameters + if ( CLDFB_NO_CHANNELS_MAX != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (CLDFB_NO_CHANNELS_MAX)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + memcpy( ( *hHRTF )->fastconvReverberationTimes, hrtf_data_rptr, CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hrtf_data_rptr += CLDFB_NO_CHANNELS_MAX * sizeof( float ); + + memcpy( ( *hHRTF )->fastconvReverberationEneCorrections, hrtf_data_rptr, CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hrtf_data_rptr += CLDFB_NO_CHANNELS_MAX * sizeof( float ); + } + return IVAS_ERR_OK; +} + +ivas_error load_fastconv_HRTF_from_binary( + IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv, /* i/o: FastConv HRTF handle */ + const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ +) +{ + FILE *f_hrtf; + int32_t hrtf_data_size_max; + char *hrtf_data; + ivas_hrtfs_header_t hrtf_header; + ivas_error header_check_result; + ivas_hrtfs_file_header_t hrtfs_file_header; + int16_t hrtf_id; + + f_hrtf = hrtfReader->file; + + if ( ( header_check_result = read_and_check_hrtf_binary_file_header( &hrtfs_file_header, f_hrtf ) ) != IVAS_ERR_OK ) + { + return header_check_result; + } + + hrtf_data_size_max = hrtfs_file_header.max_data_size; + + /* Allocate the memory */ + + if ( hrtf_data_size_max == 0 ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (hrtf_data_size_max)" ); + } + + hrtf_data = (char *) malloc( hrtf_data_size_max ); + if ( hrtf_data == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); + } + + /* Read & load */ + + memset( hHrtfFastConv, 0x00, sizeof( HRTFS_FASTCONV ) ); + + for ( hrtf_id = 0; hrtf_id < hrtfs_file_header.nb_hrtf; hrtf_id++ ) + { + if ( read_hrtf_binary_header( &hrtf_header, f_hrtf ) != IVAS_ERR_OK ) + { + free( hrtf_data ); + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "HRTF binary file not compliant (number of HRTF)" ); + } + + if ( ( hrtf_header.frequency == 48000 ) && + ( ( hrtf_header.rend_type == RENDERER_BINAURAL_FASTCONV ) || ( hrtf_header.rend_type == RENDERER_BINAURAL_FASTCONV_ROOM ) ) ) + { + if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) + { + free( hrtf_data ); + return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); + } + + // Create the HRTF reading the raw data from the binary file + if ( ( create_fastconv_HRTF_from_rawdata( &hHrtfFastConv, hrtf_data, hrtf_header.rend_type, hrtf_header.input_cfg ) ) != IVAS_ERR_OK ) + { + free( hrtf_data ); + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create HRTF from binary file" ); + } + } + else + { + fseek( f_hrtf, hrtf_header.data_size, SEEK_CUR ); + } + } + free( hrtf_data ); + + return IVAS_ERR_OK; +} +#endif + + +#ifdef HRTF_BINARY_FILE +static ivas_error create_parambin_HRTF_from_rawdata( + HRTFS_PARAMBIN_HANDLE *hHRTF, /* i/o: Parametric binauralizer HRTF handle */ + char *hrtf_data /* i : pointer to binary file */ +) +{ + int i, j; + char *hrtf_data_rptr; + uint32_t data_size_tmp; + + hrtf_data_rptr = hrtf_data; + + // HRTF_SH_CHANNELS + if ( HRTF_SH_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HRTF_SH_CHANNELS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + // HRTF_NUM_BINS + if ( HRTF_NUM_BINS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HRTF_NUM_BINS)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + // HRTF + data_size_tmp = HRTF_NUM_BINS * sizeof( float ); + for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->hrtfShCoeffsRe[i][j], hrtf_data_rptr, data_size_tmp ); + hrtf_data_rptr += data_size_tmp; + } + } + for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + { + for ( j = 0; j < HRTF_SH_CHANNELS; j++ ) + { + memcpy( ( *hHRTF )->hrtfShCoeffsIm[i][j], hrtf_data_rptr, data_size_tmp ); + hrtf_data_rptr += data_size_tmp; + } + } + + // Reverb Parameters + if ( CLDFB_NO_CHANNELS_MAX != *( (uint16_t *) ( hrtf_data_rptr ) ) ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (CLDFB_NO_CHANNELS_MAX)" ); + } + hrtf_data_rptr += sizeof( uint16_t ); + + memcpy( ( *hHRTF )->parametricReverberationTimes, hrtf_data_rptr, CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hrtf_data_rptr += CLDFB_NO_CHANNELS_MAX * sizeof( float ); + + memcpy( ( *hHRTF )->parametricReverberationEneCorrections, hrtf_data_rptr, CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hrtf_data_rptr += CLDFB_NO_CHANNELS_MAX * sizeof( float ); + + memcpy( ( *hHRTF )->parametricEarlyPartEneCorrection, hrtf_data_rptr, CLDFB_NO_CHANNELS_MAX * sizeof( float ) ); + hrtf_data_rptr += CLDFB_NO_CHANNELS_MAX * sizeof( float ); + + return IVAS_ERR_OK; +} + +ivas_error load_parambin_HRTF_from_binary( + IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParamBin, /* i/o: Parametric binauralizer HRTF handle */ + const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ +) +{ + FILE *f_hrtf; + int32_t hrtf_data_size_max; + char *hrtf_data; + ivas_hrtfs_header_t hrtf_header; + ivas_error header_check_result; + ivas_hrtfs_file_header_t hrtfs_file_header; + int16_t hrtf_id; + + f_hrtf = hrtfReader->file; + + if ( ( header_check_result = read_and_check_hrtf_binary_file_header( &hrtfs_file_header, f_hrtf ) ) != IVAS_ERR_OK ) + { + return header_check_result; + } + + hrtf_data_size_max = hrtfs_file_header.max_data_size; + + /* Allocate the memory */ + + if ( hrtf_data_size_max == 0 ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (hrtf_data_size_max)" ); + } + + hrtf_data = (char *) malloc( hrtf_data_size_max ); + if ( hrtf_data == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); + } + + /* Read & load */ + memset( hHrtfParamBin, 0x00, sizeof( HRTFS_PARAMBIN ) ); + + for ( hrtf_id = 0; hrtf_id < hrtfs_file_header.nb_hrtf; hrtf_id++ ) + { + if ( read_hrtf_binary_header( &hrtf_header, f_hrtf ) != IVAS_ERR_OK ) + { + free( hrtf_data ); + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "HRTF binary file not compliant (number of HRTF)" ); + } + + if ( hrtf_header.rend_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) /* Parametric binauralizer data is represented as single entity */ + { + if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) + { + free( hrtf_data ); + return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); + } + + // Create the HRTF reading the raw data from the binary file + if ( ( create_parambin_HRTF_from_rawdata( &hHrtfParamBin, hrtf_data ) ) != IVAS_ERR_OK ) + { + free( hrtf_data ); + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create HRTF from binary file" ); + } + } + else + { + fseek( f_hrtf, hrtf_header.data_size, SEEK_CUR ); + } + } + free( hrtf_data ); + + return IVAS_ERR_OK; +} +#endif + + +/*---------------------------------------------------------------------* + * create_SetOfHRTF_from_binary() + * + * Create the HRTF data set from the binary file + *---------------------------------------------------------------------*/ + +ivas_error create_SetOfHRTF_from_binary( + IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF, /* i/o: HRTF CRend handle */ + const hrtfFileReader *hrtfReader, /* i: pointer to hrtfFileReader handle */ + int32_t output_Fs ) /* i: Output sampling frequency */ +{ + FILE *f_hrtf; + int32_t hrtf_data_size_max; + char *hrtf_data; + ivas_hrtfs_header_t hrtf_header; + HRTFS_DATA **hHRTF; + ivas_error header_check_result; + ivas_hrtfs_file_header_t hrtfs_file_header; + int16_t hrtf_id; + + f_hrtf = hrtfReader->file; + + if ( ( header_check_result = read_and_check_hrtf_binary_file_header( &hrtfs_file_header, f_hrtf ) ) != IVAS_ERR_OK ) + { + return header_check_result; + } + + hrtf_data_size_max = hrtfs_file_header.max_data_size; + + /* Allocate the memory */ + + if ( hrtf_data_size_max == 0 ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (hrtf_data_size_max)" ); + } + + hrtf_data = (char *) malloc( hrtf_data_size_max ); + if ( hrtf_data == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); + } + + /* Read & load */ + + memset( hSetOfHRTF, 0x00, sizeof( HRTFS_CREND ) ); + + for ( hrtf_id = 0; hrtf_id < hrtfs_file_header.nb_hrtf; hrtf_id++ ) + { + if ( read_hrtf_binary_header( &hrtf_header, f_hrtf ) != IVAS_ERR_OK ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "HRTF binary file not compliant (number of HRTF)" ); + } + + hHRTF = NULL; + if ( hrtf_header.frequency == output_Fs ) + { + if ( hrtf_header.rend_type == RENDERER_BINAURAL_MIXER_CONV ) + { + if ( hrtf_header.input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) + { + hHRTF = &( ( *hSetOfHRTF ).hHRTF_hrir_combined ); + } + else if ( hrtf_header.input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_HOA ) + { + hHRTF = &( ( *hSetOfHRTF ).hHRTF_hrir_hoa3 ); + } + } + else if ( hrtf_header.rend_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + if ( hrtf_header.input_cfg == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) + { + hHRTF = &( ( *hSetOfHRTF ).hHRTF_brir_combined ); + } + } + } + + if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); + } + + if ( hHRTF != NULL ) + { + // Create the HRTF reading the raw data from the binary file + if ( ( create_HRTF_from_rawdata( hHRTF, hrtf_data ) ) != IVAS_ERR_OK ) + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create HRTF from binary file" ); + } + } + } + + free( hrtf_data ); + + if ( ( ( *hSetOfHRTF ).hHRTF_hrir_combined == NULL ) || ( ( *hSetOfHRTF ).hHRTF_brir_combined == NULL ) || ( ( *hSetOfHRTF ).hHRTF_hrir_hoa3 == NULL ) ) + { + destroy_SetOfHRTF( hSetOfHRTF ); + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create all the HRTF from binary file" ); + } + + return IVAS_ERR_OK; +} + +#endif diff --git a/lib_util/hrtf_file_reader.h b/lib_util/hrtf_file_reader.h index ed3d572d56047e36cd629de40f40ec21b8755f15..b4465511507b5c7afd32809479da35ec7a73b2a3 100644 --- a/lib_util/hrtf_file_reader.h +++ b/lib_util/hrtf_file_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -36,6 +36,7 @@ #include #include "common_api_types.h" #include "ivas_error.h" +#include "options.h" typedef struct hrtfFileReader hrtfFileReader; @@ -72,4 +73,65 @@ ivas_error load_HRTF_binary( const hrtfFileReader *hrtfReader /* i/o: pointer to hrtfFileReader handle */ ); +#ifdef HRTF_BINARY_FILE +/*---------------------------------------------------------------------* + * create_SetOfHRTF_from_binary() + * + * Create the HRTF data set from the binary file + *---------------------------------------------------------------------*/ + +ivas_error create_SetOfHRTF_from_binary( + IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF, /* i/o: Set of HRTF CRend handle */ + const hrtfFileReader *hrtfReader, /* i: pointer to hrtfFileReader handle */ + int32_t output_Fs /* i: Output sampling frequency */ +); + +/*---------------------------------------------------------------------* + * destroy_SetOfHRTF() + * + * Destroy the HRTF data set. + *---------------------------------------------------------------------*/ + +ivas_error destroy_SetOfHRTF( + IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ +); + +#endif + +#ifdef HRTF_BINARY_FILE +/*---------------------------------------------------------------------* + * load_fastconv_HRTF_from_binary() + * + * Load FastConv HRTF binary data into the handle + *---------------------------------------------------------------------*/ + +ivas_error load_fastconv_HRTF_from_binary( + IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv, /* i/o: FastConv HRTF handle */ + const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ +); + + +/*---------------------------------------------------------------------* + * load_parambin_HRTF_from_binary() + * + * Load parametric binauralizer HRTF binary data into the handle + *---------------------------------------------------------------------*/ + +ivas_error load_parambin_HRTF_from_binary( + IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin, /* i/o: Parambin HRTF handle */ + const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ +); + +#endif + +/*---------------------------------------------------------------------* + * dealloc_HRTF_binary() + * + * Deallocated memory allocated by load_HRTF_binary + *---------------------------------------------------------------------*/ + +ivas_error dealloc_HRTF_binary( + IVAS_DEC_HRTF_HANDLE hHrtf /* i/o: HRTF handle */ +); + #endif /* IVAS_HRTF_FILE_READER_H */ diff --git a/lib_util/ism_file_reader.c b/lib_util/ism_file_reader.c index b511b304997c42ba9086f747b750aa3f93af4fc9..33fae320b58427730f054205efd420aca3de6e39 100644 --- a/lib_util/ism_file_reader.c +++ b/lib_util/ism_file_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/ism_file_reader.h b/lib_util/ism_file_reader.h index d618621d3210353c3860ef1453d105a05bcd3217..4e87b2f6bc3d529d19bfa4d80338880ca5c9b734 100644 --- a/lib_util/ism_file_reader.h +++ b/lib_util/ism_file_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/ism_file_writer.c b/lib_util/ism_file_writer.c index ac90e7b1ebcb0f43275df3b725f21a53df88ebe4..46705316c8c0f5f5e4662b4c96d2bccc64dff919 100644 --- a/lib_util/ism_file_writer.c +++ b/lib_util/ism_file_writer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -64,7 +64,7 @@ ivas_error IsmFileWriter_open( FILE *file; strncpy( metadata_filename_loc, filePathWav, sizeof( metadata_filename_loc ) - 1 ); - sprintf( ext_meta, ".%d.csv", obj_num ); + snprintf( ext_meta, sizeof( ext_meta ), ".%d.csv", obj_num ); const int32_t maxNumCharactersToAppend = (int32_t) sizeof( metadata_filename_loc ) - strlen( metadata_filename_loc ) - 1; strncat( metadata_filename_loc, ext_meta, maxNumCharactersToAppend ); @@ -116,7 +116,7 @@ ivas_error IsmFileWriter_writeFrame( file = ismWriter->file; /* IVAS_fmToDo: work in progress; currently position_azimuth, position_elevation, position_radius, spread, gain_factor */ - sprintf( char_buff, "%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f\n", ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor ); + snprintf( char_buff, sizeof( char_buff ), "%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f\n", ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor ); if ( file ) { diff --git a/lib_util/ism_file_writer.h b/lib_util/ism_file_writer.h index 1624eddd1aa7888427dc528192ea4c7e126982d6..4e1211cd8256798a0c21f7d58f32a0fa212933f9 100644 --- a/lib_util/ism_file_writer.h +++ b/lib_util/ism_file_writer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/jbm_file_reader.c b/lib_util/jbm_file_reader.c index 7360f0ced6f89f13f0d9aac10900cefba6986154..fe08d5cea61aaf12153dd244fc40a9d62136111c 100644 --- a/lib_util/jbm_file_reader.c +++ b/lib_util/jbm_file_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/jbm_file_reader.h b/lib_util/jbm_file_reader.h index dca0a6c13596b03b5a27012cd2083b9dfcee1348..1a453627468c04baf9417af44b4a13c40b5a0eac 100644 --- a/lib_util/jbm_file_reader.h +++ b/lib_util/jbm_file_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/jbm_file_writer.c b/lib_util/jbm_file_writer.c index bf34c5187279d47dcdaecb3a1dc37886ff6dbedb..0fce217e4efc2b0ec7a11a51da5573a1de0edfb1 100644 --- a/lib_util/jbm_file_writer.c +++ b/lib_util/jbm_file_writer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -78,7 +78,7 @@ ivas_error JbmOffsetFileWriter_open( return IVAS_ERR_FAILED_FILE_OPEN; } - self = calloc( sizeof( JbmTraceFileWriter ), 1 ); + self = calloc( sizeof( JbmOffsetFileWriter ), 1 ); self->file = file; self->file_path = calloc( sizeof( char ), strlen( jbmOffsetFilename ) + 1 ); strcpy( self->file_path, jbmOffsetFilename ); @@ -191,9 +191,6 @@ ivas_error JbmTraceFileWriter_open( JbmTraceFileWriter *self; FILE *file; -#ifdef SUPPORT_JBM_TRACEFILE -#endif - if ( strlen( jbmTraceFilename ) < 1 ) { return IVAS_ERR_FAILED_FILE_OPEN; @@ -227,8 +224,8 @@ ivas_error JbmTraceFileWriter_open( /*! r: error code */ ivas_error JbmTraceFileWriter_writeFrame( - const IVAS_JBM_TRACE_DATA *JbmTraceData, /* i : JBM trace data */ - JbmTraceFileWriter *jbmTraceWriter /* o : JbmTraceFileWriter handle */ + const IVAS_JBM_TRACE_DATA *data, /* i : JBM trace data */ + JbmTraceFileWriter *jbmTraceWriter /* o : JbmTraceFileWriter handle */ ) { FILE *file; @@ -242,21 +239,23 @@ ivas_error JbmTraceFileWriter_writeFrame( if ( file ) { + /* the first sample of the decoded/concealed frame will be played after the samples in the ring buffer */ + double playTime = data->systemTimestamp_ms + data->extBufferedSamples * 1000.0 / data->output_Fs; /* rtpSeqNo;rtpTs;rcvTime;playTime;active\n */ - if ( JbmTraceData->dataUnit_flag ) + if ( data->dataUnit_flag ) { - if ( JbmTraceData->partial_frame_flag == 1 ) + if ( data->partial_frame == 1 ) { - fprintf( file, "%d;%d;%d;%f;%d;%d\n", -1, -1, -1, JbmTraceData->playTime, JbmTraceData->lastDecodedWasActive, JbmTraceData->partialCopyOffset ); + fprintf( file, "%d;%d;%d;%f;%d;%d\n", -1, -1, -1, playTime, data->lastDecodedWasActive, data->partialCopyOffset ); } else { - fprintf( file, "%u;%u;%u;%f;%d\n", JbmTraceData->sequenceNumber, JbmTraceData->timeStamp, JbmTraceData->rcvTime, JbmTraceData->playTime, JbmTraceData->lastDecodedWasActive ); + fprintf( file, "%u;%u;%u;%f;%d\n", data->sequenceNumber, data->timeStamp, data->rcvTime, playTime, data->lastDecodedWasActive ); } } else { - fprintf( file, "%d;%d;%d;%f;%d\n", -1, -1, -1, JbmTraceData->playTime, JbmTraceData->lastDecodedWasActive ); + fprintf( file, "%d;%d;%d;%f;%d\n", -1, -1, -1, playTime, data->lastDecodedWasActive ); } } else diff --git a/lib_util/jbm_file_writer.h b/lib_util/jbm_file_writer.h index 5cfab08f613f02f1d7f2a65c752a08512d86bbc8..1dd308499e81ba5aecbda397416609fa198899dd 100644 --- a/lib_util/jbm_file_writer.h +++ b/lib_util/jbm_file_writer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/ls_custom_file_reader.c b/lib_util/ls_custom_file_reader.c index 58d78de068c92ddbf52acdaca962512e15b04895..d2e823c816cb85e7e12de6600a4cb5226b87101b 100644 --- a/lib_util/ls_custom_file_reader.c +++ b/lib_util/ls_custom_file_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -34,8 +34,8 @@ #include #include #include -#include "ivas_prot.h" -#include "prot.h" +#include "ivas_prot.h" // VE: !!!!! +#include "prot.h" // VE: !!!!! struct LsCustomFileReader diff --git a/lib_util/ls_custom_file_reader.h b/lib_util/ls_custom_file_reader.h index e35c06ea8842a76002a730c44f992f60c1e63bd7..390659cb7b7f5580141d409d07a1a060add4fb10 100644 --- a/lib_util/ls_custom_file_reader.h +++ b/lib_util/ls_custom_file_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/masa_file_reader.c b/lib_util/masa_file_reader.c index 918d613d379f3d06b64565d5575743e30d6a8be2..29ef9e347a608545fa029452741293328eea44d8 100644 --- a/lib_util/masa_file_reader.c +++ b/lib_util/masa_file_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -31,7 +31,8 @@ *******************************************************************************************************/ #include "masa_file_reader.h" -#include "ivas_prot.h" +#include "ivas_prot.h" // VE: !!!!! +#include "ivas_stat_com.h" #include #include #include diff --git a/lib_util/masa_file_reader.h b/lib_util/masa_file_reader.h index 898303c99e08cdde30815bac2214d720b134452b..8e9cd2fd728cbf3cf1b58b8a9cb5aee2f0a971f2 100644 --- a/lib_util/masa_file_reader.h +++ b/lib_util/masa_file_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/masa_file_writer.c b/lib_util/masa_file_writer.c index e8f9a09c68d812dfa9f3f4059932c1d4046cb90b..3b4df4f1c95ed74335a7994575bd4522d6e551a2 100644 --- a/lib_util/masa_file_writer.c +++ b/lib_util/masa_file_writer.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -66,7 +66,7 @@ static void getExtMasaMetadataFileName( /* sizeof( ext_meta ) accounts for terminating NULL, don't subtract extra 1 */ const int32_t maxNameLenWithoutExt = sizeof( metadata_filename[0] ) - sizeof( ext_meta ); strncpy( metadata_filename[0], outputWavFilename, maxNameLenWithoutExt ); - sprintf( ext_meta, ".met" ); + snprintf( ext_meta, sizeof( ext_meta ), ".met" ); /* strlen( metadata_filename[0] ) doesn't account for terminating NULL, subtract extra 1 */ const int32_t maxNumCharactersToAppend = (int32_t) ( sizeof( metadata_filename[0] ) - strlen( metadata_filename[0] ) - 1 ); diff --git a/lib_util/masa_file_writer.h b/lib_util/masa_file_writer.h index ce4ed2e238fdb651f87d49b9de844bac6767df51..29b4dd1b3f9aa4b72b108ab91118abd3a00996fc 100644 --- a/lib_util/masa_file_writer.h +++ b/lib_util/masa_file_writer.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/mime_io.c b/lib_util/mime_io.c index 36cd61adbbdc0f41e2da93ab34448a6ea12088dd..b640512466a1633ae442ad2b4b5ad4341400aaf4 100644 --- a/lib_util/mime_io.c +++ b/lib_util/mime_io.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -33,7 +33,7 @@ #include "options.h" #include "mime_io.h" #include "mime.h" -#include "prot.h" +#include "prot.h" // VE: !!!!! #include "string.h" #include #include diff --git a/lib_util/mime_io.h b/lib_util/mime_io.h index 770b4dd5e4bed5b5b70c6fda02880875e0d0b82e..91b9160529600b46447baf60dca5485c71a3ec1a 100644 --- a/lib_util/mime_io.h +++ b/lib_util/mime_io.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index 27eed3bf147a4e933c2748dd587a2d9f1d961fd3..3ade7e576a2885837c42fe623648488219bd6dd1 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -37,8 +37,8 @@ #include #include #include "cmdl_tools.h" -#include "prot.h" -#include "ivas_cnst.h" +#include "prot.h" // VE: !!!!! + /*------------------------------------------------------------------------------------------* * PreProc Macros @@ -90,17 +90,17 @@ static int16_t read_bool( if ( sscanf( pLine, "%s", (char *) &value ) != 1 ) { - return true; + return TRUE; } if ( strcmp( value, "TRUE" ) == 0 ) { - *pTarget = true; - return false; + *pTarget = TRUE; + return FALSE; } if ( strcmp( value, "FALSE" ) == 0 ) { - *pTarget = false; - return false; + *pTarget = FALSE; + return FALSE; } return true; @@ -418,7 +418,7 @@ ivas_error RenderConfigReader_read( pValue = (char *) calloc( strlen( pParams ), sizeof( char ) ); while ( sscanf( pParams + params_idx, "%64[^=]=%[^;];", item, pValue ) == 2 ) { - hRenderConfig->room_acoustics.override = true; + hRenderConfig->room_acoustics.override = TRUE; params_idx += (int32_t) ( strlen( item ) + strlen( pValue ) + 2 ); #ifdef DEBUGGING fprintf( stderr, " PARAM: %s -> %s\n", item, pValue ); diff --git a/lib_util/render_config_reader.h b/lib_util/render_config_reader.h index 1130b43b8cb7603ea0e0a80ef9bbb2ce8258d510..01509148cf87419aee09e3653a6503cb6fabd813 100644 --- a/lib_util/render_config_reader.h +++ b/lib_util/render_config_reader.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/rtpdump.c b/lib_util/rtpdump.c index 79a4e43ede8133de491186177ef706817f9a3f45..262f114a13ef015d83562bb35d5d978ed0bc794a 100644 --- a/lib_util/rtpdump.c +++ b/lib_util/rtpdump.c @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/rtpdump.h b/lib_util/rtpdump.h index 3b5cb6b64b35359bec260727560c3ebbeef2dd8e..46300c0e9a1e85fbd704ea54df6da123e40df741 100644 --- a/lib_util/rtpdump.h +++ b/lib_util/rtpdump.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/tinywavein_c.h b/lib_util/tinywavein_c.h index 1f826a03013a040952958aefd1aa728778227c46..2d9a218934cf29bccc1b96ba4b0b169dce7ef37f 100644 --- a/lib_util/tinywavein_c.h +++ b/lib_util/tinywavein_c.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/lib_util/tinywaveout_c.h b/lib_util/tinywaveout_c.h index 39cde0d3383801c81b75139324d5dfab2ddb2555..d0531eb6653c47288f7db1b6f1c84d454f55227d 100644 --- a/lib_util/tinywaveout_c.h +++ b/lib_util/tinywaveout_c.h @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/readme.txt b/readme.txt index 86e223b32cf6823b8ed3a9c7e0a25a0dcceb8b23..95b9a814eca1d4bb44a4623a087a33f236d9289e 100644 --- a/readme.txt +++ b/readme.txt @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/IvasBuildAndRun.py b/scripts/IvasBuildAndRun.py index 9053d55291878d5df10e2293b4aef359fdb57d08..554c216b184eb47331ffbad3947ad767ae16d17f 100755 --- a/scripts/IvasBuildAndRun.py +++ b/scripts/IvasBuildAndRun.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/IvasBuildAndRunChecks.py b/scripts/IvasBuildAndRunChecks.py index 0b2a2932c010357aa66d3c4d3d343a74fff1d62d..f32ade77733d567f2dd235dea577d781383785f1 100755 --- a/scripts/IvasBuildAndRunChecks.py +++ b/scripts/IvasBuildAndRunChecks.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/README.md b/scripts/README.md index 57084e1bdf8c2ff51559193f94e6e27c67ebb794..fec54ffeac8a7929b329d55ecb72641eb79b0e22 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,6 +1,6 @@ Find all rows which are constant (sum of abs diff is zero). The >0 is -% to limit the reordering to constant values only. -[~,indx] = sort(sum(abs(diff(mem,[],2)),2)>0); -mem = mem(indx,:); -names = names(indx); - -bar(mem',1,'stacked') -legend(names,'location','eastoutside','interpreter','none') -xlabel('frame') -ylabel('memory size') \ No newline at end of file diff --git a/scripts/mem_analysis.py b/scripts/mem_analysis.py new file mode 100644 index 0000000000000000000000000000000000000000..fa2030c033fbb06ec86a08147572e14c6dfe59e8 --- /dev/null +++ b/scripts/mem_analysis.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python3 + +import os +import argparse +import csv +import sys +import struct +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt + +# set matplotlib in interactive mode (plots figure and return control) +# plt.ion() +# plt.close('all') + +parser = argparse.ArgumentParser(description='Analyze memory output file') +parser.add_argument('input',type=str,help='Memory analysis file (e.g. mem_analysis.csv)') +args = parser.parse_args() +fileIn = args.input + +# read input .csv file +df = pd.read_csv(fileIn, header=None, names=['action_type', 'frame', 'name', 'line_no', 'mem_size']) +Nframes = max(df['frame']) + +# merge identical memory blocks -> create new column 'count' +df = df.groupby(df.columns.tolist(),as_index=False).size() +df = df.rename(columns={'size': 'count'}) + +# remove column 'action_type' +df.drop(columns = ['action_type']) + +# merge records with the same signature but different frame number -> create list of frames (sort in ascending order) +df = df.groupby(['name', 'line_no', 'mem_size', 'count'],as_index=False).agg({'frame': list}) +df['frame'] = df['frame'].apply(np.sort) +df['list_len'] = df['frame'].apply(len) # auxiliary column -> length of the list + +# merge records with the same name and frame but different line number -> sum memory sizes and counts +df = df.groupby(['name', 'list_len'],as_index=False).agg({'line_no': list, 'mem_size': sum, 'count':sum, 'frame':'first'}) + +# sort by memory size (put inter-frame memory blocks to the bottom) +select_inter = (df['list_len'] == 2) & (df.apply(lambda row : row['frame'][-1] - row['frame'][0], axis = 1) >= Nframes) +df_inter = df[select_inter] +df_inter = df_inter.sort_values(by=['mem_size'], ascending=False) +df_intra = df[~select_inter] +df_intra = df_intra.sort_values(by=['list_len'], ascending=True) + +# plot inter-frame memory blocks in horizontal bar graph (use .broken_barh method) +fig, ax = plt.subplots() +colors = iter(plt.cm.rainbow(np.linspace(0, 1, len(df.index)))) +y_ticks = [] +y_tick_labels = [] +y_low = 1 +for index, row in df_inter.iterrows(): + l = f"{row['name']} on lines: {row['line_no']}, total memory size: {row['count']}x{row['mem_size']}" + fms = row['frame'].reshape((-1,2)) # convert frame numbers to two-column format + fms[:,1] -= fms[:,0] # second column should now represent the duration of the segment + fmsT = fms.T + fms_list = list(zip(fmsT[0], fmsT[1])) + c = next(colors) + ax.broken_barh(xranges=fms_list, yrange=(y_low, row['count']), label=l, color=c) + y_ticks.append(y_low + 0.5 * row['count']) + y_tick_labels.append(row['name']) + y_low += row['count'] + 0.5 + print(l + f", {row['count'] * fms.shape[0]/Nframes:.3f} mallocs per frame") + +# plot intra-frame memory blocks in horizontal bar graph (use .broken_barh method) +df_intra = df_intra.groupby(['name'],as_index=False).agg({'list_len': list, 'line_no': list, 'mem_size': list, 'count': list, 'frame': list}) +for index, row in df_intra.iterrows(): + # repeat for all grouped memory records in the row + for j in range(len(row['list_len'])): + l = f"{row['name']} on lines: {row['line_no'][j]}, total memory size: {row['count'][j]}x{row['mem_size'][j]}" + fms = row['frame'][j].astype(float).reshape((-1,2)) # convert frame numbers to two-column format + fms[:,1] -= fms[:,0] # second column should now represent the duration of the segment + idx_zero = fms[:,1] == 0 # find zero-length segments -> these are intra-frame memory blocks + fms[idx_zero, 0] += 0.1 + fms[idx_zero, 1] = 0.8 + fmsT = fms.T + fms_list = list(zip(fmsT[0], fmsT[1])) + c = next(colors) + ax.broken_barh(xranges=fms_list, yrange=(y_low, row['count'][j]), label=l, color=c, alpha=0.6) + print(l + f", {row['count'][j] * fms.shape[0]/Nframes:.3f} mallocs per frame") + y_ticks.append(y_low + 0.5 * max(row['count'])) + y_tick_labels.append(row['name']) + y_low += max(row['count']) + 0.5 + +ax.set_yticks(y_ticks) +ax.set_yticklabels(y_tick_labels) +ax.set_ylabel('Memory size') +ax.set_xlabel('Frame') +ax.set_title('Memory analysis') + +# shrink current axis's height by 20% on the bottom to fit the legend +box = ax.get_position() +ax.set_position([box.x0, box.y0 + box.height * 0.2, box.width, box.height * 0.8]) + +# insert the legend below the graph +ax.legend(loc="upper left", bbox_to_anchor=(0, -0.1), ncol=2, borderaxespad=0, fontsize='small') + +# magnify to "almost" fullscreen size (select the alternative for your backend) +fig = plt.gcf() +fig.set_size_inches(15, 9) # we need to set the size manually, otherwise savefig will save the figure in the default size +mng = plt.get_current_fig_manager() +mng.full_screen_toggle() +# mng.frame.Maximize(True) +# mng.window.showMaximized() +# mng.window.state('zoomed') + +# show and save the figure (use block=True to wait until Figure is closed manually) +plt.savefig(os.path.splitext(args.input)[0] + '.png', dpi=100, bbox_inches='tight') +plt.show(block=True) diff --git a/scripts/parse_options_h.sh b/scripts/parse_options_h.sh index 452e87f9b8346341dd5f0575176c338977f9aa68..0c90faefc00832b20bfd8aaf17c922d350a6b441 100755 --- a/scripts/parse_options_h.sh +++ b/scripts/parse_options_h.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/parse_selftest_summary.py b/scripts/parse_selftest_summary.py index 17ac7678f4ae66b2175165502e1b56cd8851b78b..56b36a20c47329a263c3a5165556b3612363a983 100755 --- a/scripts/parse_selftest_summary.py +++ b/scripts/parse_selftest_summary.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/plot_meta_data.py b/scripts/plot_meta_data.py index 62727f46db404adfaa2b953d14dacdd950d79aca..f104337e01e4bf9c8d09ea4aece1b7afcb6a4b2b 100755 --- a/scripts/plot_meta_data.py +++ b/scripts/plot_meta_data.py @@ -2,7 +2,7 @@ __license__ = \ """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/prepare_instrumentation.sh b/scripts/prepare_instrumentation.sh index d9fab685eab4ef6c8fed771d68e547608018b74c..17179fc57c62800b71b6624616220586be7b2cf1 100755 --- a/scripts/prepare_instrumentation.sh +++ b/scripts/prepare_instrumentation.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -30,13 +30,9 @@ # the United Nations Convention on Contracts on the International Sales of Goods. # -emulator="" system=`uname -s` if [[ ($system == "Linux") && (`uname -a` =~ (microsoft|Microsoft|wsl|WSL) ) ]]; then - system="WSL" -fi -if [[ ($system == "Linux") || ($system == "Darwin") ]]; then - emulator="wine" + system="Linux" fi coan_exists () { @@ -88,22 +84,26 @@ if [ $? -ne 0 ]; then exit -1 fi -# strip switches, to remove the macros +# strip switches, to remove the macros (turn on extended globing to allow !(pattern*) matching) +shopt -s extglob if coan_exists; then - coan source --replace --no-transients -E -K --file $ifdef_list $targetdir/lib_{com,dec,enc,rend,util,debug}/*.[hc] + # remove WMOPS and MEM_COUNT_DETAILS from the list to preserve the options in the instrumented code + sed -i "/-DWMOPS/d" $ifdef_list + sed -i "/-UMEM_COUNT_DETAILS/d" $ifdef_list + + coan source --replace --no-transients -E -K --file $ifdef_list $targetdir/lib_{com,dec,enc,rend,util,debug}/!(wmc_auto*).[hc] coan source --replace --no-transients -E -K --file $ifdef_list $targetdir/apps/*.[hc] else ./strip_defines_cppp.sh $targetdir $ifdef_list fi +shopt -u extglob # patch code before wmc_tool: replace hexadecimal unsigned long constants (0x...UL) by regular integer constant + cast to unsigned long find $targetdir -name "*.[ch]" -exec sed -i.bak -e "s/\(0x[0-9a-fA-F]*\)UL/\(\(unsigned long\)\1\)/" \{\} \; -# run wmc_tool using wine -${emulator} ./wmc_tool.exe $targetdir/lib_enc/*.c /ic /op > /dev/null -${emulator} ./wmc_tool.exe $targetdir/lib_com/*.c /ic /op > /dev/null -${emulator} ./wmc_tool.exe $targetdir/lib_dec/*.c /ic /op > /dev/null -${emulator} ./wmc_tool.exe $targetdir/lib_rend/*.c /ic /op > /dev/null +# run wmc_tool +"tools/$system/wmc_tool" -m "$targetdir/apps/encoder.c" "$targetdir/lib_enc/*.c" "$targetdir/lib_com/*.c" >> /dev/null +"tools/$system/wmc_tool" -m "$targetdir/apps/decoder.c" "$targetdir/lib_dec/*.c" "$targetdir/lib_rend/*.c" >> /dev/null # automatically enable #define WMOPS in options.h sed -i.bak -e "s/\/\*\s*\(#define\s*WMOPS\)\s*\*\//\1/g" $targetdir/lib_com/options.h diff --git a/scripts/prepare_mem_dryrun.py b/scripts/prepare_mem_dryrun.py new file mode 100644 index 0000000000000000000000000000000000000000..21f5b8114592067bdb0b9d04d00fa9bb20c22227 --- /dev/null +++ b/scripts/prepare_mem_dryrun.py @@ -0,0 +1,29 @@ +#!/bin/python3 + +import re, os, fnmatch + +sub = ['free','malloc','calloc'] +dirs = ['./lib_com','./lib_enc','./lib_dec','./lib_rend'] +suffix = '*.c' + +skip = 0 + +for d in dirs: + print(d) + for path, ds, files in os.walk(d): + for filename in fnmatch.filter(files, suffix): + fileIn = os.path.join(path, filename) + with open(fileIn, 'r') as f_in: + lines = f_in.readlines() + with open(fileIn, 'w') as f_out: + for line in lines: + if re.search(r'#define\W+WMC_TOOL_SKIP', line): + skip = 1 + elif re.search(r'#undef\W+WMC_TOOL_SKIP', line): + skip = 0 + else: + if not skip: + for s in sub: + line = re.sub(r'\b%s\b' % (s), '%s' % (s+'_'), line) + f_out.write(line) + diff --git a/scripts/pyaudio3dtools/__init__.py b/scripts/pyaudio3dtools/__init__.py index fa204bae8274e3ae00bb2690c50fd3a9c26be003..9870fb6620c859e7e7195c8dae52d16d67841713 100644 --- a/scripts/pyaudio3dtools/__init__.py +++ b/scripts/pyaudio3dtools/__init__.py @@ -1,5 +1,5 @@ """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/audio3dtools.py b/scripts/pyaudio3dtools/audio3dtools.py index c2b1ff46d129d7a7d8d8ebb318d60aeb010f5903..a325a433b5c323e04b4d7f9280edad46c58b698b 100755 --- a/scripts/pyaudio3dtools/audio3dtools.py +++ b/scripts/pyaudio3dtools/audio3dtools.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/audioarray.py b/scripts/pyaudio3dtools/audioarray.py index 917cdf59c6537a30153bb42ba468ed1f62e8fc36..87fc50b4632de86fd9e88c4042980cf76fd64f38 100644 --- a/scripts/pyaudio3dtools/audioarray.py +++ b/scripts/pyaudio3dtools/audioarray.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -221,7 +221,7 @@ def cut(x: np.ndarray, limits: Tuple[int, int]) -> np.ndarray: return y -def compare(ref: np.ndarray, test: np.ndarray, fs: int) -> dict: +def compare(ref: np.ndarray, test: np.ndarray, fs: int, per_frame: bool=True) -> dict: """Compare two audio arrays Parameters @@ -246,12 +246,17 @@ def compare(ref: np.ndarray, test: np.ndarray, fs: int) -> dict: "max_abs_diff": 0, "max_abs_diff_pos_sample": 0, "max_abs_diff_pos_channel": 0, - "max_abs_diff_pos_frame": 0, "nsamples_diff": 0, "nsamples_diff_percentage": 0.0, - "nframes_diff": 0, - "nframes_diff_percentage": 0.0, + "first_diff_pos_sample": -1, + "first_diff_pos_channel": -1, + "first_diff_pos_frame": -1 } + if per_frame: + result["max_abs_diff_pos_frame"] = 0 + result["nframes_diff"] = 0 + result["nframes_diff_percentage"] = 0.0 + if max_diff != 0: if diff.ndim == 1: nsamples_total = diff.shape @@ -264,25 +269,40 @@ def compare(ref: np.ndarray, test: np.ndarray, fs: int) -> dict: max_diff_pos[0][0] // framesize, max_diff_pos[1][0], ] + + first_diff_pos = np.nonzero(diff) + first_diff_pos = [ + first_diff_pos[0][0], + first_diff_pos[0][0] // framesize, + first_diff_pos[1][0], + ] + nsamples_diff = np.nonzero(diff)[0].size nsamples_diff_percentage = nsamples_diff / (nsamples_total * nchannels) * 100.0 nframes = nsamples_total // framesize nframes_diff = 0 - for fr in range(nframes): - diff_fr = diff[fr * framesize : ((fr + 1) * framesize), :] - nframes_diff += 1 if diff_fr.nonzero()[0].size > 0 else 0 - nframes_diff_percentage = nframes_diff / nframes * 100.0 + result = { "bitexact": False, "max_abs_diff": max_diff, "max_abs_diff_pos_sample": max_diff_pos[0], "max_abs_diff_pos_channel": max_diff_pos[2], - "max_abs_diff_pos_frame": max_diff_pos[1], "nsamples_diff": nsamples_diff, "nsamples_diff_percentage": nsamples_diff_percentage, - "nframes_diff": nframes_diff, - "nframes_diff_percentage": nframes_diff_percentage, + "first_diff_pos_sample": first_diff_pos[0], + "first_diff_pos_channel": first_diff_pos[2], + "first_diff_pos_frame": first_diff_pos[1], } + + if per_frame: + for fr in range(nframes): + diff_fr = diff[fr * framesize : ((fr + 1) * framesize), :] + nframes_diff += 1 if diff_fr.nonzero()[0].size > 0 else 0 + nframes_diff_percentage = nframes_diff / nframes * 100.0 + result["max_abs_diff_pos_frame"] = max_diff_pos[1] + result["nframes_diff"] = nframes_diff + result["nframes_diff_percentage"] = nframes_diff_percentage + return result diff --git a/scripts/pyaudio3dtools/audiofile.py b/scripts/pyaudio3dtools/audiofile.py index b03b472ae908aa3d57269d3b9fede4167deb3eeb..daa562f94afb1bc2fb56c92e0f5599c58c2ec976 100644 --- a/scripts/pyaudio3dtools/audiofile.py +++ b/scripts/pyaudio3dtools/audiofile.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -764,3 +764,46 @@ def get_wav_file_info(filename: str) -> dict: "ext_param_size": ext_param_size, "ext_param": ext_param, } + + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser(description="Tool for basic operations on audio files") + subparsers = parser.add_subparsers() + + def pre_trim_wrapper(pre_trim_args): + if pre_trim_args.input_file.endswith(".wav"): + input_file_properties = get_wav_file_info(pre_trim_args.input_file) + else: + print("Delay currently only supported with WAV file input") + exit(-1) + + x, _ = readfile(pre_trim_args.input_file, fs=input_file_properties["fs"], nchannels=input_file_properties["channels"]) + trim = int(pre_trim_args.amount_in_ms * input_file_properties["fs"] / 1000) + x = x[trim:] + writefile(pre_trim_args.output_file, x, fs=input_file_properties["fs"]) + + + parser_delay = subparsers.add_parser("pre-trim", help="Trim a given amount of content from the beginning of the file") + parser_delay.add_argument("amount_in_ms", type=float, help="Trim amount milliseconds.") + parser_delay.add_argument("input_file") + parser_delay.add_argument("output_file") + parser_delay.set_defaults(func=pre_trim_wrapper) + + def convert_wrapper(convert_args): + if not convert_args.input_file.endswith(".wav"): + print("Convert currently only supported with WAV file input") + exit(-1) + + convertfile(convert_args.input_file, convert_args.output_file) + + parser_convert = subparsers.add_parser( + "convert", help="Convert file format (output file extension determines output format)" + ) + parser_convert.add_argument("input_file") + parser_convert.add_argument("output_file") + parser_convert.set_defaults(func=convert_wrapper) + + args = parser.parse_args() + args.func(args) diff --git a/scripts/pyaudio3dtools/binauralrenderer.py b/scripts/pyaudio3dtools/binauralrenderer.py index d5004c06f38787fbff9a81898721ce2749b36e51..2567b433db993e0029b66cccc477a44d34ae110b 100644 --- a/scripts/pyaudio3dtools/binauralrenderer.py +++ b/scripts/pyaudio3dtools/binauralrenderer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/hoadecoder.py b/scripts/pyaudio3dtools/hoadecoder.py index 9879980259651bc2190ae4b2e9c77d493483637c..c37ceb3bdcf6f04a91308583ac3d5c9df76c12a5 100644 --- a/scripts/pyaudio3dtools/hoadecoder.py +++ b/scripts/pyaudio3dtools/hoadecoder.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/masarenderer.py b/scripts/pyaudio3dtools/masarenderer.py index 4ae7a9da3bd97cfdd10c4f62267054b14a605e68..ff9a3612a4f86ba7211708be81f678aadf5141a2 100644 --- a/scripts/pyaudio3dtools/masarenderer.py +++ b/scripts/pyaudio3dtools/masarenderer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/quaternions/__init__.py b/scripts/pyaudio3dtools/quaternions/__init__.py index ccd22bb925d7eefd3fe5319b88cbf5a626040557..8f1f04c36906bb9a43d1c3226aca6eced4f63498 100644 --- a/scripts/pyaudio3dtools/quaternions/__init__.py +++ b/scripts/pyaudio3dtools/quaternions/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/quaternions/functions.py b/scripts/pyaudio3dtools/quaternions/functions.py index a36c6cd026d9feb5be0953b71d7b6f8fe54d5602..6b30ccb5ee0e269cde63149b78ee15a5dbab332f 100644 --- a/scripts/pyaudio3dtools/quaternions/functions.py +++ b/scripts/pyaudio3dtools/quaternions/functions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/rotation.py b/scripts/pyaudio3dtools/rotation.py index 5fd9707167b402e718314e280bf9622101228d71..cbd76aef3fe468378674cd13dc5de12f4ef60c02 100644 --- a/scripts/pyaudio3dtools/rotation.py +++ b/scripts/pyaudio3dtools/rotation.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/spatialaudioconvert.py b/scripts/pyaudio3dtools/spatialaudioconvert.py index 04c77d0ac4c21c1ed9d61e0cf712e64e30fceb00..0040f28acea8ca519189f920a1bc516ecf1991ca 100644 --- a/scripts/pyaudio3dtools/spatialaudioconvert.py +++ b/scripts/pyaudio3dtools/spatialaudioconvert.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/spatialaudioformat.py b/scripts/pyaudio3dtools/spatialaudioformat.py index 40f08800c4ffb5c81da00eedd1030d276b7d9f26..524e4d61f50fe50d05f75093be563b015f0468e9 100644 --- a/scripts/pyaudio3dtools/spatialaudioformat.py +++ b/scripts/pyaudio3dtools/spatialaudioformat.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyaudio3dtools/spatialmetadata.py b/scripts/pyaudio3dtools/spatialmetadata.py index fa89595b70e0ceb2a14abbee716e5fc9a07a4780..3cf1338d4fb45ce47f04b4fc905a418a576059c1 100644 --- a/scripts/pyaudio3dtools/spatialmetadata.py +++ b/scripts/pyaudio3dtools/spatialmetadata.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyivastest/IvasBaseClass.py b/scripts/pyivastest/IvasBaseClass.py index 570e32d3fc77a294ac265602a9587357157fa147..4c7a1a67360e668d655e42e286d869bd63abe9bb 100644 --- a/scripts/pyivastest/IvasBaseClass.py +++ b/scripts/pyivastest/IvasBaseClass.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyivastest/IvasModeAnalyzer.py b/scripts/pyivastest/IvasModeAnalyzer.py index 678af1906a08ff3512acb5af7a6c138fd066958f..fed4f29ecdcbf16219db68176a62e366d8944d5d 100644 --- a/scripts/pyivastest/IvasModeAnalyzer.py +++ b/scripts/pyivastest/IvasModeAnalyzer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -46,51 +46,67 @@ INSTRUMENTED_RESULTS = { "WMOPS": { "keyword": "total", "number_format": "{:.5g}", - "position": 3, + "position": 2, "max_or_add": "add", "keyword_suffix": False, "strip_suffix": False, "encdec": 2, }, - "SRAM": { - "keyword": "Static RAM size", + "RAM": { + "keyword": "Maximum RAM (stack + heap) size:", "number_format": "{:.0f}", - "position": 4, + "position": 0, "max_or_add": "add", - "keyword_suffix": True, - "strip_suffix": True, + "keyword_suffix": False, + "strip_suffix": False, + "encdec": 2, + }, + "HEAP": { + "keyword": "Maximum inter-frame heap size:", + "number_format": "{:.0f}", + "position": 0, + "max_or_add": "add", + "keyword_suffix": False, + "strip_suffix": False, + "encdec": 2, + }, + "HEAP_INTRA": { + "keyword": "Maximum intra-frame heap size:", + "number_format": "{:.0f}", + "position": 0, + "max_or_add": "add", + "keyword_suffix": False, + "strip_suffix": False, "encdec": 2, }, - "DRAM": { - "keyword": "Stack size", + "STACK": { + "keyword": "Maximum stack size:", "number_format": "{:.0f}", - "position": 3, + "position": 0, "max_or_add": "max", - "keyword_suffix": True, - "strip_suffix": True, + "keyword_suffix": False, + "strip_suffix": False, "encdec": 2, }, "PROM": { - "keyword": "PROM size", + "keyword": "Program ROM size", "number_format": "{:.0f}", - "position": 3, + "position": 0, "max_or_add": "add", "keyword_suffix": True, "strip_suffix": True, "encdec": 4, }, - "TABLES": { - "keyword": "Table ROM size", + "TROM": { + "keyword": "Table ROM (const data) size", "number_format": "{:.0f}", - "position": 4, + "position": 0, "max_or_add": "add", "keyword_suffix": True, "strip_suffix": True, "encdec": 4, }, } - - HTML_DOCTYPE = """""" HTML_META = ( @@ -254,32 +270,44 @@ class IvasModeAnalyzer(IvasModeCollector): @staticmethod def get_log_value_from_file( - filename: str, keyword: str, position: int, strip_suffix=0 + filename: str, keywords: list, position: int, strip_suffix=0 ): """ Parameters ---------- - filename : + filename : log filename - keyword : + keywords : list of keywords to be searched in the log file (must be present on a single line) - position : + position : index to the list of extracted values strip_suffix : (Default value = 0) Returns ------- + + First value extracted from the line in the log file containing all keywords """ - loglines = [] + + if type(keywords) != list: + keywords = [keywords] + if os.path.exists(filename): fp = open(filename) loglines = fp.readlines() - return IvasModeAnalyzer.get_log_value( - loglines, keyword, position, strip_suffix=strip_suffix - ) + fp.close() + matching_lines = [line for line in loglines if all(keyword in line for keyword in keywords)] + + for line in matching_lines: + all_values_on_line = [float(s) for s in line.split() if re.match(r'^[0-9\.]*$', s)] + if all_values_on_line: + return all_values_on_line[position] + + return -1.0 + def sort_log_modes(self): list_to_sort = [] @@ -363,9 +391,9 @@ class IvasModeAnalyzer(IvasModeCollector): result_table = [["conf", "com"]] else: if max_or_add == "add": - result_table = [["conf", "enc", "dec", "com", "total"]] + result_table = [["conf", "enc", "dec", "com", "rend", "total"]] if max_or_add == "max": - result_table = [["conf", "enc", "dec", "com", "max"]] + result_table = [["conf", "enc", "dec", "com", "rend", "max"]] sorted_modes = self.sort_log_modes() @@ -389,7 +417,7 @@ class IvasModeAnalyzer(IvasModeCollector): enc_value, self.get_log_value_from_file( enc_log_name, - " ".join([keyword, "\(encoder\)"]), + [keyword, "lib_enc"], position, strip_suffix=strip_suffix, ), @@ -411,7 +439,7 @@ class IvasModeAnalyzer(IvasModeCollector): com_value, self.get_log_value_from_file( enc_log_name, - " ".join([keyword, "\(common\)"]), + [keyword, "lib_com"], position, strip_suffix=strip_suffix, ), @@ -427,15 +455,17 @@ class IvasModeAnalyzer(IvasModeCollector): for oc in self.selected_logs[mode]["oc_list"]: formatted_name_oc = formatted_name + " to " + oc dec_value = -1 + rend_value = -1 for item in self.selected_logs[mode]["items"]: if oc in self.selected_logs[mode]["items"][item]["dec"]: dec_log_name = self.get_dec_log_file_name(item, mode, oc) + # get dec if keyword_suffix == 1: dec_value = max( dec_value, self.get_log_value_from_file( dec_log_name, - " ".join([keyword, "\(decoder\)"]), + [keyword, "lib_dec"], position, strip_suffix=strip_suffix, ), @@ -450,6 +480,27 @@ class IvasModeAnalyzer(IvasModeCollector): strip_suffix=strip_suffix, ), ) + # get rend + if keyword_suffix == 1: + rend_value = max( + rend_value, + self.get_log_value_from_file( + dec_log_name, + [keyword, "lib_rend"], + position, + strip_suffix=strip_suffix, + ), + ) + else: + rend_value = max( + rend_value, + self.get_log_value_from_file( + dec_log_name, + keyword, + position, + strip_suffix=strip_suffix, + ), + ) if encdec == 2: if max_or_add == "add": total = number_format.format( @@ -475,13 +526,13 @@ class IvasModeAnalyzer(IvasModeCollector): elif encdec == 4: if max_or_add == "add": total = number_format.format( - float(enc_value) + float(dec_value) + float(com_value) + float(enc_value) + float(dec_value) + float(com_value) + float(rend_value) ) elif max_or_add == "max": total = number_format.format( max( float(enc_value) + float(com_value), - float(dec_value) + float(com_value), + float(dec_value) + float(com_value) + float(rend_value), ) ) result_line = [ @@ -489,6 +540,7 @@ class IvasModeAnalyzer(IvasModeCollector): number_format.format(enc_value), number_format.format(float(dec_value)), number_format.format(com_value), + number_format.format(rend_value), total, ] result_table.append(result_line) @@ -885,6 +937,10 @@ class IvasModeAnalyzer(IvasModeCollector): ------- """ + + if not os.path.exists(os.path.dirname(csv_file_name)): + os.makedirs(os.path.dirname(csv_file_name)) + with open(csv_file_name + ".csv", "w", newline="\n") as f: header = result_table.pop(0) # write header diff --git a/scripts/pyivastest/IvasModeCollector.py b/scripts/pyivastest/IvasModeCollector.py index ab466d0b9d84c3d434a4d4eda1a31cad48b45c5e..2a9361a0784faaf8e28d0ea868d677a190efd94f 100644 --- a/scripts/pyivastest/IvasModeCollector.py +++ b/scripts/pyivastest/IvasModeCollector.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyivastest/IvasModeRunner.py b/scripts/pyivastest/IvasModeRunner.py index 1c91c3f39f217c5453619bd8070101bef77f57ff..114991c3743c06e610ea85f784dba0843d75e70a 100644 --- a/scripts/pyivastest/IvasModeRunner.py +++ b/scripts/pyivastest/IvasModeRunner.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -829,7 +829,7 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector): enc_log = open(enc_log_name, "a") enc_log.write(" ".join(proc_cmd)) proc_result = subprocess.run( - proc_cmd, capture_output=True, text=True + proc_cmd, capture_output=True, text=True, encoding="utf8" ) enc_log.write(proc_result.stderr) enc_log.write(proc_result.stdout) @@ -840,9 +840,10 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector): suffix, enc_file_name ) ) + self.logger.error(proc_result.stderr) raise RuntimeError( - "Processing step {} for {} failed!".format( - suffix, enc_file_name + "Processing step {} for {} failed!\n{}".format( + suffix, enc_file_name, proc_result.stderr ) ) bs_in_file = bs_out_file @@ -925,11 +926,11 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector): ) if isinstance(dec_options, dict): if "dec_options" in dec_options: - dec_options["dec_options"].append(addl_dec_options) + dec_options["dec_options"].extend(addl_dec_options) else: dec_options["dec_options"] = addl_dec_options else: - dec_options.append(addl_dec_options) + dec_options.extend(addl_dec_options) dec_config = { "ivas_format": mode, "config": config, diff --git a/scripts/pyivastest/IvasScriptsCommon.py b/scripts/pyivastest/IvasScriptsCommon.py index 46e6a2f4a83b285a8e0c9db851c11c3691dc538c..3df9994170a1cdfb3b4957b4bd6f7363f08a612d 100644 --- a/scripts/pyivastest/IvasScriptsCommon.py +++ b/scripts/pyivastest/IvasScriptsCommon.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -546,7 +546,10 @@ def runner_setup(runner, args): if "fer_file" in args.keys() or "ber_file" in args.keys(): # assert that the eid-xor tool is there - eid_xor_path = os.path.join(runner.config["utilPath"], "eid-xor") + bin_ext="" + if platform.system() == "Windows": + bin_ext=".exe" + eid_xor_path = os.path.join(runner.config["utilPath"], "".join(["eid-xor", bin_ext])) if not os.path.isfile(eid_xor_path): raise FileNotFoundError(f"Could not find {eid_xor_path} (needed for error pattern insertion)") diff --git a/scripts/pyivastest/IvasSvnBuilder.py b/scripts/pyivastest/IvasSvnBuilder.py index f12e71428646d4a115242ce0da5b034866e62a66..0d7cc9c847c14c5a241c5b958102851136641e83 100644 --- a/scripts/pyivastest/IvasSvnBuilder.py +++ b/scripts/pyivastest/IvasSvnBuilder.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -275,7 +275,7 @@ class IvasBuilder(IvasBaseClass): build_log.write(" ".join(instrument_cmd)) build_log.write("\n") build_result = subprocess.run( - instrument_cmd, capture_output=True, text=True + instrument_cmd, capture_output=True, text=True, check=True ) build_log.write(build_result.stderr) build_log.write(build_result.stdout) diff --git a/scripts/pyivastest/__init__.py b/scripts/pyivastest/__init__.py index 4196e8943933c3d2a25ca37568e77bf1baed81a6..f5c84b66c89bdca0a34037bb4184e380c291e42a 100644 --- a/scripts/pyivastest/__init__.py +++ b/scripts/pyivastest/__init__.py @@ -1,5 +1,5 @@ """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyivastest/constants.py b/scripts/pyivastest/constants.py index 89ab93b72714882a6933335a1f8db031229e9396..f42796376addc89256a88973b182bf9e8dee0a23 100644 --- a/scripts/pyivastest/constants.py +++ b/scripts/pyivastest/constants.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyivastest/ivas_svn.py b/scripts/pyivastest/ivas_svn.py index b5061515c402c2e9aa9ed84dc54c8daf56bdb4e6..58e321e67c9e6ff3c31aede040365b8abfe1f27c 100644 --- a/scripts/pyivastest/ivas_svn.py +++ b/scripts/pyivastest/ivas_svn.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyprocessing/__init__.py b/scripts/pyprocessing/__init__.py index 1db673e95189e432f70a73b4222158d9d362bd11..5e7b5aa892d9f45d2eed18386bf8aa8889cb4900 100644 --- a/scripts/pyprocessing/__init__.py +++ b/scripts/pyprocessing/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyprocessing/evs.py b/scripts/pyprocessing/evs.py index 3c7f8e1918737c48ae7451bf26ceabead1bb6d55..6de86f2a27b2a69adf3d1567a165207b7618dfde 100644 --- a/scripts/pyprocessing/evs.py +++ b/scripts/pyprocessing/evs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyprocessing/ivas.py b/scripts/pyprocessing/ivas.py index 3533e7a0bc052529da59c4873781015a8e7fd831..0f182fd1fbf98f5a8daa31f69426bd351c8d73fb 100644 --- a/scripts/pyprocessing/ivas.py +++ b/scripts/pyprocessing/ivas.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyprocessing/prepost_processing.py b/scripts/pyprocessing/prepost_processing.py index a2c014b6a9adb731b5f207440e38cc28763cdf82..3ea7411cea8e4d282b98661a55eda7c7496ad8d1 100644 --- a/scripts/pyprocessing/prepost_processing.py +++ b/scripts/pyprocessing/prepost_processing.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyprocessing/processing.py b/scripts/pyprocessing/processing.py index ec7deb66f4bbfbe334d12d483f1a2b66707d9384..a0533b2b4edead2b7f699c39b14eebdf56e84227 100644 --- a/scripts/pyprocessing/processing.py +++ b/scripts/pyprocessing/processing.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyprocessing/processing_configs.py b/scripts/pyprocessing/processing_configs.py index d7619230dd858d095c925db3a1d9bae8c0987b41..255f183c6decc1d8d84243aa61d7f4dfc32f581d 100644 --- a/scripts/pyprocessing/processing_configs.py +++ b/scripts/pyprocessing/processing_configs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/pyprocessing/utils.py b/scripts/pyprocessing/utils.py index 6132792cc02cbfe640e300245260c5c1c322085c..e62840fd1367ef536ee9213065c535598fcf35ca 100644 --- a/scripts/pyprocessing/utils.py +++ b/scripts/pyprocessing/utils.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/runIvasCodec.py b/scripts/runIvasCodec.py index 4ec1da90b9df0dea82f8e85de4e9af300b019b98..070fb8e4f04da261e273fc0a1576c6ab5533cb6b 100755 --- a/scripts/runIvasCodec.py +++ b/scripts/runIvasCodec.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/self_test.py b/scripts/self_test.py index 05c6944ddde4aa13576e88f4e0c16c73f20404d1..2be585882b1dd4b322a9fd64aaae02d86159e5d6 100755 --- a/scripts/self_test.py +++ b/scripts/self_test.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -992,10 +992,6 @@ class SelfTest(IvasScriptsCommon.IvasScript): suffix = "nws" proc_cmd[0] = os.path.join(TOOLS_DIR, proc_cmd[0]) - if suffix == "nws" and TOOLS_DIR == TOOLS_DIR_LINUX: - # use wine - proc_cmd[0] = os.path.join(TOOLS_DIR_WIN, "networkSimulator_g192.exe") - proc_cmd = ["wine"] + proc_cmd proc_cmd = [ "{in_file}" if x == in_file else self.test_for_file(x) for x in proc_cmd diff --git a/scripts/strip_defines_cppp.sh b/scripts/strip_defines_cppp.sh index 8563cad36885f635c66382ee67189a42885a75bc..a03614b2487a76b73ab262d7d54335ac11dfdf3a 100755 --- a/scripts/strip_defines_cppp.sh +++ b/scripts/strip_defines_cppp.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/scripts/switchPaths/sw_mctech_5fr.bin b/scripts/switchPaths/sw_mctech_5fr.bin new file mode 100644 index 0000000000000000000000000000000000000000..8b21888757bc30b3ff4f41c8bbd4b2ba54d35a1a --- /dev/null +++ b/scripts/switchPaths/sw_mctech_5fr.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22d4d72283254c3a0bd7d290182a11d2909c0c0d8ee5424e55e288b34ea5ed45 +size 60000 diff --git a/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_16kHz.bin b/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_16kHz.bin index 17691616db240c96866cc4db3bc2ce48c5b160bc..dd4d32cdcbfcc7047166a06c07ddda14cc3dae6a 100644 --- a/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_16kHz.bin +++ b/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0950686593146f4d7c7b622d2e52afdc10cc63481824d516ee88f7e2996f0de4 -size 204970 +oid sha256:1fdfc45a9bd54697b85cec44906c6cf2ac76b58440911472ec14ef743c6bcb52 +size 204974 diff --git a/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_32kHz.bin b/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_32kHz.bin index f6cf12bf4fb3a4bc93e70e839f95d769b8ee5aa3..63ed4ac7fa0647ab05b9ff115e92d91ff09c8249 100644 --- a/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_32kHz.bin +++ b/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1467d78861387e370ba916a93730961dd2d4abf1eff133740f9b7fafb89b32c4 -size 403802 +oid sha256:8b81a9aa52f64f86fe3abdd50a3c65b6a1ce632db32a30606b7b8bb17f2c3d36 +size 403806 diff --git a/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_48kHz.bin b/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_48kHz.bin index 8eeacfc0de6520a63a64270227991575e8583f9a..dceb314b87d91ada9c341a3a425e92d89c8c2d61 100644 --- a/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_48kHz.bin +++ b/scripts/td_object_renderer/hrtf_data/Orange_53/hrfilter_model_v002_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1740802509d5c3076a259b113ffc832e5585da9bc0fdbe851b89d524ccba374e -size 598010 +oid sha256:ac395980e37d1e38f602b7223c401b1c6711912d1a5db71ee668584c30c521b1 +size 598014 diff --git a/scripts/td_object_renderer/metadata/create_metadata_v3.m b/scripts/td_object_renderer/metadata/create_metadata_v3.m deleted file mode 100644 index 3bdd398fde0490d456124888fb6f5bf28a8dd0b6..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/create_metadata_v3.m +++ /dev/null @@ -1,433 +0,0 @@ -% -% (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, -% Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., -% Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, -% Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other -% contributors to this repository. All Rights Reserved. -% -% This software is protected by copyright law and by international treaties. -% The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, -% Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., -% Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, -% Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other -% contributors to this repository retain full ownership rights in their respective contributions in -% the software. This notice grants no license of any kind, including but not limited to patent -% license, nor is any license granted by implication, estoppel or otherwise. -% -% Contributors are required to enter into the IVAS codec Public Collaboration agreement before making -% contributions. -% -% This software is provided "AS IS", without any express or implied warranties. The software is in the -% development stage. It is intended exclusively for experts who have experience with such software and -% solely for the purpose of inspection. All implied warranties of non-infringement, merchantability -% and fitness for a particular purpose are hereby disclaimed and excluded. -% -% Any dispute, controversy or claim arising under or in relation to providing this software shall be -% submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in -% accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and -% the United Nations Convention on Contracts on the International Sales of Goods. -% - -% Sources are at stationary positions, but their orientations rotate. Since -% a source directivity is defined, we should hear a modulated volume -% (louder when the source is pointed at the listener). -% Listener is stationary -% Source orientation cone defined (not changing). - -clear;clc;close all; -fclose('all'); - -numFrames = 1000; -reverbNumCombFilters = -1; % Disabled -reverbRoomPreset = -1; % Disabled - -%fileNamePattern = 'm1'; % azimuth moves back and forth, elev fixed=0 -%fileNamePattern = 'm2'; % azimuth moves back and forth, elev fixed=+30 -%fileNamePattern = 'm3'; % azimuth moves back and forth, elev fixed=+45 -%fileNamePattern = 'm4'; % object moves in a circle at z=-1 (in front of the listener), shifted upward to make sure that the elevation is always above the listener. Both az & el changing. -%fileNamePattern = 'm5'; % elev=0, azimuth constantly increasing, so moving in a circle in the horizontal plane, listener at the center. -%fileNamePattern = 'x1'; % A synthetic test, loudspeaker position 0 -%fileNamePattern = 'x2'; % A synthetic test, loudspeaker position 30 -%fileNamePattern = 'x3'; % A synthetic test, loudspeaker position 90 -%fileNamePattern = 'x4'; % A synthetic test, loudspeaker position 135 - - -% fileNamePatterns = ["m1"; % azimuth moves back and forth, elev fixed=0 -% "m2"; % azimuth moves back and forth, elev fixed=+30 -% "m3"; % azimuth moves back and forth, elev fixed=+45 -% "m4"; % object moves in a circle at z=-1 (in front of the listener), shifted upward to make sure that the elevation is always above the listener. Both az & el changing. -% "m5"; % elev=0, azimuth constantly increasing, so moving in a circle in the horizontal plane, listener at the center. -% "x1"; % A synthetic test, loudspeaker position 0 -% "x2"; % A synthetic test, loudspeaker position 30 -% "x3"; % A synthetic test, loudspeaker position 90 -% "x4";]; % A synthetic test, loudspeaker position 135 - -fileNamePatterns = ["t01"; % - "t02"; % - "t03"; % - "t04"; % - "t05"; % - "t06"; % - "t07"; % - "t08"; % - "t09"; % - "t10"; % - "t11"; % - %"test_drums"; - %"wmops"; - "wmops2"; - %"azminus20"; - %"azplus20"; - "spiral"; - "circle_minus_30"; - "gainchange" - ]; % - -%fileNamePatterns = ["spiral"]; % - -%fileNamePatterns = ["m5";]; - -for i = 1:length(fileNamePatterns) - - fileNamePattern = fileNamePatterns(i); - disp(fileNamePattern) - - switch fileNamePattern - case "t11" - numObjects = 2; - case "t06" - numObjects = 3; - case {"t05", "wmops", "wmops2", "spiral"} - numObjects = 4; - otherwise - numObjects = 1; - end - - switch fileNamePattern - case "t01" - xr = 11.164; - case "t02" - xr = 12.442; - case "t03" - xr = 9.089; - case "t04" - xr = 8.000; - case "t05" - xr = 17.267; - case "t06" - xr = 8.000; - case "t07" - xr = 7.192; - case "t08" - xr = 7.192; - case "t09" - xr = 7.192; - case "t10" - xr = 9.08; - case "t11" - xr = 8.000; - case "test_drums" - xr = 17.267; - case {"wmops","wmops2"} - xr = 7.192; - case "azminus20" - xr = 12.442; - case "azplus20" - xr = 12.442; - case "spiral" - xr = 7.192; - case "circle_minus_30" - xr = 9.08; - case "gainchange" - xr = 1; - end - - % File names and handles - fileIDs_txt = zeros(1,numObjects); - for iObj = 1:numObjects - fileIDs_txt(iObj) = fopen(sprintf( 'csv\\%s_ch%d.csv',fileNamePattern,iObj),'wt'); - end - - % This setup has x-y plane as horizontal, with z vertical. Angles are - % measured from the x axis, with positive angles to the right/clockwise. - radii_source = [1, 1, 1, 1]; - thetas_position_source = [0]; - delta_theta_source_position = 1; - - % To do: Probably need to impose a range on these, or at least simplify - % when a cone becomes a sphere. CAMix defaults these to 360, 360, 1.0. - cone_angle_1 = 360; - cone_angle_2 = 360; - rear_level = 1.0; - - %delta_theta = 0.020 * 30; - %theta_store = zeros([1,numFrames]); - - time = 0; - time_store = zeros([1,numFrames]); - azim_store = zeros([numObjects,numFrames]); - elev_store = zeros([numObjects,numFrames]); - - % Data for each frame - for iFrame = 1:numFrames - % Calculate for frame ------------------------------------------------- - listenerPosition = [0,0,0]; - % Front, up vectors: Looking in x direction with up in z direction - listenerOrientation = [1,0,0,0,0,1]; - - sourcePositions = zeros(3,numObjects); - sourceDirections = zeros(3,numObjects); - sourceDirectivity = zeros(3,numObjects); - - for ob = 1:numObjects - %% - gain = 1.0; % Default gain setting - switch fileNamePattern - %% Stationary objects - case 't01' % 15 degrees left, zero elevation - x = 1.0 * radii_source(ob) * cosd(-15); - y = 1.0 * radii_source(ob) * sind(-15); - z = 0; - case 't02' % 30 degrees right, zero elevation - x = 1.0 * radii_source(ob) * cosd(30); - y = 1.0 * radii_source(ob) * sind(30); - z = 0; - case 't03' % 45 degrees right, zero elevation - x = 1.0 * radii_source(ob) * cosd(45); - y = 1.0 * radii_source(ob) * sind(45); - z = 0; - case 't04' - azim = 30; elev = 20; - x = 1.0 * radii_source(ob) * cosd(elev) * cosd(-azim); - y = 1.0 * radii_source(ob) * cosd(elev) * sind(-azim); - z = 1.0 * radii_source(ob) * sind(elev); - case 't05' - switch ob - case 1 - az=-60; - case 2 - az=-20; - case 3 - az=20; - case 4 - az=60; - end - x = 1.0 * cosd(az); - y = 1.0 * sind(az); - z = 0; - case 't06' - switch ob - case 1 - az=-50; - case 2 - az=-20; - case 3 - az=30; - end - x = 1.0 * cosd(az); - y = 1.0 * sind(az); - z = 0; - %% Part 2 - Moving objects - case 't07' % Horizontal circle. - x = 1.0 * radii_source(ob) * cosd(360/xr*time); - y = 1.0 * radii_source(ob) * sind(360/xr*time); - z = 0; - case 't08' - % Azimuth = 0 (straight ahead) - % Note that this should keep the object at distance radii_source(ob). - elevmax = 30; - y = 0; - z = sind(elevmax) * radii_source(ob) * cosd(360/xr*time); - alpha = asind(z/radii_source(ob)); - x = 1 * radii_source(ob) * cosd(alpha); - case 't09' - % Vertically oriented circle at fixed x position in - % front of listener. - % Note that this should keep the object at distance radii_source(ob). - x = 1 * radii_source(ob) * cosd(-30); - y = sind(30) * radii_source(ob) * sind(360/xr*time); - z = sind(30) * radii_source(ob) * cosd(360/xr*time); - case 't10' - % Horizontal circle at 20 elevation - alphaelev=20; - x = 1.0 * radii_source(ob) * cosd(alphaelev) * cosd(360/xr*time); - y = 1.0 * radii_source(ob) * cosd(alphaelev) * sind(360/xr*time); - z = 1.0 * radii_source(ob) * sind(alphaelev); - case 't11' - % Cross talk, 1 talker stationary, one talker follows - % circular trajectory - switch ob - case 1 - az = -50; - case 2 - az = -20 + 360/xr*time; - end - x = radii_source(ob) * cosd(az); - y = radii_source(ob) * sind(az); - z = 0; - case 'test_drums' - % Test case with drum channel only from case 5. - az=-60; - x = 1.0 * cosd(az); - y = 1.0 * sind(az); - z = 0; - case 'wmops' - switch ob - case 1 - az = 0 - 360/xr*time; - case 2 - az = 90 - 360/xr*time; - case 3 - az = 180 - 360/xr*time; - case 4 - az = 270 - 360/xr*time; - end - x = 1.0 * radii_source(ob) * cosd(az); - y = 1.0 * radii_source(ob) * sind(az); - z = 0; - case 'wmops2' - switch ob - case 1 - rot = 0 - 360/xr*time; - case 2 - rot = 90 - 360/xr*time; - case 3 - rot = 180 - 360/xr*time; - case 4 - rot = 270 - 360/xr*time; - end - x = 1 * radii_source(ob) * cosd(-30); - y = sind(30) * radii_source(ob) * sind(rot); - z = sind(30) * radii_source(ob) * cosd(rot); - case 'azminus20' - x = 1.0 * radii_source(ob) * cosd(-20); - y = 1.0 * radii_source(ob) * sind(-20); - z = 0; - case 'azplus20' - x = 1.0 * radii_source(ob) * cosd(20); - y = 1.0 * radii_source(ob) * sind(20); - z = 0; - case 'spiral' - switch ob - case 1 - rot = 360/xr*time; - case 2 - rot = 360/xr*time - 90; - case 3 - rot = 360/xr*time - 180; - case 4 - rot = 360/xr*time - 270; - end - x = (0.5*rot) * radii_source(ob) * cosd(rot); - y = sind(0.5*rot) * radii_source(ob) * sind(rot); - z = radii_source(ob) * cosd(0.5*rot); - case 'circle_minus_30' - % Horizontal circle at 20 elevation - alphaelev=-30; - x = 1.0 * radii_source(ob) * cosd(alphaelev) * cosd(360/xr*time); - y = 1.0 * radii_source(ob) * cosd(alphaelev) * sind(360/xr*time); - z = 1.0 * radii_source(ob) * sind(alphaelev); - case 'gainchange' - x = 1.0 * radii_source(ob) * cosd(-15); - y = 1.0 * radii_source(ob) * sind(-15); - z = 0; - gain = abs(sind(360/xr*time)); - otherwise - error("Bad file pattern.") - end - - %% - sourcePositions(:,ob) = [x;y;z]; - - % Pointing direction of the source. Since the sources are conical, - % there is no orientation, only a central axis. - dirx = 0.0; - diry = 0.0; - dirz = 1.0; - sourceDirections(:,ob) = [dirx;diry;dirz]; - sourceDirectivity(:,ob) = [cone_angle_1, cone_angle_2, rear_level]; - end - - % Storage for final plotting ------------------------------------------ - theta_store(iFrame) = thetas_position_source(1); - - for ob = 1:numObjects - - % ----------------------------------------------------------------- - % Write data for frame, text - % Write values to file for current object - fileID_txt = fileIDs_txt(ob); - - x = sourcePositions(1,ob); - y = sourcePositions(2,ob); - z = sourcePositions(3,ob); - horiz = sqrt(x^2 + y^2); - r = sqrt(x^2 + y^2 + z^2); - azim = atan2d(y, x); % NB Azimuth is positive left - elev = atan2d(z, horiz); - - azim_store(ob,iFrame) = azim; - elev_store(ob,iFrame) = elev; - - %fprintf(fileID_txt,'%04d,', iFrame-1); - fprintf(fileID_txt,'%+07.2f,', azim); - fprintf(fileID_txt,'%+06.2f,', elev); - fprintf(fileID_txt,'%05.2f,', r); - fprintf(fileID_txt,'%06.2f,', 0.0); % Spread. - fprintf(fileID_txt,'%04.2f', gain); % Gain. No comma at end of line. - - fprintf(fileID_txt,'\n'); - % ----------------------------------------------------------------- - end - time_store(iFrame) = time; - time = time + 0.02; % 20ms - end - - % Save for ambisonics - azim_store = -azim_store; - if ~exist("../ambisonics_rendering/scenes/", 'dir') - mkdir("../ambisonics_rendering/scenes/") - end - save(sprintf("../ambisonics_rendering/scenes/%s.mat",fileNamePattern),'azim_store','elev_store'); - azim_store = -azim_store; - - fig = figure; - subplot(2,1,1) - plot(time_store,azim_store) - ylim([-180,180]) - xlabel("Time, s",'fontsize',18) - ylabel("Azimuth, degrees",'fontsize',18) - xlim([0 xr]) - subplot(2,1,2) - plot(time_store,elev_store) - ylim([-90,90]) - xlabel("Time, s",'fontsize',18) - ylabel("Elevation, degrees",'fontsize',18) - xlim([0 xr]) - switch fileNamePattern - case 't05' - legend('Drums','Guitar','Bass','Vocal'); - case 't06' - legend('Female 1','Male','Female 2'); - case 't11' - legend('Female','Male'); - case 'wmops2' - legend('Object 1', 'Object 2', 'Object 3', 'Object 4'); - end - %print(sprintf("%s.pdf",fileNamePattern),'-dpdf','-bestfit') - print(sprintf("%s.png",fileNamePattern),'-dpng') - close(fig) - - for fid = fileIDs_txt - fclose(fid); - end -end -%copyfile("test_metadata_3.met","..\\..\\..\\Workspace_msvc\\test_metadata.met",'f') - -% figure; -% plot(wrapTo360(theta_store)) -% ylabel("Theta") -% xlabel("Frame no.") - -% figure; -% plot(x_store, -z_store,'x') diff --git a/scripts/td_object_renderer/metadata/csv/t01_ch1.csv b/scripts/td_object_renderer/metadata/csv/t01_ch1.csv deleted file mode 100644 index d639a92ffb5a759fc514074d5f9bcc1e47b42bca..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t01_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 --015.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t02_ch1.csv b/scripts/td_object_renderer/metadata/csv/t02_ch1.csv deleted file mode 100644 index 82a50f1b3e2eca992f66c7033b4e394eacaeff77..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t02_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t03_ch1.csv b/scripts/td_object_renderer/metadata/csv/t03_ch1.csv deleted file mode 100644 index 7bdb46bd65f65cf894c4dd74b08907c722192db5..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t03_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 -+045.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t04_ch1.csv b/scripts/td_object_renderer/metadata/csv/t04_ch1.csv deleted file mode 100644 index 4f78a0c32f1c8d572dbc99bd136a5699c0798047..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t04_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 --030.00,+20.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t05_ch1.csv b/scripts/td_object_renderer/metadata/csv/t05_ch1.csv deleted file mode 100644 index 4c841ef6d64005aa4d1de0612527341439289c47..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t05_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 --060.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t05_ch2.csv b/scripts/td_object_renderer/metadata/csv/t05_ch2.csv deleted file mode 100644 index f64e78d8c2e58552d2e44fe46701cf609a84bc8f..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t05_ch2.csv +++ /dev/null @@ -1,1000 +0,0 @@ --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t05_ch3.csv b/scripts/td_object_renderer/metadata/csv/t05_ch3.csv deleted file mode 100644 index 0ca1953e375656fd419792318d36dee85abe9e72..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t05_ch3.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 -+020.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t05_ch4.csv b/scripts/td_object_renderer/metadata/csv/t05_ch4.csv deleted file mode 100644 index 89201e59a46a413154296fdcdee21b20cd77a3e4..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t05_ch4.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 -+060.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t06_ch1.csv b/scripts/td_object_renderer/metadata/csv/t06_ch1.csv deleted file mode 100644 index 846e2129898d4a040c78e3e3253cb78c472c1109..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t06_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t06_ch2.csv b/scripts/td_object_renderer/metadata/csv/t06_ch2.csv deleted file mode 100644 index f64e78d8c2e58552d2e44fe46701cf609a84bc8f..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t06_ch2.csv +++ /dev/null @@ -1,1000 +0,0 @@ --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t06_ch3.csv b/scripts/td_object_renderer/metadata/csv/t06_ch3.csv deleted file mode 100644 index 82a50f1b3e2eca992f66c7033b4e394eacaeff77..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t06_ch3.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 -+030.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t07_ch1.csv b/scripts/td_object_renderer/metadata/csv/t07_ch1.csv deleted file mode 100644 index c73471b79a5ea3e2ab8708409ceef8d2bed1287b..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t07_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+000.00,+00.00,01.00,000.00,1.00 -+001.00,+00.00,01.00,000.00,1.00 -+002.00,+00.00,01.00,000.00,1.00 -+003.00,+00.00,01.00,000.00,1.00 -+004.00,+00.00,01.00,000.00,1.00 -+005.01,+00.00,01.00,000.00,1.00 -+006.01,+00.00,01.00,000.00,1.00 -+007.01,+00.00,01.00,000.00,1.00 -+008.01,+00.00,01.00,000.00,1.00 -+009.01,+00.00,01.00,000.00,1.00 -+010.01,+00.00,01.00,000.00,1.00 -+011.01,+00.00,01.00,000.00,1.00 -+012.01,+00.00,01.00,000.00,1.00 -+013.01,+00.00,01.00,000.00,1.00 -+014.02,+00.00,01.00,000.00,1.00 -+015.02,+00.00,01.00,000.00,1.00 -+016.02,+00.00,01.00,000.00,1.00 -+017.02,+00.00,01.00,000.00,1.00 -+018.02,+00.00,01.00,000.00,1.00 -+019.02,+00.00,01.00,000.00,1.00 -+020.02,+00.00,01.00,000.00,1.00 -+021.02,+00.00,01.00,000.00,1.00 -+022.02,+00.00,01.00,000.00,1.00 -+023.03,+00.00,01.00,000.00,1.00 -+024.03,+00.00,01.00,000.00,1.00 -+025.03,+00.00,01.00,000.00,1.00 -+026.03,+00.00,01.00,000.00,1.00 -+027.03,+00.00,01.00,000.00,1.00 -+028.03,+00.00,01.00,000.00,1.00 -+029.03,+00.00,01.00,000.00,1.00 -+030.03,+00.00,01.00,000.00,1.00 -+031.03,+00.00,01.00,000.00,1.00 -+032.04,+00.00,01.00,000.00,1.00 -+033.04,+00.00,01.00,000.00,1.00 -+034.04,+00.00,01.00,000.00,1.00 -+035.04,+00.00,01.00,000.00,1.00 -+036.04,+00.00,01.00,000.00,1.00 -+037.04,+00.00,01.00,000.00,1.00 -+038.04,+00.00,01.00,000.00,1.00 -+039.04,+00.00,01.00,000.00,1.00 -+040.04,+00.00,01.00,000.00,1.00 -+041.05,+00.00,01.00,000.00,1.00 -+042.05,+00.00,01.00,000.00,1.00 -+043.05,+00.00,01.00,000.00,1.00 -+044.05,+00.00,01.00,000.00,1.00 -+045.05,+00.00,01.00,000.00,1.00 -+046.05,+00.00,01.00,000.00,1.00 -+047.05,+00.00,01.00,000.00,1.00 -+048.05,+00.00,01.00,000.00,1.00 -+049.05,+00.00,01.00,000.00,1.00 -+050.06,+00.00,01.00,000.00,1.00 -+051.06,+00.00,01.00,000.00,1.00 -+052.06,+00.00,01.00,000.00,1.00 -+053.06,+00.00,01.00,000.00,1.00 -+054.06,+00.00,01.00,000.00,1.00 -+055.06,+00.00,01.00,000.00,1.00 -+056.06,+00.00,01.00,000.00,1.00 -+057.06,+00.00,01.00,000.00,1.00 -+058.06,+00.00,01.00,000.00,1.00 -+059.07,+00.00,01.00,000.00,1.00 -+060.07,+00.00,01.00,000.00,1.00 -+061.07,+00.00,01.00,000.00,1.00 -+062.07,+00.00,01.00,000.00,1.00 -+063.07,+00.00,01.00,000.00,1.00 -+064.07,+00.00,01.00,000.00,1.00 -+065.07,+00.00,01.00,000.00,1.00 -+066.07,+00.00,01.00,000.00,1.00 -+067.07,+00.00,01.00,000.00,1.00 -+068.08,+00.00,01.00,000.00,1.00 -+069.08,+00.00,01.00,000.00,1.00 -+070.08,+00.00,01.00,000.00,1.00 -+071.08,+00.00,01.00,000.00,1.00 -+072.08,+00.00,01.00,000.00,1.00 -+073.08,+00.00,01.00,000.00,1.00 -+074.08,+00.00,01.00,000.00,1.00 -+075.08,+00.00,01.00,000.00,1.00 -+076.08,+00.00,01.00,000.00,1.00 -+077.09,+00.00,01.00,000.00,1.00 -+078.09,+00.00,01.00,000.00,1.00 -+079.09,+00.00,01.00,000.00,1.00 -+080.09,+00.00,01.00,000.00,1.00 -+081.09,+00.00,01.00,000.00,1.00 -+082.09,+00.00,01.00,000.00,1.00 -+083.09,+00.00,01.00,000.00,1.00 -+084.09,+00.00,01.00,000.00,1.00 -+085.09,+00.00,01.00,000.00,1.00 -+086.10,+00.00,01.00,000.00,1.00 -+087.10,+00.00,01.00,000.00,1.00 -+088.10,+00.00,01.00,000.00,1.00 -+089.10,+00.00,01.00,000.00,1.00 -+090.10,+00.00,01.00,000.00,1.00 -+091.10,+00.00,01.00,000.00,1.00 -+092.10,+00.00,01.00,000.00,1.00 -+093.10,+00.00,01.00,000.00,1.00 -+094.10,+00.00,01.00,000.00,1.00 -+095.11,+00.00,01.00,000.00,1.00 -+096.11,+00.00,01.00,000.00,1.00 -+097.11,+00.00,01.00,000.00,1.00 -+098.11,+00.00,01.00,000.00,1.00 -+099.11,+00.00,01.00,000.00,1.00 -+100.11,+00.00,01.00,000.00,1.00 -+101.11,+00.00,01.00,000.00,1.00 -+102.11,+00.00,01.00,000.00,1.00 -+103.11,+00.00,01.00,000.00,1.00 -+104.12,+00.00,01.00,000.00,1.00 -+105.12,+00.00,01.00,000.00,1.00 -+106.12,+00.00,01.00,000.00,1.00 -+107.12,+00.00,01.00,000.00,1.00 -+108.12,+00.00,01.00,000.00,1.00 -+109.12,+00.00,01.00,000.00,1.00 -+110.12,+00.00,01.00,000.00,1.00 -+111.12,+00.00,01.00,000.00,1.00 -+112.12,+00.00,01.00,000.00,1.00 -+113.13,+00.00,01.00,000.00,1.00 -+114.13,+00.00,01.00,000.00,1.00 -+115.13,+00.00,01.00,000.00,1.00 -+116.13,+00.00,01.00,000.00,1.00 -+117.13,+00.00,01.00,000.00,1.00 -+118.13,+00.00,01.00,000.00,1.00 -+119.13,+00.00,01.00,000.00,1.00 -+120.13,+00.00,01.00,000.00,1.00 -+121.13,+00.00,01.00,000.00,1.00 -+122.14,+00.00,01.00,000.00,1.00 -+123.14,+00.00,01.00,000.00,1.00 -+124.14,+00.00,01.00,000.00,1.00 -+125.14,+00.00,01.00,000.00,1.00 -+126.14,+00.00,01.00,000.00,1.00 -+127.14,+00.00,01.00,000.00,1.00 -+128.14,+00.00,01.00,000.00,1.00 -+129.14,+00.00,01.00,000.00,1.00 -+130.14,+00.00,01.00,000.00,1.00 -+131.15,+00.00,01.00,000.00,1.00 -+132.15,+00.00,01.00,000.00,1.00 -+133.15,+00.00,01.00,000.00,1.00 -+134.15,+00.00,01.00,000.00,1.00 -+135.15,+00.00,01.00,000.00,1.00 -+136.15,+00.00,01.00,000.00,1.00 -+137.15,+00.00,01.00,000.00,1.00 -+138.15,+00.00,01.00,000.00,1.00 -+139.15,+00.00,01.00,000.00,1.00 -+140.16,+00.00,01.00,000.00,1.00 -+141.16,+00.00,01.00,000.00,1.00 -+142.16,+00.00,01.00,000.00,1.00 -+143.16,+00.00,01.00,000.00,1.00 -+144.16,+00.00,01.00,000.00,1.00 -+145.16,+00.00,01.00,000.00,1.00 -+146.16,+00.00,01.00,000.00,1.00 -+147.16,+00.00,01.00,000.00,1.00 -+148.16,+00.00,01.00,000.00,1.00 -+149.17,+00.00,01.00,000.00,1.00 -+150.17,+00.00,01.00,000.00,1.00 -+151.17,+00.00,01.00,000.00,1.00 -+152.17,+00.00,01.00,000.00,1.00 -+153.17,+00.00,01.00,000.00,1.00 -+154.17,+00.00,01.00,000.00,1.00 -+155.17,+00.00,01.00,000.00,1.00 -+156.17,+00.00,01.00,000.00,1.00 -+157.17,+00.00,01.00,000.00,1.00 -+158.18,+00.00,01.00,000.00,1.00 -+159.18,+00.00,01.00,000.00,1.00 -+160.18,+00.00,01.00,000.00,1.00 -+161.18,+00.00,01.00,000.00,1.00 -+162.18,+00.00,01.00,000.00,1.00 -+163.18,+00.00,01.00,000.00,1.00 -+164.18,+00.00,01.00,000.00,1.00 -+165.18,+00.00,01.00,000.00,1.00 -+166.18,+00.00,01.00,000.00,1.00 -+167.19,+00.00,01.00,000.00,1.00 -+168.19,+00.00,01.00,000.00,1.00 -+169.19,+00.00,01.00,000.00,1.00 -+170.19,+00.00,01.00,000.00,1.00 -+171.19,+00.00,01.00,000.00,1.00 -+172.19,+00.00,01.00,000.00,1.00 -+173.19,+00.00,01.00,000.00,1.00 -+174.19,+00.00,01.00,000.00,1.00 -+175.19,+00.00,01.00,000.00,1.00 -+176.20,+00.00,01.00,000.00,1.00 -+177.20,+00.00,01.00,000.00,1.00 -+178.20,+00.00,01.00,000.00,1.00 -+179.20,+00.00,01.00,000.00,1.00 --179.80,+00.00,01.00,000.00,1.00 --178.80,+00.00,01.00,000.00,1.00 --177.80,+00.00,01.00,000.00,1.00 --176.80,+00.00,01.00,000.00,1.00 --175.80,+00.00,01.00,000.00,1.00 --174.79,+00.00,01.00,000.00,1.00 --173.79,+00.00,01.00,000.00,1.00 --172.79,+00.00,01.00,000.00,1.00 --171.79,+00.00,01.00,000.00,1.00 --170.79,+00.00,01.00,000.00,1.00 --169.79,+00.00,01.00,000.00,1.00 --168.79,+00.00,01.00,000.00,1.00 --167.79,+00.00,01.00,000.00,1.00 --166.79,+00.00,01.00,000.00,1.00 --165.78,+00.00,01.00,000.00,1.00 --164.78,+00.00,01.00,000.00,1.00 --163.78,+00.00,01.00,000.00,1.00 --162.78,+00.00,01.00,000.00,1.00 --161.78,+00.00,01.00,000.00,1.00 --160.78,+00.00,01.00,000.00,1.00 --159.78,+00.00,01.00,000.00,1.00 --158.78,+00.00,01.00,000.00,1.00 --157.78,+00.00,01.00,000.00,1.00 --156.77,+00.00,01.00,000.00,1.00 --155.77,+00.00,01.00,000.00,1.00 --154.77,+00.00,01.00,000.00,1.00 --153.77,+00.00,01.00,000.00,1.00 --152.77,+00.00,01.00,000.00,1.00 --151.77,+00.00,01.00,000.00,1.00 --150.77,+00.00,01.00,000.00,1.00 --149.77,+00.00,01.00,000.00,1.00 --148.77,+00.00,01.00,000.00,1.00 --147.76,+00.00,01.00,000.00,1.00 --146.76,+00.00,01.00,000.00,1.00 --145.76,+00.00,01.00,000.00,1.00 --144.76,+00.00,01.00,000.00,1.00 --143.76,+00.00,01.00,000.00,1.00 --142.76,+00.00,01.00,000.00,1.00 --141.76,+00.00,01.00,000.00,1.00 --140.76,+00.00,01.00,000.00,1.00 --139.76,+00.00,01.00,000.00,1.00 --138.75,+00.00,01.00,000.00,1.00 --137.75,+00.00,01.00,000.00,1.00 --136.75,+00.00,01.00,000.00,1.00 --135.75,+00.00,01.00,000.00,1.00 --134.75,+00.00,01.00,000.00,1.00 --133.75,+00.00,01.00,000.00,1.00 --132.75,+00.00,01.00,000.00,1.00 --131.75,+00.00,01.00,000.00,1.00 --130.75,+00.00,01.00,000.00,1.00 --129.74,+00.00,01.00,000.00,1.00 --128.74,+00.00,01.00,000.00,1.00 --127.74,+00.00,01.00,000.00,1.00 --126.74,+00.00,01.00,000.00,1.00 --125.74,+00.00,01.00,000.00,1.00 --124.74,+00.00,01.00,000.00,1.00 --123.74,+00.00,01.00,000.00,1.00 --122.74,+00.00,01.00,000.00,1.00 --121.74,+00.00,01.00,000.00,1.00 --120.73,+00.00,01.00,000.00,1.00 --119.73,+00.00,01.00,000.00,1.00 --118.73,+00.00,01.00,000.00,1.00 --117.73,+00.00,01.00,000.00,1.00 --116.73,+00.00,01.00,000.00,1.00 --115.73,+00.00,01.00,000.00,1.00 --114.73,+00.00,01.00,000.00,1.00 --113.73,+00.00,01.00,000.00,1.00 --112.73,+00.00,01.00,000.00,1.00 --111.72,+00.00,01.00,000.00,1.00 --110.72,+00.00,01.00,000.00,1.00 --109.72,+00.00,01.00,000.00,1.00 --108.72,+00.00,01.00,000.00,1.00 --107.72,+00.00,01.00,000.00,1.00 --106.72,+00.00,01.00,000.00,1.00 --105.72,+00.00,01.00,000.00,1.00 --104.72,+00.00,01.00,000.00,1.00 --103.72,+00.00,01.00,000.00,1.00 --102.71,+00.00,01.00,000.00,1.00 --101.71,+00.00,01.00,000.00,1.00 --100.71,+00.00,01.00,000.00,1.00 --099.71,+00.00,01.00,000.00,1.00 --098.71,+00.00,01.00,000.00,1.00 --097.71,+00.00,01.00,000.00,1.00 --096.71,+00.00,01.00,000.00,1.00 --095.71,+00.00,01.00,000.00,1.00 --094.71,+00.00,01.00,000.00,1.00 --093.70,+00.00,01.00,000.00,1.00 --092.70,+00.00,01.00,000.00,1.00 --091.70,+00.00,01.00,000.00,1.00 --090.70,+00.00,01.00,000.00,1.00 --089.70,+00.00,01.00,000.00,1.00 --088.70,+00.00,01.00,000.00,1.00 --087.70,+00.00,01.00,000.00,1.00 --086.70,+00.00,01.00,000.00,1.00 --085.70,+00.00,01.00,000.00,1.00 --084.69,+00.00,01.00,000.00,1.00 --083.69,+00.00,01.00,000.00,1.00 --082.69,+00.00,01.00,000.00,1.00 --081.69,+00.00,01.00,000.00,1.00 --080.69,+00.00,01.00,000.00,1.00 --079.69,+00.00,01.00,000.00,1.00 --078.69,+00.00,01.00,000.00,1.00 --077.69,+00.00,01.00,000.00,1.00 --076.69,+00.00,01.00,000.00,1.00 --075.68,+00.00,01.00,000.00,1.00 --074.68,+00.00,01.00,000.00,1.00 --073.68,+00.00,01.00,000.00,1.00 --072.68,+00.00,01.00,000.00,1.00 --071.68,+00.00,01.00,000.00,1.00 --070.68,+00.00,01.00,000.00,1.00 --069.68,+00.00,01.00,000.00,1.00 --068.68,+00.00,01.00,000.00,1.00 --067.68,+00.00,01.00,000.00,1.00 --066.67,+00.00,01.00,000.00,1.00 --065.67,+00.00,01.00,000.00,1.00 --064.67,+00.00,01.00,000.00,1.00 --063.67,+00.00,01.00,000.00,1.00 --062.67,+00.00,01.00,000.00,1.00 --061.67,+00.00,01.00,000.00,1.00 --060.67,+00.00,01.00,000.00,1.00 --059.67,+00.00,01.00,000.00,1.00 --058.67,+00.00,01.00,000.00,1.00 --057.66,+00.00,01.00,000.00,1.00 --056.66,+00.00,01.00,000.00,1.00 --055.66,+00.00,01.00,000.00,1.00 --054.66,+00.00,01.00,000.00,1.00 --053.66,+00.00,01.00,000.00,1.00 --052.66,+00.00,01.00,000.00,1.00 --051.66,+00.00,01.00,000.00,1.00 --050.66,+00.00,01.00,000.00,1.00 --049.66,+00.00,01.00,000.00,1.00 --048.65,+00.00,01.00,000.00,1.00 --047.65,+00.00,01.00,000.00,1.00 --046.65,+00.00,01.00,000.00,1.00 --045.65,+00.00,01.00,000.00,1.00 --044.65,+00.00,01.00,000.00,1.00 --043.65,+00.00,01.00,000.00,1.00 --042.65,+00.00,01.00,000.00,1.00 --041.65,+00.00,01.00,000.00,1.00 --040.65,+00.00,01.00,000.00,1.00 --039.64,+00.00,01.00,000.00,1.00 --038.64,+00.00,01.00,000.00,1.00 --037.64,+00.00,01.00,000.00,1.00 --036.64,+00.00,01.00,000.00,1.00 --035.64,+00.00,01.00,000.00,1.00 --034.64,+00.00,01.00,000.00,1.00 --033.64,+00.00,01.00,000.00,1.00 --032.64,+00.00,01.00,000.00,1.00 --031.64,+00.00,01.00,000.00,1.00 --030.63,+00.00,01.00,000.00,1.00 --029.63,+00.00,01.00,000.00,1.00 --028.63,+00.00,01.00,000.00,1.00 --027.63,+00.00,01.00,000.00,1.00 --026.63,+00.00,01.00,000.00,1.00 --025.63,+00.00,01.00,000.00,1.00 --024.63,+00.00,01.00,000.00,1.00 --023.63,+00.00,01.00,000.00,1.00 --022.63,+00.00,01.00,000.00,1.00 --021.62,+00.00,01.00,000.00,1.00 --020.62,+00.00,01.00,000.00,1.00 --019.62,+00.00,01.00,000.00,1.00 --018.62,+00.00,01.00,000.00,1.00 --017.62,+00.00,01.00,000.00,1.00 --016.62,+00.00,01.00,000.00,1.00 --015.62,+00.00,01.00,000.00,1.00 --014.62,+00.00,01.00,000.00,1.00 --013.62,+00.00,01.00,000.00,1.00 --012.61,+00.00,01.00,000.00,1.00 --011.61,+00.00,01.00,000.00,1.00 --010.61,+00.00,01.00,000.00,1.00 --009.61,+00.00,01.00,000.00,1.00 --008.61,+00.00,01.00,000.00,1.00 --007.61,+00.00,01.00,000.00,1.00 --006.61,+00.00,01.00,000.00,1.00 --005.61,+00.00,01.00,000.00,1.00 --004.61,+00.00,01.00,000.00,1.00 --003.60,+00.00,01.00,000.00,1.00 --002.60,+00.00,01.00,000.00,1.00 --001.60,+00.00,01.00,000.00,1.00 --000.60,+00.00,01.00,000.00,1.00 -+000.40,+00.00,01.00,000.00,1.00 -+001.40,+00.00,01.00,000.00,1.00 -+002.40,+00.00,01.00,000.00,1.00 -+003.40,+00.00,01.00,000.00,1.00 -+004.40,+00.00,01.00,000.00,1.00 -+005.41,+00.00,01.00,000.00,1.00 -+006.41,+00.00,01.00,000.00,1.00 -+007.41,+00.00,01.00,000.00,1.00 -+008.41,+00.00,01.00,000.00,1.00 -+009.41,+00.00,01.00,000.00,1.00 -+010.41,+00.00,01.00,000.00,1.00 -+011.41,+00.00,01.00,000.00,1.00 -+012.41,+00.00,01.00,000.00,1.00 -+013.41,+00.00,01.00,000.00,1.00 -+014.42,+00.00,01.00,000.00,1.00 -+015.42,+00.00,01.00,000.00,1.00 -+016.42,+00.00,01.00,000.00,1.00 -+017.42,+00.00,01.00,000.00,1.00 -+018.42,+00.00,01.00,000.00,1.00 -+019.42,+00.00,01.00,000.00,1.00 -+020.42,+00.00,01.00,000.00,1.00 -+021.42,+00.00,01.00,000.00,1.00 -+022.42,+00.00,01.00,000.00,1.00 -+023.43,+00.00,01.00,000.00,1.00 -+024.43,+00.00,01.00,000.00,1.00 -+025.43,+00.00,01.00,000.00,1.00 -+026.43,+00.00,01.00,000.00,1.00 -+027.43,+00.00,01.00,000.00,1.00 -+028.43,+00.00,01.00,000.00,1.00 -+029.43,+00.00,01.00,000.00,1.00 -+030.43,+00.00,01.00,000.00,1.00 -+031.43,+00.00,01.00,000.00,1.00 -+032.44,+00.00,01.00,000.00,1.00 -+033.44,+00.00,01.00,000.00,1.00 -+034.44,+00.00,01.00,000.00,1.00 -+035.44,+00.00,01.00,000.00,1.00 -+036.44,+00.00,01.00,000.00,1.00 -+037.44,+00.00,01.00,000.00,1.00 -+038.44,+00.00,01.00,000.00,1.00 -+039.44,+00.00,01.00,000.00,1.00 -+040.44,+00.00,01.00,000.00,1.00 -+041.45,+00.00,01.00,000.00,1.00 -+042.45,+00.00,01.00,000.00,1.00 -+043.45,+00.00,01.00,000.00,1.00 -+044.45,+00.00,01.00,000.00,1.00 -+045.45,+00.00,01.00,000.00,1.00 -+046.45,+00.00,01.00,000.00,1.00 -+047.45,+00.00,01.00,000.00,1.00 -+048.45,+00.00,01.00,000.00,1.00 -+049.45,+00.00,01.00,000.00,1.00 -+050.46,+00.00,01.00,000.00,1.00 -+051.46,+00.00,01.00,000.00,1.00 -+052.46,+00.00,01.00,000.00,1.00 -+053.46,+00.00,01.00,000.00,1.00 -+054.46,+00.00,01.00,000.00,1.00 -+055.46,+00.00,01.00,000.00,1.00 -+056.46,+00.00,01.00,000.00,1.00 -+057.46,+00.00,01.00,000.00,1.00 -+058.46,+00.00,01.00,000.00,1.00 -+059.47,+00.00,01.00,000.00,1.00 -+060.47,+00.00,01.00,000.00,1.00 -+061.47,+00.00,01.00,000.00,1.00 -+062.47,+00.00,01.00,000.00,1.00 -+063.47,+00.00,01.00,000.00,1.00 -+064.47,+00.00,01.00,000.00,1.00 -+065.47,+00.00,01.00,000.00,1.00 -+066.47,+00.00,01.00,000.00,1.00 -+067.47,+00.00,01.00,000.00,1.00 -+068.48,+00.00,01.00,000.00,1.00 -+069.48,+00.00,01.00,000.00,1.00 -+070.48,+00.00,01.00,000.00,1.00 -+071.48,+00.00,01.00,000.00,1.00 -+072.48,+00.00,01.00,000.00,1.00 -+073.48,+00.00,01.00,000.00,1.00 -+074.48,+00.00,01.00,000.00,1.00 -+075.48,+00.00,01.00,000.00,1.00 -+076.48,+00.00,01.00,000.00,1.00 -+077.49,+00.00,01.00,000.00,1.00 -+078.49,+00.00,01.00,000.00,1.00 -+079.49,+00.00,01.00,000.00,1.00 -+080.49,+00.00,01.00,000.00,1.00 -+081.49,+00.00,01.00,000.00,1.00 -+082.49,+00.00,01.00,000.00,1.00 -+083.49,+00.00,01.00,000.00,1.00 -+084.49,+00.00,01.00,000.00,1.00 -+085.49,+00.00,01.00,000.00,1.00 -+086.50,+00.00,01.00,000.00,1.00 -+087.50,+00.00,01.00,000.00,1.00 -+088.50,+00.00,01.00,000.00,1.00 -+089.50,+00.00,01.00,000.00,1.00 -+090.50,+00.00,01.00,000.00,1.00 -+091.50,+00.00,01.00,000.00,1.00 -+092.50,+00.00,01.00,000.00,1.00 -+093.50,+00.00,01.00,000.00,1.00 -+094.51,+00.00,01.00,000.00,1.00 -+095.51,+00.00,01.00,000.00,1.00 -+096.51,+00.00,01.00,000.00,1.00 -+097.51,+00.00,01.00,000.00,1.00 -+098.51,+00.00,01.00,000.00,1.00 -+099.51,+00.00,01.00,000.00,1.00 -+100.51,+00.00,01.00,000.00,1.00 -+101.51,+00.00,01.00,000.00,1.00 -+102.51,+00.00,01.00,000.00,1.00 -+103.52,+00.00,01.00,000.00,1.00 -+104.52,+00.00,01.00,000.00,1.00 -+105.52,+00.00,01.00,000.00,1.00 -+106.52,+00.00,01.00,000.00,1.00 -+107.52,+00.00,01.00,000.00,1.00 -+108.52,+00.00,01.00,000.00,1.00 -+109.52,+00.00,01.00,000.00,1.00 -+110.52,+00.00,01.00,000.00,1.00 -+111.52,+00.00,01.00,000.00,1.00 -+112.53,+00.00,01.00,000.00,1.00 -+113.53,+00.00,01.00,000.00,1.00 -+114.53,+00.00,01.00,000.00,1.00 -+115.53,+00.00,01.00,000.00,1.00 -+116.53,+00.00,01.00,000.00,1.00 -+117.53,+00.00,01.00,000.00,1.00 -+118.53,+00.00,01.00,000.00,1.00 -+119.53,+00.00,01.00,000.00,1.00 -+120.53,+00.00,01.00,000.00,1.00 -+121.54,+00.00,01.00,000.00,1.00 -+122.54,+00.00,01.00,000.00,1.00 -+123.54,+00.00,01.00,000.00,1.00 -+124.54,+00.00,01.00,000.00,1.00 -+125.54,+00.00,01.00,000.00,1.00 -+126.54,+00.00,01.00,000.00,1.00 -+127.54,+00.00,01.00,000.00,1.00 -+128.54,+00.00,01.00,000.00,1.00 -+129.54,+00.00,01.00,000.00,1.00 -+130.55,+00.00,01.00,000.00,1.00 -+131.55,+00.00,01.00,000.00,1.00 -+132.55,+00.00,01.00,000.00,1.00 -+133.55,+00.00,01.00,000.00,1.00 -+134.55,+00.00,01.00,000.00,1.00 -+135.55,+00.00,01.00,000.00,1.00 -+136.55,+00.00,01.00,000.00,1.00 -+137.55,+00.00,01.00,000.00,1.00 -+138.55,+00.00,01.00,000.00,1.00 -+139.56,+00.00,01.00,000.00,1.00 -+140.56,+00.00,01.00,000.00,1.00 -+141.56,+00.00,01.00,000.00,1.00 -+142.56,+00.00,01.00,000.00,1.00 -+143.56,+00.00,01.00,000.00,1.00 -+144.56,+00.00,01.00,000.00,1.00 -+145.56,+00.00,01.00,000.00,1.00 -+146.56,+00.00,01.00,000.00,1.00 -+147.56,+00.00,01.00,000.00,1.00 -+148.57,+00.00,01.00,000.00,1.00 -+149.57,+00.00,01.00,000.00,1.00 -+150.57,+00.00,01.00,000.00,1.00 -+151.57,+00.00,01.00,000.00,1.00 -+152.57,+00.00,01.00,000.00,1.00 -+153.57,+00.00,01.00,000.00,1.00 -+154.57,+00.00,01.00,000.00,1.00 -+155.57,+00.00,01.00,000.00,1.00 -+156.57,+00.00,01.00,000.00,1.00 -+157.58,+00.00,01.00,000.00,1.00 -+158.58,+00.00,01.00,000.00,1.00 -+159.58,+00.00,01.00,000.00,1.00 -+160.58,+00.00,01.00,000.00,1.00 -+161.58,+00.00,01.00,000.00,1.00 -+162.58,+00.00,01.00,000.00,1.00 -+163.58,+00.00,01.00,000.00,1.00 -+164.58,+00.00,01.00,000.00,1.00 -+165.58,+00.00,01.00,000.00,1.00 -+166.59,+00.00,01.00,000.00,1.00 -+167.59,+00.00,01.00,000.00,1.00 -+168.59,+00.00,01.00,000.00,1.00 -+169.59,+00.00,01.00,000.00,1.00 -+170.59,+00.00,01.00,000.00,1.00 -+171.59,+00.00,01.00,000.00,1.00 -+172.59,+00.00,01.00,000.00,1.00 -+173.59,+00.00,01.00,000.00,1.00 -+174.59,+00.00,01.00,000.00,1.00 -+175.60,+00.00,01.00,000.00,1.00 -+176.60,+00.00,01.00,000.00,1.00 -+177.60,+00.00,01.00,000.00,1.00 -+178.60,+00.00,01.00,000.00,1.00 -+179.60,+00.00,01.00,000.00,1.00 --179.40,+00.00,01.00,000.00,1.00 --178.40,+00.00,01.00,000.00,1.00 --177.40,+00.00,01.00,000.00,1.00 --176.40,+00.00,01.00,000.00,1.00 --175.39,+00.00,01.00,000.00,1.00 --174.39,+00.00,01.00,000.00,1.00 --173.39,+00.00,01.00,000.00,1.00 --172.39,+00.00,01.00,000.00,1.00 --171.39,+00.00,01.00,000.00,1.00 --170.39,+00.00,01.00,000.00,1.00 --169.39,+00.00,01.00,000.00,1.00 --168.39,+00.00,01.00,000.00,1.00 --167.39,+00.00,01.00,000.00,1.00 --166.38,+00.00,01.00,000.00,1.00 --165.38,+00.00,01.00,000.00,1.00 --164.38,+00.00,01.00,000.00,1.00 --163.38,+00.00,01.00,000.00,1.00 --162.38,+00.00,01.00,000.00,1.00 --161.38,+00.00,01.00,000.00,1.00 --160.38,+00.00,01.00,000.00,1.00 --159.38,+00.00,01.00,000.00,1.00 --158.38,+00.00,01.00,000.00,1.00 --157.37,+00.00,01.00,000.00,1.00 --156.37,+00.00,01.00,000.00,1.00 --155.37,+00.00,01.00,000.00,1.00 --154.37,+00.00,01.00,000.00,1.00 --153.37,+00.00,01.00,000.00,1.00 --152.37,+00.00,01.00,000.00,1.00 --151.37,+00.00,01.00,000.00,1.00 --150.37,+00.00,01.00,000.00,1.00 --149.37,+00.00,01.00,000.00,1.00 --148.36,+00.00,01.00,000.00,1.00 --147.36,+00.00,01.00,000.00,1.00 --146.36,+00.00,01.00,000.00,1.00 --145.36,+00.00,01.00,000.00,1.00 --144.36,+00.00,01.00,000.00,1.00 --143.36,+00.00,01.00,000.00,1.00 --142.36,+00.00,01.00,000.00,1.00 --141.36,+00.00,01.00,000.00,1.00 --140.36,+00.00,01.00,000.00,1.00 --139.35,+00.00,01.00,000.00,1.00 --138.35,+00.00,01.00,000.00,1.00 --137.35,+00.00,01.00,000.00,1.00 --136.35,+00.00,01.00,000.00,1.00 --135.35,+00.00,01.00,000.00,1.00 --134.35,+00.00,01.00,000.00,1.00 --133.35,+00.00,01.00,000.00,1.00 --132.35,+00.00,01.00,000.00,1.00 --131.35,+00.00,01.00,000.00,1.00 --130.34,+00.00,01.00,000.00,1.00 --129.34,+00.00,01.00,000.00,1.00 --128.34,+00.00,01.00,000.00,1.00 --127.34,+00.00,01.00,000.00,1.00 --126.34,+00.00,01.00,000.00,1.00 --125.34,+00.00,01.00,000.00,1.00 --124.34,+00.00,01.00,000.00,1.00 --123.34,+00.00,01.00,000.00,1.00 --122.34,+00.00,01.00,000.00,1.00 --121.33,+00.00,01.00,000.00,1.00 --120.33,+00.00,01.00,000.00,1.00 --119.33,+00.00,01.00,000.00,1.00 --118.33,+00.00,01.00,000.00,1.00 --117.33,+00.00,01.00,000.00,1.00 --116.33,+00.00,01.00,000.00,1.00 --115.33,+00.00,01.00,000.00,1.00 --114.33,+00.00,01.00,000.00,1.00 --113.33,+00.00,01.00,000.00,1.00 --112.32,+00.00,01.00,000.00,1.00 --111.32,+00.00,01.00,000.00,1.00 --110.32,+00.00,01.00,000.00,1.00 --109.32,+00.00,01.00,000.00,1.00 --108.32,+00.00,01.00,000.00,1.00 --107.32,+00.00,01.00,000.00,1.00 --106.32,+00.00,01.00,000.00,1.00 --105.32,+00.00,01.00,000.00,1.00 --104.32,+00.00,01.00,000.00,1.00 --103.31,+00.00,01.00,000.00,1.00 --102.31,+00.00,01.00,000.00,1.00 --101.31,+00.00,01.00,000.00,1.00 --100.31,+00.00,01.00,000.00,1.00 --099.31,+00.00,01.00,000.00,1.00 --098.31,+00.00,01.00,000.00,1.00 --097.31,+00.00,01.00,000.00,1.00 --096.31,+00.00,01.00,000.00,1.00 --095.31,+00.00,01.00,000.00,1.00 --094.30,+00.00,01.00,000.00,1.00 --093.30,+00.00,01.00,000.00,1.00 --092.30,+00.00,01.00,000.00,1.00 --091.30,+00.00,01.00,000.00,1.00 --090.30,+00.00,01.00,000.00,1.00 --089.30,+00.00,01.00,000.00,1.00 --088.30,+00.00,01.00,000.00,1.00 --087.30,+00.00,01.00,000.00,1.00 --086.30,+00.00,01.00,000.00,1.00 --085.29,+00.00,01.00,000.00,1.00 --084.29,+00.00,01.00,000.00,1.00 --083.29,+00.00,01.00,000.00,1.00 --082.29,+00.00,01.00,000.00,1.00 --081.29,+00.00,01.00,000.00,1.00 --080.29,+00.00,01.00,000.00,1.00 --079.29,+00.00,01.00,000.00,1.00 --078.29,+00.00,01.00,000.00,1.00 --077.29,+00.00,01.00,000.00,1.00 --076.28,+00.00,01.00,000.00,1.00 --075.28,+00.00,01.00,000.00,1.00 --074.28,+00.00,01.00,000.00,1.00 --073.28,+00.00,01.00,000.00,1.00 --072.28,+00.00,01.00,000.00,1.00 --071.28,+00.00,01.00,000.00,1.00 --070.28,+00.00,01.00,000.00,1.00 --069.28,+00.00,01.00,000.00,1.00 --068.28,+00.00,01.00,000.00,1.00 --067.27,+00.00,01.00,000.00,1.00 --066.27,+00.00,01.00,000.00,1.00 --065.27,+00.00,01.00,000.00,1.00 --064.27,+00.00,01.00,000.00,1.00 --063.27,+00.00,01.00,000.00,1.00 --062.27,+00.00,01.00,000.00,1.00 --061.27,+00.00,01.00,000.00,1.00 --060.27,+00.00,01.00,000.00,1.00 --059.27,+00.00,01.00,000.00,1.00 --058.26,+00.00,01.00,000.00,1.00 --057.26,+00.00,01.00,000.00,1.00 --056.26,+00.00,01.00,000.00,1.00 --055.26,+00.00,01.00,000.00,1.00 --054.26,+00.00,01.00,000.00,1.00 --053.26,+00.00,01.00,000.00,1.00 --052.26,+00.00,01.00,000.00,1.00 --051.26,+00.00,01.00,000.00,1.00 --050.26,+00.00,01.00,000.00,1.00 --049.25,+00.00,01.00,000.00,1.00 --048.25,+00.00,01.00,000.00,1.00 --047.25,+00.00,01.00,000.00,1.00 --046.25,+00.00,01.00,000.00,1.00 --045.25,+00.00,01.00,000.00,1.00 --044.25,+00.00,01.00,000.00,1.00 --043.25,+00.00,01.00,000.00,1.00 --042.25,+00.00,01.00,000.00,1.00 --041.25,+00.00,01.00,000.00,1.00 --040.24,+00.00,01.00,000.00,1.00 --039.24,+00.00,01.00,000.00,1.00 --038.24,+00.00,01.00,000.00,1.00 --037.24,+00.00,01.00,000.00,1.00 --036.24,+00.00,01.00,000.00,1.00 --035.24,+00.00,01.00,000.00,1.00 --034.24,+00.00,01.00,000.00,1.00 --033.24,+00.00,01.00,000.00,1.00 --032.24,+00.00,01.00,000.00,1.00 --031.23,+00.00,01.00,000.00,1.00 --030.23,+00.00,01.00,000.00,1.00 --029.23,+00.00,01.00,000.00,1.00 --028.23,+00.00,01.00,000.00,1.00 --027.23,+00.00,01.00,000.00,1.00 --026.23,+00.00,01.00,000.00,1.00 --025.23,+00.00,01.00,000.00,1.00 --024.23,+00.00,01.00,000.00,1.00 --023.23,+00.00,01.00,000.00,1.00 --022.22,+00.00,01.00,000.00,1.00 --021.22,+00.00,01.00,000.00,1.00 --020.22,+00.00,01.00,000.00,1.00 --019.22,+00.00,01.00,000.00,1.00 --018.22,+00.00,01.00,000.00,1.00 --017.22,+00.00,01.00,000.00,1.00 --016.22,+00.00,01.00,000.00,1.00 --015.22,+00.00,01.00,000.00,1.00 --014.22,+00.00,01.00,000.00,1.00 --013.21,+00.00,01.00,000.00,1.00 --012.21,+00.00,01.00,000.00,1.00 --011.21,+00.00,01.00,000.00,1.00 --010.21,+00.00,01.00,000.00,1.00 --009.21,+00.00,01.00,000.00,1.00 --008.21,+00.00,01.00,000.00,1.00 --007.21,+00.00,01.00,000.00,1.00 --006.21,+00.00,01.00,000.00,1.00 --005.21,+00.00,01.00,000.00,1.00 --004.20,+00.00,01.00,000.00,1.00 --003.20,+00.00,01.00,000.00,1.00 --002.20,+00.00,01.00,000.00,1.00 --001.20,+00.00,01.00,000.00,1.00 --000.20,+00.00,01.00,000.00,1.00 -+000.80,+00.00,01.00,000.00,1.00 -+001.80,+00.00,01.00,000.00,1.00 -+002.80,+00.00,01.00,000.00,1.00 -+003.80,+00.00,01.00,000.00,1.00 -+004.81,+00.00,01.00,000.00,1.00 -+005.81,+00.00,01.00,000.00,1.00 -+006.81,+00.00,01.00,000.00,1.00 -+007.81,+00.00,01.00,000.00,1.00 -+008.81,+00.00,01.00,000.00,1.00 -+009.81,+00.00,01.00,000.00,1.00 -+010.81,+00.00,01.00,000.00,1.00 -+011.81,+00.00,01.00,000.00,1.00 -+012.81,+00.00,01.00,000.00,1.00 -+013.82,+00.00,01.00,000.00,1.00 -+014.82,+00.00,01.00,000.00,1.00 -+015.82,+00.00,01.00,000.00,1.00 -+016.82,+00.00,01.00,000.00,1.00 -+017.82,+00.00,01.00,000.00,1.00 -+018.82,+00.00,01.00,000.00,1.00 -+019.82,+00.00,01.00,000.00,1.00 -+020.82,+00.00,01.00,000.00,1.00 -+021.82,+00.00,01.00,000.00,1.00 -+022.83,+00.00,01.00,000.00,1.00 -+023.83,+00.00,01.00,000.00,1.00 -+024.83,+00.00,01.00,000.00,1.00 -+025.83,+00.00,01.00,000.00,1.00 -+026.83,+00.00,01.00,000.00,1.00 -+027.83,+00.00,01.00,000.00,1.00 -+028.83,+00.00,01.00,000.00,1.00 -+029.83,+00.00,01.00,000.00,1.00 -+030.83,+00.00,01.00,000.00,1.00 -+031.84,+00.00,01.00,000.00,1.00 -+032.84,+00.00,01.00,000.00,1.00 -+033.84,+00.00,01.00,000.00,1.00 -+034.84,+00.00,01.00,000.00,1.00 -+035.84,+00.00,01.00,000.00,1.00 -+036.84,+00.00,01.00,000.00,1.00 -+037.84,+00.00,01.00,000.00,1.00 -+038.84,+00.00,01.00,000.00,1.00 -+039.84,+00.00,01.00,000.00,1.00 -+040.85,+00.00,01.00,000.00,1.00 -+041.85,+00.00,01.00,000.00,1.00 -+042.85,+00.00,01.00,000.00,1.00 -+043.85,+00.00,01.00,000.00,1.00 -+044.85,+00.00,01.00,000.00,1.00 -+045.85,+00.00,01.00,000.00,1.00 -+046.85,+00.00,01.00,000.00,1.00 -+047.85,+00.00,01.00,000.00,1.00 -+048.85,+00.00,01.00,000.00,1.00 -+049.86,+00.00,01.00,000.00,1.00 -+050.86,+00.00,01.00,000.00,1.00 -+051.86,+00.00,01.00,000.00,1.00 -+052.86,+00.00,01.00,000.00,1.00 -+053.86,+00.00,01.00,000.00,1.00 -+054.86,+00.00,01.00,000.00,1.00 -+055.86,+00.00,01.00,000.00,1.00 -+056.86,+00.00,01.00,000.00,1.00 -+057.86,+00.00,01.00,000.00,1.00 -+058.87,+00.00,01.00,000.00,1.00 -+059.87,+00.00,01.00,000.00,1.00 -+060.87,+00.00,01.00,000.00,1.00 -+061.87,+00.00,01.00,000.00,1.00 -+062.87,+00.00,01.00,000.00,1.00 -+063.87,+00.00,01.00,000.00,1.00 -+064.87,+00.00,01.00,000.00,1.00 -+065.87,+00.00,01.00,000.00,1.00 -+066.87,+00.00,01.00,000.00,1.00 -+067.88,+00.00,01.00,000.00,1.00 -+068.88,+00.00,01.00,000.00,1.00 -+069.88,+00.00,01.00,000.00,1.00 -+070.88,+00.00,01.00,000.00,1.00 -+071.88,+00.00,01.00,000.00,1.00 -+072.88,+00.00,01.00,000.00,1.00 -+073.88,+00.00,01.00,000.00,1.00 -+074.88,+00.00,01.00,000.00,1.00 -+075.88,+00.00,01.00,000.00,1.00 -+076.89,+00.00,01.00,000.00,1.00 -+077.89,+00.00,01.00,000.00,1.00 -+078.89,+00.00,01.00,000.00,1.00 -+079.89,+00.00,01.00,000.00,1.00 -+080.89,+00.00,01.00,000.00,1.00 -+081.89,+00.00,01.00,000.00,1.00 -+082.89,+00.00,01.00,000.00,1.00 -+083.89,+00.00,01.00,000.00,1.00 -+084.89,+00.00,01.00,000.00,1.00 -+085.90,+00.00,01.00,000.00,1.00 -+086.90,+00.00,01.00,000.00,1.00 -+087.90,+00.00,01.00,000.00,1.00 -+088.90,+00.00,01.00,000.00,1.00 -+089.90,+00.00,01.00,000.00,1.00 -+090.90,+00.00,01.00,000.00,1.00 -+091.90,+00.00,01.00,000.00,1.00 -+092.90,+00.00,01.00,000.00,1.00 -+093.90,+00.00,01.00,000.00,1.00 -+094.91,+00.00,01.00,000.00,1.00 -+095.91,+00.00,01.00,000.00,1.00 -+096.91,+00.00,01.00,000.00,1.00 -+097.91,+00.00,01.00,000.00,1.00 -+098.91,+00.00,01.00,000.00,1.00 -+099.91,+00.00,01.00,000.00,1.00 -+100.91,+00.00,01.00,000.00,1.00 -+101.91,+00.00,01.00,000.00,1.00 -+102.91,+00.00,01.00,000.00,1.00 -+103.92,+00.00,01.00,000.00,1.00 -+104.92,+00.00,01.00,000.00,1.00 -+105.92,+00.00,01.00,000.00,1.00 -+106.92,+00.00,01.00,000.00,1.00 -+107.92,+00.00,01.00,000.00,1.00 -+108.92,+00.00,01.00,000.00,1.00 -+109.92,+00.00,01.00,000.00,1.00 -+110.92,+00.00,01.00,000.00,1.00 -+111.92,+00.00,01.00,000.00,1.00 -+112.93,+00.00,01.00,000.00,1.00 -+113.93,+00.00,01.00,000.00,1.00 -+114.93,+00.00,01.00,000.00,1.00 -+115.93,+00.00,01.00,000.00,1.00 -+116.93,+00.00,01.00,000.00,1.00 -+117.93,+00.00,01.00,000.00,1.00 -+118.93,+00.00,01.00,000.00,1.00 -+119.93,+00.00,01.00,000.00,1.00 -+120.93,+00.00,01.00,000.00,1.00 -+121.94,+00.00,01.00,000.00,1.00 -+122.94,+00.00,01.00,000.00,1.00 -+123.94,+00.00,01.00,000.00,1.00 -+124.94,+00.00,01.00,000.00,1.00 -+125.94,+00.00,01.00,000.00,1.00 -+126.94,+00.00,01.00,000.00,1.00 -+127.94,+00.00,01.00,000.00,1.00 -+128.94,+00.00,01.00,000.00,1.00 -+129.94,+00.00,01.00,000.00,1.00 -+130.95,+00.00,01.00,000.00,1.00 -+131.95,+00.00,01.00,000.00,1.00 -+132.95,+00.00,01.00,000.00,1.00 -+133.95,+00.00,01.00,000.00,1.00 -+134.95,+00.00,01.00,000.00,1.00 -+135.95,+00.00,01.00,000.00,1.00 -+136.95,+00.00,01.00,000.00,1.00 -+137.95,+00.00,01.00,000.00,1.00 -+138.95,+00.00,01.00,000.00,1.00 -+139.96,+00.00,01.00,000.00,1.00 -+140.96,+00.00,01.00,000.00,1.00 -+141.96,+00.00,01.00,000.00,1.00 -+142.96,+00.00,01.00,000.00,1.00 -+143.96,+00.00,01.00,000.00,1.00 -+144.96,+00.00,01.00,000.00,1.00 -+145.96,+00.00,01.00,000.00,1.00 -+146.96,+00.00,01.00,000.00,1.00 -+147.96,+00.00,01.00,000.00,1.00 -+148.97,+00.00,01.00,000.00,1.00 -+149.97,+00.00,01.00,000.00,1.00 -+150.97,+00.00,01.00,000.00,1.00 -+151.97,+00.00,01.00,000.00,1.00 -+152.97,+00.00,01.00,000.00,1.00 -+153.97,+00.00,01.00,000.00,1.00 -+154.97,+00.00,01.00,000.00,1.00 -+155.97,+00.00,01.00,000.00,1.00 -+156.97,+00.00,01.00,000.00,1.00 -+157.98,+00.00,01.00,000.00,1.00 -+158.98,+00.00,01.00,000.00,1.00 -+159.98,+00.00,01.00,000.00,1.00 -+160.98,+00.00,01.00,000.00,1.00 -+161.98,+00.00,01.00,000.00,1.00 -+162.98,+00.00,01.00,000.00,1.00 -+163.98,+00.00,01.00,000.00,1.00 -+164.98,+00.00,01.00,000.00,1.00 -+165.98,+00.00,01.00,000.00,1.00 -+166.99,+00.00,01.00,000.00,1.00 -+167.99,+00.00,01.00,000.00,1.00 -+168.99,+00.00,01.00,000.00,1.00 -+169.99,+00.00,01.00,000.00,1.00 -+170.99,+00.00,01.00,000.00,1.00 -+171.99,+00.00,01.00,000.00,1.00 -+172.99,+00.00,01.00,000.00,1.00 -+173.99,+00.00,01.00,000.00,1.00 -+174.99,+00.00,01.00,000.00,1.00 -+176.00,+00.00,01.00,000.00,1.00 -+177.00,+00.00,01.00,000.00,1.00 -+178.00,+00.00,01.00,000.00,1.00 -+179.00,+00.00,01.00,000.00,1.00 -+180.00,+00.00,01.00,000.00,1.00 --179.00,+00.00,01.00,000.00,1.00 --178.00,+00.00,01.00,000.00,1.00 --177.00,+00.00,01.00,000.00,1.00 --176.00,+00.00,01.00,000.00,1.00 --174.99,+00.00,01.00,000.00,1.00 --173.99,+00.00,01.00,000.00,1.00 --172.99,+00.00,01.00,000.00,1.00 --171.99,+00.00,01.00,000.00,1.00 --170.99,+00.00,01.00,000.00,1.00 --169.99,+00.00,01.00,000.00,1.00 --168.99,+00.00,01.00,000.00,1.00 --167.99,+00.00,01.00,000.00,1.00 --166.99,+00.00,01.00,000.00,1.00 --165.98,+00.00,01.00,000.00,1.00 --164.98,+00.00,01.00,000.00,1.00 --163.98,+00.00,01.00,000.00,1.00 --162.98,+00.00,01.00,000.00,1.00 --161.98,+00.00,01.00,000.00,1.00 --160.98,+00.00,01.00,000.00,1.00 --159.98,+00.00,01.00,000.00,1.00 --158.98,+00.00,01.00,000.00,1.00 --157.98,+00.00,01.00,000.00,1.00 --156.97,+00.00,01.00,000.00,1.00 --155.97,+00.00,01.00,000.00,1.00 --154.97,+00.00,01.00,000.00,1.00 --153.97,+00.00,01.00,000.00,1.00 --152.97,+00.00,01.00,000.00,1.00 --151.97,+00.00,01.00,000.00,1.00 --150.97,+00.00,01.00,000.00,1.00 --149.97,+00.00,01.00,000.00,1.00 --148.97,+00.00,01.00,000.00,1.00 --147.96,+00.00,01.00,000.00,1.00 --146.96,+00.00,01.00,000.00,1.00 --145.96,+00.00,01.00,000.00,1.00 --144.96,+00.00,01.00,000.00,1.00 --143.96,+00.00,01.00,000.00,1.00 --142.96,+00.00,01.00,000.00,1.00 --141.96,+00.00,01.00,000.00,1.00 --140.96,+00.00,01.00,000.00,1.00 --139.96,+00.00,01.00,000.00,1.00 --138.95,+00.00,01.00,000.00,1.00 --137.95,+00.00,01.00,000.00,1.00 --136.95,+00.00,01.00,000.00,1.00 --135.95,+00.00,01.00,000.00,1.00 --134.95,+00.00,01.00,000.00,1.00 --133.95,+00.00,01.00,000.00,1.00 --132.95,+00.00,01.00,000.00,1.00 --131.95,+00.00,01.00,000.00,1.00 --130.95,+00.00,01.00,000.00,1.00 --129.94,+00.00,01.00,000.00,1.00 --128.94,+00.00,01.00,000.00,1.00 --127.94,+00.00,01.00,000.00,1.00 --126.94,+00.00,01.00,000.00,1.00 --125.94,+00.00,01.00,000.00,1.00 --124.94,+00.00,01.00,000.00,1.00 --123.94,+00.00,01.00,000.00,1.00 --122.94,+00.00,01.00,000.00,1.00 --121.94,+00.00,01.00,000.00,1.00 --120.93,+00.00,01.00,000.00,1.00 --119.93,+00.00,01.00,000.00,1.00 --118.93,+00.00,01.00,000.00,1.00 --117.93,+00.00,01.00,000.00,1.00 --116.93,+00.00,01.00,000.00,1.00 --115.93,+00.00,01.00,000.00,1.00 --114.93,+00.00,01.00,000.00,1.00 --113.93,+00.00,01.00,000.00,1.00 --112.93,+00.00,01.00,000.00,1.00 --111.92,+00.00,01.00,000.00,1.00 --110.92,+00.00,01.00,000.00,1.00 --109.92,+00.00,01.00,000.00,1.00 --108.92,+00.00,01.00,000.00,1.00 --107.92,+00.00,01.00,000.00,1.00 --106.92,+00.00,01.00,000.00,1.00 --105.92,+00.00,01.00,000.00,1.00 --104.92,+00.00,01.00,000.00,1.00 --103.92,+00.00,01.00,000.00,1.00 --102.91,+00.00,01.00,000.00,1.00 --101.91,+00.00,01.00,000.00,1.00 --100.91,+00.00,01.00,000.00,1.00 --099.91,+00.00,01.00,000.00,1.00 --098.91,+00.00,01.00,000.00,1.00 --097.91,+00.00,01.00,000.00,1.00 --096.91,+00.00,01.00,000.00,1.00 --095.91,+00.00,01.00,000.00,1.00 --094.91,+00.00,01.00,000.00,1.00 --093.90,+00.00,01.00,000.00,1.00 --092.90,+00.00,01.00,000.00,1.00 --091.90,+00.00,01.00,000.00,1.00 --090.90,+00.00,01.00,000.00,1.00 --089.90,+00.00,01.00,000.00,1.00 --088.90,+00.00,01.00,000.00,1.00 --087.90,+00.00,01.00,000.00,1.00 --086.90,+00.00,01.00,000.00,1.00 --085.90,+00.00,01.00,000.00,1.00 --084.89,+00.00,01.00,000.00,1.00 --083.89,+00.00,01.00,000.00,1.00 --082.89,+00.00,01.00,000.00,1.00 --081.89,+00.00,01.00,000.00,1.00 --080.89,+00.00,01.00,000.00,1.00 --079.89,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t08_ch1.csv b/scripts/td_object_renderer/metadata/csv/t08_ch1.csv deleted file mode 100644 index 2eaf94bbc454bc8524b85412d466ba898f5abd5b..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t08_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+000.00,+30.00,01.00,000.00,1.00 -+000.00,+29.99,01.00,000.00,1.00 -+000.00,+29.98,01.00,000.00,1.00 -+000.00,+29.95,01.00,000.00,1.00 -+000.00,+29.92,01.00,000.00,1.00 -+000.00,+29.87,01.00,000.00,1.00 -+000.00,+29.82,01.00,000.00,1.00 -+000.00,+29.75,01.00,000.00,1.00 -+000.00,+29.68,01.00,000.00,1.00 -+000.00,+29.59,01.00,000.00,1.00 -+000.00,+29.50,01.00,000.00,1.00 -+000.00,+29.39,01.00,000.00,1.00 -+000.00,+29.28,01.00,000.00,1.00 -+000.00,+29.15,01.00,000.00,1.00 -+000.00,+29.02,01.00,000.00,1.00 -+000.00,+28.88,01.00,000.00,1.00 -+000.00,+28.72,01.00,000.00,1.00 -+000.00,+28.56,01.00,000.00,1.00 -+000.00,+28.39,01.00,000.00,1.00 -+000.00,+28.21,01.00,000.00,1.00 -+000.00,+28.02,01.00,000.00,1.00 -+000.00,+27.82,01.00,000.00,1.00 -+000.00,+27.61,01.00,000.00,1.00 -+000.00,+27.40,01.00,000.00,1.00 -+000.00,+27.17,01.00,000.00,1.00 -+000.00,+26.94,01.00,000.00,1.00 -+000.00,+26.70,01.00,000.00,1.00 -+000.00,+26.45,01.00,000.00,1.00 -+000.00,+26.19,01.00,000.00,1.00 -+000.00,+25.92,01.00,000.00,1.00 -+000.00,+25.65,01.00,000.00,1.00 -+000.00,+25.37,01.00,000.00,1.00 -+000.00,+25.08,01.00,000.00,1.00 -+000.00,+24.78,01.00,000.00,1.00 -+000.00,+24.48,01.00,000.00,1.00 -+000.00,+24.17,01.00,000.00,1.00 -+000.00,+23.85,01.00,000.00,1.00 -+000.00,+23.52,01.00,000.00,1.00 -+000.00,+23.19,01.00,000.00,1.00 -+000.00,+22.85,01.00,000.00,1.00 -+000.00,+22.51,01.00,000.00,1.00 -+000.00,+22.15,01.00,000.00,1.00 -+000.00,+21.80,01.00,000.00,1.00 -+000.00,+21.43,01.00,000.00,1.00 -+000.00,+21.06,01.00,000.00,1.00 -+000.00,+20.69,01.00,000.00,1.00 -+000.00,+20.30,01.00,000.00,1.00 -+000.00,+19.92,01.00,000.00,1.00 -+000.00,+19.53,01.00,000.00,1.00 -+000.00,+19.13,01.00,000.00,1.00 -+000.00,+18.72,01.00,000.00,1.00 -+000.00,+18.32,01.00,000.00,1.00 -+000.00,+17.90,01.00,000.00,1.00 -+000.00,+17.49,01.00,000.00,1.00 -+000.00,+17.07,01.00,000.00,1.00 -+000.00,+16.64,01.00,000.00,1.00 -+000.00,+16.21,01.00,000.00,1.00 -+000.00,+15.77,01.00,000.00,1.00 -+000.00,+15.34,01.00,000.00,1.00 -+000.00,+14.89,01.00,000.00,1.00 -+000.00,+14.45,01.00,000.00,1.00 -+000.00,+14.00,01.00,000.00,1.00 -+000.00,+13.54,01.00,000.00,1.00 -+000.00,+13.09,01.00,000.00,1.00 -+000.00,+12.63,01.00,000.00,1.00 -+000.00,+12.17,01.00,000.00,1.00 -+000.00,+11.70,01.00,000.00,1.00 -+000.00,+11.23,01.00,000.00,1.00 -+000.00,+10.76,01.00,000.00,1.00 -+000.00,+10.29,01.00,000.00,1.00 -+000.00,+09.81,01.00,000.00,1.00 -+000.00,+09.33,01.00,000.00,1.00 -+000.00,+08.85,01.00,000.00,1.00 -+000.00,+08.37,01.00,000.00,1.00 -+000.00,+07.88,01.00,000.00,1.00 -+000.00,+07.39,01.00,000.00,1.00 -+000.00,+06.91,01.00,000.00,1.00 -+000.00,+06.42,01.00,000.00,1.00 -+000.00,+05.92,01.00,000.00,1.00 -+000.00,+05.43,01.00,000.00,1.00 -+000.00,+04.94,01.00,000.00,1.00 -+000.00,+04.44,01.00,000.00,1.00 -+000.00,+03.94,01.00,000.00,1.00 -+000.00,+03.45,01.00,000.00,1.00 -+000.00,+02.95,01.00,000.00,1.00 -+000.00,+02.45,01.00,000.00,1.00 -+000.00,+01.95,01.00,000.00,1.00 -+000.00,+01.45,01.00,000.00,1.00 -+000.00,+00.95,01.00,000.00,1.00 -+000.00,+00.45,01.00,000.00,1.00 -+000.00,-00.05,01.00,000.00,1.00 -+000.00,-00.55,01.00,000.00,1.00 -+000.00,-01.05,01.00,000.00,1.00 -+000.00,-01.55,01.00,000.00,1.00 -+000.00,-02.05,01.00,000.00,1.00 -+000.00,-02.55,01.00,000.00,1.00 -+000.00,-03.05,01.00,000.00,1.00 -+000.00,-03.55,01.00,000.00,1.00 -+000.00,-04.04,01.00,000.00,1.00 -+000.00,-04.54,01.00,000.00,1.00 -+000.00,-05.04,01.00,000.00,1.00 -+000.00,-05.53,01.00,000.00,1.00 -+000.00,-06.02,01.00,000.00,1.00 -+000.00,-06.51,01.00,000.00,1.00 -+000.00,-07.00,01.00,000.00,1.00 -+000.00,-07.49,01.00,000.00,1.00 -+000.00,-07.98,01.00,000.00,1.00 -+000.00,-08.46,01.00,000.00,1.00 -+000.00,-08.95,01.00,000.00,1.00 -+000.00,-09.43,01.00,000.00,1.00 -+000.00,-09.90,01.00,000.00,1.00 -+000.00,-10.38,01.00,000.00,1.00 -+000.00,-10.85,01.00,000.00,1.00 -+000.00,-11.33,01.00,000.00,1.00 -+000.00,-11.79,01.00,000.00,1.00 -+000.00,-12.26,01.00,000.00,1.00 -+000.00,-12.72,01.00,000.00,1.00 -+000.00,-13.18,01.00,000.00,1.00 -+000.00,-13.64,01.00,000.00,1.00 -+000.00,-14.09,01.00,000.00,1.00 -+000.00,-14.54,01.00,000.00,1.00 -+000.00,-14.98,01.00,000.00,1.00 -+000.00,-15.42,01.00,000.00,1.00 -+000.00,-15.86,01.00,000.00,1.00 -+000.00,-16.30,01.00,000.00,1.00 -+000.00,-16.73,01.00,000.00,1.00 -+000.00,-17.15,01.00,000.00,1.00 -+000.00,-17.57,01.00,000.00,1.00 -+000.00,-17.99,01.00,000.00,1.00 -+000.00,-18.40,01.00,000.00,1.00 -+000.00,-18.81,01.00,000.00,1.00 -+000.00,-19.21,01.00,000.00,1.00 -+000.00,-19.60,01.00,000.00,1.00 -+000.00,-20.00,01.00,000.00,1.00 -+000.00,-20.38,01.00,000.00,1.00 -+000.00,-20.76,01.00,000.00,1.00 -+000.00,-21.14,01.00,000.00,1.00 -+000.00,-21.51,01.00,000.00,1.00 -+000.00,-21.87,01.00,000.00,1.00 -+000.00,-22.22,01.00,000.00,1.00 -+000.00,-22.58,01.00,000.00,1.00 -+000.00,-22.92,01.00,000.00,1.00 -+000.00,-23.26,01.00,000.00,1.00 -+000.00,-23.59,01.00,000.00,1.00 -+000.00,-23.91,01.00,000.00,1.00 -+000.00,-24.23,01.00,000.00,1.00 -+000.00,-24.54,01.00,000.00,1.00 -+000.00,-24.84,01.00,000.00,1.00 -+000.00,-25.14,01.00,000.00,1.00 -+000.00,-25.42,01.00,000.00,1.00 -+000.00,-25.71,01.00,000.00,1.00 -+000.00,-25.98,01.00,000.00,1.00 -+000.00,-26.24,01.00,000.00,1.00 -+000.00,-26.50,01.00,000.00,1.00 -+000.00,-26.75,01.00,000.00,1.00 -+000.00,-26.99,01.00,000.00,1.00 -+000.00,-27.22,01.00,000.00,1.00 -+000.00,-27.44,01.00,000.00,1.00 -+000.00,-27.66,01.00,000.00,1.00 -+000.00,-27.86,01.00,000.00,1.00 -+000.00,-28.06,01.00,000.00,1.00 -+000.00,-28.25,01.00,000.00,1.00 -+000.00,-28.43,01.00,000.00,1.00 -+000.00,-28.59,01.00,000.00,1.00 -+000.00,-28.76,01.00,000.00,1.00 -+000.00,-28.91,01.00,000.00,1.00 -+000.00,-29.05,01.00,000.00,1.00 -+000.00,-29.18,01.00,000.00,1.00 -+000.00,-29.30,01.00,000.00,1.00 -+000.00,-29.41,01.00,000.00,1.00 -+000.00,-29.52,01.00,000.00,1.00 -+000.00,-29.61,01.00,000.00,1.00 -+000.00,-29.69,01.00,000.00,1.00 -+000.00,-29.77,01.00,000.00,1.00 -+000.00,-29.83,01.00,000.00,1.00 -+000.00,-29.88,01.00,000.00,1.00 -+000.00,-29.93,01.00,000.00,1.00 -+000.00,-29.96,01.00,000.00,1.00 -+000.00,-29.98,01.00,000.00,1.00 -+000.00,-30.00,01.00,000.00,1.00 -+000.00,-30.00,01.00,000.00,1.00 -+000.00,-29.99,01.00,000.00,1.00 -+000.00,-29.98,01.00,000.00,1.00 -+000.00,-29.95,01.00,000.00,1.00 -+000.00,-29.91,01.00,000.00,1.00 -+000.00,-29.86,01.00,000.00,1.00 -+000.00,-29.81,01.00,000.00,1.00 -+000.00,-29.74,01.00,000.00,1.00 -+000.00,-29.66,01.00,000.00,1.00 -+000.00,-29.57,01.00,000.00,1.00 -+000.00,-29.48,01.00,000.00,1.00 -+000.00,-29.37,01.00,000.00,1.00 -+000.00,-29.25,01.00,000.00,1.00 -+000.00,-29.13,01.00,000.00,1.00 -+000.00,-28.99,01.00,000.00,1.00 -+000.00,-28.85,01.00,000.00,1.00 -+000.00,-28.69,01.00,000.00,1.00 -+000.00,-28.53,01.00,000.00,1.00 -+000.00,-28.35,01.00,000.00,1.00 -+000.00,-28.17,01.00,000.00,1.00 -+000.00,-27.98,01.00,000.00,1.00 -+000.00,-27.78,01.00,000.00,1.00 -+000.00,-27.57,01.00,000.00,1.00 -+000.00,-27.35,01.00,000.00,1.00 -+000.00,-27.13,01.00,000.00,1.00 -+000.00,-26.89,01.00,000.00,1.00 -+000.00,-26.65,01.00,000.00,1.00 -+000.00,-26.40,01.00,000.00,1.00 -+000.00,-26.14,01.00,000.00,1.00 -+000.00,-25.87,01.00,000.00,1.00 -+000.00,-25.59,01.00,000.00,1.00 -+000.00,-25.31,01.00,000.00,1.00 -+000.00,-25.02,01.00,000.00,1.00 -+000.00,-24.72,01.00,000.00,1.00 -+000.00,-24.42,01.00,000.00,1.00 -+000.00,-24.10,01.00,000.00,1.00 -+000.00,-23.78,01.00,000.00,1.00 -+000.00,-23.46,01.00,000.00,1.00 -+000.00,-23.12,01.00,000.00,1.00 -+000.00,-22.78,01.00,000.00,1.00 -+000.00,-22.44,01.00,000.00,1.00 -+000.00,-22.08,01.00,000.00,1.00 -+000.00,-21.72,01.00,000.00,1.00 -+000.00,-21.36,01.00,000.00,1.00 -+000.00,-20.99,01.00,000.00,1.00 -+000.00,-20.61,01.00,000.00,1.00 -+000.00,-20.23,01.00,000.00,1.00 -+000.00,-19.84,01.00,000.00,1.00 -+000.00,-19.45,01.00,000.00,1.00 -+000.00,-19.05,01.00,000.00,1.00 -+000.00,-18.64,01.00,000.00,1.00 -+000.00,-18.23,01.00,000.00,1.00 -+000.00,-17.82,01.00,000.00,1.00 -+000.00,-17.40,01.00,000.00,1.00 -+000.00,-16.98,01.00,000.00,1.00 -+000.00,-16.55,01.00,000.00,1.00 -+000.00,-16.12,01.00,000.00,1.00 -+000.00,-15.69,01.00,000.00,1.00 -+000.00,-15.25,01.00,000.00,1.00 -+000.00,-14.80,01.00,000.00,1.00 -+000.00,-14.36,01.00,000.00,1.00 -+000.00,-13.91,01.00,000.00,1.00 -+000.00,-13.45,01.00,000.00,1.00 -+000.00,-13.00,01.00,000.00,1.00 -+000.00,-12.54,01.00,000.00,1.00 -+000.00,-12.07,01.00,000.00,1.00 -+000.00,-11.61,01.00,000.00,1.00 -+000.00,-11.14,01.00,000.00,1.00 -+000.00,-10.67,01.00,000.00,1.00 -+000.00,-10.19,01.00,000.00,1.00 -+000.00,-09.71,01.00,000.00,1.00 -+000.00,-09.23,01.00,000.00,1.00 -+000.00,-08.75,01.00,000.00,1.00 -+000.00,-08.27,01.00,000.00,1.00 -+000.00,-07.78,01.00,000.00,1.00 -+000.00,-07.30,01.00,000.00,1.00 -+000.00,-06.81,01.00,000.00,1.00 -+000.00,-06.32,01.00,000.00,1.00 -+000.00,-05.83,01.00,000.00,1.00 -+000.00,-05.33,01.00,000.00,1.00 -+000.00,-04.84,01.00,000.00,1.00 -+000.00,-04.34,01.00,000.00,1.00 -+000.00,-03.85,01.00,000.00,1.00 -+000.00,-03.35,01.00,000.00,1.00 -+000.00,-02.85,01.00,000.00,1.00 -+000.00,-02.35,01.00,000.00,1.00 -+000.00,-01.85,01.00,000.00,1.00 -+000.00,-01.35,01.00,000.00,1.00 -+000.00,-00.85,01.00,000.00,1.00 -+000.00,-00.35,01.00,000.00,1.00 -+000.00,+00.15,01.00,000.00,1.00 -+000.00,+00.65,01.00,000.00,1.00 -+000.00,+01.15,01.00,000.00,1.00 -+000.00,+01.65,01.00,000.00,1.00 -+000.00,+02.15,01.00,000.00,1.00 -+000.00,+02.65,01.00,000.00,1.00 -+000.00,+03.15,01.00,000.00,1.00 -+000.00,+03.65,01.00,000.00,1.00 -+000.00,+04.14,01.00,000.00,1.00 -+000.00,+04.64,01.00,000.00,1.00 -+000.00,+05.13,01.00,000.00,1.00 -+000.00,+05.63,01.00,000.00,1.00 -+000.00,+06.12,01.00,000.00,1.00 -+000.00,+06.61,01.00,000.00,1.00 -+000.00,+07.10,01.00,000.00,1.00 -+000.00,+07.59,01.00,000.00,1.00 -+000.00,+08.08,01.00,000.00,1.00 -+000.00,+08.56,01.00,000.00,1.00 -+000.00,+09.04,01.00,000.00,1.00 -+000.00,+09.52,01.00,000.00,1.00 -+000.00,+10.00,01.00,000.00,1.00 -+000.00,+10.48,01.00,000.00,1.00 -+000.00,+10.95,01.00,000.00,1.00 -+000.00,+11.42,01.00,000.00,1.00 -+000.00,+11.89,01.00,000.00,1.00 -+000.00,+12.35,01.00,000.00,1.00 -+000.00,+12.81,01.00,000.00,1.00 -+000.00,+13.27,01.00,000.00,1.00 -+000.00,+13.73,01.00,000.00,1.00 -+000.00,+14.18,01.00,000.00,1.00 -+000.00,+14.63,01.00,000.00,1.00 -+000.00,+15.07,01.00,000.00,1.00 -+000.00,+15.51,01.00,000.00,1.00 -+000.00,+15.95,01.00,000.00,1.00 -+000.00,+16.38,01.00,000.00,1.00 -+000.00,+16.81,01.00,000.00,1.00 -+000.00,+17.23,01.00,000.00,1.00 -+000.00,+17.65,01.00,000.00,1.00 -+000.00,+18.07,01.00,000.00,1.00 -+000.00,+18.48,01.00,000.00,1.00 -+000.00,+18.89,01.00,000.00,1.00 -+000.00,+19.29,01.00,000.00,1.00 -+000.00,+19.68,01.00,000.00,1.00 -+000.00,+20.07,01.00,000.00,1.00 -+000.00,+20.46,01.00,000.00,1.00 -+000.00,+20.84,01.00,000.00,1.00 -+000.00,+21.21,01.00,000.00,1.00 -+000.00,+21.58,01.00,000.00,1.00 -+000.00,+21.94,01.00,000.00,1.00 -+000.00,+22.30,01.00,000.00,1.00 -+000.00,+22.64,01.00,000.00,1.00 -+000.00,+22.99,01.00,000.00,1.00 -+000.00,+23.32,01.00,000.00,1.00 -+000.00,+23.65,01.00,000.00,1.00 -+000.00,+23.98,01.00,000.00,1.00 -+000.00,+24.29,01.00,000.00,1.00 -+000.00,+24.60,01.00,000.00,1.00 -+000.00,+24.90,01.00,000.00,1.00 -+000.00,+25.20,01.00,000.00,1.00 -+000.00,+25.48,01.00,000.00,1.00 -+000.00,+25.76,01.00,000.00,1.00 -+000.00,+26.03,01.00,000.00,1.00 -+000.00,+26.29,01.00,000.00,1.00 -+000.00,+26.55,01.00,000.00,1.00 -+000.00,+26.80,01.00,000.00,1.00 -+000.00,+27.03,01.00,000.00,1.00 -+000.00,+27.26,01.00,000.00,1.00 -+000.00,+27.49,01.00,000.00,1.00 -+000.00,+27.70,01.00,000.00,1.00 -+000.00,+27.90,01.00,000.00,1.00 -+000.00,+28.10,01.00,000.00,1.00 -+000.00,+28.28,01.00,000.00,1.00 -+000.00,+28.46,01.00,000.00,1.00 -+000.00,+28.63,01.00,000.00,1.00 -+000.00,+28.79,01.00,000.00,1.00 -+000.00,+28.94,01.00,000.00,1.00 -+000.00,+29.07,01.00,000.00,1.00 -+000.00,+29.20,01.00,000.00,1.00 -+000.00,+29.33,01.00,000.00,1.00 -+000.00,+29.44,01.00,000.00,1.00 -+000.00,+29.54,01.00,000.00,1.00 -+000.00,+29.63,01.00,000.00,1.00 -+000.00,+29.71,01.00,000.00,1.00 -+000.00,+29.78,01.00,000.00,1.00 -+000.00,+29.84,01.00,000.00,1.00 -+000.00,+29.89,01.00,000.00,1.00 -+000.00,+29.93,01.00,000.00,1.00 -+000.00,+29.97,01.00,000.00,1.00 -+000.00,+29.99,01.00,000.00,1.00 -+000.00,+30.00,01.00,000.00,1.00 -+000.00,+30.00,01.00,000.00,1.00 -+000.00,+29.99,01.00,000.00,1.00 -+000.00,+29.97,01.00,000.00,1.00 -+000.00,+29.94,01.00,000.00,1.00 -+000.00,+29.90,01.00,000.00,1.00 -+000.00,+29.85,01.00,000.00,1.00 -+000.00,+29.79,01.00,000.00,1.00 -+000.00,+29.72,01.00,000.00,1.00 -+000.00,+29.64,01.00,000.00,1.00 -+000.00,+29.56,01.00,000.00,1.00 -+000.00,+29.46,01.00,000.00,1.00 -+000.00,+29.35,01.00,000.00,1.00 -+000.00,+29.23,01.00,000.00,1.00 -+000.00,+29.10,01.00,000.00,1.00 -+000.00,+28.96,01.00,000.00,1.00 -+000.00,+28.82,01.00,000.00,1.00 -+000.00,+28.66,01.00,000.00,1.00 -+000.00,+28.49,01.00,000.00,1.00 -+000.00,+28.32,01.00,000.00,1.00 -+000.00,+28.13,01.00,000.00,1.00 -+000.00,+27.94,01.00,000.00,1.00 -+000.00,+27.74,01.00,000.00,1.00 -+000.00,+27.53,01.00,000.00,1.00 -+000.00,+27.31,01.00,000.00,1.00 -+000.00,+27.08,01.00,000.00,1.00 -+000.00,+26.84,01.00,000.00,1.00 -+000.00,+26.60,01.00,000.00,1.00 -+000.00,+26.35,01.00,000.00,1.00 -+000.00,+26.08,01.00,000.00,1.00 -+000.00,+25.81,01.00,000.00,1.00 -+000.00,+25.54,01.00,000.00,1.00 -+000.00,+25.25,01.00,000.00,1.00 -+000.00,+24.96,01.00,000.00,1.00 -+000.00,+24.66,01.00,000.00,1.00 -+000.00,+24.35,01.00,000.00,1.00 -+000.00,+24.04,01.00,000.00,1.00 -+000.00,+23.72,01.00,000.00,1.00 -+000.00,+23.39,01.00,000.00,1.00 -+000.00,+23.06,01.00,000.00,1.00 -+000.00,+22.71,01.00,000.00,1.00 -+000.00,+22.37,01.00,000.00,1.00 -+000.00,+22.01,01.00,000.00,1.00 -+000.00,+21.65,01.00,000.00,1.00 -+000.00,+21.28,01.00,000.00,1.00 -+000.00,+20.91,01.00,000.00,1.00 -+000.00,+20.53,01.00,000.00,1.00 -+000.00,+20.15,01.00,000.00,1.00 -+000.00,+19.76,01.00,000.00,1.00 -+000.00,+19.37,01.00,000.00,1.00 -+000.00,+18.97,01.00,000.00,1.00 -+000.00,+18.56,01.00,000.00,1.00 -+000.00,+18.15,01.00,000.00,1.00 -+000.00,+17.74,01.00,000.00,1.00 -+000.00,+17.32,01.00,000.00,1.00 -+000.00,+16.90,01.00,000.00,1.00 -+000.00,+16.47,01.00,000.00,1.00 -+000.00,+16.04,01.00,000.00,1.00 -+000.00,+15.60,01.00,000.00,1.00 -+000.00,+15.16,01.00,000.00,1.00 -+000.00,+14.72,01.00,000.00,1.00 -+000.00,+14.27,01.00,000.00,1.00 -+000.00,+13.82,01.00,000.00,1.00 -+000.00,+13.36,01.00,000.00,1.00 -+000.00,+12.90,01.00,000.00,1.00 -+000.00,+12.44,01.00,000.00,1.00 -+000.00,+11.98,01.00,000.00,1.00 -+000.00,+11.51,01.00,000.00,1.00 -+000.00,+11.04,01.00,000.00,1.00 -+000.00,+10.57,01.00,000.00,1.00 -+000.00,+10.10,01.00,000.00,1.00 -+000.00,+09.62,01.00,000.00,1.00 -+000.00,+09.14,01.00,000.00,1.00 -+000.00,+08.66,01.00,000.00,1.00 -+000.00,+08.17,01.00,000.00,1.00 -+000.00,+07.69,01.00,000.00,1.00 -+000.00,+07.20,01.00,000.00,1.00 -+000.00,+06.71,01.00,000.00,1.00 -+000.00,+06.22,01.00,000.00,1.00 -+000.00,+05.73,01.00,000.00,1.00 -+000.00,+05.23,01.00,000.00,1.00 -+000.00,+04.74,01.00,000.00,1.00 -+000.00,+04.24,01.00,000.00,1.00 -+000.00,+03.75,01.00,000.00,1.00 -+000.00,+03.25,01.00,000.00,1.00 -+000.00,+02.75,01.00,000.00,1.00 -+000.00,+02.25,01.00,000.00,1.00 -+000.00,+01.75,01.00,000.00,1.00 -+000.00,+01.25,01.00,000.00,1.00 -+000.00,+00.75,01.00,000.00,1.00 -+000.00,+00.25,01.00,000.00,1.00 -+000.00,-00.25,01.00,000.00,1.00 -+000.00,-00.75,01.00,000.00,1.00 -+000.00,-01.25,01.00,000.00,1.00 -+000.00,-01.75,01.00,000.00,1.00 -+000.00,-02.25,01.00,000.00,1.00 -+000.00,-02.75,01.00,000.00,1.00 -+000.00,-03.25,01.00,000.00,1.00 -+000.00,-03.75,01.00,000.00,1.00 -+000.00,-04.24,01.00,000.00,1.00 -+000.00,-04.74,01.00,000.00,1.00 -+000.00,-05.23,01.00,000.00,1.00 -+000.00,-05.73,01.00,000.00,1.00 -+000.00,-06.22,01.00,000.00,1.00 -+000.00,-06.71,01.00,000.00,1.00 -+000.00,-07.20,01.00,000.00,1.00 -+000.00,-07.69,01.00,000.00,1.00 -+000.00,-08.17,01.00,000.00,1.00 -+000.00,-08.66,01.00,000.00,1.00 -+000.00,-09.14,01.00,000.00,1.00 -+000.00,-09.62,01.00,000.00,1.00 -+000.00,-10.10,01.00,000.00,1.00 -+000.00,-10.57,01.00,000.00,1.00 -+000.00,-11.04,01.00,000.00,1.00 -+000.00,-11.51,01.00,000.00,1.00 -+000.00,-11.98,01.00,000.00,1.00 -+000.00,-12.44,01.00,000.00,1.00 -+000.00,-12.90,01.00,000.00,1.00 -+000.00,-13.36,01.00,000.00,1.00 -+000.00,-13.82,01.00,000.00,1.00 -+000.00,-14.27,01.00,000.00,1.00 -+000.00,-14.72,01.00,000.00,1.00 -+000.00,-15.16,01.00,000.00,1.00 -+000.00,-15.60,01.00,000.00,1.00 -+000.00,-16.04,01.00,000.00,1.00 -+000.00,-16.47,01.00,000.00,1.00 -+000.00,-16.90,01.00,000.00,1.00 -+000.00,-17.32,01.00,000.00,1.00 -+000.00,-17.74,01.00,000.00,1.00 -+000.00,-18.15,01.00,000.00,1.00 -+000.00,-18.56,01.00,000.00,1.00 -+000.00,-18.97,01.00,000.00,1.00 -+000.00,-19.37,01.00,000.00,1.00 -+000.00,-19.76,01.00,000.00,1.00 -+000.00,-20.15,01.00,000.00,1.00 -+000.00,-20.53,01.00,000.00,1.00 -+000.00,-20.91,01.00,000.00,1.00 -+000.00,-21.28,01.00,000.00,1.00 -+000.00,-21.65,01.00,000.00,1.00 -+000.00,-22.01,01.00,000.00,1.00 -+000.00,-22.37,01.00,000.00,1.00 -+000.00,-22.71,01.00,000.00,1.00 -+000.00,-23.06,01.00,000.00,1.00 -+000.00,-23.39,01.00,000.00,1.00 -+000.00,-23.72,01.00,000.00,1.00 -+000.00,-24.04,01.00,000.00,1.00 -+000.00,-24.35,01.00,000.00,1.00 -+000.00,-24.66,01.00,000.00,1.00 -+000.00,-24.96,01.00,000.00,1.00 -+000.00,-25.25,01.00,000.00,1.00 -+000.00,-25.54,01.00,000.00,1.00 -+000.00,-25.81,01.00,000.00,1.00 -+000.00,-26.08,01.00,000.00,1.00 -+000.00,-26.35,01.00,000.00,1.00 -+000.00,-26.60,01.00,000.00,1.00 -+000.00,-26.84,01.00,000.00,1.00 -+000.00,-27.08,01.00,000.00,1.00 -+000.00,-27.31,01.00,000.00,1.00 -+000.00,-27.53,01.00,000.00,1.00 -+000.00,-27.74,01.00,000.00,1.00 -+000.00,-27.94,01.00,000.00,1.00 -+000.00,-28.13,01.00,000.00,1.00 -+000.00,-28.32,01.00,000.00,1.00 -+000.00,-28.49,01.00,000.00,1.00 -+000.00,-28.66,01.00,000.00,1.00 -+000.00,-28.82,01.00,000.00,1.00 -+000.00,-28.96,01.00,000.00,1.00 -+000.00,-29.10,01.00,000.00,1.00 -+000.00,-29.23,01.00,000.00,1.00 -+000.00,-29.35,01.00,000.00,1.00 -+000.00,-29.46,01.00,000.00,1.00 -+000.00,-29.56,01.00,000.00,1.00 -+000.00,-29.64,01.00,000.00,1.00 -+000.00,-29.72,01.00,000.00,1.00 -+000.00,-29.79,01.00,000.00,1.00 -+000.00,-29.85,01.00,000.00,1.00 -+000.00,-29.90,01.00,000.00,1.00 -+000.00,-29.94,01.00,000.00,1.00 -+000.00,-29.97,01.00,000.00,1.00 -+000.00,-29.99,01.00,000.00,1.00 -+000.00,-30.00,01.00,000.00,1.00 -+000.00,-30.00,01.00,000.00,1.00 -+000.00,-29.99,01.00,000.00,1.00 -+000.00,-29.97,01.00,000.00,1.00 -+000.00,-29.93,01.00,000.00,1.00 -+000.00,-29.89,01.00,000.00,1.00 -+000.00,-29.84,01.00,000.00,1.00 -+000.00,-29.78,01.00,000.00,1.00 -+000.00,-29.71,01.00,000.00,1.00 -+000.00,-29.63,01.00,000.00,1.00 -+000.00,-29.54,01.00,000.00,1.00 -+000.00,-29.44,01.00,000.00,1.00 -+000.00,-29.33,01.00,000.00,1.00 -+000.00,-29.20,01.00,000.00,1.00 -+000.00,-29.07,01.00,000.00,1.00 -+000.00,-28.94,01.00,000.00,1.00 -+000.00,-28.79,01.00,000.00,1.00 -+000.00,-28.63,01.00,000.00,1.00 -+000.00,-28.46,01.00,000.00,1.00 -+000.00,-28.28,01.00,000.00,1.00 -+000.00,-28.10,01.00,000.00,1.00 -+000.00,-27.90,01.00,000.00,1.00 -+000.00,-27.70,01.00,000.00,1.00 -+000.00,-27.49,01.00,000.00,1.00 -+000.00,-27.26,01.00,000.00,1.00 -+000.00,-27.03,01.00,000.00,1.00 -+000.00,-26.80,01.00,000.00,1.00 -+000.00,-26.55,01.00,000.00,1.00 -+000.00,-26.29,01.00,000.00,1.00 -+000.00,-26.03,01.00,000.00,1.00 -+000.00,-25.76,01.00,000.00,1.00 -+000.00,-25.48,01.00,000.00,1.00 -+000.00,-25.20,01.00,000.00,1.00 -+000.00,-24.90,01.00,000.00,1.00 -+000.00,-24.60,01.00,000.00,1.00 -+000.00,-24.29,01.00,000.00,1.00 -+000.00,-23.98,01.00,000.00,1.00 -+000.00,-23.65,01.00,000.00,1.00 -+000.00,-23.32,01.00,000.00,1.00 -+000.00,-22.99,01.00,000.00,1.00 -+000.00,-22.64,01.00,000.00,1.00 -+000.00,-22.30,01.00,000.00,1.00 -+000.00,-21.94,01.00,000.00,1.00 -+000.00,-21.58,01.00,000.00,1.00 -+000.00,-21.21,01.00,000.00,1.00 -+000.00,-20.84,01.00,000.00,1.00 -+000.00,-20.46,01.00,000.00,1.00 -+000.00,-20.07,01.00,000.00,1.00 -+000.00,-19.68,01.00,000.00,1.00 -+000.00,-19.29,01.00,000.00,1.00 -+000.00,-18.89,01.00,000.00,1.00 -+000.00,-18.48,01.00,000.00,1.00 -+000.00,-18.07,01.00,000.00,1.00 -+000.00,-17.65,01.00,000.00,1.00 -+000.00,-17.23,01.00,000.00,1.00 -+000.00,-16.81,01.00,000.00,1.00 -+000.00,-16.38,01.00,000.00,1.00 -+000.00,-15.95,01.00,000.00,1.00 -+000.00,-15.51,01.00,000.00,1.00 -+000.00,-15.07,01.00,000.00,1.00 -+000.00,-14.63,01.00,000.00,1.00 -+000.00,-14.18,01.00,000.00,1.00 -+000.00,-13.73,01.00,000.00,1.00 -+000.00,-13.27,01.00,000.00,1.00 -+000.00,-12.81,01.00,000.00,1.00 -+000.00,-12.35,01.00,000.00,1.00 -+000.00,-11.89,01.00,000.00,1.00 -+000.00,-11.42,01.00,000.00,1.00 -+000.00,-10.95,01.00,000.00,1.00 -+000.00,-10.48,01.00,000.00,1.00 -+000.00,-10.00,01.00,000.00,1.00 -+000.00,-09.52,01.00,000.00,1.00 -+000.00,-09.04,01.00,000.00,1.00 -+000.00,-08.56,01.00,000.00,1.00 -+000.00,-08.08,01.00,000.00,1.00 -+000.00,-07.59,01.00,000.00,1.00 -+000.00,-07.10,01.00,000.00,1.00 -+000.00,-06.61,01.00,000.00,1.00 -+000.00,-06.12,01.00,000.00,1.00 -+000.00,-05.63,01.00,000.00,1.00 -+000.00,-05.13,01.00,000.00,1.00 -+000.00,-04.64,01.00,000.00,1.00 -+000.00,-04.14,01.00,000.00,1.00 -+000.00,-03.65,01.00,000.00,1.00 -+000.00,-03.15,01.00,000.00,1.00 -+000.00,-02.65,01.00,000.00,1.00 -+000.00,-02.15,01.00,000.00,1.00 -+000.00,-01.65,01.00,000.00,1.00 -+000.00,-01.15,01.00,000.00,1.00 -+000.00,-00.65,01.00,000.00,1.00 -+000.00,-00.15,01.00,000.00,1.00 -+000.00,+00.35,01.00,000.00,1.00 -+000.00,+00.85,01.00,000.00,1.00 -+000.00,+01.35,01.00,000.00,1.00 -+000.00,+01.85,01.00,000.00,1.00 -+000.00,+02.35,01.00,000.00,1.00 -+000.00,+02.85,01.00,000.00,1.00 -+000.00,+03.35,01.00,000.00,1.00 -+000.00,+03.85,01.00,000.00,1.00 -+000.00,+04.34,01.00,000.00,1.00 -+000.00,+04.84,01.00,000.00,1.00 -+000.00,+05.33,01.00,000.00,1.00 -+000.00,+05.83,01.00,000.00,1.00 -+000.00,+06.32,01.00,000.00,1.00 -+000.00,+06.81,01.00,000.00,1.00 -+000.00,+07.30,01.00,000.00,1.00 -+000.00,+07.78,01.00,000.00,1.00 -+000.00,+08.27,01.00,000.00,1.00 -+000.00,+08.75,01.00,000.00,1.00 -+000.00,+09.23,01.00,000.00,1.00 -+000.00,+09.71,01.00,000.00,1.00 -+000.00,+10.19,01.00,000.00,1.00 -+000.00,+10.67,01.00,000.00,1.00 -+000.00,+11.14,01.00,000.00,1.00 -+000.00,+11.61,01.00,000.00,1.00 -+000.00,+12.07,01.00,000.00,1.00 -+000.00,+12.54,01.00,000.00,1.00 -+000.00,+13.00,01.00,000.00,1.00 -+000.00,+13.45,01.00,000.00,1.00 -+000.00,+13.91,01.00,000.00,1.00 -+000.00,+14.36,01.00,000.00,1.00 -+000.00,+14.80,01.00,000.00,1.00 -+000.00,+15.25,01.00,000.00,1.00 -+000.00,+15.69,01.00,000.00,1.00 -+000.00,+16.12,01.00,000.00,1.00 -+000.00,+16.55,01.00,000.00,1.00 -+000.00,+16.98,01.00,000.00,1.00 -+000.00,+17.40,01.00,000.00,1.00 -+000.00,+17.82,01.00,000.00,1.00 -+000.00,+18.23,01.00,000.00,1.00 -+000.00,+18.64,01.00,000.00,1.00 -+000.00,+19.05,01.00,000.00,1.00 -+000.00,+19.45,01.00,000.00,1.00 -+000.00,+19.84,01.00,000.00,1.00 -+000.00,+20.23,01.00,000.00,1.00 -+000.00,+20.61,01.00,000.00,1.00 -+000.00,+20.99,01.00,000.00,1.00 -+000.00,+21.36,01.00,000.00,1.00 -+000.00,+21.72,01.00,000.00,1.00 -+000.00,+22.08,01.00,000.00,1.00 -+000.00,+22.44,01.00,000.00,1.00 -+000.00,+22.78,01.00,000.00,1.00 -+000.00,+23.12,01.00,000.00,1.00 -+000.00,+23.46,01.00,000.00,1.00 -+000.00,+23.78,01.00,000.00,1.00 -+000.00,+24.10,01.00,000.00,1.00 -+000.00,+24.42,01.00,000.00,1.00 -+000.00,+24.72,01.00,000.00,1.00 -+000.00,+25.02,01.00,000.00,1.00 -+000.00,+25.31,01.00,000.00,1.00 -+000.00,+25.59,01.00,000.00,1.00 -+000.00,+25.87,01.00,000.00,1.00 -+000.00,+26.14,01.00,000.00,1.00 -+000.00,+26.40,01.00,000.00,1.00 -+000.00,+26.65,01.00,000.00,1.00 -+000.00,+26.89,01.00,000.00,1.00 -+000.00,+27.13,01.00,000.00,1.00 -+000.00,+27.35,01.00,000.00,1.00 -+000.00,+27.57,01.00,000.00,1.00 -+000.00,+27.78,01.00,000.00,1.00 -+000.00,+27.98,01.00,000.00,1.00 -+000.00,+28.17,01.00,000.00,1.00 -+000.00,+28.35,01.00,000.00,1.00 -+000.00,+28.53,01.00,000.00,1.00 -+000.00,+28.69,01.00,000.00,1.00 -+000.00,+28.85,01.00,000.00,1.00 -+000.00,+28.99,01.00,000.00,1.00 -+000.00,+29.13,01.00,000.00,1.00 -+000.00,+29.25,01.00,000.00,1.00 -+000.00,+29.37,01.00,000.00,1.00 -+000.00,+29.48,01.00,000.00,1.00 -+000.00,+29.57,01.00,000.00,1.00 -+000.00,+29.66,01.00,000.00,1.00 -+000.00,+29.74,01.00,000.00,1.00 -+000.00,+29.81,01.00,000.00,1.00 -+000.00,+29.86,01.00,000.00,1.00 -+000.00,+29.91,01.00,000.00,1.00 -+000.00,+29.95,01.00,000.00,1.00 -+000.00,+29.98,01.00,000.00,1.00 -+000.00,+29.99,01.00,000.00,1.00 -+000.00,+30.00,01.00,000.00,1.00 -+000.00,+30.00,01.00,000.00,1.00 -+000.00,+29.98,01.00,000.00,1.00 -+000.00,+29.96,01.00,000.00,1.00 -+000.00,+29.93,01.00,000.00,1.00 -+000.00,+29.88,01.00,000.00,1.00 -+000.00,+29.83,01.00,000.00,1.00 -+000.00,+29.77,01.00,000.00,1.00 -+000.00,+29.69,01.00,000.00,1.00 -+000.00,+29.61,01.00,000.00,1.00 -+000.00,+29.52,01.00,000.00,1.00 -+000.00,+29.41,01.00,000.00,1.00 -+000.00,+29.30,01.00,000.00,1.00 -+000.00,+29.18,01.00,000.00,1.00 -+000.00,+29.05,01.00,000.00,1.00 -+000.00,+28.91,01.00,000.00,1.00 -+000.00,+28.76,01.00,000.00,1.00 -+000.00,+28.59,01.00,000.00,1.00 -+000.00,+28.43,01.00,000.00,1.00 -+000.00,+28.25,01.00,000.00,1.00 -+000.00,+28.06,01.00,000.00,1.00 -+000.00,+27.86,01.00,000.00,1.00 -+000.00,+27.66,01.00,000.00,1.00 -+000.00,+27.44,01.00,000.00,1.00 -+000.00,+27.22,01.00,000.00,1.00 -+000.00,+26.99,01.00,000.00,1.00 -+000.00,+26.75,01.00,000.00,1.00 -+000.00,+26.50,01.00,000.00,1.00 -+000.00,+26.24,01.00,000.00,1.00 -+000.00,+25.98,01.00,000.00,1.00 -+000.00,+25.71,01.00,000.00,1.00 -+000.00,+25.42,01.00,000.00,1.00 -+000.00,+25.14,01.00,000.00,1.00 -+000.00,+24.84,01.00,000.00,1.00 -+000.00,+24.54,01.00,000.00,1.00 -+000.00,+24.23,01.00,000.00,1.00 -+000.00,+23.91,01.00,000.00,1.00 -+000.00,+23.59,01.00,000.00,1.00 -+000.00,+23.26,01.00,000.00,1.00 -+000.00,+22.92,01.00,000.00,1.00 -+000.00,+22.58,01.00,000.00,1.00 -+000.00,+22.22,01.00,000.00,1.00 -+000.00,+21.87,01.00,000.00,1.00 -+000.00,+21.51,01.00,000.00,1.00 -+000.00,+21.14,01.00,000.00,1.00 -+000.00,+20.76,01.00,000.00,1.00 -+000.00,+20.38,01.00,000.00,1.00 -+000.00,+20.00,01.00,000.00,1.00 -+000.00,+19.60,01.00,000.00,1.00 -+000.00,+19.21,01.00,000.00,1.00 -+000.00,+18.81,01.00,000.00,1.00 -+000.00,+18.40,01.00,000.00,1.00 -+000.00,+17.99,01.00,000.00,1.00 -+000.00,+17.57,01.00,000.00,1.00 -+000.00,+17.15,01.00,000.00,1.00 -+000.00,+16.73,01.00,000.00,1.00 -+000.00,+16.30,01.00,000.00,1.00 -+000.00,+15.86,01.00,000.00,1.00 -+000.00,+15.42,01.00,000.00,1.00 -+000.00,+14.98,01.00,000.00,1.00 -+000.00,+14.54,01.00,000.00,1.00 -+000.00,+14.09,01.00,000.00,1.00 -+000.00,+13.64,01.00,000.00,1.00 -+000.00,+13.18,01.00,000.00,1.00 -+000.00,+12.72,01.00,000.00,1.00 -+000.00,+12.26,01.00,000.00,1.00 -+000.00,+11.79,01.00,000.00,1.00 -+000.00,+11.33,01.00,000.00,1.00 -+000.00,+10.85,01.00,000.00,1.00 -+000.00,+10.38,01.00,000.00,1.00 -+000.00,+09.90,01.00,000.00,1.00 -+000.00,+09.43,01.00,000.00,1.00 -+000.00,+08.95,01.00,000.00,1.00 -+000.00,+08.46,01.00,000.00,1.00 -+000.00,+07.98,01.00,000.00,1.00 -+000.00,+07.49,01.00,000.00,1.00 -+000.00,+07.00,01.00,000.00,1.00 -+000.00,+06.51,01.00,000.00,1.00 -+000.00,+06.02,01.00,000.00,1.00 -+000.00,+05.53,01.00,000.00,1.00 -+000.00,+05.04,01.00,000.00,1.00 -+000.00,+04.54,01.00,000.00,1.00 -+000.00,+04.04,01.00,000.00,1.00 -+000.00,+03.55,01.00,000.00,1.00 -+000.00,+03.05,01.00,000.00,1.00 -+000.00,+02.55,01.00,000.00,1.00 -+000.00,+02.05,01.00,000.00,1.00 -+000.00,+01.55,01.00,000.00,1.00 -+000.00,+01.05,01.00,000.00,1.00 -+000.00,+00.55,01.00,000.00,1.00 -+000.00,+00.05,01.00,000.00,1.00 -+000.00,-00.45,01.00,000.00,1.00 -+000.00,-00.95,01.00,000.00,1.00 -+000.00,-01.45,01.00,000.00,1.00 -+000.00,-01.95,01.00,000.00,1.00 -+000.00,-02.45,01.00,000.00,1.00 -+000.00,-02.95,01.00,000.00,1.00 -+000.00,-03.45,01.00,000.00,1.00 -+000.00,-03.94,01.00,000.00,1.00 -+000.00,-04.44,01.00,000.00,1.00 -+000.00,-04.94,01.00,000.00,1.00 -+000.00,-05.43,01.00,000.00,1.00 -+000.00,-05.92,01.00,000.00,1.00 -+000.00,-06.42,01.00,000.00,1.00 -+000.00,-06.91,01.00,000.00,1.00 -+000.00,-07.39,01.00,000.00,1.00 -+000.00,-07.88,01.00,000.00,1.00 -+000.00,-08.37,01.00,000.00,1.00 -+000.00,-08.85,01.00,000.00,1.00 -+000.00,-09.33,01.00,000.00,1.00 -+000.00,-09.81,01.00,000.00,1.00 -+000.00,-10.29,01.00,000.00,1.00 -+000.00,-10.76,01.00,000.00,1.00 -+000.00,-11.23,01.00,000.00,1.00 -+000.00,-11.70,01.00,000.00,1.00 -+000.00,-12.17,01.00,000.00,1.00 -+000.00,-12.63,01.00,000.00,1.00 -+000.00,-13.09,01.00,000.00,1.00 -+000.00,-13.54,01.00,000.00,1.00 -+000.00,-14.00,01.00,000.00,1.00 -+000.00,-14.45,01.00,000.00,1.00 -+000.00,-14.89,01.00,000.00,1.00 -+000.00,-15.34,01.00,000.00,1.00 -+000.00,-15.77,01.00,000.00,1.00 -+000.00,-16.21,01.00,000.00,1.00 -+000.00,-16.64,01.00,000.00,1.00 -+000.00,-17.07,01.00,000.00,1.00 -+000.00,-17.49,01.00,000.00,1.00 -+000.00,-17.90,01.00,000.00,1.00 -+000.00,-18.32,01.00,000.00,1.00 -+000.00,-18.72,01.00,000.00,1.00 -+000.00,-19.13,01.00,000.00,1.00 -+000.00,-19.53,01.00,000.00,1.00 -+000.00,-19.92,01.00,000.00,1.00 -+000.00,-20.30,01.00,000.00,1.00 -+000.00,-20.69,01.00,000.00,1.00 -+000.00,-21.06,01.00,000.00,1.00 -+000.00,-21.43,01.00,000.00,1.00 -+000.00,-21.80,01.00,000.00,1.00 -+000.00,-22.15,01.00,000.00,1.00 -+000.00,-22.51,01.00,000.00,1.00 -+000.00,-22.85,01.00,000.00,1.00 -+000.00,-23.19,01.00,000.00,1.00 -+000.00,-23.52,01.00,000.00,1.00 -+000.00,-23.85,01.00,000.00,1.00 -+000.00,-24.17,01.00,000.00,1.00 -+000.00,-24.48,01.00,000.00,1.00 -+000.00,-24.78,01.00,000.00,1.00 -+000.00,-25.08,01.00,000.00,1.00 -+000.00,-25.37,01.00,000.00,1.00 -+000.00,-25.65,01.00,000.00,1.00 -+000.00,-25.92,01.00,000.00,1.00 -+000.00,-26.19,01.00,000.00,1.00 -+000.00,-26.45,01.00,000.00,1.00 -+000.00,-26.70,01.00,000.00,1.00 -+000.00,-26.94,01.00,000.00,1.00 -+000.00,-27.17,01.00,000.00,1.00 -+000.00,-27.40,01.00,000.00,1.00 -+000.00,-27.61,01.00,000.00,1.00 -+000.00,-27.82,01.00,000.00,1.00 -+000.00,-28.02,01.00,000.00,1.00 -+000.00,-28.21,01.00,000.00,1.00 -+000.00,-28.39,01.00,000.00,1.00 -+000.00,-28.56,01.00,000.00,1.00 -+000.00,-28.72,01.00,000.00,1.00 -+000.00,-28.88,01.00,000.00,1.00 -+000.00,-29.02,01.00,000.00,1.00 -+000.00,-29.15,01.00,000.00,1.00 -+000.00,-29.28,01.00,000.00,1.00 -+000.00,-29.39,01.00,000.00,1.00 -+000.00,-29.50,01.00,000.00,1.00 -+000.00,-29.59,01.00,000.00,1.00 -+000.00,-29.68,01.00,000.00,1.00 -+000.00,-29.75,01.00,000.00,1.00 -+000.00,-29.82,01.00,000.00,1.00 -+000.00,-29.87,01.00,000.00,1.00 -+000.00,-29.92,01.00,000.00,1.00 -+000.00,-29.95,01.00,000.00,1.00 -+000.00,-29.98,01.00,000.00,1.00 -+000.00,-29.99,01.00,000.00,1.00 -+000.00,-30.00,01.00,000.00,1.00 -+000.00,-29.99,01.00,000.00,1.00 -+000.00,-29.98,01.00,000.00,1.00 -+000.00,-29.95,01.00,000.00,1.00 -+000.00,-29.92,01.00,000.00,1.00 -+000.00,-29.87,01.00,000.00,1.00 -+000.00,-29.82,01.00,000.00,1.00 -+000.00,-29.75,01.00,000.00,1.00 -+000.00,-29.68,01.00,000.00,1.00 -+000.00,-29.59,01.00,000.00,1.00 -+000.00,-29.50,01.00,000.00,1.00 -+000.00,-29.39,01.00,000.00,1.00 -+000.00,-29.28,01.00,000.00,1.00 -+000.00,-29.15,01.00,000.00,1.00 -+000.00,-29.02,01.00,000.00,1.00 -+000.00,-28.88,01.00,000.00,1.00 -+000.00,-28.72,01.00,000.00,1.00 -+000.00,-28.56,01.00,000.00,1.00 -+000.00,-28.39,01.00,000.00,1.00 -+000.00,-28.21,01.00,000.00,1.00 -+000.00,-28.02,01.00,000.00,1.00 -+000.00,-27.82,01.00,000.00,1.00 -+000.00,-27.61,01.00,000.00,1.00 -+000.00,-27.40,01.00,000.00,1.00 -+000.00,-27.17,01.00,000.00,1.00 -+000.00,-26.94,01.00,000.00,1.00 -+000.00,-26.70,01.00,000.00,1.00 -+000.00,-26.45,01.00,000.00,1.00 -+000.00,-26.19,01.00,000.00,1.00 -+000.00,-25.92,01.00,000.00,1.00 -+000.00,-25.65,01.00,000.00,1.00 -+000.00,-25.37,01.00,000.00,1.00 -+000.00,-25.08,01.00,000.00,1.00 -+000.00,-24.78,01.00,000.00,1.00 -+000.00,-24.48,01.00,000.00,1.00 -+000.00,-24.17,01.00,000.00,1.00 -+000.00,-23.85,01.00,000.00,1.00 -+000.00,-23.52,01.00,000.00,1.00 -+000.00,-23.19,01.00,000.00,1.00 -+000.00,-22.85,01.00,000.00,1.00 -+000.00,-22.51,01.00,000.00,1.00 -+000.00,-22.15,01.00,000.00,1.00 -+000.00,-21.80,01.00,000.00,1.00 -+000.00,-21.43,01.00,000.00,1.00 -+000.00,-21.06,01.00,000.00,1.00 -+000.00,-20.69,01.00,000.00,1.00 -+000.00,-20.30,01.00,000.00,1.00 -+000.00,-19.92,01.00,000.00,1.00 -+000.00,-19.53,01.00,000.00,1.00 -+000.00,-19.13,01.00,000.00,1.00 -+000.00,-18.72,01.00,000.00,1.00 -+000.00,-18.32,01.00,000.00,1.00 -+000.00,-17.90,01.00,000.00,1.00 -+000.00,-17.49,01.00,000.00,1.00 -+000.00,-17.07,01.00,000.00,1.00 -+000.00,-16.64,01.00,000.00,1.00 -+000.00,-16.21,01.00,000.00,1.00 -+000.00,-15.77,01.00,000.00,1.00 -+000.00,-15.34,01.00,000.00,1.00 -+000.00,-14.89,01.00,000.00,1.00 -+000.00,-14.45,01.00,000.00,1.00 -+000.00,-14.00,01.00,000.00,1.00 -+000.00,-13.54,01.00,000.00,1.00 -+000.00,-13.09,01.00,000.00,1.00 -+000.00,-12.63,01.00,000.00,1.00 -+000.00,-12.17,01.00,000.00,1.00 -+000.00,-11.70,01.00,000.00,1.00 -+000.00,-11.23,01.00,000.00,1.00 -+000.00,-10.76,01.00,000.00,1.00 -+000.00,-10.29,01.00,000.00,1.00 -+000.00,-09.81,01.00,000.00,1.00 -+000.00,-09.33,01.00,000.00,1.00 -+000.00,-08.85,01.00,000.00,1.00 -+000.00,-08.37,01.00,000.00,1.00 -+000.00,-07.88,01.00,000.00,1.00 -+000.00,-07.39,01.00,000.00,1.00 -+000.00,-06.91,01.00,000.00,1.00 -+000.00,-06.42,01.00,000.00,1.00 -+000.00,-05.92,01.00,000.00,1.00 -+000.00,-05.43,01.00,000.00,1.00 -+000.00,-04.94,01.00,000.00,1.00 -+000.00,-04.44,01.00,000.00,1.00 -+000.00,-03.94,01.00,000.00,1.00 -+000.00,-03.45,01.00,000.00,1.00 -+000.00,-02.95,01.00,000.00,1.00 -+000.00,-02.45,01.00,000.00,1.00 -+000.00,-01.95,01.00,000.00,1.00 -+000.00,-01.45,01.00,000.00,1.00 -+000.00,-00.95,01.00,000.00,1.00 -+000.00,-00.45,01.00,000.00,1.00 -+000.00,+00.05,01.00,000.00,1.00 -+000.00,+00.55,01.00,000.00,1.00 -+000.00,+01.05,01.00,000.00,1.00 -+000.00,+01.55,01.00,000.00,1.00 -+000.00,+02.05,01.00,000.00,1.00 -+000.00,+02.55,01.00,000.00,1.00 -+000.00,+03.05,01.00,000.00,1.00 -+000.00,+03.55,01.00,000.00,1.00 -+000.00,+04.04,01.00,000.00,1.00 -+000.00,+04.54,01.00,000.00,1.00 -+000.00,+05.04,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t09_ch1.csv b/scripts/td_object_renderer/metadata/csv/t09_ch1.csv deleted file mode 100644 index 803c0f92c902a9a0f8139f3299461aa9313d1d36..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t09_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+000.00,+30.00,01.00,000.00,1.00 -+000.58,+29.99,01.00,000.00,1.00 -+001.16,+29.98,01.00,000.00,1.00 -+001.73,+29.95,01.00,000.00,1.00 -+002.31,+29.92,01.00,000.00,1.00 -+002.88,+29.87,01.00,000.00,1.00 -+003.46,+29.82,01.00,000.00,1.00 -+004.03,+29.75,01.00,000.00,1.00 -+004.60,+29.68,01.00,000.00,1.00 -+005.17,+29.59,01.00,000.00,1.00 -+005.73,+29.50,01.00,000.00,1.00 -+006.29,+29.39,01.00,000.00,1.00 -+006.85,+29.28,01.00,000.00,1.00 -+007.41,+29.15,01.00,000.00,1.00 -+007.96,+29.02,01.00,000.00,1.00 -+008.51,+28.88,01.00,000.00,1.00 -+009.05,+28.72,01.00,000.00,1.00 -+009.59,+28.56,01.00,000.00,1.00 -+010.13,+28.39,01.00,000.00,1.00 -+010.66,+28.21,01.00,000.00,1.00 -+011.18,+28.02,01.00,000.00,1.00 -+011.70,+27.82,01.00,000.00,1.00 -+012.22,+27.61,01.00,000.00,1.00 -+012.73,+27.40,01.00,000.00,1.00 -+013.23,+27.17,01.00,000.00,1.00 -+013.73,+26.94,01.00,000.00,1.00 -+014.22,+26.70,01.00,000.00,1.00 -+014.70,+26.45,01.00,000.00,1.00 -+015.18,+26.19,01.00,000.00,1.00 -+015.65,+25.92,01.00,000.00,1.00 -+016.12,+25.65,01.00,000.00,1.00 -+016.58,+25.37,01.00,000.00,1.00 -+017.03,+25.08,01.00,000.00,1.00 -+017.47,+24.78,01.00,000.00,1.00 -+017.91,+24.48,01.00,000.00,1.00 -+018.34,+24.17,01.00,000.00,1.00 -+018.76,+23.85,01.00,000.00,1.00 -+019.18,+23.52,01.00,000.00,1.00 -+019.58,+23.19,01.00,000.00,1.00 -+019.99,+22.85,01.00,000.00,1.00 -+020.38,+22.51,01.00,000.00,1.00 -+020.76,+22.15,01.00,000.00,1.00 -+021.14,+21.80,01.00,000.00,1.00 -+021.51,+21.43,01.00,000.00,1.00 -+021.87,+21.06,01.00,000.00,1.00 -+022.23,+20.69,01.00,000.00,1.00 -+022.57,+20.30,01.00,000.00,1.00 -+022.91,+19.92,01.00,000.00,1.00 -+023.24,+19.53,01.00,000.00,1.00 -+023.56,+19.13,01.00,000.00,1.00 -+023.88,+18.72,01.00,000.00,1.00 -+024.18,+18.32,01.00,000.00,1.00 -+024.48,+17.90,01.00,000.00,1.00 -+024.77,+17.49,01.00,000.00,1.00 -+025.05,+17.07,01.00,000.00,1.00 -+025.33,+16.64,01.00,000.00,1.00 -+025.59,+16.21,01.00,000.00,1.00 -+025.85,+15.77,01.00,000.00,1.00 -+026.10,+15.34,01.00,000.00,1.00 -+026.35,+14.89,01.00,000.00,1.00 -+026.58,+14.45,01.00,000.00,1.00 -+026.81,+14.00,01.00,000.00,1.00 -+027.03,+13.54,01.00,000.00,1.00 -+027.24,+13.09,01.00,000.00,1.00 -+027.44,+12.63,01.00,000.00,1.00 -+027.63,+12.17,01.00,000.00,1.00 -+027.82,+11.70,01.00,000.00,1.00 -+028.00,+11.23,01.00,000.00,1.00 -+028.17,+10.76,01.00,000.00,1.00 -+028.34,+10.29,01.00,000.00,1.00 -+028.49,+09.81,01.00,000.00,1.00 -+028.64,+09.33,01.00,000.00,1.00 -+028.78,+08.85,01.00,000.00,1.00 -+028.91,+08.37,01.00,000.00,1.00 -+029.04,+07.88,01.00,000.00,1.00 -+029.16,+07.39,01.00,000.00,1.00 -+029.27,+06.91,01.00,000.00,1.00 -+029.37,+06.42,01.00,000.00,1.00 -+029.46,+05.92,01.00,000.00,1.00 -+029.55,+05.43,01.00,000.00,1.00 -+029.63,+04.94,01.00,000.00,1.00 -+029.70,+04.44,01.00,000.00,1.00 -+029.76,+03.94,01.00,000.00,1.00 -+029.82,+03.45,01.00,000.00,1.00 -+029.87,+02.95,01.00,000.00,1.00 -+029.91,+02.45,01.00,000.00,1.00 -+029.94,+01.95,01.00,000.00,1.00 -+029.97,+01.45,01.00,000.00,1.00 -+029.99,+00.95,01.00,000.00,1.00 -+030.00,+00.45,01.00,000.00,1.00 -+030.00,-00.05,01.00,000.00,1.00 -+030.00,-00.55,01.00,000.00,1.00 -+029.98,-01.05,01.00,000.00,1.00 -+029.96,-01.55,01.00,000.00,1.00 -+029.94,-02.05,01.00,000.00,1.00 -+029.90,-02.55,01.00,000.00,1.00 -+029.86,-03.05,01.00,000.00,1.00 -+029.81,-03.55,01.00,000.00,1.00 -+029.75,-04.04,01.00,000.00,1.00 -+029.69,-04.54,01.00,000.00,1.00 -+029.61,-05.04,01.00,000.00,1.00 -+029.53,-05.53,01.00,000.00,1.00 -+029.44,-06.02,01.00,000.00,1.00 -+029.35,-06.51,01.00,000.00,1.00 -+029.25,-07.00,01.00,000.00,1.00 -+029.13,-07.49,01.00,000.00,1.00 -+029.02,-07.98,01.00,000.00,1.00 -+028.89,-08.46,01.00,000.00,1.00 -+028.75,-08.95,01.00,000.00,1.00 -+028.61,-09.43,01.00,000.00,1.00 -+028.46,-09.90,01.00,000.00,1.00 -+028.30,-10.38,01.00,000.00,1.00 -+028.14,-10.85,01.00,000.00,1.00 -+027.97,-11.33,01.00,000.00,1.00 -+027.79,-11.79,01.00,000.00,1.00 -+027.60,-12.26,01.00,000.00,1.00 -+027.40,-12.72,01.00,000.00,1.00 -+027.20,-13.18,01.00,000.00,1.00 -+026.98,-13.64,01.00,000.00,1.00 -+026.76,-14.09,01.00,000.00,1.00 -+026.53,-14.54,01.00,000.00,1.00 -+026.30,-14.98,01.00,000.00,1.00 -+026.05,-15.42,01.00,000.00,1.00 -+025.80,-15.86,01.00,000.00,1.00 -+025.54,-16.30,01.00,000.00,1.00 -+025.27,-16.73,01.00,000.00,1.00 -+025.00,-17.15,01.00,000.00,1.00 -+024.71,-17.57,01.00,000.00,1.00 -+024.42,-17.99,01.00,000.00,1.00 -+024.12,-18.40,01.00,000.00,1.00 -+023.81,-18.81,01.00,000.00,1.00 -+023.50,-19.21,01.00,000.00,1.00 -+023.17,-19.60,01.00,000.00,1.00 -+022.84,-20.00,01.00,000.00,1.00 -+022.50,-20.38,01.00,000.00,1.00 -+022.16,-20.76,01.00,000.00,1.00 -+021.80,-21.14,01.00,000.00,1.00 -+021.44,-21.51,01.00,000.00,1.00 -+021.07,-21.87,01.00,000.00,1.00 -+020.69,-22.22,01.00,000.00,1.00 -+020.30,-22.58,01.00,000.00,1.00 -+019.91,-22.92,01.00,000.00,1.00 -+019.50,-23.26,01.00,000.00,1.00 -+019.09,-23.59,01.00,000.00,1.00 -+018.68,-23.91,01.00,000.00,1.00 -+018.25,-24.23,01.00,000.00,1.00 -+017.82,-24.54,01.00,000.00,1.00 -+017.38,-24.84,01.00,000.00,1.00 -+016.94,-25.14,01.00,000.00,1.00 -+016.48,-25.42,01.00,000.00,1.00 -+016.03,-25.71,01.00,000.00,1.00 -+015.56,-25.98,01.00,000.00,1.00 -+015.09,-26.24,01.00,000.00,1.00 -+014.61,-26.50,01.00,000.00,1.00 -+014.12,-26.75,01.00,000.00,1.00 -+013.63,-26.99,01.00,000.00,1.00 -+013.13,-27.22,01.00,000.00,1.00 -+012.62,-27.44,01.00,000.00,1.00 -+012.11,-27.66,01.00,000.00,1.00 -+011.60,-27.86,01.00,000.00,1.00 -+011.08,-28.06,01.00,000.00,1.00 -+010.55,-28.25,01.00,000.00,1.00 -+010.02,-28.43,01.00,000.00,1.00 -+009.48,-28.59,01.00,000.00,1.00 -+008.94,-28.76,01.00,000.00,1.00 -+008.40,-28.91,01.00,000.00,1.00 -+007.85,-29.05,01.00,000.00,1.00 -+007.30,-29.18,01.00,000.00,1.00 -+006.74,-29.30,01.00,000.00,1.00 -+006.18,-29.41,01.00,000.00,1.00 -+005.62,-29.52,01.00,000.00,1.00 -+005.05,-29.61,01.00,000.00,1.00 -+004.49,-29.69,01.00,000.00,1.00 -+003.92,-29.77,01.00,000.00,1.00 -+003.34,-29.83,01.00,000.00,1.00 -+002.77,-29.88,01.00,000.00,1.00 -+002.19,-29.93,01.00,000.00,1.00 -+001.62,-29.96,01.00,000.00,1.00 -+001.04,-29.98,01.00,000.00,1.00 -+000.46,-30.00,01.00,000.00,1.00 --000.12,-30.00,01.00,000.00,1.00 --000.69,-29.99,01.00,000.00,1.00 --001.27,-29.98,01.00,000.00,1.00 --001.85,-29.95,01.00,000.00,1.00 --002.42,-29.91,01.00,000.00,1.00 --003.00,-29.86,01.00,000.00,1.00 --003.57,-29.81,01.00,000.00,1.00 --004.14,-29.74,01.00,000.00,1.00 --004.71,-29.66,01.00,000.00,1.00 --005.28,-29.57,01.00,000.00,1.00 --005.84,-29.48,01.00,000.00,1.00 --006.41,-29.37,01.00,000.00,1.00 --006.96,-29.25,01.00,000.00,1.00 --007.52,-29.13,01.00,000.00,1.00 --008.07,-28.99,01.00,000.00,1.00 --008.62,-28.85,01.00,000.00,1.00 --009.16,-28.69,01.00,000.00,1.00 --009.70,-28.53,01.00,000.00,1.00 --010.23,-28.35,01.00,000.00,1.00 --010.76,-28.17,01.00,000.00,1.00 --011.29,-27.98,01.00,000.00,1.00 --011.81,-27.78,01.00,000.00,1.00 --012.32,-27.57,01.00,000.00,1.00 --012.83,-27.35,01.00,000.00,1.00 --013.33,-27.13,01.00,000.00,1.00 --013.82,-26.89,01.00,000.00,1.00 --014.31,-26.65,01.00,000.00,1.00 --014.80,-26.40,01.00,000.00,1.00 --015.28,-26.14,01.00,000.00,1.00 --015.75,-25.87,01.00,000.00,1.00 --016.21,-25.59,01.00,000.00,1.00 --016.67,-25.31,01.00,000.00,1.00 --017.12,-25.02,01.00,000.00,1.00 --017.56,-24.72,01.00,000.00,1.00 --018.00,-24.42,01.00,000.00,1.00 --018.42,-24.10,01.00,000.00,1.00 --018.85,-23.78,01.00,000.00,1.00 --019.26,-23.46,01.00,000.00,1.00 --019.67,-23.12,01.00,000.00,1.00 --020.06,-22.78,01.00,000.00,1.00 --020.46,-22.44,01.00,000.00,1.00 --020.84,-22.08,01.00,000.00,1.00 --021.21,-21.72,01.00,000.00,1.00 --021.58,-21.36,01.00,000.00,1.00 --021.94,-20.99,01.00,000.00,1.00 --022.29,-20.61,01.00,000.00,1.00 --022.64,-20.23,01.00,000.00,1.00 --022.98,-19.84,01.00,000.00,1.00 --023.30,-19.45,01.00,000.00,1.00 --023.63,-19.05,01.00,000.00,1.00 --023.94,-18.64,01.00,000.00,1.00 --024.24,-18.23,01.00,000.00,1.00 --024.54,-17.82,01.00,000.00,1.00 --024.83,-17.40,01.00,000.00,1.00 --025.11,-16.98,01.00,000.00,1.00 --025.38,-16.55,01.00,000.00,1.00 --025.65,-16.12,01.00,000.00,1.00 --025.90,-15.69,01.00,000.00,1.00 --026.15,-15.25,01.00,000.00,1.00 --026.39,-14.80,01.00,000.00,1.00 --026.63,-14.36,01.00,000.00,1.00 --026.85,-13.91,01.00,000.00,1.00 --027.07,-13.45,01.00,000.00,1.00 --027.28,-13.00,01.00,000.00,1.00 --027.48,-12.54,01.00,000.00,1.00 --027.67,-12.07,01.00,000.00,1.00 --027.86,-11.61,01.00,000.00,1.00 --028.04,-11.14,01.00,000.00,1.00 --028.21,-10.67,01.00,000.00,1.00 --028.37,-10.19,01.00,000.00,1.00 --028.52,-09.71,01.00,000.00,1.00 --028.67,-09.23,01.00,000.00,1.00 --028.81,-08.75,01.00,000.00,1.00 --028.94,-08.27,01.00,000.00,1.00 --029.06,-07.78,01.00,000.00,1.00 --029.18,-07.30,01.00,000.00,1.00 --029.29,-06.81,01.00,000.00,1.00 --029.39,-06.32,01.00,000.00,1.00 --029.48,-05.83,01.00,000.00,1.00 --029.57,-05.33,01.00,000.00,1.00 --029.64,-04.84,01.00,000.00,1.00 --029.71,-04.34,01.00,000.00,1.00 --029.78,-03.85,01.00,000.00,1.00 --029.83,-03.35,01.00,000.00,1.00 --029.88,-02.85,01.00,000.00,1.00 --029.92,-02.35,01.00,000.00,1.00 --029.95,-01.85,01.00,000.00,1.00 --029.97,-01.35,01.00,000.00,1.00 --029.99,-00.85,01.00,000.00,1.00 --030.00,-00.35,01.00,000.00,1.00 --030.00,+00.15,01.00,000.00,1.00 --029.99,+00.65,01.00,000.00,1.00 --029.98,+01.15,01.00,000.00,1.00 --029.96,+01.65,01.00,000.00,1.00 --029.93,+02.15,01.00,000.00,1.00 --029.89,+02.65,01.00,000.00,1.00 --029.85,+03.15,01.00,000.00,1.00 --029.80,+03.65,01.00,000.00,1.00 --029.74,+04.14,01.00,000.00,1.00 --029.67,+04.64,01.00,000.00,1.00 --029.60,+05.13,01.00,000.00,1.00 --029.52,+05.63,01.00,000.00,1.00 --029.43,+06.12,01.00,000.00,1.00 --029.33,+06.61,01.00,000.00,1.00 --029.22,+07.10,01.00,000.00,1.00 --029.11,+07.59,01.00,000.00,1.00 --028.99,+08.08,01.00,000.00,1.00 --028.86,+08.56,01.00,000.00,1.00 --028.73,+09.04,01.00,000.00,1.00 --028.58,+09.52,01.00,000.00,1.00 --028.43,+10.00,01.00,000.00,1.00 --028.27,+10.48,01.00,000.00,1.00 --028.11,+10.95,01.00,000.00,1.00 --027.93,+11.42,01.00,000.00,1.00 --027.75,+11.89,01.00,000.00,1.00 --027.56,+12.35,01.00,000.00,1.00 --027.36,+12.81,01.00,000.00,1.00 --027.15,+13.27,01.00,000.00,1.00 --026.94,+13.73,01.00,000.00,1.00 --026.72,+14.18,01.00,000.00,1.00 --026.49,+14.63,01.00,000.00,1.00 --026.25,+15.07,01.00,000.00,1.00 --026.00,+15.51,01.00,000.00,1.00 --025.75,+15.95,01.00,000.00,1.00 --025.49,+16.38,01.00,000.00,1.00 --025.22,+16.81,01.00,000.00,1.00 --024.94,+17.23,01.00,000.00,1.00 --024.66,+17.65,01.00,000.00,1.00 --024.36,+18.07,01.00,000.00,1.00 --024.06,+18.48,01.00,000.00,1.00 --023.75,+18.89,01.00,000.00,1.00 --023.43,+19.29,01.00,000.00,1.00 --023.11,+19.68,01.00,000.00,1.00 --022.77,+20.07,01.00,000.00,1.00 --022.43,+20.46,01.00,000.00,1.00 --022.08,+20.84,01.00,000.00,1.00 --021.73,+21.21,01.00,000.00,1.00 --021.36,+21.58,01.00,000.00,1.00 --020.99,+21.94,01.00,000.00,1.00 --020.61,+22.30,01.00,000.00,1.00 --020.22,+22.64,01.00,000.00,1.00 --019.83,+22.99,01.00,000.00,1.00 --019.42,+23.32,01.00,000.00,1.00 --019.01,+23.65,01.00,000.00,1.00 --018.59,+23.98,01.00,000.00,1.00 --018.17,+24.29,01.00,000.00,1.00 --017.74,+24.60,01.00,000.00,1.00 --017.29,+24.90,01.00,000.00,1.00 --016.85,+25.20,01.00,000.00,1.00 --016.39,+25.48,01.00,000.00,1.00 --015.93,+25.76,01.00,000.00,1.00 --015.46,+26.03,01.00,000.00,1.00 --014.99,+26.29,01.00,000.00,1.00 --014.51,+26.55,01.00,000.00,1.00 --014.02,+26.80,01.00,000.00,1.00 --013.53,+27.03,01.00,000.00,1.00 --013.03,+27.26,01.00,000.00,1.00 --012.52,+27.49,01.00,000.00,1.00 --012.01,+27.70,01.00,000.00,1.00 --011.49,+27.90,01.00,000.00,1.00 --010.97,+28.10,01.00,000.00,1.00 --010.45,+28.28,01.00,000.00,1.00 --009.91,+28.46,01.00,000.00,1.00 --009.38,+28.63,01.00,000.00,1.00 --008.83,+28.79,01.00,000.00,1.00 --008.29,+28.94,01.00,000.00,1.00 --007.74,+29.07,01.00,000.00,1.00 --007.19,+29.20,01.00,000.00,1.00 --006.63,+29.33,01.00,000.00,1.00 --006.07,+29.44,01.00,000.00,1.00 --005.51,+29.54,01.00,000.00,1.00 --004.94,+29.63,01.00,000.00,1.00 --004.37,+29.71,01.00,000.00,1.00 --003.80,+29.78,01.00,000.00,1.00 --003.23,+29.84,01.00,000.00,1.00 --002.65,+29.89,01.00,000.00,1.00 --002.08,+29.93,01.00,000.00,1.00 --001.50,+29.97,01.00,000.00,1.00 --000.92,+29.99,01.00,000.00,1.00 --000.35,+30.00,01.00,000.00,1.00 -+000.23,+30.00,01.00,000.00,1.00 -+000.81,+29.99,01.00,000.00,1.00 -+001.39,+29.97,01.00,000.00,1.00 -+001.96,+29.94,01.00,000.00,1.00 -+002.54,+29.90,01.00,000.00,1.00 -+003.11,+29.85,01.00,000.00,1.00 -+003.69,+29.79,01.00,000.00,1.00 -+004.26,+29.72,01.00,000.00,1.00 -+004.83,+29.64,01.00,000.00,1.00 -+005.39,+29.56,01.00,000.00,1.00 -+005.96,+29.46,01.00,000.00,1.00 -+006.52,+29.35,01.00,000.00,1.00 -+007.07,+29.23,01.00,000.00,1.00 -+007.63,+29.10,01.00,000.00,1.00 -+008.18,+28.96,01.00,000.00,1.00 -+008.73,+28.82,01.00,000.00,1.00 -+009.27,+28.66,01.00,000.00,1.00 -+009.81,+28.49,01.00,000.00,1.00 -+010.34,+28.32,01.00,000.00,1.00 -+010.87,+28.13,01.00,000.00,1.00 -+011.39,+27.94,01.00,000.00,1.00 -+011.91,+27.74,01.00,000.00,1.00 -+012.42,+27.53,01.00,000.00,1.00 -+012.93,+27.31,01.00,000.00,1.00 -+013.43,+27.08,01.00,000.00,1.00 -+013.92,+26.84,01.00,000.00,1.00 -+014.41,+26.60,01.00,000.00,1.00 -+014.89,+26.35,01.00,000.00,1.00 -+015.37,+26.08,01.00,000.00,1.00 -+015.84,+25.81,01.00,000.00,1.00 -+016.30,+25.54,01.00,000.00,1.00 -+016.76,+25.25,01.00,000.00,1.00 -+017.21,+24.96,01.00,000.00,1.00 -+017.65,+24.66,01.00,000.00,1.00 -+018.08,+24.35,01.00,000.00,1.00 -+018.51,+24.04,01.00,000.00,1.00 -+018.93,+23.72,01.00,000.00,1.00 -+019.34,+23.39,01.00,000.00,1.00 -+019.75,+23.06,01.00,000.00,1.00 -+020.14,+22.71,01.00,000.00,1.00 -+020.53,+22.37,01.00,000.00,1.00 -+020.91,+22.01,01.00,000.00,1.00 -+021.29,+21.65,01.00,000.00,1.00 -+021.66,+21.28,01.00,000.00,1.00 -+022.01,+20.91,01.00,000.00,1.00 -+022.36,+20.53,01.00,000.00,1.00 -+022.71,+20.15,01.00,000.00,1.00 -+023.04,+19.76,01.00,000.00,1.00 -+023.37,+19.37,01.00,000.00,1.00 -+023.69,+18.97,01.00,000.00,1.00 -+024.00,+18.56,01.00,000.00,1.00 -+024.30,+18.15,01.00,000.00,1.00 -+024.60,+17.74,01.00,000.00,1.00 -+024.88,+17.32,01.00,000.00,1.00 -+025.16,+16.90,01.00,000.00,1.00 -+025.44,+16.47,01.00,000.00,1.00 -+025.70,+16.04,01.00,000.00,1.00 -+025.95,+15.60,01.00,000.00,1.00 -+026.20,+15.16,01.00,000.00,1.00 -+026.44,+14.72,01.00,000.00,1.00 -+026.67,+14.27,01.00,000.00,1.00 -+026.90,+13.82,01.00,000.00,1.00 -+027.11,+13.36,01.00,000.00,1.00 -+027.32,+12.90,01.00,000.00,1.00 -+027.52,+12.44,01.00,000.00,1.00 -+027.71,+11.98,01.00,000.00,1.00 -+027.89,+11.51,01.00,000.00,1.00 -+028.07,+11.04,01.00,000.00,1.00 -+028.24,+10.57,01.00,000.00,1.00 -+028.40,+10.10,01.00,000.00,1.00 -+028.55,+09.62,01.00,000.00,1.00 -+028.70,+09.14,01.00,000.00,1.00 -+028.84,+08.66,01.00,000.00,1.00 -+028.97,+08.17,01.00,000.00,1.00 -+029.09,+07.69,01.00,000.00,1.00 -+029.20,+07.20,01.00,000.00,1.00 -+029.31,+06.71,01.00,000.00,1.00 -+029.41,+06.22,01.00,000.00,1.00 -+029.50,+05.73,01.00,000.00,1.00 -+029.58,+05.23,01.00,000.00,1.00 -+029.66,+04.74,01.00,000.00,1.00 -+029.73,+04.24,01.00,000.00,1.00 -+029.79,+03.75,01.00,000.00,1.00 -+029.84,+03.25,01.00,000.00,1.00 -+029.89,+02.75,01.00,000.00,1.00 -+029.92,+02.25,01.00,000.00,1.00 -+029.95,+01.75,01.00,000.00,1.00 -+029.98,+01.25,01.00,000.00,1.00 -+029.99,+00.75,01.00,000.00,1.00 -+030.00,+00.25,01.00,000.00,1.00 -+030.00,-00.25,01.00,000.00,1.00 -+029.99,-00.75,01.00,000.00,1.00 -+029.98,-01.25,01.00,000.00,1.00 -+029.95,-01.75,01.00,000.00,1.00 -+029.92,-02.25,01.00,000.00,1.00 -+029.89,-02.75,01.00,000.00,1.00 -+029.84,-03.25,01.00,000.00,1.00 -+029.79,-03.75,01.00,000.00,1.00 -+029.73,-04.24,01.00,000.00,1.00 -+029.66,-04.74,01.00,000.00,1.00 -+029.58,-05.23,01.00,000.00,1.00 -+029.50,-05.73,01.00,000.00,1.00 -+029.41,-06.22,01.00,000.00,1.00 -+029.31,-06.71,01.00,000.00,1.00 -+029.20,-07.20,01.00,000.00,1.00 -+029.09,-07.69,01.00,000.00,1.00 -+028.97,-08.17,01.00,000.00,1.00 -+028.84,-08.66,01.00,000.00,1.00 -+028.70,-09.14,01.00,000.00,1.00 -+028.55,-09.62,01.00,000.00,1.00 -+028.40,-10.10,01.00,000.00,1.00 -+028.24,-10.57,01.00,000.00,1.00 -+028.07,-11.04,01.00,000.00,1.00 -+027.89,-11.51,01.00,000.00,1.00 -+027.71,-11.98,01.00,000.00,1.00 -+027.52,-12.44,01.00,000.00,1.00 -+027.32,-12.90,01.00,000.00,1.00 -+027.11,-13.36,01.00,000.00,1.00 -+026.90,-13.82,01.00,000.00,1.00 -+026.67,-14.27,01.00,000.00,1.00 -+026.44,-14.72,01.00,000.00,1.00 -+026.20,-15.16,01.00,000.00,1.00 -+025.95,-15.60,01.00,000.00,1.00 -+025.70,-16.04,01.00,000.00,1.00 -+025.44,-16.47,01.00,000.00,1.00 -+025.16,-16.90,01.00,000.00,1.00 -+024.88,-17.32,01.00,000.00,1.00 -+024.60,-17.74,01.00,000.00,1.00 -+024.30,-18.15,01.00,000.00,1.00 -+024.00,-18.56,01.00,000.00,1.00 -+023.69,-18.97,01.00,000.00,1.00 -+023.37,-19.37,01.00,000.00,1.00 -+023.04,-19.76,01.00,000.00,1.00 -+022.71,-20.15,01.00,000.00,1.00 -+022.36,-20.53,01.00,000.00,1.00 -+022.01,-20.91,01.00,000.00,1.00 -+021.66,-21.28,01.00,000.00,1.00 -+021.29,-21.65,01.00,000.00,1.00 -+020.91,-22.01,01.00,000.00,1.00 -+020.53,-22.37,01.00,000.00,1.00 -+020.14,-22.71,01.00,000.00,1.00 -+019.75,-23.06,01.00,000.00,1.00 -+019.34,-23.39,01.00,000.00,1.00 -+018.93,-23.72,01.00,000.00,1.00 -+018.51,-24.04,01.00,000.00,1.00 -+018.08,-24.35,01.00,000.00,1.00 -+017.65,-24.66,01.00,000.00,1.00 -+017.21,-24.96,01.00,000.00,1.00 -+016.76,-25.25,01.00,000.00,1.00 -+016.30,-25.54,01.00,000.00,1.00 -+015.84,-25.81,01.00,000.00,1.00 -+015.37,-26.08,01.00,000.00,1.00 -+014.89,-26.35,01.00,000.00,1.00 -+014.41,-26.60,01.00,000.00,1.00 -+013.92,-26.84,01.00,000.00,1.00 -+013.43,-27.08,01.00,000.00,1.00 -+012.93,-27.31,01.00,000.00,1.00 -+012.42,-27.53,01.00,000.00,1.00 -+011.91,-27.74,01.00,000.00,1.00 -+011.39,-27.94,01.00,000.00,1.00 -+010.87,-28.13,01.00,000.00,1.00 -+010.34,-28.32,01.00,000.00,1.00 -+009.81,-28.49,01.00,000.00,1.00 -+009.27,-28.66,01.00,000.00,1.00 -+008.73,-28.82,01.00,000.00,1.00 -+008.18,-28.96,01.00,000.00,1.00 -+007.63,-29.10,01.00,000.00,1.00 -+007.07,-29.23,01.00,000.00,1.00 -+006.52,-29.35,01.00,000.00,1.00 -+005.96,-29.46,01.00,000.00,1.00 -+005.39,-29.56,01.00,000.00,1.00 -+004.83,-29.64,01.00,000.00,1.00 -+004.26,-29.72,01.00,000.00,1.00 -+003.69,-29.79,01.00,000.00,1.00 -+003.11,-29.85,01.00,000.00,1.00 -+002.54,-29.90,01.00,000.00,1.00 -+001.96,-29.94,01.00,000.00,1.00 -+001.39,-29.97,01.00,000.00,1.00 -+000.81,-29.99,01.00,000.00,1.00 -+000.23,-30.00,01.00,000.00,1.00 --000.35,-30.00,01.00,000.00,1.00 --000.92,-29.99,01.00,000.00,1.00 --001.50,-29.97,01.00,000.00,1.00 --002.08,-29.93,01.00,000.00,1.00 --002.65,-29.89,01.00,000.00,1.00 --003.23,-29.84,01.00,000.00,1.00 --003.80,-29.78,01.00,000.00,1.00 --004.37,-29.71,01.00,000.00,1.00 --004.94,-29.63,01.00,000.00,1.00 --005.51,-29.54,01.00,000.00,1.00 --006.07,-29.44,01.00,000.00,1.00 --006.63,-29.33,01.00,000.00,1.00 --007.19,-29.20,01.00,000.00,1.00 --007.74,-29.07,01.00,000.00,1.00 --008.29,-28.94,01.00,000.00,1.00 --008.83,-28.79,01.00,000.00,1.00 --009.38,-28.63,01.00,000.00,1.00 --009.91,-28.46,01.00,000.00,1.00 --010.45,-28.28,01.00,000.00,1.00 --010.97,-28.10,01.00,000.00,1.00 --011.49,-27.90,01.00,000.00,1.00 --012.01,-27.70,01.00,000.00,1.00 --012.52,-27.49,01.00,000.00,1.00 --013.03,-27.26,01.00,000.00,1.00 --013.53,-27.03,01.00,000.00,1.00 --014.02,-26.80,01.00,000.00,1.00 --014.51,-26.55,01.00,000.00,1.00 --014.99,-26.29,01.00,000.00,1.00 --015.46,-26.03,01.00,000.00,1.00 --015.93,-25.76,01.00,000.00,1.00 --016.39,-25.48,01.00,000.00,1.00 --016.85,-25.20,01.00,000.00,1.00 --017.29,-24.90,01.00,000.00,1.00 --017.74,-24.60,01.00,000.00,1.00 --018.17,-24.29,01.00,000.00,1.00 --018.59,-23.98,01.00,000.00,1.00 --019.01,-23.65,01.00,000.00,1.00 --019.42,-23.32,01.00,000.00,1.00 --019.83,-22.99,01.00,000.00,1.00 --020.22,-22.64,01.00,000.00,1.00 --020.61,-22.30,01.00,000.00,1.00 --020.99,-21.94,01.00,000.00,1.00 --021.36,-21.58,01.00,000.00,1.00 --021.73,-21.21,01.00,000.00,1.00 --022.08,-20.84,01.00,000.00,1.00 --022.43,-20.46,01.00,000.00,1.00 --022.77,-20.07,01.00,000.00,1.00 --023.11,-19.68,01.00,000.00,1.00 --023.43,-19.29,01.00,000.00,1.00 --023.75,-18.89,01.00,000.00,1.00 --024.06,-18.48,01.00,000.00,1.00 --024.36,-18.07,01.00,000.00,1.00 --024.66,-17.65,01.00,000.00,1.00 --024.94,-17.23,01.00,000.00,1.00 --025.22,-16.81,01.00,000.00,1.00 --025.49,-16.38,01.00,000.00,1.00 --025.75,-15.95,01.00,000.00,1.00 --026.00,-15.51,01.00,000.00,1.00 --026.25,-15.07,01.00,000.00,1.00 --026.49,-14.63,01.00,000.00,1.00 --026.72,-14.18,01.00,000.00,1.00 --026.94,-13.73,01.00,000.00,1.00 --027.15,-13.27,01.00,000.00,1.00 --027.36,-12.81,01.00,000.00,1.00 --027.56,-12.35,01.00,000.00,1.00 --027.75,-11.89,01.00,000.00,1.00 --027.93,-11.42,01.00,000.00,1.00 --028.11,-10.95,01.00,000.00,1.00 --028.27,-10.48,01.00,000.00,1.00 --028.43,-10.00,01.00,000.00,1.00 --028.58,-09.52,01.00,000.00,1.00 --028.73,-09.04,01.00,000.00,1.00 --028.86,-08.56,01.00,000.00,1.00 --028.99,-08.08,01.00,000.00,1.00 --029.11,-07.59,01.00,000.00,1.00 --029.22,-07.10,01.00,000.00,1.00 --029.33,-06.61,01.00,000.00,1.00 --029.43,-06.12,01.00,000.00,1.00 --029.52,-05.63,01.00,000.00,1.00 --029.60,-05.13,01.00,000.00,1.00 --029.67,-04.64,01.00,000.00,1.00 --029.74,-04.14,01.00,000.00,1.00 --029.80,-03.65,01.00,000.00,1.00 --029.85,-03.15,01.00,000.00,1.00 --029.89,-02.65,01.00,000.00,1.00 --029.93,-02.15,01.00,000.00,1.00 --029.96,-01.65,01.00,000.00,1.00 --029.98,-01.15,01.00,000.00,1.00 --029.99,-00.65,01.00,000.00,1.00 --030.00,-00.15,01.00,000.00,1.00 --030.00,+00.35,01.00,000.00,1.00 --029.99,+00.85,01.00,000.00,1.00 --029.97,+01.35,01.00,000.00,1.00 --029.95,+01.85,01.00,000.00,1.00 --029.92,+02.35,01.00,000.00,1.00 --029.88,+02.85,01.00,000.00,1.00 --029.83,+03.35,01.00,000.00,1.00 --029.78,+03.85,01.00,000.00,1.00 --029.71,+04.34,01.00,000.00,1.00 --029.64,+04.84,01.00,000.00,1.00 --029.57,+05.33,01.00,000.00,1.00 --029.48,+05.83,01.00,000.00,1.00 --029.39,+06.32,01.00,000.00,1.00 --029.29,+06.81,01.00,000.00,1.00 --029.18,+07.30,01.00,000.00,1.00 --029.06,+07.78,01.00,000.00,1.00 --028.94,+08.27,01.00,000.00,1.00 --028.81,+08.75,01.00,000.00,1.00 --028.67,+09.23,01.00,000.00,1.00 --028.52,+09.71,01.00,000.00,1.00 --028.37,+10.19,01.00,000.00,1.00 --028.21,+10.67,01.00,000.00,1.00 --028.04,+11.14,01.00,000.00,1.00 --027.86,+11.61,01.00,000.00,1.00 --027.67,+12.07,01.00,000.00,1.00 --027.48,+12.54,01.00,000.00,1.00 --027.28,+13.00,01.00,000.00,1.00 --027.07,+13.45,01.00,000.00,1.00 --026.85,+13.91,01.00,000.00,1.00 --026.63,+14.36,01.00,000.00,1.00 --026.39,+14.80,01.00,000.00,1.00 --026.15,+15.25,01.00,000.00,1.00 --025.90,+15.69,01.00,000.00,1.00 --025.65,+16.12,01.00,000.00,1.00 --025.38,+16.55,01.00,000.00,1.00 --025.11,+16.98,01.00,000.00,1.00 --024.83,+17.40,01.00,000.00,1.00 --024.54,+17.82,01.00,000.00,1.00 --024.24,+18.23,01.00,000.00,1.00 --023.94,+18.64,01.00,000.00,1.00 --023.63,+19.05,01.00,000.00,1.00 --023.30,+19.45,01.00,000.00,1.00 --022.98,+19.84,01.00,000.00,1.00 --022.64,+20.23,01.00,000.00,1.00 --022.29,+20.61,01.00,000.00,1.00 --021.94,+20.99,01.00,000.00,1.00 --021.58,+21.36,01.00,000.00,1.00 --021.21,+21.72,01.00,000.00,1.00 --020.84,+22.08,01.00,000.00,1.00 --020.46,+22.44,01.00,000.00,1.00 --020.06,+22.78,01.00,000.00,1.00 --019.67,+23.12,01.00,000.00,1.00 --019.26,+23.46,01.00,000.00,1.00 --018.85,+23.78,01.00,000.00,1.00 --018.42,+24.10,01.00,000.00,1.00 --018.00,+24.42,01.00,000.00,1.00 --017.56,+24.72,01.00,000.00,1.00 --017.12,+25.02,01.00,000.00,1.00 --016.67,+25.31,01.00,000.00,1.00 --016.21,+25.59,01.00,000.00,1.00 --015.75,+25.87,01.00,000.00,1.00 --015.28,+26.14,01.00,000.00,1.00 --014.80,+26.40,01.00,000.00,1.00 --014.31,+26.65,01.00,000.00,1.00 --013.82,+26.89,01.00,000.00,1.00 --013.33,+27.13,01.00,000.00,1.00 --012.83,+27.35,01.00,000.00,1.00 --012.32,+27.57,01.00,000.00,1.00 --011.81,+27.78,01.00,000.00,1.00 --011.29,+27.98,01.00,000.00,1.00 --010.76,+28.17,01.00,000.00,1.00 --010.23,+28.35,01.00,000.00,1.00 --009.70,+28.53,01.00,000.00,1.00 --009.16,+28.69,01.00,000.00,1.00 --008.62,+28.85,01.00,000.00,1.00 --008.07,+28.99,01.00,000.00,1.00 --007.52,+29.13,01.00,000.00,1.00 --006.96,+29.25,01.00,000.00,1.00 --006.41,+29.37,01.00,000.00,1.00 --005.84,+29.48,01.00,000.00,1.00 --005.28,+29.57,01.00,000.00,1.00 --004.71,+29.66,01.00,000.00,1.00 --004.14,+29.74,01.00,000.00,1.00 --003.57,+29.81,01.00,000.00,1.00 --003.00,+29.86,01.00,000.00,1.00 --002.42,+29.91,01.00,000.00,1.00 --001.85,+29.95,01.00,000.00,1.00 --001.27,+29.98,01.00,000.00,1.00 --000.69,+29.99,01.00,000.00,1.00 --000.12,+30.00,01.00,000.00,1.00 -+000.46,+30.00,01.00,000.00,1.00 -+001.04,+29.98,01.00,000.00,1.00 -+001.62,+29.96,01.00,000.00,1.00 -+002.19,+29.93,01.00,000.00,1.00 -+002.77,+29.88,01.00,000.00,1.00 -+003.34,+29.83,01.00,000.00,1.00 -+003.92,+29.77,01.00,000.00,1.00 -+004.49,+29.69,01.00,000.00,1.00 -+005.05,+29.61,01.00,000.00,1.00 -+005.62,+29.52,01.00,000.00,1.00 -+006.18,+29.41,01.00,000.00,1.00 -+006.74,+29.30,01.00,000.00,1.00 -+007.30,+29.18,01.00,000.00,1.00 -+007.85,+29.05,01.00,000.00,1.00 -+008.40,+28.91,01.00,000.00,1.00 -+008.94,+28.76,01.00,000.00,1.00 -+009.48,+28.59,01.00,000.00,1.00 -+010.02,+28.43,01.00,000.00,1.00 -+010.55,+28.25,01.00,000.00,1.00 -+011.08,+28.06,01.00,000.00,1.00 -+011.60,+27.86,01.00,000.00,1.00 -+012.11,+27.66,01.00,000.00,1.00 -+012.62,+27.44,01.00,000.00,1.00 -+013.13,+27.22,01.00,000.00,1.00 -+013.63,+26.99,01.00,000.00,1.00 -+014.12,+26.75,01.00,000.00,1.00 -+014.61,+26.50,01.00,000.00,1.00 -+015.09,+26.24,01.00,000.00,1.00 -+015.56,+25.98,01.00,000.00,1.00 -+016.03,+25.71,01.00,000.00,1.00 -+016.48,+25.42,01.00,000.00,1.00 -+016.94,+25.14,01.00,000.00,1.00 -+017.38,+24.84,01.00,000.00,1.00 -+017.82,+24.54,01.00,000.00,1.00 -+018.25,+24.23,01.00,000.00,1.00 -+018.68,+23.91,01.00,000.00,1.00 -+019.09,+23.59,01.00,000.00,1.00 -+019.50,+23.26,01.00,000.00,1.00 -+019.91,+22.92,01.00,000.00,1.00 -+020.30,+22.58,01.00,000.00,1.00 -+020.69,+22.22,01.00,000.00,1.00 -+021.07,+21.87,01.00,000.00,1.00 -+021.44,+21.51,01.00,000.00,1.00 -+021.80,+21.14,01.00,000.00,1.00 -+022.16,+20.76,01.00,000.00,1.00 -+022.50,+20.38,01.00,000.00,1.00 -+022.84,+20.00,01.00,000.00,1.00 -+023.17,+19.60,01.00,000.00,1.00 -+023.50,+19.21,01.00,000.00,1.00 -+023.81,+18.81,01.00,000.00,1.00 -+024.12,+18.40,01.00,000.00,1.00 -+024.42,+17.99,01.00,000.00,1.00 -+024.71,+17.57,01.00,000.00,1.00 -+025.00,+17.15,01.00,000.00,1.00 -+025.27,+16.73,01.00,000.00,1.00 -+025.54,+16.30,01.00,000.00,1.00 -+025.80,+15.86,01.00,000.00,1.00 -+026.05,+15.42,01.00,000.00,1.00 -+026.30,+14.98,01.00,000.00,1.00 -+026.53,+14.54,01.00,000.00,1.00 -+026.76,+14.09,01.00,000.00,1.00 -+026.98,+13.64,01.00,000.00,1.00 -+027.20,+13.18,01.00,000.00,1.00 -+027.40,+12.72,01.00,000.00,1.00 -+027.60,+12.26,01.00,000.00,1.00 -+027.79,+11.79,01.00,000.00,1.00 -+027.97,+11.33,01.00,000.00,1.00 -+028.14,+10.85,01.00,000.00,1.00 -+028.30,+10.38,01.00,000.00,1.00 -+028.46,+09.90,01.00,000.00,1.00 -+028.61,+09.43,01.00,000.00,1.00 -+028.75,+08.95,01.00,000.00,1.00 -+028.89,+08.46,01.00,000.00,1.00 -+029.02,+07.98,01.00,000.00,1.00 -+029.13,+07.49,01.00,000.00,1.00 -+029.25,+07.00,01.00,000.00,1.00 -+029.35,+06.51,01.00,000.00,1.00 -+029.44,+06.02,01.00,000.00,1.00 -+029.53,+05.53,01.00,000.00,1.00 -+029.61,+05.04,01.00,000.00,1.00 -+029.69,+04.54,01.00,000.00,1.00 -+029.75,+04.04,01.00,000.00,1.00 -+029.81,+03.55,01.00,000.00,1.00 -+029.86,+03.05,01.00,000.00,1.00 -+029.90,+02.55,01.00,000.00,1.00 -+029.94,+02.05,01.00,000.00,1.00 -+029.96,+01.55,01.00,000.00,1.00 -+029.98,+01.05,01.00,000.00,1.00 -+030.00,+00.55,01.00,000.00,1.00 -+030.00,+00.05,01.00,000.00,1.00 -+030.00,-00.45,01.00,000.00,1.00 -+029.99,-00.95,01.00,000.00,1.00 -+029.97,-01.45,01.00,000.00,1.00 -+029.94,-01.95,01.00,000.00,1.00 -+029.91,-02.45,01.00,000.00,1.00 -+029.87,-02.95,01.00,000.00,1.00 -+029.82,-03.45,01.00,000.00,1.00 -+029.76,-03.94,01.00,000.00,1.00 -+029.70,-04.44,01.00,000.00,1.00 -+029.63,-04.94,01.00,000.00,1.00 -+029.55,-05.43,01.00,000.00,1.00 -+029.46,-05.92,01.00,000.00,1.00 -+029.37,-06.42,01.00,000.00,1.00 -+029.27,-06.91,01.00,000.00,1.00 -+029.16,-07.39,01.00,000.00,1.00 -+029.04,-07.88,01.00,000.00,1.00 -+028.91,-08.37,01.00,000.00,1.00 -+028.78,-08.85,01.00,000.00,1.00 -+028.64,-09.33,01.00,000.00,1.00 -+028.49,-09.81,01.00,000.00,1.00 -+028.34,-10.29,01.00,000.00,1.00 -+028.17,-10.76,01.00,000.00,1.00 -+028.00,-11.23,01.00,000.00,1.00 -+027.82,-11.70,01.00,000.00,1.00 -+027.63,-12.17,01.00,000.00,1.00 -+027.44,-12.63,01.00,000.00,1.00 -+027.24,-13.09,01.00,000.00,1.00 -+027.03,-13.54,01.00,000.00,1.00 -+026.81,-14.00,01.00,000.00,1.00 -+026.58,-14.45,01.00,000.00,1.00 -+026.35,-14.89,01.00,000.00,1.00 -+026.10,-15.34,01.00,000.00,1.00 -+025.85,-15.77,01.00,000.00,1.00 -+025.59,-16.21,01.00,000.00,1.00 -+025.33,-16.64,01.00,000.00,1.00 -+025.05,-17.07,01.00,000.00,1.00 -+024.77,-17.49,01.00,000.00,1.00 -+024.48,-17.90,01.00,000.00,1.00 -+024.18,-18.32,01.00,000.00,1.00 -+023.88,-18.72,01.00,000.00,1.00 -+023.56,-19.13,01.00,000.00,1.00 -+023.24,-19.53,01.00,000.00,1.00 -+022.91,-19.92,01.00,000.00,1.00 -+022.57,-20.30,01.00,000.00,1.00 -+022.23,-20.69,01.00,000.00,1.00 -+021.87,-21.06,01.00,000.00,1.00 -+021.51,-21.43,01.00,000.00,1.00 -+021.14,-21.80,01.00,000.00,1.00 -+020.76,-22.15,01.00,000.00,1.00 -+020.38,-22.51,01.00,000.00,1.00 -+019.99,-22.85,01.00,000.00,1.00 -+019.58,-23.19,01.00,000.00,1.00 -+019.18,-23.52,01.00,000.00,1.00 -+018.76,-23.85,01.00,000.00,1.00 -+018.34,-24.17,01.00,000.00,1.00 -+017.91,-24.48,01.00,000.00,1.00 -+017.47,-24.78,01.00,000.00,1.00 -+017.03,-25.08,01.00,000.00,1.00 -+016.58,-25.37,01.00,000.00,1.00 -+016.12,-25.65,01.00,000.00,1.00 -+015.65,-25.92,01.00,000.00,1.00 -+015.18,-26.19,01.00,000.00,1.00 -+014.70,-26.45,01.00,000.00,1.00 -+014.22,-26.70,01.00,000.00,1.00 -+013.73,-26.94,01.00,000.00,1.00 -+013.23,-27.17,01.00,000.00,1.00 -+012.73,-27.40,01.00,000.00,1.00 -+012.22,-27.61,01.00,000.00,1.00 -+011.70,-27.82,01.00,000.00,1.00 -+011.18,-28.02,01.00,000.00,1.00 -+010.66,-28.21,01.00,000.00,1.00 -+010.13,-28.39,01.00,000.00,1.00 -+009.59,-28.56,01.00,000.00,1.00 -+009.05,-28.72,01.00,000.00,1.00 -+008.51,-28.88,01.00,000.00,1.00 -+007.96,-29.02,01.00,000.00,1.00 -+007.41,-29.15,01.00,000.00,1.00 -+006.85,-29.28,01.00,000.00,1.00 -+006.29,-29.39,01.00,000.00,1.00 -+005.73,-29.50,01.00,000.00,1.00 -+005.17,-29.59,01.00,000.00,1.00 -+004.60,-29.68,01.00,000.00,1.00 -+004.03,-29.75,01.00,000.00,1.00 -+003.46,-29.82,01.00,000.00,1.00 -+002.88,-29.87,01.00,000.00,1.00 -+002.31,-29.92,01.00,000.00,1.00 -+001.73,-29.95,01.00,000.00,1.00 -+001.16,-29.98,01.00,000.00,1.00 -+000.58,-29.99,01.00,000.00,1.00 -+000.00,-30.00,01.00,000.00,1.00 --000.58,-29.99,01.00,000.00,1.00 --001.16,-29.98,01.00,000.00,1.00 --001.73,-29.95,01.00,000.00,1.00 --002.31,-29.92,01.00,000.00,1.00 --002.88,-29.87,01.00,000.00,1.00 --003.46,-29.82,01.00,000.00,1.00 --004.03,-29.75,01.00,000.00,1.00 --004.60,-29.68,01.00,000.00,1.00 --005.17,-29.59,01.00,000.00,1.00 --005.73,-29.50,01.00,000.00,1.00 --006.29,-29.39,01.00,000.00,1.00 --006.85,-29.28,01.00,000.00,1.00 --007.41,-29.15,01.00,000.00,1.00 --007.96,-29.02,01.00,000.00,1.00 --008.51,-28.88,01.00,000.00,1.00 --009.05,-28.72,01.00,000.00,1.00 --009.59,-28.56,01.00,000.00,1.00 --010.13,-28.39,01.00,000.00,1.00 --010.66,-28.21,01.00,000.00,1.00 --011.18,-28.02,01.00,000.00,1.00 --011.70,-27.82,01.00,000.00,1.00 --012.22,-27.61,01.00,000.00,1.00 --012.73,-27.40,01.00,000.00,1.00 --013.23,-27.17,01.00,000.00,1.00 --013.73,-26.94,01.00,000.00,1.00 --014.22,-26.70,01.00,000.00,1.00 --014.70,-26.45,01.00,000.00,1.00 --015.18,-26.19,01.00,000.00,1.00 --015.65,-25.92,01.00,000.00,1.00 --016.12,-25.65,01.00,000.00,1.00 --016.58,-25.37,01.00,000.00,1.00 --017.03,-25.08,01.00,000.00,1.00 --017.47,-24.78,01.00,000.00,1.00 --017.91,-24.48,01.00,000.00,1.00 --018.34,-24.17,01.00,000.00,1.00 --018.76,-23.85,01.00,000.00,1.00 --019.18,-23.52,01.00,000.00,1.00 --019.58,-23.19,01.00,000.00,1.00 --019.99,-22.85,01.00,000.00,1.00 --020.38,-22.51,01.00,000.00,1.00 --020.76,-22.15,01.00,000.00,1.00 --021.14,-21.80,01.00,000.00,1.00 --021.51,-21.43,01.00,000.00,1.00 --021.87,-21.06,01.00,000.00,1.00 --022.23,-20.69,01.00,000.00,1.00 --022.57,-20.30,01.00,000.00,1.00 --022.91,-19.92,01.00,000.00,1.00 --023.24,-19.53,01.00,000.00,1.00 --023.56,-19.13,01.00,000.00,1.00 --023.88,-18.72,01.00,000.00,1.00 --024.18,-18.32,01.00,000.00,1.00 --024.48,-17.90,01.00,000.00,1.00 --024.77,-17.49,01.00,000.00,1.00 --025.05,-17.07,01.00,000.00,1.00 --025.33,-16.64,01.00,000.00,1.00 --025.59,-16.21,01.00,000.00,1.00 --025.85,-15.77,01.00,000.00,1.00 --026.10,-15.34,01.00,000.00,1.00 --026.35,-14.89,01.00,000.00,1.00 --026.58,-14.45,01.00,000.00,1.00 --026.81,-14.00,01.00,000.00,1.00 --027.03,-13.54,01.00,000.00,1.00 --027.24,-13.09,01.00,000.00,1.00 --027.44,-12.63,01.00,000.00,1.00 --027.63,-12.17,01.00,000.00,1.00 --027.82,-11.70,01.00,000.00,1.00 --028.00,-11.23,01.00,000.00,1.00 --028.17,-10.76,01.00,000.00,1.00 --028.34,-10.29,01.00,000.00,1.00 --028.49,-09.81,01.00,000.00,1.00 --028.64,-09.33,01.00,000.00,1.00 --028.78,-08.85,01.00,000.00,1.00 --028.91,-08.37,01.00,000.00,1.00 --029.04,-07.88,01.00,000.00,1.00 --029.16,-07.39,01.00,000.00,1.00 --029.27,-06.91,01.00,000.00,1.00 --029.37,-06.42,01.00,000.00,1.00 --029.46,-05.92,01.00,000.00,1.00 --029.55,-05.43,01.00,000.00,1.00 --029.63,-04.94,01.00,000.00,1.00 --029.70,-04.44,01.00,000.00,1.00 --029.76,-03.94,01.00,000.00,1.00 --029.82,-03.45,01.00,000.00,1.00 --029.87,-02.95,01.00,000.00,1.00 --029.91,-02.45,01.00,000.00,1.00 --029.94,-01.95,01.00,000.00,1.00 --029.97,-01.45,01.00,000.00,1.00 --029.99,-00.95,01.00,000.00,1.00 --030.00,-00.45,01.00,000.00,1.00 --030.00,+00.05,01.00,000.00,1.00 --030.00,+00.55,01.00,000.00,1.00 --029.98,+01.05,01.00,000.00,1.00 --029.96,+01.55,01.00,000.00,1.00 --029.94,+02.05,01.00,000.00,1.00 --029.90,+02.55,01.00,000.00,1.00 --029.86,+03.05,01.00,000.00,1.00 --029.81,+03.55,01.00,000.00,1.00 --029.75,+04.04,01.00,000.00,1.00 --029.69,+04.54,01.00,000.00,1.00 --029.61,+05.04,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t10_ch1.csv b/scripts/td_object_renderer/metadata/csv/t10_ch1.csv deleted file mode 100644 index 34205471ca2558dea559753b9f2eddca863f01b7..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t10_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ -+000.00,+20.00,01.00,000.00,1.00 -+000.79,+20.00,01.00,000.00,1.00 -+001.59,+20.00,01.00,000.00,1.00 -+002.38,+20.00,01.00,000.00,1.00 -+003.17,+20.00,01.00,000.00,1.00 -+003.96,+20.00,01.00,000.00,1.00 -+004.76,+20.00,01.00,000.00,1.00 -+005.55,+20.00,01.00,000.00,1.00 -+006.34,+20.00,01.00,000.00,1.00 -+007.14,+20.00,01.00,000.00,1.00 -+007.93,+20.00,01.00,000.00,1.00 -+008.72,+20.00,01.00,000.00,1.00 -+009.52,+20.00,01.00,000.00,1.00 -+010.31,+20.00,01.00,000.00,1.00 -+011.10,+20.00,01.00,000.00,1.00 -+011.89,+20.00,01.00,000.00,1.00 -+012.69,+20.00,01.00,000.00,1.00 -+013.48,+20.00,01.00,000.00,1.00 -+014.27,+20.00,01.00,000.00,1.00 -+015.07,+20.00,01.00,000.00,1.00 -+015.86,+20.00,01.00,000.00,1.00 -+016.65,+20.00,01.00,000.00,1.00 -+017.44,+20.00,01.00,000.00,1.00 -+018.24,+20.00,01.00,000.00,1.00 -+019.03,+20.00,01.00,000.00,1.00 -+019.82,+20.00,01.00,000.00,1.00 -+020.62,+20.00,01.00,000.00,1.00 -+021.41,+20.00,01.00,000.00,1.00 -+022.20,+20.00,01.00,000.00,1.00 -+023.00,+20.00,01.00,000.00,1.00 -+023.79,+20.00,01.00,000.00,1.00 -+024.58,+20.00,01.00,000.00,1.00 -+025.37,+20.00,01.00,000.00,1.00 -+026.17,+20.00,01.00,000.00,1.00 -+026.96,+20.00,01.00,000.00,1.00 -+027.75,+20.00,01.00,000.00,1.00 -+028.55,+20.00,01.00,000.00,1.00 -+029.34,+20.00,01.00,000.00,1.00 -+030.13,+20.00,01.00,000.00,1.00 -+030.93,+20.00,01.00,000.00,1.00 -+031.72,+20.00,01.00,000.00,1.00 -+032.51,+20.00,01.00,000.00,1.00 -+033.30,+20.00,01.00,000.00,1.00 -+034.10,+20.00,01.00,000.00,1.00 -+034.89,+20.00,01.00,000.00,1.00 -+035.68,+20.00,01.00,000.00,1.00 -+036.48,+20.00,01.00,000.00,1.00 -+037.27,+20.00,01.00,000.00,1.00 -+038.06,+20.00,01.00,000.00,1.00 -+038.85,+20.00,01.00,000.00,1.00 -+039.65,+20.00,01.00,000.00,1.00 -+040.44,+20.00,01.00,000.00,1.00 -+041.23,+20.00,01.00,000.00,1.00 -+042.03,+20.00,01.00,000.00,1.00 -+042.82,+20.00,01.00,000.00,1.00 -+043.61,+20.00,01.00,000.00,1.00 -+044.41,+20.00,01.00,000.00,1.00 -+045.20,+20.00,01.00,000.00,1.00 -+045.99,+20.00,01.00,000.00,1.00 -+046.78,+20.00,01.00,000.00,1.00 -+047.58,+20.00,01.00,000.00,1.00 -+048.37,+20.00,01.00,000.00,1.00 -+049.16,+20.00,01.00,000.00,1.00 -+049.96,+20.00,01.00,000.00,1.00 -+050.75,+20.00,01.00,000.00,1.00 -+051.54,+20.00,01.00,000.00,1.00 -+052.33,+20.00,01.00,000.00,1.00 -+053.13,+20.00,01.00,000.00,1.00 -+053.92,+20.00,01.00,000.00,1.00 -+054.71,+20.00,01.00,000.00,1.00 -+055.51,+20.00,01.00,000.00,1.00 -+056.30,+20.00,01.00,000.00,1.00 -+057.09,+20.00,01.00,000.00,1.00 -+057.89,+20.00,01.00,000.00,1.00 -+058.68,+20.00,01.00,000.00,1.00 -+059.47,+20.00,01.00,000.00,1.00 -+060.26,+20.00,01.00,000.00,1.00 -+061.06,+20.00,01.00,000.00,1.00 -+061.85,+20.00,01.00,000.00,1.00 -+062.64,+20.00,01.00,000.00,1.00 -+063.44,+20.00,01.00,000.00,1.00 -+064.23,+20.00,01.00,000.00,1.00 -+065.02,+20.00,01.00,000.00,1.00 -+065.81,+20.00,01.00,000.00,1.00 -+066.61,+20.00,01.00,000.00,1.00 -+067.40,+20.00,01.00,000.00,1.00 -+068.19,+20.00,01.00,000.00,1.00 -+068.99,+20.00,01.00,000.00,1.00 -+069.78,+20.00,01.00,000.00,1.00 -+070.57,+20.00,01.00,000.00,1.00 -+071.37,+20.00,01.00,000.00,1.00 -+072.16,+20.00,01.00,000.00,1.00 -+072.95,+20.00,01.00,000.00,1.00 -+073.74,+20.00,01.00,000.00,1.00 -+074.54,+20.00,01.00,000.00,1.00 -+075.33,+20.00,01.00,000.00,1.00 -+076.12,+20.00,01.00,000.00,1.00 -+076.92,+20.00,01.00,000.00,1.00 -+077.71,+20.00,01.00,000.00,1.00 -+078.50,+20.00,01.00,000.00,1.00 -+079.30,+20.00,01.00,000.00,1.00 -+080.09,+20.00,01.00,000.00,1.00 -+080.88,+20.00,01.00,000.00,1.00 -+081.67,+20.00,01.00,000.00,1.00 -+082.47,+20.00,01.00,000.00,1.00 -+083.26,+20.00,01.00,000.00,1.00 -+084.05,+20.00,01.00,000.00,1.00 -+084.85,+20.00,01.00,000.00,1.00 -+085.64,+20.00,01.00,000.00,1.00 -+086.43,+20.00,01.00,000.00,1.00 -+087.22,+20.00,01.00,000.00,1.00 -+088.02,+20.00,01.00,000.00,1.00 -+088.81,+20.00,01.00,000.00,1.00 -+089.60,+20.00,01.00,000.00,1.00 -+090.40,+20.00,01.00,000.00,1.00 -+091.19,+20.00,01.00,000.00,1.00 -+091.98,+20.00,01.00,000.00,1.00 -+092.78,+20.00,01.00,000.00,1.00 -+093.57,+20.00,01.00,000.00,1.00 -+094.36,+20.00,01.00,000.00,1.00 -+095.15,+20.00,01.00,000.00,1.00 -+095.95,+20.00,01.00,000.00,1.00 -+096.74,+20.00,01.00,000.00,1.00 -+097.53,+20.00,01.00,000.00,1.00 -+098.33,+20.00,01.00,000.00,1.00 -+099.12,+20.00,01.00,000.00,1.00 -+099.91,+20.00,01.00,000.00,1.00 -+100.70,+20.00,01.00,000.00,1.00 -+101.50,+20.00,01.00,000.00,1.00 -+102.29,+20.00,01.00,000.00,1.00 -+103.08,+20.00,01.00,000.00,1.00 -+103.88,+20.00,01.00,000.00,1.00 -+104.67,+20.00,01.00,000.00,1.00 -+105.46,+20.00,01.00,000.00,1.00 -+106.26,+20.00,01.00,000.00,1.00 -+107.05,+20.00,01.00,000.00,1.00 -+107.84,+20.00,01.00,000.00,1.00 -+108.63,+20.00,01.00,000.00,1.00 -+109.43,+20.00,01.00,000.00,1.00 -+110.22,+20.00,01.00,000.00,1.00 -+111.01,+20.00,01.00,000.00,1.00 -+111.81,+20.00,01.00,000.00,1.00 -+112.60,+20.00,01.00,000.00,1.00 -+113.39,+20.00,01.00,000.00,1.00 -+114.19,+20.00,01.00,000.00,1.00 -+114.98,+20.00,01.00,000.00,1.00 -+115.77,+20.00,01.00,000.00,1.00 -+116.56,+20.00,01.00,000.00,1.00 -+117.36,+20.00,01.00,000.00,1.00 -+118.15,+20.00,01.00,000.00,1.00 -+118.94,+20.00,01.00,000.00,1.00 -+119.74,+20.00,01.00,000.00,1.00 -+120.53,+20.00,01.00,000.00,1.00 -+121.32,+20.00,01.00,000.00,1.00 -+122.11,+20.00,01.00,000.00,1.00 -+122.91,+20.00,01.00,000.00,1.00 -+123.70,+20.00,01.00,000.00,1.00 -+124.49,+20.00,01.00,000.00,1.00 -+125.29,+20.00,01.00,000.00,1.00 -+126.08,+20.00,01.00,000.00,1.00 -+126.87,+20.00,01.00,000.00,1.00 -+127.67,+20.00,01.00,000.00,1.00 -+128.46,+20.00,01.00,000.00,1.00 -+129.25,+20.00,01.00,000.00,1.00 -+130.04,+20.00,01.00,000.00,1.00 -+130.84,+20.00,01.00,000.00,1.00 -+131.63,+20.00,01.00,000.00,1.00 -+132.42,+20.00,01.00,000.00,1.00 -+133.22,+20.00,01.00,000.00,1.00 -+134.01,+20.00,01.00,000.00,1.00 -+134.80,+20.00,01.00,000.00,1.00 -+135.59,+20.00,01.00,000.00,1.00 -+136.39,+20.00,01.00,000.00,1.00 -+137.18,+20.00,01.00,000.00,1.00 -+137.97,+20.00,01.00,000.00,1.00 -+138.77,+20.00,01.00,000.00,1.00 -+139.56,+20.00,01.00,000.00,1.00 -+140.35,+20.00,01.00,000.00,1.00 -+141.15,+20.00,01.00,000.00,1.00 -+141.94,+20.00,01.00,000.00,1.00 -+142.73,+20.00,01.00,000.00,1.00 -+143.52,+20.00,01.00,000.00,1.00 -+144.32,+20.00,01.00,000.00,1.00 -+145.11,+20.00,01.00,000.00,1.00 -+145.90,+20.00,01.00,000.00,1.00 -+146.70,+20.00,01.00,000.00,1.00 -+147.49,+20.00,01.00,000.00,1.00 -+148.28,+20.00,01.00,000.00,1.00 -+149.07,+20.00,01.00,000.00,1.00 -+149.87,+20.00,01.00,000.00,1.00 -+150.66,+20.00,01.00,000.00,1.00 -+151.45,+20.00,01.00,000.00,1.00 -+152.25,+20.00,01.00,000.00,1.00 -+153.04,+20.00,01.00,000.00,1.00 -+153.83,+20.00,01.00,000.00,1.00 -+154.63,+20.00,01.00,000.00,1.00 -+155.42,+20.00,01.00,000.00,1.00 -+156.21,+20.00,01.00,000.00,1.00 -+157.00,+20.00,01.00,000.00,1.00 -+157.80,+20.00,01.00,000.00,1.00 -+158.59,+20.00,01.00,000.00,1.00 -+159.38,+20.00,01.00,000.00,1.00 -+160.18,+20.00,01.00,000.00,1.00 -+160.97,+20.00,01.00,000.00,1.00 -+161.76,+20.00,01.00,000.00,1.00 -+162.56,+20.00,01.00,000.00,1.00 -+163.35,+20.00,01.00,000.00,1.00 -+164.14,+20.00,01.00,000.00,1.00 -+164.93,+20.00,01.00,000.00,1.00 -+165.73,+20.00,01.00,000.00,1.00 -+166.52,+20.00,01.00,000.00,1.00 -+167.31,+20.00,01.00,000.00,1.00 -+168.11,+20.00,01.00,000.00,1.00 -+168.90,+20.00,01.00,000.00,1.00 -+169.69,+20.00,01.00,000.00,1.00 -+170.48,+20.00,01.00,000.00,1.00 -+171.28,+20.00,01.00,000.00,1.00 -+172.07,+20.00,01.00,000.00,1.00 -+172.86,+20.00,01.00,000.00,1.00 -+173.66,+20.00,01.00,000.00,1.00 -+174.45,+20.00,01.00,000.00,1.00 -+175.24,+20.00,01.00,000.00,1.00 -+176.04,+20.00,01.00,000.00,1.00 -+176.83,+20.00,01.00,000.00,1.00 -+177.62,+20.00,01.00,000.00,1.00 -+178.41,+20.00,01.00,000.00,1.00 -+179.21,+20.00,01.00,000.00,1.00 -+180.00,+20.00,01.00,000.00,1.00 --179.21,+20.00,01.00,000.00,1.00 --178.41,+20.00,01.00,000.00,1.00 --177.62,+20.00,01.00,000.00,1.00 --176.83,+20.00,01.00,000.00,1.00 --176.04,+20.00,01.00,000.00,1.00 --175.24,+20.00,01.00,000.00,1.00 --174.45,+20.00,01.00,000.00,1.00 --173.66,+20.00,01.00,000.00,1.00 --172.86,+20.00,01.00,000.00,1.00 --172.07,+20.00,01.00,000.00,1.00 --171.28,+20.00,01.00,000.00,1.00 --170.48,+20.00,01.00,000.00,1.00 --169.69,+20.00,01.00,000.00,1.00 --168.90,+20.00,01.00,000.00,1.00 --168.11,+20.00,01.00,000.00,1.00 --167.31,+20.00,01.00,000.00,1.00 --166.52,+20.00,01.00,000.00,1.00 --165.73,+20.00,01.00,000.00,1.00 --164.93,+20.00,01.00,000.00,1.00 --164.14,+20.00,01.00,000.00,1.00 --163.35,+20.00,01.00,000.00,1.00 --162.56,+20.00,01.00,000.00,1.00 --161.76,+20.00,01.00,000.00,1.00 --160.97,+20.00,01.00,000.00,1.00 --160.18,+20.00,01.00,000.00,1.00 --159.38,+20.00,01.00,000.00,1.00 --158.59,+20.00,01.00,000.00,1.00 --157.80,+20.00,01.00,000.00,1.00 --157.00,+20.00,01.00,000.00,1.00 --156.21,+20.00,01.00,000.00,1.00 --155.42,+20.00,01.00,000.00,1.00 --154.63,+20.00,01.00,000.00,1.00 --153.83,+20.00,01.00,000.00,1.00 --153.04,+20.00,01.00,000.00,1.00 --152.25,+20.00,01.00,000.00,1.00 --151.45,+20.00,01.00,000.00,1.00 --150.66,+20.00,01.00,000.00,1.00 --149.87,+20.00,01.00,000.00,1.00 --149.07,+20.00,01.00,000.00,1.00 --148.28,+20.00,01.00,000.00,1.00 --147.49,+20.00,01.00,000.00,1.00 --146.70,+20.00,01.00,000.00,1.00 --145.90,+20.00,01.00,000.00,1.00 --145.11,+20.00,01.00,000.00,1.00 --144.32,+20.00,01.00,000.00,1.00 --143.52,+20.00,01.00,000.00,1.00 --142.73,+20.00,01.00,000.00,1.00 --141.94,+20.00,01.00,000.00,1.00 --141.15,+20.00,01.00,000.00,1.00 --140.35,+20.00,01.00,000.00,1.00 --139.56,+20.00,01.00,000.00,1.00 --138.77,+20.00,01.00,000.00,1.00 --137.97,+20.00,01.00,000.00,1.00 --137.18,+20.00,01.00,000.00,1.00 --136.39,+20.00,01.00,000.00,1.00 --135.59,+20.00,01.00,000.00,1.00 --134.80,+20.00,01.00,000.00,1.00 --134.01,+20.00,01.00,000.00,1.00 --133.22,+20.00,01.00,000.00,1.00 --132.42,+20.00,01.00,000.00,1.00 --131.63,+20.00,01.00,000.00,1.00 --130.84,+20.00,01.00,000.00,1.00 --130.04,+20.00,01.00,000.00,1.00 --129.25,+20.00,01.00,000.00,1.00 --128.46,+20.00,01.00,000.00,1.00 --127.67,+20.00,01.00,000.00,1.00 --126.87,+20.00,01.00,000.00,1.00 --126.08,+20.00,01.00,000.00,1.00 --125.29,+20.00,01.00,000.00,1.00 --124.49,+20.00,01.00,000.00,1.00 --123.70,+20.00,01.00,000.00,1.00 --122.91,+20.00,01.00,000.00,1.00 --122.11,+20.00,01.00,000.00,1.00 --121.32,+20.00,01.00,000.00,1.00 --120.53,+20.00,01.00,000.00,1.00 --119.74,+20.00,01.00,000.00,1.00 --118.94,+20.00,01.00,000.00,1.00 --118.15,+20.00,01.00,000.00,1.00 --117.36,+20.00,01.00,000.00,1.00 --116.56,+20.00,01.00,000.00,1.00 --115.77,+20.00,01.00,000.00,1.00 --114.98,+20.00,01.00,000.00,1.00 --114.19,+20.00,01.00,000.00,1.00 --113.39,+20.00,01.00,000.00,1.00 --112.60,+20.00,01.00,000.00,1.00 --111.81,+20.00,01.00,000.00,1.00 --111.01,+20.00,01.00,000.00,1.00 --110.22,+20.00,01.00,000.00,1.00 --109.43,+20.00,01.00,000.00,1.00 --108.63,+20.00,01.00,000.00,1.00 --107.84,+20.00,01.00,000.00,1.00 --107.05,+20.00,01.00,000.00,1.00 --106.26,+20.00,01.00,000.00,1.00 --105.46,+20.00,01.00,000.00,1.00 --104.67,+20.00,01.00,000.00,1.00 --103.88,+20.00,01.00,000.00,1.00 --103.08,+20.00,01.00,000.00,1.00 --102.29,+20.00,01.00,000.00,1.00 --101.50,+20.00,01.00,000.00,1.00 --100.70,+20.00,01.00,000.00,1.00 --099.91,+20.00,01.00,000.00,1.00 --099.12,+20.00,01.00,000.00,1.00 --098.33,+20.00,01.00,000.00,1.00 --097.53,+20.00,01.00,000.00,1.00 --096.74,+20.00,01.00,000.00,1.00 --095.95,+20.00,01.00,000.00,1.00 --095.15,+20.00,01.00,000.00,1.00 --094.36,+20.00,01.00,000.00,1.00 --093.57,+20.00,01.00,000.00,1.00 --092.78,+20.00,01.00,000.00,1.00 --091.98,+20.00,01.00,000.00,1.00 --091.19,+20.00,01.00,000.00,1.00 --090.40,+20.00,01.00,000.00,1.00 --089.60,+20.00,01.00,000.00,1.00 --088.81,+20.00,01.00,000.00,1.00 --088.02,+20.00,01.00,000.00,1.00 --087.22,+20.00,01.00,000.00,1.00 --086.43,+20.00,01.00,000.00,1.00 --085.64,+20.00,01.00,000.00,1.00 --084.85,+20.00,01.00,000.00,1.00 --084.05,+20.00,01.00,000.00,1.00 --083.26,+20.00,01.00,000.00,1.00 --082.47,+20.00,01.00,000.00,1.00 --081.67,+20.00,01.00,000.00,1.00 --080.88,+20.00,01.00,000.00,1.00 --080.09,+20.00,01.00,000.00,1.00 --079.30,+20.00,01.00,000.00,1.00 --078.50,+20.00,01.00,000.00,1.00 --077.71,+20.00,01.00,000.00,1.00 --076.92,+20.00,01.00,000.00,1.00 --076.12,+20.00,01.00,000.00,1.00 --075.33,+20.00,01.00,000.00,1.00 --074.54,+20.00,01.00,000.00,1.00 --073.74,+20.00,01.00,000.00,1.00 --072.95,+20.00,01.00,000.00,1.00 --072.16,+20.00,01.00,000.00,1.00 --071.37,+20.00,01.00,000.00,1.00 --070.57,+20.00,01.00,000.00,1.00 --069.78,+20.00,01.00,000.00,1.00 --068.99,+20.00,01.00,000.00,1.00 --068.19,+20.00,01.00,000.00,1.00 --067.40,+20.00,01.00,000.00,1.00 --066.61,+20.00,01.00,000.00,1.00 --065.81,+20.00,01.00,000.00,1.00 --065.02,+20.00,01.00,000.00,1.00 --064.23,+20.00,01.00,000.00,1.00 --063.44,+20.00,01.00,000.00,1.00 --062.64,+20.00,01.00,000.00,1.00 --061.85,+20.00,01.00,000.00,1.00 --061.06,+20.00,01.00,000.00,1.00 --060.26,+20.00,01.00,000.00,1.00 --059.47,+20.00,01.00,000.00,1.00 --058.68,+20.00,01.00,000.00,1.00 --057.89,+20.00,01.00,000.00,1.00 --057.09,+20.00,01.00,000.00,1.00 --056.30,+20.00,01.00,000.00,1.00 --055.51,+20.00,01.00,000.00,1.00 --054.71,+20.00,01.00,000.00,1.00 --053.92,+20.00,01.00,000.00,1.00 --053.13,+20.00,01.00,000.00,1.00 --052.33,+20.00,01.00,000.00,1.00 --051.54,+20.00,01.00,000.00,1.00 --050.75,+20.00,01.00,000.00,1.00 --049.96,+20.00,01.00,000.00,1.00 --049.16,+20.00,01.00,000.00,1.00 --048.37,+20.00,01.00,000.00,1.00 --047.58,+20.00,01.00,000.00,1.00 --046.78,+20.00,01.00,000.00,1.00 --045.99,+20.00,01.00,000.00,1.00 --045.20,+20.00,01.00,000.00,1.00 --044.41,+20.00,01.00,000.00,1.00 --043.61,+20.00,01.00,000.00,1.00 --042.82,+20.00,01.00,000.00,1.00 --042.03,+20.00,01.00,000.00,1.00 --041.23,+20.00,01.00,000.00,1.00 --040.44,+20.00,01.00,000.00,1.00 --039.65,+20.00,01.00,000.00,1.00 --038.85,+20.00,01.00,000.00,1.00 --038.06,+20.00,01.00,000.00,1.00 --037.27,+20.00,01.00,000.00,1.00 --036.48,+20.00,01.00,000.00,1.00 --035.68,+20.00,01.00,000.00,1.00 --034.89,+20.00,01.00,000.00,1.00 --034.10,+20.00,01.00,000.00,1.00 --033.30,+20.00,01.00,000.00,1.00 --032.51,+20.00,01.00,000.00,1.00 --031.72,+20.00,01.00,000.00,1.00 --030.93,+20.00,01.00,000.00,1.00 --030.13,+20.00,01.00,000.00,1.00 --029.34,+20.00,01.00,000.00,1.00 --028.55,+20.00,01.00,000.00,1.00 --027.75,+20.00,01.00,000.00,1.00 --026.96,+20.00,01.00,000.00,1.00 --026.17,+20.00,01.00,000.00,1.00 --025.37,+20.00,01.00,000.00,1.00 --024.58,+20.00,01.00,000.00,1.00 --023.79,+20.00,01.00,000.00,1.00 --023.00,+20.00,01.00,000.00,1.00 --022.20,+20.00,01.00,000.00,1.00 --021.41,+20.00,01.00,000.00,1.00 --020.62,+20.00,01.00,000.00,1.00 --019.82,+20.00,01.00,000.00,1.00 --019.03,+20.00,01.00,000.00,1.00 --018.24,+20.00,01.00,000.00,1.00 --017.44,+20.00,01.00,000.00,1.00 --016.65,+20.00,01.00,000.00,1.00 --015.86,+20.00,01.00,000.00,1.00 --015.07,+20.00,01.00,000.00,1.00 --014.27,+20.00,01.00,000.00,1.00 --013.48,+20.00,01.00,000.00,1.00 --012.69,+20.00,01.00,000.00,1.00 --011.89,+20.00,01.00,000.00,1.00 --011.10,+20.00,01.00,000.00,1.00 --010.31,+20.00,01.00,000.00,1.00 --009.52,+20.00,01.00,000.00,1.00 --008.72,+20.00,01.00,000.00,1.00 --007.93,+20.00,01.00,000.00,1.00 --007.14,+20.00,01.00,000.00,1.00 --006.34,+20.00,01.00,000.00,1.00 --005.55,+20.00,01.00,000.00,1.00 --004.76,+20.00,01.00,000.00,1.00 --003.96,+20.00,01.00,000.00,1.00 --003.17,+20.00,01.00,000.00,1.00 --002.38,+20.00,01.00,000.00,1.00 --001.59,+20.00,01.00,000.00,1.00 --000.79,+20.00,01.00,000.00,1.00 --000.00,+20.00,01.00,000.00,1.00 -+000.79,+20.00,01.00,000.00,1.00 -+001.59,+20.00,01.00,000.00,1.00 -+002.38,+20.00,01.00,000.00,1.00 -+003.17,+20.00,01.00,000.00,1.00 -+003.96,+20.00,01.00,000.00,1.00 -+004.76,+20.00,01.00,000.00,1.00 -+005.55,+20.00,01.00,000.00,1.00 -+006.34,+20.00,01.00,000.00,1.00 -+007.14,+20.00,01.00,000.00,1.00 -+007.93,+20.00,01.00,000.00,1.00 -+008.72,+20.00,01.00,000.00,1.00 -+009.52,+20.00,01.00,000.00,1.00 -+010.31,+20.00,01.00,000.00,1.00 -+011.10,+20.00,01.00,000.00,1.00 -+011.89,+20.00,01.00,000.00,1.00 -+012.69,+20.00,01.00,000.00,1.00 -+013.48,+20.00,01.00,000.00,1.00 -+014.27,+20.00,01.00,000.00,1.00 -+015.07,+20.00,01.00,000.00,1.00 -+015.86,+20.00,01.00,000.00,1.00 -+016.65,+20.00,01.00,000.00,1.00 -+017.44,+20.00,01.00,000.00,1.00 -+018.24,+20.00,01.00,000.00,1.00 -+019.03,+20.00,01.00,000.00,1.00 -+019.82,+20.00,01.00,000.00,1.00 -+020.62,+20.00,01.00,000.00,1.00 -+021.41,+20.00,01.00,000.00,1.00 -+022.20,+20.00,01.00,000.00,1.00 -+023.00,+20.00,01.00,000.00,1.00 -+023.79,+20.00,01.00,000.00,1.00 -+024.58,+20.00,01.00,000.00,1.00 -+025.37,+20.00,01.00,000.00,1.00 -+026.17,+20.00,01.00,000.00,1.00 -+026.96,+20.00,01.00,000.00,1.00 -+027.75,+20.00,01.00,000.00,1.00 -+028.55,+20.00,01.00,000.00,1.00 -+029.34,+20.00,01.00,000.00,1.00 -+030.13,+20.00,01.00,000.00,1.00 -+030.93,+20.00,01.00,000.00,1.00 -+031.72,+20.00,01.00,000.00,1.00 -+032.51,+20.00,01.00,000.00,1.00 -+033.30,+20.00,01.00,000.00,1.00 -+034.10,+20.00,01.00,000.00,1.00 -+034.89,+20.00,01.00,000.00,1.00 -+035.68,+20.00,01.00,000.00,1.00 -+036.48,+20.00,01.00,000.00,1.00 -+037.27,+20.00,01.00,000.00,1.00 -+038.06,+20.00,01.00,000.00,1.00 -+038.85,+20.00,01.00,000.00,1.00 -+039.65,+20.00,01.00,000.00,1.00 -+040.44,+20.00,01.00,000.00,1.00 -+041.23,+20.00,01.00,000.00,1.00 -+042.03,+20.00,01.00,000.00,1.00 -+042.82,+20.00,01.00,000.00,1.00 -+043.61,+20.00,01.00,000.00,1.00 -+044.41,+20.00,01.00,000.00,1.00 -+045.20,+20.00,01.00,000.00,1.00 -+045.99,+20.00,01.00,000.00,1.00 -+046.78,+20.00,01.00,000.00,1.00 -+047.58,+20.00,01.00,000.00,1.00 -+048.37,+20.00,01.00,000.00,1.00 -+049.16,+20.00,01.00,000.00,1.00 -+049.96,+20.00,01.00,000.00,1.00 -+050.75,+20.00,01.00,000.00,1.00 -+051.54,+20.00,01.00,000.00,1.00 -+052.33,+20.00,01.00,000.00,1.00 -+053.13,+20.00,01.00,000.00,1.00 -+053.92,+20.00,01.00,000.00,1.00 -+054.71,+20.00,01.00,000.00,1.00 -+055.51,+20.00,01.00,000.00,1.00 -+056.30,+20.00,01.00,000.00,1.00 -+057.09,+20.00,01.00,000.00,1.00 -+057.89,+20.00,01.00,000.00,1.00 -+058.68,+20.00,01.00,000.00,1.00 -+059.47,+20.00,01.00,000.00,1.00 -+060.26,+20.00,01.00,000.00,1.00 -+061.06,+20.00,01.00,000.00,1.00 -+061.85,+20.00,01.00,000.00,1.00 -+062.64,+20.00,01.00,000.00,1.00 -+063.44,+20.00,01.00,000.00,1.00 -+064.23,+20.00,01.00,000.00,1.00 -+065.02,+20.00,01.00,000.00,1.00 -+065.81,+20.00,01.00,000.00,1.00 -+066.61,+20.00,01.00,000.00,1.00 -+067.40,+20.00,01.00,000.00,1.00 -+068.19,+20.00,01.00,000.00,1.00 -+068.99,+20.00,01.00,000.00,1.00 -+069.78,+20.00,01.00,000.00,1.00 -+070.57,+20.00,01.00,000.00,1.00 -+071.37,+20.00,01.00,000.00,1.00 -+072.16,+20.00,01.00,000.00,1.00 -+072.95,+20.00,01.00,000.00,1.00 -+073.74,+20.00,01.00,000.00,1.00 -+074.54,+20.00,01.00,000.00,1.00 -+075.33,+20.00,01.00,000.00,1.00 -+076.12,+20.00,01.00,000.00,1.00 -+076.92,+20.00,01.00,000.00,1.00 -+077.71,+20.00,01.00,000.00,1.00 -+078.50,+20.00,01.00,000.00,1.00 -+079.30,+20.00,01.00,000.00,1.00 -+080.09,+20.00,01.00,000.00,1.00 -+080.88,+20.00,01.00,000.00,1.00 -+081.67,+20.00,01.00,000.00,1.00 -+082.47,+20.00,01.00,000.00,1.00 -+083.26,+20.00,01.00,000.00,1.00 -+084.05,+20.00,01.00,000.00,1.00 -+084.85,+20.00,01.00,000.00,1.00 -+085.64,+20.00,01.00,000.00,1.00 -+086.43,+20.00,01.00,000.00,1.00 -+087.22,+20.00,01.00,000.00,1.00 -+088.02,+20.00,01.00,000.00,1.00 -+088.81,+20.00,01.00,000.00,1.00 -+089.60,+20.00,01.00,000.00,1.00 -+090.40,+20.00,01.00,000.00,1.00 -+091.19,+20.00,01.00,000.00,1.00 -+091.98,+20.00,01.00,000.00,1.00 -+092.78,+20.00,01.00,000.00,1.00 -+093.57,+20.00,01.00,000.00,1.00 -+094.36,+20.00,01.00,000.00,1.00 -+095.15,+20.00,01.00,000.00,1.00 -+095.95,+20.00,01.00,000.00,1.00 -+096.74,+20.00,01.00,000.00,1.00 -+097.53,+20.00,01.00,000.00,1.00 -+098.33,+20.00,01.00,000.00,1.00 -+099.12,+20.00,01.00,000.00,1.00 -+099.91,+20.00,01.00,000.00,1.00 -+100.70,+20.00,01.00,000.00,1.00 -+101.50,+20.00,01.00,000.00,1.00 -+102.29,+20.00,01.00,000.00,1.00 -+103.08,+20.00,01.00,000.00,1.00 -+103.88,+20.00,01.00,000.00,1.00 -+104.67,+20.00,01.00,000.00,1.00 -+105.46,+20.00,01.00,000.00,1.00 -+106.26,+20.00,01.00,000.00,1.00 -+107.05,+20.00,01.00,000.00,1.00 -+107.84,+20.00,01.00,000.00,1.00 -+108.63,+20.00,01.00,000.00,1.00 -+109.43,+20.00,01.00,000.00,1.00 -+110.22,+20.00,01.00,000.00,1.00 -+111.01,+20.00,01.00,000.00,1.00 -+111.81,+20.00,01.00,000.00,1.00 -+112.60,+20.00,01.00,000.00,1.00 -+113.39,+20.00,01.00,000.00,1.00 -+114.19,+20.00,01.00,000.00,1.00 -+114.98,+20.00,01.00,000.00,1.00 -+115.77,+20.00,01.00,000.00,1.00 -+116.56,+20.00,01.00,000.00,1.00 -+117.36,+20.00,01.00,000.00,1.00 -+118.15,+20.00,01.00,000.00,1.00 -+118.94,+20.00,01.00,000.00,1.00 -+119.74,+20.00,01.00,000.00,1.00 -+120.53,+20.00,01.00,000.00,1.00 -+121.32,+20.00,01.00,000.00,1.00 -+122.11,+20.00,01.00,000.00,1.00 -+122.91,+20.00,01.00,000.00,1.00 -+123.70,+20.00,01.00,000.00,1.00 -+124.49,+20.00,01.00,000.00,1.00 -+125.29,+20.00,01.00,000.00,1.00 -+126.08,+20.00,01.00,000.00,1.00 -+126.87,+20.00,01.00,000.00,1.00 -+127.67,+20.00,01.00,000.00,1.00 -+128.46,+20.00,01.00,000.00,1.00 -+129.25,+20.00,01.00,000.00,1.00 -+130.04,+20.00,01.00,000.00,1.00 -+130.84,+20.00,01.00,000.00,1.00 -+131.63,+20.00,01.00,000.00,1.00 -+132.42,+20.00,01.00,000.00,1.00 -+133.22,+20.00,01.00,000.00,1.00 -+134.01,+20.00,01.00,000.00,1.00 -+134.80,+20.00,01.00,000.00,1.00 -+135.59,+20.00,01.00,000.00,1.00 -+136.39,+20.00,01.00,000.00,1.00 -+137.18,+20.00,01.00,000.00,1.00 -+137.97,+20.00,01.00,000.00,1.00 -+138.77,+20.00,01.00,000.00,1.00 -+139.56,+20.00,01.00,000.00,1.00 -+140.35,+20.00,01.00,000.00,1.00 -+141.15,+20.00,01.00,000.00,1.00 -+141.94,+20.00,01.00,000.00,1.00 -+142.73,+20.00,01.00,000.00,1.00 -+143.52,+20.00,01.00,000.00,1.00 -+144.32,+20.00,01.00,000.00,1.00 -+145.11,+20.00,01.00,000.00,1.00 -+145.90,+20.00,01.00,000.00,1.00 -+146.70,+20.00,01.00,000.00,1.00 -+147.49,+20.00,01.00,000.00,1.00 -+148.28,+20.00,01.00,000.00,1.00 -+149.07,+20.00,01.00,000.00,1.00 -+149.87,+20.00,01.00,000.00,1.00 -+150.66,+20.00,01.00,000.00,1.00 -+151.45,+20.00,01.00,000.00,1.00 -+152.25,+20.00,01.00,000.00,1.00 -+153.04,+20.00,01.00,000.00,1.00 -+153.83,+20.00,01.00,000.00,1.00 -+154.63,+20.00,01.00,000.00,1.00 -+155.42,+20.00,01.00,000.00,1.00 -+156.21,+20.00,01.00,000.00,1.00 -+157.00,+20.00,01.00,000.00,1.00 -+157.80,+20.00,01.00,000.00,1.00 -+158.59,+20.00,01.00,000.00,1.00 -+159.38,+20.00,01.00,000.00,1.00 -+160.18,+20.00,01.00,000.00,1.00 -+160.97,+20.00,01.00,000.00,1.00 -+161.76,+20.00,01.00,000.00,1.00 -+162.56,+20.00,01.00,000.00,1.00 -+163.35,+20.00,01.00,000.00,1.00 -+164.14,+20.00,01.00,000.00,1.00 -+164.93,+20.00,01.00,000.00,1.00 -+165.73,+20.00,01.00,000.00,1.00 -+166.52,+20.00,01.00,000.00,1.00 -+167.31,+20.00,01.00,000.00,1.00 -+168.11,+20.00,01.00,000.00,1.00 -+168.90,+20.00,01.00,000.00,1.00 -+169.69,+20.00,01.00,000.00,1.00 -+170.48,+20.00,01.00,000.00,1.00 -+171.28,+20.00,01.00,000.00,1.00 -+172.07,+20.00,01.00,000.00,1.00 -+172.86,+20.00,01.00,000.00,1.00 -+173.66,+20.00,01.00,000.00,1.00 -+174.45,+20.00,01.00,000.00,1.00 -+175.24,+20.00,01.00,000.00,1.00 -+176.04,+20.00,01.00,000.00,1.00 -+176.83,+20.00,01.00,000.00,1.00 -+177.62,+20.00,01.00,000.00,1.00 -+178.41,+20.00,01.00,000.00,1.00 -+179.21,+20.00,01.00,000.00,1.00 -+180.00,+20.00,01.00,000.00,1.00 --179.21,+20.00,01.00,000.00,1.00 --178.41,+20.00,01.00,000.00,1.00 --177.62,+20.00,01.00,000.00,1.00 --176.83,+20.00,01.00,000.00,1.00 --176.04,+20.00,01.00,000.00,1.00 --175.24,+20.00,01.00,000.00,1.00 --174.45,+20.00,01.00,000.00,1.00 --173.66,+20.00,01.00,000.00,1.00 --172.86,+20.00,01.00,000.00,1.00 --172.07,+20.00,01.00,000.00,1.00 --171.28,+20.00,01.00,000.00,1.00 --170.48,+20.00,01.00,000.00,1.00 --169.69,+20.00,01.00,000.00,1.00 --168.90,+20.00,01.00,000.00,1.00 --168.11,+20.00,01.00,000.00,1.00 --167.31,+20.00,01.00,000.00,1.00 --166.52,+20.00,01.00,000.00,1.00 --165.73,+20.00,01.00,000.00,1.00 --164.93,+20.00,01.00,000.00,1.00 --164.14,+20.00,01.00,000.00,1.00 --163.35,+20.00,01.00,000.00,1.00 --162.56,+20.00,01.00,000.00,1.00 --161.76,+20.00,01.00,000.00,1.00 --160.97,+20.00,01.00,000.00,1.00 --160.18,+20.00,01.00,000.00,1.00 --159.38,+20.00,01.00,000.00,1.00 --158.59,+20.00,01.00,000.00,1.00 --157.80,+20.00,01.00,000.00,1.00 --157.00,+20.00,01.00,000.00,1.00 --156.21,+20.00,01.00,000.00,1.00 --155.42,+20.00,01.00,000.00,1.00 --154.63,+20.00,01.00,000.00,1.00 --153.83,+20.00,01.00,000.00,1.00 --153.04,+20.00,01.00,000.00,1.00 --152.25,+20.00,01.00,000.00,1.00 --151.45,+20.00,01.00,000.00,1.00 --150.66,+20.00,01.00,000.00,1.00 --149.87,+20.00,01.00,000.00,1.00 --149.07,+20.00,01.00,000.00,1.00 --148.28,+20.00,01.00,000.00,1.00 --147.49,+20.00,01.00,000.00,1.00 --146.70,+20.00,01.00,000.00,1.00 --145.90,+20.00,01.00,000.00,1.00 --145.11,+20.00,01.00,000.00,1.00 --144.32,+20.00,01.00,000.00,1.00 --143.52,+20.00,01.00,000.00,1.00 --142.73,+20.00,01.00,000.00,1.00 --141.94,+20.00,01.00,000.00,1.00 --141.15,+20.00,01.00,000.00,1.00 --140.35,+20.00,01.00,000.00,1.00 --139.56,+20.00,01.00,000.00,1.00 --138.77,+20.00,01.00,000.00,1.00 --137.97,+20.00,01.00,000.00,1.00 --137.18,+20.00,01.00,000.00,1.00 --136.39,+20.00,01.00,000.00,1.00 --135.59,+20.00,01.00,000.00,1.00 --134.80,+20.00,01.00,000.00,1.00 --134.01,+20.00,01.00,000.00,1.00 --133.22,+20.00,01.00,000.00,1.00 --132.42,+20.00,01.00,000.00,1.00 --131.63,+20.00,01.00,000.00,1.00 --130.84,+20.00,01.00,000.00,1.00 --130.04,+20.00,01.00,000.00,1.00 --129.25,+20.00,01.00,000.00,1.00 --128.46,+20.00,01.00,000.00,1.00 --127.67,+20.00,01.00,000.00,1.00 --126.87,+20.00,01.00,000.00,1.00 --126.08,+20.00,01.00,000.00,1.00 --125.29,+20.00,01.00,000.00,1.00 --124.49,+20.00,01.00,000.00,1.00 --123.70,+20.00,01.00,000.00,1.00 --122.91,+20.00,01.00,000.00,1.00 --122.11,+20.00,01.00,000.00,1.00 --121.32,+20.00,01.00,000.00,1.00 --120.53,+20.00,01.00,000.00,1.00 --119.74,+20.00,01.00,000.00,1.00 --118.94,+20.00,01.00,000.00,1.00 --118.15,+20.00,01.00,000.00,1.00 --117.36,+20.00,01.00,000.00,1.00 --116.56,+20.00,01.00,000.00,1.00 --115.77,+20.00,01.00,000.00,1.00 --114.98,+20.00,01.00,000.00,1.00 --114.19,+20.00,01.00,000.00,1.00 --113.39,+20.00,01.00,000.00,1.00 --112.60,+20.00,01.00,000.00,1.00 --111.81,+20.00,01.00,000.00,1.00 --111.01,+20.00,01.00,000.00,1.00 --110.22,+20.00,01.00,000.00,1.00 --109.43,+20.00,01.00,000.00,1.00 --108.63,+20.00,01.00,000.00,1.00 --107.84,+20.00,01.00,000.00,1.00 --107.05,+20.00,01.00,000.00,1.00 --106.26,+20.00,01.00,000.00,1.00 --105.46,+20.00,01.00,000.00,1.00 --104.67,+20.00,01.00,000.00,1.00 --103.88,+20.00,01.00,000.00,1.00 --103.08,+20.00,01.00,000.00,1.00 --102.29,+20.00,01.00,000.00,1.00 --101.50,+20.00,01.00,000.00,1.00 --100.70,+20.00,01.00,000.00,1.00 --099.91,+20.00,01.00,000.00,1.00 --099.12,+20.00,01.00,000.00,1.00 --098.33,+20.00,01.00,000.00,1.00 --097.53,+20.00,01.00,000.00,1.00 --096.74,+20.00,01.00,000.00,1.00 --095.95,+20.00,01.00,000.00,1.00 --095.15,+20.00,01.00,000.00,1.00 --094.36,+20.00,01.00,000.00,1.00 --093.57,+20.00,01.00,000.00,1.00 --092.78,+20.00,01.00,000.00,1.00 --091.98,+20.00,01.00,000.00,1.00 --091.19,+20.00,01.00,000.00,1.00 --090.40,+20.00,01.00,000.00,1.00 --089.60,+20.00,01.00,000.00,1.00 --088.81,+20.00,01.00,000.00,1.00 --088.02,+20.00,01.00,000.00,1.00 --087.22,+20.00,01.00,000.00,1.00 --086.43,+20.00,01.00,000.00,1.00 --085.64,+20.00,01.00,000.00,1.00 --084.85,+20.00,01.00,000.00,1.00 --084.05,+20.00,01.00,000.00,1.00 --083.26,+20.00,01.00,000.00,1.00 --082.47,+20.00,01.00,000.00,1.00 --081.67,+20.00,01.00,000.00,1.00 --080.88,+20.00,01.00,000.00,1.00 --080.09,+20.00,01.00,000.00,1.00 --079.30,+20.00,01.00,000.00,1.00 --078.50,+20.00,01.00,000.00,1.00 --077.71,+20.00,01.00,000.00,1.00 --076.92,+20.00,01.00,000.00,1.00 --076.12,+20.00,01.00,000.00,1.00 --075.33,+20.00,01.00,000.00,1.00 --074.54,+20.00,01.00,000.00,1.00 --073.74,+20.00,01.00,000.00,1.00 --072.95,+20.00,01.00,000.00,1.00 --072.16,+20.00,01.00,000.00,1.00 --071.37,+20.00,01.00,000.00,1.00 --070.57,+20.00,01.00,000.00,1.00 --069.78,+20.00,01.00,000.00,1.00 --068.99,+20.00,01.00,000.00,1.00 --068.19,+20.00,01.00,000.00,1.00 --067.40,+20.00,01.00,000.00,1.00 --066.61,+20.00,01.00,000.00,1.00 --065.81,+20.00,01.00,000.00,1.00 --065.02,+20.00,01.00,000.00,1.00 --064.23,+20.00,01.00,000.00,1.00 --063.44,+20.00,01.00,000.00,1.00 --062.64,+20.00,01.00,000.00,1.00 --061.85,+20.00,01.00,000.00,1.00 --061.06,+20.00,01.00,000.00,1.00 --060.26,+20.00,01.00,000.00,1.00 --059.47,+20.00,01.00,000.00,1.00 --058.68,+20.00,01.00,000.00,1.00 --057.89,+20.00,01.00,000.00,1.00 --057.09,+20.00,01.00,000.00,1.00 --056.30,+20.00,01.00,000.00,1.00 --055.51,+20.00,01.00,000.00,1.00 --054.71,+20.00,01.00,000.00,1.00 --053.92,+20.00,01.00,000.00,1.00 --053.13,+20.00,01.00,000.00,1.00 --052.33,+20.00,01.00,000.00,1.00 --051.54,+20.00,01.00,000.00,1.00 --050.75,+20.00,01.00,000.00,1.00 --049.96,+20.00,01.00,000.00,1.00 --049.16,+20.00,01.00,000.00,1.00 --048.37,+20.00,01.00,000.00,1.00 --047.58,+20.00,01.00,000.00,1.00 --046.78,+20.00,01.00,000.00,1.00 --045.99,+20.00,01.00,000.00,1.00 --045.20,+20.00,01.00,000.00,1.00 --044.41,+20.00,01.00,000.00,1.00 --043.61,+20.00,01.00,000.00,1.00 --042.82,+20.00,01.00,000.00,1.00 --042.03,+20.00,01.00,000.00,1.00 --041.23,+20.00,01.00,000.00,1.00 --040.44,+20.00,01.00,000.00,1.00 --039.65,+20.00,01.00,000.00,1.00 --038.85,+20.00,01.00,000.00,1.00 --038.06,+20.00,01.00,000.00,1.00 --037.27,+20.00,01.00,000.00,1.00 --036.48,+20.00,01.00,000.00,1.00 --035.68,+20.00,01.00,000.00,1.00 --034.89,+20.00,01.00,000.00,1.00 --034.10,+20.00,01.00,000.00,1.00 --033.30,+20.00,01.00,000.00,1.00 --032.51,+20.00,01.00,000.00,1.00 --031.72,+20.00,01.00,000.00,1.00 --030.93,+20.00,01.00,000.00,1.00 --030.13,+20.00,01.00,000.00,1.00 --029.34,+20.00,01.00,000.00,1.00 --028.55,+20.00,01.00,000.00,1.00 --027.75,+20.00,01.00,000.00,1.00 --026.96,+20.00,01.00,000.00,1.00 --026.17,+20.00,01.00,000.00,1.00 --025.37,+20.00,01.00,000.00,1.00 --024.58,+20.00,01.00,000.00,1.00 --023.79,+20.00,01.00,000.00,1.00 --023.00,+20.00,01.00,000.00,1.00 --022.20,+20.00,01.00,000.00,1.00 --021.41,+20.00,01.00,000.00,1.00 --020.62,+20.00,01.00,000.00,1.00 --019.82,+20.00,01.00,000.00,1.00 --019.03,+20.00,01.00,000.00,1.00 --018.24,+20.00,01.00,000.00,1.00 --017.44,+20.00,01.00,000.00,1.00 --016.65,+20.00,01.00,000.00,1.00 --015.86,+20.00,01.00,000.00,1.00 --015.07,+20.00,01.00,000.00,1.00 --014.27,+20.00,01.00,000.00,1.00 --013.48,+20.00,01.00,000.00,1.00 --012.69,+20.00,01.00,000.00,1.00 --011.89,+20.00,01.00,000.00,1.00 --011.10,+20.00,01.00,000.00,1.00 --010.31,+20.00,01.00,000.00,1.00 --009.52,+20.00,01.00,000.00,1.00 --008.72,+20.00,01.00,000.00,1.00 --007.93,+20.00,01.00,000.00,1.00 --007.14,+20.00,01.00,000.00,1.00 --006.34,+20.00,01.00,000.00,1.00 --005.55,+20.00,01.00,000.00,1.00 --004.76,+20.00,01.00,000.00,1.00 --003.96,+20.00,01.00,000.00,1.00 --003.17,+20.00,01.00,000.00,1.00 --002.38,+20.00,01.00,000.00,1.00 --001.59,+20.00,01.00,000.00,1.00 --000.79,+20.00,01.00,000.00,1.00 --000.00,+20.00,01.00,000.00,1.00 -+000.79,+20.00,01.00,000.00,1.00 -+001.59,+20.00,01.00,000.00,1.00 -+002.38,+20.00,01.00,000.00,1.00 -+003.17,+20.00,01.00,000.00,1.00 -+003.96,+20.00,01.00,000.00,1.00 -+004.76,+20.00,01.00,000.00,1.00 -+005.55,+20.00,01.00,000.00,1.00 -+006.34,+20.00,01.00,000.00,1.00 -+007.14,+20.00,01.00,000.00,1.00 -+007.93,+20.00,01.00,000.00,1.00 -+008.72,+20.00,01.00,000.00,1.00 -+009.52,+20.00,01.00,000.00,1.00 -+010.31,+20.00,01.00,000.00,1.00 -+011.10,+20.00,01.00,000.00,1.00 -+011.89,+20.00,01.00,000.00,1.00 -+012.69,+20.00,01.00,000.00,1.00 -+013.48,+20.00,01.00,000.00,1.00 -+014.27,+20.00,01.00,000.00,1.00 -+015.07,+20.00,01.00,000.00,1.00 -+015.86,+20.00,01.00,000.00,1.00 -+016.65,+20.00,01.00,000.00,1.00 -+017.44,+20.00,01.00,000.00,1.00 -+018.24,+20.00,01.00,000.00,1.00 -+019.03,+20.00,01.00,000.00,1.00 -+019.82,+20.00,01.00,000.00,1.00 -+020.62,+20.00,01.00,000.00,1.00 -+021.41,+20.00,01.00,000.00,1.00 -+022.20,+20.00,01.00,000.00,1.00 -+023.00,+20.00,01.00,000.00,1.00 -+023.79,+20.00,01.00,000.00,1.00 -+024.58,+20.00,01.00,000.00,1.00 -+025.37,+20.00,01.00,000.00,1.00 -+026.17,+20.00,01.00,000.00,1.00 -+026.96,+20.00,01.00,000.00,1.00 -+027.75,+20.00,01.00,000.00,1.00 -+028.55,+20.00,01.00,000.00,1.00 -+029.34,+20.00,01.00,000.00,1.00 -+030.13,+20.00,01.00,000.00,1.00 -+030.93,+20.00,01.00,000.00,1.00 -+031.72,+20.00,01.00,000.00,1.00 -+032.51,+20.00,01.00,000.00,1.00 -+033.30,+20.00,01.00,000.00,1.00 -+034.10,+20.00,01.00,000.00,1.00 -+034.89,+20.00,01.00,000.00,1.00 -+035.68,+20.00,01.00,000.00,1.00 -+036.48,+20.00,01.00,000.00,1.00 -+037.27,+20.00,01.00,000.00,1.00 -+038.06,+20.00,01.00,000.00,1.00 -+038.85,+20.00,01.00,000.00,1.00 -+039.65,+20.00,01.00,000.00,1.00 -+040.44,+20.00,01.00,000.00,1.00 -+041.23,+20.00,01.00,000.00,1.00 -+042.03,+20.00,01.00,000.00,1.00 -+042.82,+20.00,01.00,000.00,1.00 -+043.61,+20.00,01.00,000.00,1.00 -+044.41,+20.00,01.00,000.00,1.00 -+045.20,+20.00,01.00,000.00,1.00 -+045.99,+20.00,01.00,000.00,1.00 -+046.78,+20.00,01.00,000.00,1.00 -+047.58,+20.00,01.00,000.00,1.00 -+048.37,+20.00,01.00,000.00,1.00 -+049.16,+20.00,01.00,000.00,1.00 -+049.96,+20.00,01.00,000.00,1.00 -+050.75,+20.00,01.00,000.00,1.00 -+051.54,+20.00,01.00,000.00,1.00 -+052.33,+20.00,01.00,000.00,1.00 -+053.13,+20.00,01.00,000.00,1.00 -+053.92,+20.00,01.00,000.00,1.00 -+054.71,+20.00,01.00,000.00,1.00 -+055.51,+20.00,01.00,000.00,1.00 -+056.30,+20.00,01.00,000.00,1.00 -+057.09,+20.00,01.00,000.00,1.00 -+057.89,+20.00,01.00,000.00,1.00 -+058.68,+20.00,01.00,000.00,1.00 -+059.47,+20.00,01.00,000.00,1.00 -+060.26,+20.00,01.00,000.00,1.00 -+061.06,+20.00,01.00,000.00,1.00 -+061.85,+20.00,01.00,000.00,1.00 -+062.64,+20.00,01.00,000.00,1.00 -+063.44,+20.00,01.00,000.00,1.00 -+064.23,+20.00,01.00,000.00,1.00 -+065.02,+20.00,01.00,000.00,1.00 -+065.81,+20.00,01.00,000.00,1.00 -+066.61,+20.00,01.00,000.00,1.00 -+067.40,+20.00,01.00,000.00,1.00 -+068.19,+20.00,01.00,000.00,1.00 -+068.99,+20.00,01.00,000.00,1.00 -+069.78,+20.00,01.00,000.00,1.00 -+070.57,+20.00,01.00,000.00,1.00 -+071.37,+20.00,01.00,000.00,1.00 -+072.16,+20.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t11_ch1.csv b/scripts/td_object_renderer/metadata/csv/t11_ch1.csv deleted file mode 100644 index 846e2129898d4a040c78e3e3253cb78c472c1109..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t11_ch1.csv +++ /dev/null @@ -1,1000 +0,0 @@ --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 --050.00,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/metadata/csv/t11_ch2.csv b/scripts/td_object_renderer/metadata/csv/t11_ch2.csv deleted file mode 100644 index 59fc7ed029686f09586f02595a0d506ee40c5910..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/metadata/csv/t11_ch2.csv +++ /dev/null @@ -1,1000 +0,0 @@ --020.00,+00.00,01.00,000.00,1.00 --019.10,+00.00,01.00,000.00,1.00 --018.20,+00.00,01.00,000.00,1.00 --017.30,+00.00,01.00,000.00,1.00 --016.40,+00.00,01.00,000.00,1.00 --015.50,+00.00,01.00,000.00,1.00 --014.60,+00.00,01.00,000.00,1.00 --013.70,+00.00,01.00,000.00,1.00 --012.80,+00.00,01.00,000.00,1.00 --011.90,+00.00,01.00,000.00,1.00 --011.00,+00.00,01.00,000.00,1.00 --010.10,+00.00,01.00,000.00,1.00 --009.20,+00.00,01.00,000.00,1.00 --008.30,+00.00,01.00,000.00,1.00 --007.40,+00.00,01.00,000.00,1.00 --006.50,+00.00,01.00,000.00,1.00 --005.60,+00.00,01.00,000.00,1.00 --004.70,+00.00,01.00,000.00,1.00 --003.80,+00.00,01.00,000.00,1.00 --002.90,+00.00,01.00,000.00,1.00 --002.00,+00.00,01.00,000.00,1.00 --001.10,+00.00,01.00,000.00,1.00 --000.20,+00.00,01.00,000.00,1.00 -+000.70,+00.00,01.00,000.00,1.00 -+001.60,+00.00,01.00,000.00,1.00 -+002.50,+00.00,01.00,000.00,1.00 -+003.40,+00.00,01.00,000.00,1.00 -+004.30,+00.00,01.00,000.00,1.00 -+005.20,+00.00,01.00,000.00,1.00 -+006.10,+00.00,01.00,000.00,1.00 -+007.00,+00.00,01.00,000.00,1.00 -+007.90,+00.00,01.00,000.00,1.00 -+008.80,+00.00,01.00,000.00,1.00 -+009.70,+00.00,01.00,000.00,1.00 -+010.60,+00.00,01.00,000.00,1.00 -+011.50,+00.00,01.00,000.00,1.00 -+012.40,+00.00,01.00,000.00,1.00 -+013.30,+00.00,01.00,000.00,1.00 -+014.20,+00.00,01.00,000.00,1.00 -+015.10,+00.00,01.00,000.00,1.00 -+016.00,+00.00,01.00,000.00,1.00 -+016.90,+00.00,01.00,000.00,1.00 -+017.80,+00.00,01.00,000.00,1.00 -+018.70,+00.00,01.00,000.00,1.00 -+019.60,+00.00,01.00,000.00,1.00 -+020.50,+00.00,01.00,000.00,1.00 -+021.40,+00.00,01.00,000.00,1.00 -+022.30,+00.00,01.00,000.00,1.00 -+023.20,+00.00,01.00,000.00,1.00 -+024.10,+00.00,01.00,000.00,1.00 -+025.00,+00.00,01.00,000.00,1.00 -+025.90,+00.00,01.00,000.00,1.00 -+026.80,+00.00,01.00,000.00,1.00 -+027.70,+00.00,01.00,000.00,1.00 -+028.60,+00.00,01.00,000.00,1.00 -+029.50,+00.00,01.00,000.00,1.00 -+030.40,+00.00,01.00,000.00,1.00 -+031.30,+00.00,01.00,000.00,1.00 -+032.20,+00.00,01.00,000.00,1.00 -+033.10,+00.00,01.00,000.00,1.00 -+034.00,+00.00,01.00,000.00,1.00 -+034.90,+00.00,01.00,000.00,1.00 -+035.80,+00.00,01.00,000.00,1.00 -+036.70,+00.00,01.00,000.00,1.00 -+037.60,+00.00,01.00,000.00,1.00 -+038.50,+00.00,01.00,000.00,1.00 -+039.40,+00.00,01.00,000.00,1.00 -+040.30,+00.00,01.00,000.00,1.00 -+041.20,+00.00,01.00,000.00,1.00 -+042.10,+00.00,01.00,000.00,1.00 -+043.00,+00.00,01.00,000.00,1.00 -+043.90,+00.00,01.00,000.00,1.00 -+044.80,+00.00,01.00,000.00,1.00 -+045.70,+00.00,01.00,000.00,1.00 -+046.60,+00.00,01.00,000.00,1.00 -+047.50,+00.00,01.00,000.00,1.00 -+048.40,+00.00,01.00,000.00,1.00 -+049.30,+00.00,01.00,000.00,1.00 -+050.20,+00.00,01.00,000.00,1.00 -+051.10,+00.00,01.00,000.00,1.00 -+052.00,+00.00,01.00,000.00,1.00 -+052.90,+00.00,01.00,000.00,1.00 -+053.80,+00.00,01.00,000.00,1.00 -+054.70,+00.00,01.00,000.00,1.00 -+055.60,+00.00,01.00,000.00,1.00 -+056.50,+00.00,01.00,000.00,1.00 -+057.40,+00.00,01.00,000.00,1.00 -+058.30,+00.00,01.00,000.00,1.00 -+059.20,+00.00,01.00,000.00,1.00 -+060.10,+00.00,01.00,000.00,1.00 -+061.00,+00.00,01.00,000.00,1.00 -+061.90,+00.00,01.00,000.00,1.00 -+062.80,+00.00,01.00,000.00,1.00 -+063.70,+00.00,01.00,000.00,1.00 -+064.60,+00.00,01.00,000.00,1.00 -+065.50,+00.00,01.00,000.00,1.00 -+066.40,+00.00,01.00,000.00,1.00 -+067.30,+00.00,01.00,000.00,1.00 -+068.20,+00.00,01.00,000.00,1.00 -+069.10,+00.00,01.00,000.00,1.00 -+070.00,+00.00,01.00,000.00,1.00 -+070.90,+00.00,01.00,000.00,1.00 -+071.80,+00.00,01.00,000.00,1.00 -+072.70,+00.00,01.00,000.00,1.00 -+073.60,+00.00,01.00,000.00,1.00 -+074.50,+00.00,01.00,000.00,1.00 -+075.40,+00.00,01.00,000.00,1.00 -+076.30,+00.00,01.00,000.00,1.00 -+077.20,+00.00,01.00,000.00,1.00 -+078.10,+00.00,01.00,000.00,1.00 -+079.00,+00.00,01.00,000.00,1.00 -+079.90,+00.00,01.00,000.00,1.00 -+080.80,+00.00,01.00,000.00,1.00 -+081.70,+00.00,01.00,000.00,1.00 -+082.60,+00.00,01.00,000.00,1.00 -+083.50,+00.00,01.00,000.00,1.00 -+084.40,+00.00,01.00,000.00,1.00 -+085.30,+00.00,01.00,000.00,1.00 -+086.20,+00.00,01.00,000.00,1.00 -+087.10,+00.00,01.00,000.00,1.00 -+088.00,+00.00,01.00,000.00,1.00 -+088.90,+00.00,01.00,000.00,1.00 -+089.80,+00.00,01.00,000.00,1.00 -+090.70,+00.00,01.00,000.00,1.00 -+091.60,+00.00,01.00,000.00,1.00 -+092.50,+00.00,01.00,000.00,1.00 -+093.40,+00.00,01.00,000.00,1.00 -+094.30,+00.00,01.00,000.00,1.00 -+095.20,+00.00,01.00,000.00,1.00 -+096.10,+00.00,01.00,000.00,1.00 -+097.00,+00.00,01.00,000.00,1.00 -+097.90,+00.00,01.00,000.00,1.00 -+098.80,+00.00,01.00,000.00,1.00 -+099.70,+00.00,01.00,000.00,1.00 -+100.60,+00.00,01.00,000.00,1.00 -+101.50,+00.00,01.00,000.00,1.00 -+102.40,+00.00,01.00,000.00,1.00 -+103.30,+00.00,01.00,000.00,1.00 -+104.20,+00.00,01.00,000.00,1.00 -+105.10,+00.00,01.00,000.00,1.00 -+106.00,+00.00,01.00,000.00,1.00 -+106.90,+00.00,01.00,000.00,1.00 -+107.80,+00.00,01.00,000.00,1.00 -+108.70,+00.00,01.00,000.00,1.00 -+109.60,+00.00,01.00,000.00,1.00 -+110.50,+00.00,01.00,000.00,1.00 -+111.40,+00.00,01.00,000.00,1.00 -+112.30,+00.00,01.00,000.00,1.00 -+113.20,+00.00,01.00,000.00,1.00 -+114.10,+00.00,01.00,000.00,1.00 -+115.00,+00.00,01.00,000.00,1.00 -+115.90,+00.00,01.00,000.00,1.00 -+116.80,+00.00,01.00,000.00,1.00 -+117.70,+00.00,01.00,000.00,1.00 -+118.60,+00.00,01.00,000.00,1.00 -+119.50,+00.00,01.00,000.00,1.00 -+120.40,+00.00,01.00,000.00,1.00 -+121.30,+00.00,01.00,000.00,1.00 -+122.20,+00.00,01.00,000.00,1.00 -+123.10,+00.00,01.00,000.00,1.00 -+124.00,+00.00,01.00,000.00,1.00 -+124.90,+00.00,01.00,000.00,1.00 -+125.80,+00.00,01.00,000.00,1.00 -+126.70,+00.00,01.00,000.00,1.00 -+127.60,+00.00,01.00,000.00,1.00 -+128.50,+00.00,01.00,000.00,1.00 -+129.40,+00.00,01.00,000.00,1.00 -+130.30,+00.00,01.00,000.00,1.00 -+131.20,+00.00,01.00,000.00,1.00 -+132.10,+00.00,01.00,000.00,1.00 -+133.00,+00.00,01.00,000.00,1.00 -+133.90,+00.00,01.00,000.00,1.00 -+134.80,+00.00,01.00,000.00,1.00 -+135.70,+00.00,01.00,000.00,1.00 -+136.60,+00.00,01.00,000.00,1.00 -+137.50,+00.00,01.00,000.00,1.00 -+138.40,+00.00,01.00,000.00,1.00 -+139.30,+00.00,01.00,000.00,1.00 -+140.20,+00.00,01.00,000.00,1.00 -+141.10,+00.00,01.00,000.00,1.00 -+142.00,+00.00,01.00,000.00,1.00 -+142.90,+00.00,01.00,000.00,1.00 -+143.80,+00.00,01.00,000.00,1.00 -+144.70,+00.00,01.00,000.00,1.00 -+145.60,+00.00,01.00,000.00,1.00 -+146.50,+00.00,01.00,000.00,1.00 -+147.40,+00.00,01.00,000.00,1.00 -+148.30,+00.00,01.00,000.00,1.00 -+149.20,+00.00,01.00,000.00,1.00 -+150.10,+00.00,01.00,000.00,1.00 -+151.00,+00.00,01.00,000.00,1.00 -+151.90,+00.00,01.00,000.00,1.00 -+152.80,+00.00,01.00,000.00,1.00 -+153.70,+00.00,01.00,000.00,1.00 -+154.60,+00.00,01.00,000.00,1.00 -+155.50,+00.00,01.00,000.00,1.00 -+156.40,+00.00,01.00,000.00,1.00 -+157.30,+00.00,01.00,000.00,1.00 -+158.20,+00.00,01.00,000.00,1.00 -+159.10,+00.00,01.00,000.00,1.00 -+160.00,+00.00,01.00,000.00,1.00 -+160.90,+00.00,01.00,000.00,1.00 -+161.80,+00.00,01.00,000.00,1.00 -+162.70,+00.00,01.00,000.00,1.00 -+163.60,+00.00,01.00,000.00,1.00 -+164.50,+00.00,01.00,000.00,1.00 -+165.40,+00.00,01.00,000.00,1.00 -+166.30,+00.00,01.00,000.00,1.00 -+167.20,+00.00,01.00,000.00,1.00 -+168.10,+00.00,01.00,000.00,1.00 -+169.00,+00.00,01.00,000.00,1.00 -+169.90,+00.00,01.00,000.00,1.00 -+170.80,+00.00,01.00,000.00,1.00 -+171.70,+00.00,01.00,000.00,1.00 -+172.60,+00.00,01.00,000.00,1.00 -+173.50,+00.00,01.00,000.00,1.00 -+174.40,+00.00,01.00,000.00,1.00 -+175.30,+00.00,01.00,000.00,1.00 -+176.20,+00.00,01.00,000.00,1.00 -+177.10,+00.00,01.00,000.00,1.00 -+178.00,+00.00,01.00,000.00,1.00 -+178.90,+00.00,01.00,000.00,1.00 -+179.80,+00.00,01.00,000.00,1.00 --179.30,+00.00,01.00,000.00,1.00 --178.40,+00.00,01.00,000.00,1.00 --177.50,+00.00,01.00,000.00,1.00 --176.60,+00.00,01.00,000.00,1.00 --175.70,+00.00,01.00,000.00,1.00 --174.80,+00.00,01.00,000.00,1.00 --173.90,+00.00,01.00,000.00,1.00 --173.00,+00.00,01.00,000.00,1.00 --172.10,+00.00,01.00,000.00,1.00 --171.20,+00.00,01.00,000.00,1.00 --170.30,+00.00,01.00,000.00,1.00 --169.40,+00.00,01.00,000.00,1.00 --168.50,+00.00,01.00,000.00,1.00 --167.60,+00.00,01.00,000.00,1.00 --166.70,+00.00,01.00,000.00,1.00 --165.80,+00.00,01.00,000.00,1.00 --164.90,+00.00,01.00,000.00,1.00 --164.00,+00.00,01.00,000.00,1.00 --163.10,+00.00,01.00,000.00,1.00 --162.20,+00.00,01.00,000.00,1.00 --161.30,+00.00,01.00,000.00,1.00 --160.40,+00.00,01.00,000.00,1.00 --159.50,+00.00,01.00,000.00,1.00 --158.60,+00.00,01.00,000.00,1.00 --157.70,+00.00,01.00,000.00,1.00 --156.80,+00.00,01.00,000.00,1.00 --155.90,+00.00,01.00,000.00,1.00 --155.00,+00.00,01.00,000.00,1.00 --154.10,+00.00,01.00,000.00,1.00 --153.20,+00.00,01.00,000.00,1.00 --152.30,+00.00,01.00,000.00,1.00 --151.40,+00.00,01.00,000.00,1.00 --150.50,+00.00,01.00,000.00,1.00 --149.60,+00.00,01.00,000.00,1.00 --148.70,+00.00,01.00,000.00,1.00 --147.80,+00.00,01.00,000.00,1.00 --146.90,+00.00,01.00,000.00,1.00 --146.00,+00.00,01.00,000.00,1.00 --145.10,+00.00,01.00,000.00,1.00 --144.20,+00.00,01.00,000.00,1.00 --143.30,+00.00,01.00,000.00,1.00 --142.40,+00.00,01.00,000.00,1.00 --141.50,+00.00,01.00,000.00,1.00 --140.60,+00.00,01.00,000.00,1.00 --139.70,+00.00,01.00,000.00,1.00 --138.80,+00.00,01.00,000.00,1.00 --137.90,+00.00,01.00,000.00,1.00 --137.00,+00.00,01.00,000.00,1.00 --136.10,+00.00,01.00,000.00,1.00 --135.20,+00.00,01.00,000.00,1.00 --134.30,+00.00,01.00,000.00,1.00 --133.40,+00.00,01.00,000.00,1.00 --132.50,+00.00,01.00,000.00,1.00 --131.60,+00.00,01.00,000.00,1.00 --130.70,+00.00,01.00,000.00,1.00 --129.80,+00.00,01.00,000.00,1.00 --128.90,+00.00,01.00,000.00,1.00 --128.00,+00.00,01.00,000.00,1.00 --127.10,+00.00,01.00,000.00,1.00 --126.20,+00.00,01.00,000.00,1.00 --125.30,+00.00,01.00,000.00,1.00 --124.40,+00.00,01.00,000.00,1.00 --123.50,+00.00,01.00,000.00,1.00 --122.60,+00.00,01.00,000.00,1.00 --121.70,+00.00,01.00,000.00,1.00 --120.80,+00.00,01.00,000.00,1.00 --119.90,+00.00,01.00,000.00,1.00 --119.00,+00.00,01.00,000.00,1.00 --118.10,+00.00,01.00,000.00,1.00 --117.20,+00.00,01.00,000.00,1.00 --116.30,+00.00,01.00,000.00,1.00 --115.40,+00.00,01.00,000.00,1.00 --114.50,+00.00,01.00,000.00,1.00 --113.60,+00.00,01.00,000.00,1.00 --112.70,+00.00,01.00,000.00,1.00 --111.80,+00.00,01.00,000.00,1.00 --110.90,+00.00,01.00,000.00,1.00 --110.00,+00.00,01.00,000.00,1.00 --109.10,+00.00,01.00,000.00,1.00 --108.20,+00.00,01.00,000.00,1.00 --107.30,+00.00,01.00,000.00,1.00 --106.40,+00.00,01.00,000.00,1.00 --105.50,+00.00,01.00,000.00,1.00 --104.60,+00.00,01.00,000.00,1.00 --103.70,+00.00,01.00,000.00,1.00 --102.80,+00.00,01.00,000.00,1.00 --101.90,+00.00,01.00,000.00,1.00 --101.00,+00.00,01.00,000.00,1.00 --100.10,+00.00,01.00,000.00,1.00 --099.20,+00.00,01.00,000.00,1.00 --098.30,+00.00,01.00,000.00,1.00 --097.40,+00.00,01.00,000.00,1.00 --096.50,+00.00,01.00,000.00,1.00 --095.60,+00.00,01.00,000.00,1.00 --094.70,+00.00,01.00,000.00,1.00 --093.80,+00.00,01.00,000.00,1.00 --092.90,+00.00,01.00,000.00,1.00 --092.00,+00.00,01.00,000.00,1.00 --091.10,+00.00,01.00,000.00,1.00 --090.20,+00.00,01.00,000.00,1.00 --089.30,+00.00,01.00,000.00,1.00 --088.40,+00.00,01.00,000.00,1.00 --087.50,+00.00,01.00,000.00,1.00 --086.60,+00.00,01.00,000.00,1.00 --085.70,+00.00,01.00,000.00,1.00 --084.80,+00.00,01.00,000.00,1.00 --083.90,+00.00,01.00,000.00,1.00 --083.00,+00.00,01.00,000.00,1.00 --082.10,+00.00,01.00,000.00,1.00 --081.20,+00.00,01.00,000.00,1.00 --080.30,+00.00,01.00,000.00,1.00 --079.40,+00.00,01.00,000.00,1.00 --078.50,+00.00,01.00,000.00,1.00 --077.60,+00.00,01.00,000.00,1.00 --076.70,+00.00,01.00,000.00,1.00 --075.80,+00.00,01.00,000.00,1.00 --074.90,+00.00,01.00,000.00,1.00 --074.00,+00.00,01.00,000.00,1.00 --073.10,+00.00,01.00,000.00,1.00 --072.20,+00.00,01.00,000.00,1.00 --071.30,+00.00,01.00,000.00,1.00 --070.40,+00.00,01.00,000.00,1.00 --069.50,+00.00,01.00,000.00,1.00 --068.60,+00.00,01.00,000.00,1.00 --067.70,+00.00,01.00,000.00,1.00 --066.80,+00.00,01.00,000.00,1.00 --065.90,+00.00,01.00,000.00,1.00 --065.00,+00.00,01.00,000.00,1.00 --064.10,+00.00,01.00,000.00,1.00 --063.20,+00.00,01.00,000.00,1.00 --062.30,+00.00,01.00,000.00,1.00 --061.40,+00.00,01.00,000.00,1.00 --060.50,+00.00,01.00,000.00,1.00 --059.60,+00.00,01.00,000.00,1.00 --058.70,+00.00,01.00,000.00,1.00 --057.80,+00.00,01.00,000.00,1.00 --056.90,+00.00,01.00,000.00,1.00 --056.00,+00.00,01.00,000.00,1.00 --055.10,+00.00,01.00,000.00,1.00 --054.20,+00.00,01.00,000.00,1.00 --053.30,+00.00,01.00,000.00,1.00 --052.40,+00.00,01.00,000.00,1.00 --051.50,+00.00,01.00,000.00,1.00 --050.60,+00.00,01.00,000.00,1.00 --049.70,+00.00,01.00,000.00,1.00 --048.80,+00.00,01.00,000.00,1.00 --047.90,+00.00,01.00,000.00,1.00 --047.00,+00.00,01.00,000.00,1.00 --046.10,+00.00,01.00,000.00,1.00 --045.20,+00.00,01.00,000.00,1.00 --044.30,+00.00,01.00,000.00,1.00 --043.40,+00.00,01.00,000.00,1.00 --042.50,+00.00,01.00,000.00,1.00 --041.60,+00.00,01.00,000.00,1.00 --040.70,+00.00,01.00,000.00,1.00 --039.80,+00.00,01.00,000.00,1.00 --038.90,+00.00,01.00,000.00,1.00 --038.00,+00.00,01.00,000.00,1.00 --037.10,+00.00,01.00,000.00,1.00 --036.20,+00.00,01.00,000.00,1.00 --035.30,+00.00,01.00,000.00,1.00 --034.40,+00.00,01.00,000.00,1.00 --033.50,+00.00,01.00,000.00,1.00 --032.60,+00.00,01.00,000.00,1.00 --031.70,+00.00,01.00,000.00,1.00 --030.80,+00.00,01.00,000.00,1.00 --029.90,+00.00,01.00,000.00,1.00 --029.00,+00.00,01.00,000.00,1.00 --028.10,+00.00,01.00,000.00,1.00 --027.20,+00.00,01.00,000.00,1.00 --026.30,+00.00,01.00,000.00,1.00 --025.40,+00.00,01.00,000.00,1.00 --024.50,+00.00,01.00,000.00,1.00 --023.60,+00.00,01.00,000.00,1.00 --022.70,+00.00,01.00,000.00,1.00 --021.80,+00.00,01.00,000.00,1.00 --020.90,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --019.10,+00.00,01.00,000.00,1.00 --018.20,+00.00,01.00,000.00,1.00 --017.30,+00.00,01.00,000.00,1.00 --016.40,+00.00,01.00,000.00,1.00 --015.50,+00.00,01.00,000.00,1.00 --014.60,+00.00,01.00,000.00,1.00 --013.70,+00.00,01.00,000.00,1.00 --012.80,+00.00,01.00,000.00,1.00 --011.90,+00.00,01.00,000.00,1.00 --011.00,+00.00,01.00,000.00,1.00 --010.10,+00.00,01.00,000.00,1.00 --009.20,+00.00,01.00,000.00,1.00 --008.30,+00.00,01.00,000.00,1.00 --007.40,+00.00,01.00,000.00,1.00 --006.50,+00.00,01.00,000.00,1.00 --005.60,+00.00,01.00,000.00,1.00 --004.70,+00.00,01.00,000.00,1.00 --003.80,+00.00,01.00,000.00,1.00 --002.90,+00.00,01.00,000.00,1.00 --002.00,+00.00,01.00,000.00,1.00 --001.10,+00.00,01.00,000.00,1.00 --000.20,+00.00,01.00,000.00,1.00 -+000.70,+00.00,01.00,000.00,1.00 -+001.60,+00.00,01.00,000.00,1.00 -+002.50,+00.00,01.00,000.00,1.00 -+003.40,+00.00,01.00,000.00,1.00 -+004.30,+00.00,01.00,000.00,1.00 -+005.20,+00.00,01.00,000.00,1.00 -+006.10,+00.00,01.00,000.00,1.00 -+007.00,+00.00,01.00,000.00,1.00 -+007.90,+00.00,01.00,000.00,1.00 -+008.80,+00.00,01.00,000.00,1.00 -+009.70,+00.00,01.00,000.00,1.00 -+010.60,+00.00,01.00,000.00,1.00 -+011.50,+00.00,01.00,000.00,1.00 -+012.40,+00.00,01.00,000.00,1.00 -+013.30,+00.00,01.00,000.00,1.00 -+014.20,+00.00,01.00,000.00,1.00 -+015.10,+00.00,01.00,000.00,1.00 -+016.00,+00.00,01.00,000.00,1.00 -+016.90,+00.00,01.00,000.00,1.00 -+017.80,+00.00,01.00,000.00,1.00 -+018.70,+00.00,01.00,000.00,1.00 -+019.60,+00.00,01.00,000.00,1.00 -+020.50,+00.00,01.00,000.00,1.00 -+021.40,+00.00,01.00,000.00,1.00 -+022.30,+00.00,01.00,000.00,1.00 -+023.20,+00.00,01.00,000.00,1.00 -+024.10,+00.00,01.00,000.00,1.00 -+025.00,+00.00,01.00,000.00,1.00 -+025.90,+00.00,01.00,000.00,1.00 -+026.80,+00.00,01.00,000.00,1.00 -+027.70,+00.00,01.00,000.00,1.00 -+028.60,+00.00,01.00,000.00,1.00 -+029.50,+00.00,01.00,000.00,1.00 -+030.40,+00.00,01.00,000.00,1.00 -+031.30,+00.00,01.00,000.00,1.00 -+032.20,+00.00,01.00,000.00,1.00 -+033.10,+00.00,01.00,000.00,1.00 -+034.00,+00.00,01.00,000.00,1.00 -+034.90,+00.00,01.00,000.00,1.00 -+035.80,+00.00,01.00,000.00,1.00 -+036.70,+00.00,01.00,000.00,1.00 -+037.60,+00.00,01.00,000.00,1.00 -+038.50,+00.00,01.00,000.00,1.00 -+039.40,+00.00,01.00,000.00,1.00 -+040.30,+00.00,01.00,000.00,1.00 -+041.20,+00.00,01.00,000.00,1.00 -+042.10,+00.00,01.00,000.00,1.00 -+043.00,+00.00,01.00,000.00,1.00 -+043.90,+00.00,01.00,000.00,1.00 -+044.80,+00.00,01.00,000.00,1.00 -+045.70,+00.00,01.00,000.00,1.00 -+046.60,+00.00,01.00,000.00,1.00 -+047.50,+00.00,01.00,000.00,1.00 -+048.40,+00.00,01.00,000.00,1.00 -+049.30,+00.00,01.00,000.00,1.00 -+050.20,+00.00,01.00,000.00,1.00 -+051.10,+00.00,01.00,000.00,1.00 -+052.00,+00.00,01.00,000.00,1.00 -+052.90,+00.00,01.00,000.00,1.00 -+053.80,+00.00,01.00,000.00,1.00 -+054.70,+00.00,01.00,000.00,1.00 -+055.60,+00.00,01.00,000.00,1.00 -+056.50,+00.00,01.00,000.00,1.00 -+057.40,+00.00,01.00,000.00,1.00 -+058.30,+00.00,01.00,000.00,1.00 -+059.20,+00.00,01.00,000.00,1.00 -+060.10,+00.00,01.00,000.00,1.00 -+061.00,+00.00,01.00,000.00,1.00 -+061.90,+00.00,01.00,000.00,1.00 -+062.80,+00.00,01.00,000.00,1.00 -+063.70,+00.00,01.00,000.00,1.00 -+064.60,+00.00,01.00,000.00,1.00 -+065.50,+00.00,01.00,000.00,1.00 -+066.40,+00.00,01.00,000.00,1.00 -+067.30,+00.00,01.00,000.00,1.00 -+068.20,+00.00,01.00,000.00,1.00 -+069.10,+00.00,01.00,000.00,1.00 -+070.00,+00.00,01.00,000.00,1.00 -+070.90,+00.00,01.00,000.00,1.00 -+071.80,+00.00,01.00,000.00,1.00 -+072.70,+00.00,01.00,000.00,1.00 -+073.60,+00.00,01.00,000.00,1.00 -+074.50,+00.00,01.00,000.00,1.00 -+075.40,+00.00,01.00,000.00,1.00 -+076.30,+00.00,01.00,000.00,1.00 -+077.20,+00.00,01.00,000.00,1.00 -+078.10,+00.00,01.00,000.00,1.00 -+079.00,+00.00,01.00,000.00,1.00 -+079.90,+00.00,01.00,000.00,1.00 -+080.80,+00.00,01.00,000.00,1.00 -+081.70,+00.00,01.00,000.00,1.00 -+082.60,+00.00,01.00,000.00,1.00 -+083.50,+00.00,01.00,000.00,1.00 -+084.40,+00.00,01.00,000.00,1.00 -+085.30,+00.00,01.00,000.00,1.00 -+086.20,+00.00,01.00,000.00,1.00 -+087.10,+00.00,01.00,000.00,1.00 -+088.00,+00.00,01.00,000.00,1.00 -+088.90,+00.00,01.00,000.00,1.00 -+089.80,+00.00,01.00,000.00,1.00 -+090.70,+00.00,01.00,000.00,1.00 -+091.60,+00.00,01.00,000.00,1.00 -+092.50,+00.00,01.00,000.00,1.00 -+093.40,+00.00,01.00,000.00,1.00 -+094.30,+00.00,01.00,000.00,1.00 -+095.20,+00.00,01.00,000.00,1.00 -+096.10,+00.00,01.00,000.00,1.00 -+097.00,+00.00,01.00,000.00,1.00 -+097.90,+00.00,01.00,000.00,1.00 -+098.80,+00.00,01.00,000.00,1.00 -+099.70,+00.00,01.00,000.00,1.00 -+100.60,+00.00,01.00,000.00,1.00 -+101.50,+00.00,01.00,000.00,1.00 -+102.40,+00.00,01.00,000.00,1.00 -+103.30,+00.00,01.00,000.00,1.00 -+104.20,+00.00,01.00,000.00,1.00 -+105.10,+00.00,01.00,000.00,1.00 -+106.00,+00.00,01.00,000.00,1.00 -+106.90,+00.00,01.00,000.00,1.00 -+107.80,+00.00,01.00,000.00,1.00 -+108.70,+00.00,01.00,000.00,1.00 -+109.60,+00.00,01.00,000.00,1.00 -+110.50,+00.00,01.00,000.00,1.00 -+111.40,+00.00,01.00,000.00,1.00 -+112.30,+00.00,01.00,000.00,1.00 -+113.20,+00.00,01.00,000.00,1.00 -+114.10,+00.00,01.00,000.00,1.00 -+115.00,+00.00,01.00,000.00,1.00 -+115.90,+00.00,01.00,000.00,1.00 -+116.80,+00.00,01.00,000.00,1.00 -+117.70,+00.00,01.00,000.00,1.00 -+118.60,+00.00,01.00,000.00,1.00 -+119.50,+00.00,01.00,000.00,1.00 -+120.40,+00.00,01.00,000.00,1.00 -+121.30,+00.00,01.00,000.00,1.00 -+122.20,+00.00,01.00,000.00,1.00 -+123.10,+00.00,01.00,000.00,1.00 -+124.00,+00.00,01.00,000.00,1.00 -+124.90,+00.00,01.00,000.00,1.00 -+125.80,+00.00,01.00,000.00,1.00 -+126.70,+00.00,01.00,000.00,1.00 -+127.60,+00.00,01.00,000.00,1.00 -+128.50,+00.00,01.00,000.00,1.00 -+129.40,+00.00,01.00,000.00,1.00 -+130.30,+00.00,01.00,000.00,1.00 -+131.20,+00.00,01.00,000.00,1.00 -+132.10,+00.00,01.00,000.00,1.00 -+133.00,+00.00,01.00,000.00,1.00 -+133.90,+00.00,01.00,000.00,1.00 -+134.80,+00.00,01.00,000.00,1.00 -+135.70,+00.00,01.00,000.00,1.00 -+136.60,+00.00,01.00,000.00,1.00 -+137.50,+00.00,01.00,000.00,1.00 -+138.40,+00.00,01.00,000.00,1.00 -+139.30,+00.00,01.00,000.00,1.00 -+140.20,+00.00,01.00,000.00,1.00 -+141.10,+00.00,01.00,000.00,1.00 -+142.00,+00.00,01.00,000.00,1.00 -+142.90,+00.00,01.00,000.00,1.00 -+143.80,+00.00,01.00,000.00,1.00 -+144.70,+00.00,01.00,000.00,1.00 -+145.60,+00.00,01.00,000.00,1.00 -+146.50,+00.00,01.00,000.00,1.00 -+147.40,+00.00,01.00,000.00,1.00 -+148.30,+00.00,01.00,000.00,1.00 -+149.20,+00.00,01.00,000.00,1.00 -+150.10,+00.00,01.00,000.00,1.00 -+151.00,+00.00,01.00,000.00,1.00 -+151.90,+00.00,01.00,000.00,1.00 -+152.80,+00.00,01.00,000.00,1.00 -+153.70,+00.00,01.00,000.00,1.00 -+154.60,+00.00,01.00,000.00,1.00 -+155.50,+00.00,01.00,000.00,1.00 -+156.40,+00.00,01.00,000.00,1.00 -+157.30,+00.00,01.00,000.00,1.00 -+158.20,+00.00,01.00,000.00,1.00 -+159.10,+00.00,01.00,000.00,1.00 -+160.00,+00.00,01.00,000.00,1.00 -+160.90,+00.00,01.00,000.00,1.00 -+161.80,+00.00,01.00,000.00,1.00 -+162.70,+00.00,01.00,000.00,1.00 -+163.60,+00.00,01.00,000.00,1.00 -+164.50,+00.00,01.00,000.00,1.00 -+165.40,+00.00,01.00,000.00,1.00 -+166.30,+00.00,01.00,000.00,1.00 -+167.20,+00.00,01.00,000.00,1.00 -+168.10,+00.00,01.00,000.00,1.00 -+169.00,+00.00,01.00,000.00,1.00 -+169.90,+00.00,01.00,000.00,1.00 -+170.80,+00.00,01.00,000.00,1.00 -+171.70,+00.00,01.00,000.00,1.00 -+172.60,+00.00,01.00,000.00,1.00 -+173.50,+00.00,01.00,000.00,1.00 -+174.40,+00.00,01.00,000.00,1.00 -+175.30,+00.00,01.00,000.00,1.00 -+176.20,+00.00,01.00,000.00,1.00 -+177.10,+00.00,01.00,000.00,1.00 -+178.00,+00.00,01.00,000.00,1.00 -+178.90,+00.00,01.00,000.00,1.00 -+179.80,+00.00,01.00,000.00,1.00 --179.30,+00.00,01.00,000.00,1.00 --178.40,+00.00,01.00,000.00,1.00 --177.50,+00.00,01.00,000.00,1.00 --176.60,+00.00,01.00,000.00,1.00 --175.70,+00.00,01.00,000.00,1.00 --174.80,+00.00,01.00,000.00,1.00 --173.90,+00.00,01.00,000.00,1.00 --173.00,+00.00,01.00,000.00,1.00 --172.10,+00.00,01.00,000.00,1.00 --171.20,+00.00,01.00,000.00,1.00 --170.30,+00.00,01.00,000.00,1.00 --169.40,+00.00,01.00,000.00,1.00 --168.50,+00.00,01.00,000.00,1.00 --167.60,+00.00,01.00,000.00,1.00 --166.70,+00.00,01.00,000.00,1.00 --165.80,+00.00,01.00,000.00,1.00 --164.90,+00.00,01.00,000.00,1.00 --164.00,+00.00,01.00,000.00,1.00 --163.10,+00.00,01.00,000.00,1.00 --162.20,+00.00,01.00,000.00,1.00 --161.30,+00.00,01.00,000.00,1.00 --160.40,+00.00,01.00,000.00,1.00 --159.50,+00.00,01.00,000.00,1.00 --158.60,+00.00,01.00,000.00,1.00 --157.70,+00.00,01.00,000.00,1.00 --156.80,+00.00,01.00,000.00,1.00 --155.90,+00.00,01.00,000.00,1.00 --155.00,+00.00,01.00,000.00,1.00 --154.10,+00.00,01.00,000.00,1.00 --153.20,+00.00,01.00,000.00,1.00 --152.30,+00.00,01.00,000.00,1.00 --151.40,+00.00,01.00,000.00,1.00 --150.50,+00.00,01.00,000.00,1.00 --149.60,+00.00,01.00,000.00,1.00 --148.70,+00.00,01.00,000.00,1.00 --147.80,+00.00,01.00,000.00,1.00 --146.90,+00.00,01.00,000.00,1.00 --146.00,+00.00,01.00,000.00,1.00 --145.10,+00.00,01.00,000.00,1.00 --144.20,+00.00,01.00,000.00,1.00 --143.30,+00.00,01.00,000.00,1.00 --142.40,+00.00,01.00,000.00,1.00 --141.50,+00.00,01.00,000.00,1.00 --140.60,+00.00,01.00,000.00,1.00 --139.70,+00.00,01.00,000.00,1.00 --138.80,+00.00,01.00,000.00,1.00 --137.90,+00.00,01.00,000.00,1.00 --137.00,+00.00,01.00,000.00,1.00 --136.10,+00.00,01.00,000.00,1.00 --135.20,+00.00,01.00,000.00,1.00 --134.30,+00.00,01.00,000.00,1.00 --133.40,+00.00,01.00,000.00,1.00 --132.50,+00.00,01.00,000.00,1.00 --131.60,+00.00,01.00,000.00,1.00 --130.70,+00.00,01.00,000.00,1.00 --129.80,+00.00,01.00,000.00,1.00 --128.90,+00.00,01.00,000.00,1.00 --128.00,+00.00,01.00,000.00,1.00 --127.10,+00.00,01.00,000.00,1.00 --126.20,+00.00,01.00,000.00,1.00 --125.30,+00.00,01.00,000.00,1.00 --124.40,+00.00,01.00,000.00,1.00 --123.50,+00.00,01.00,000.00,1.00 --122.60,+00.00,01.00,000.00,1.00 --121.70,+00.00,01.00,000.00,1.00 --120.80,+00.00,01.00,000.00,1.00 --119.90,+00.00,01.00,000.00,1.00 --119.00,+00.00,01.00,000.00,1.00 --118.10,+00.00,01.00,000.00,1.00 --117.20,+00.00,01.00,000.00,1.00 --116.30,+00.00,01.00,000.00,1.00 --115.40,+00.00,01.00,000.00,1.00 --114.50,+00.00,01.00,000.00,1.00 --113.60,+00.00,01.00,000.00,1.00 --112.70,+00.00,01.00,000.00,1.00 --111.80,+00.00,01.00,000.00,1.00 --110.90,+00.00,01.00,000.00,1.00 --110.00,+00.00,01.00,000.00,1.00 --109.10,+00.00,01.00,000.00,1.00 --108.20,+00.00,01.00,000.00,1.00 --107.30,+00.00,01.00,000.00,1.00 --106.40,+00.00,01.00,000.00,1.00 --105.50,+00.00,01.00,000.00,1.00 --104.60,+00.00,01.00,000.00,1.00 --103.70,+00.00,01.00,000.00,1.00 --102.80,+00.00,01.00,000.00,1.00 --101.90,+00.00,01.00,000.00,1.00 --101.00,+00.00,01.00,000.00,1.00 --100.10,+00.00,01.00,000.00,1.00 --099.20,+00.00,01.00,000.00,1.00 --098.30,+00.00,01.00,000.00,1.00 --097.40,+00.00,01.00,000.00,1.00 --096.50,+00.00,01.00,000.00,1.00 --095.60,+00.00,01.00,000.00,1.00 --094.70,+00.00,01.00,000.00,1.00 --093.80,+00.00,01.00,000.00,1.00 --092.90,+00.00,01.00,000.00,1.00 --092.00,+00.00,01.00,000.00,1.00 --091.10,+00.00,01.00,000.00,1.00 --090.20,+00.00,01.00,000.00,1.00 --089.30,+00.00,01.00,000.00,1.00 --088.40,+00.00,01.00,000.00,1.00 --087.50,+00.00,01.00,000.00,1.00 --086.60,+00.00,01.00,000.00,1.00 --085.70,+00.00,01.00,000.00,1.00 --084.80,+00.00,01.00,000.00,1.00 --083.90,+00.00,01.00,000.00,1.00 --083.00,+00.00,01.00,000.00,1.00 --082.10,+00.00,01.00,000.00,1.00 --081.20,+00.00,01.00,000.00,1.00 --080.30,+00.00,01.00,000.00,1.00 --079.40,+00.00,01.00,000.00,1.00 --078.50,+00.00,01.00,000.00,1.00 --077.60,+00.00,01.00,000.00,1.00 --076.70,+00.00,01.00,000.00,1.00 --075.80,+00.00,01.00,000.00,1.00 --074.90,+00.00,01.00,000.00,1.00 --074.00,+00.00,01.00,000.00,1.00 --073.10,+00.00,01.00,000.00,1.00 --072.20,+00.00,01.00,000.00,1.00 --071.30,+00.00,01.00,000.00,1.00 --070.40,+00.00,01.00,000.00,1.00 --069.50,+00.00,01.00,000.00,1.00 --068.60,+00.00,01.00,000.00,1.00 --067.70,+00.00,01.00,000.00,1.00 --066.80,+00.00,01.00,000.00,1.00 --065.90,+00.00,01.00,000.00,1.00 --065.00,+00.00,01.00,000.00,1.00 --064.10,+00.00,01.00,000.00,1.00 --063.20,+00.00,01.00,000.00,1.00 --062.30,+00.00,01.00,000.00,1.00 --061.40,+00.00,01.00,000.00,1.00 --060.50,+00.00,01.00,000.00,1.00 --059.60,+00.00,01.00,000.00,1.00 --058.70,+00.00,01.00,000.00,1.00 --057.80,+00.00,01.00,000.00,1.00 --056.90,+00.00,01.00,000.00,1.00 --056.00,+00.00,01.00,000.00,1.00 --055.10,+00.00,01.00,000.00,1.00 --054.20,+00.00,01.00,000.00,1.00 --053.30,+00.00,01.00,000.00,1.00 --052.40,+00.00,01.00,000.00,1.00 --051.50,+00.00,01.00,000.00,1.00 --050.60,+00.00,01.00,000.00,1.00 --049.70,+00.00,01.00,000.00,1.00 --048.80,+00.00,01.00,000.00,1.00 --047.90,+00.00,01.00,000.00,1.00 --047.00,+00.00,01.00,000.00,1.00 --046.10,+00.00,01.00,000.00,1.00 --045.20,+00.00,01.00,000.00,1.00 --044.30,+00.00,01.00,000.00,1.00 --043.40,+00.00,01.00,000.00,1.00 --042.50,+00.00,01.00,000.00,1.00 --041.60,+00.00,01.00,000.00,1.00 --040.70,+00.00,01.00,000.00,1.00 --039.80,+00.00,01.00,000.00,1.00 --038.90,+00.00,01.00,000.00,1.00 --038.00,+00.00,01.00,000.00,1.00 --037.10,+00.00,01.00,000.00,1.00 --036.20,+00.00,01.00,000.00,1.00 --035.30,+00.00,01.00,000.00,1.00 --034.40,+00.00,01.00,000.00,1.00 --033.50,+00.00,01.00,000.00,1.00 --032.60,+00.00,01.00,000.00,1.00 --031.70,+00.00,01.00,000.00,1.00 --030.80,+00.00,01.00,000.00,1.00 --029.90,+00.00,01.00,000.00,1.00 --029.00,+00.00,01.00,000.00,1.00 --028.10,+00.00,01.00,000.00,1.00 --027.20,+00.00,01.00,000.00,1.00 --026.30,+00.00,01.00,000.00,1.00 --025.40,+00.00,01.00,000.00,1.00 --024.50,+00.00,01.00,000.00,1.00 --023.60,+00.00,01.00,000.00,1.00 --022.70,+00.00,01.00,000.00,1.00 --021.80,+00.00,01.00,000.00,1.00 --020.90,+00.00,01.00,000.00,1.00 --020.00,+00.00,01.00,000.00,1.00 --019.10,+00.00,01.00,000.00,1.00 --018.20,+00.00,01.00,000.00,1.00 --017.30,+00.00,01.00,000.00,1.00 --016.40,+00.00,01.00,000.00,1.00 --015.50,+00.00,01.00,000.00,1.00 --014.60,+00.00,01.00,000.00,1.00 --013.70,+00.00,01.00,000.00,1.00 --012.80,+00.00,01.00,000.00,1.00 --011.90,+00.00,01.00,000.00,1.00 --011.00,+00.00,01.00,000.00,1.00 --010.10,+00.00,01.00,000.00,1.00 --009.20,+00.00,01.00,000.00,1.00 --008.30,+00.00,01.00,000.00,1.00 --007.40,+00.00,01.00,000.00,1.00 --006.50,+00.00,01.00,000.00,1.00 --005.60,+00.00,01.00,000.00,1.00 --004.70,+00.00,01.00,000.00,1.00 --003.80,+00.00,01.00,000.00,1.00 --002.90,+00.00,01.00,000.00,1.00 --002.00,+00.00,01.00,000.00,1.00 --001.10,+00.00,01.00,000.00,1.00 --000.20,+00.00,01.00,000.00,1.00 -+000.70,+00.00,01.00,000.00,1.00 -+001.60,+00.00,01.00,000.00,1.00 -+002.50,+00.00,01.00,000.00,1.00 -+003.40,+00.00,01.00,000.00,1.00 -+004.30,+00.00,01.00,000.00,1.00 -+005.20,+00.00,01.00,000.00,1.00 -+006.10,+00.00,01.00,000.00,1.00 -+007.00,+00.00,01.00,000.00,1.00 -+007.90,+00.00,01.00,000.00,1.00 -+008.80,+00.00,01.00,000.00,1.00 -+009.70,+00.00,01.00,000.00,1.00 -+010.60,+00.00,01.00,000.00,1.00 -+011.50,+00.00,01.00,000.00,1.00 -+012.40,+00.00,01.00,000.00,1.00 -+013.30,+00.00,01.00,000.00,1.00 -+014.20,+00.00,01.00,000.00,1.00 -+015.10,+00.00,01.00,000.00,1.00 -+016.00,+00.00,01.00,000.00,1.00 -+016.90,+00.00,01.00,000.00,1.00 -+017.80,+00.00,01.00,000.00,1.00 -+018.70,+00.00,01.00,000.00,1.00 -+019.60,+00.00,01.00,000.00,1.00 -+020.50,+00.00,01.00,000.00,1.00 -+021.40,+00.00,01.00,000.00,1.00 -+022.30,+00.00,01.00,000.00,1.00 -+023.20,+00.00,01.00,000.00,1.00 -+024.10,+00.00,01.00,000.00,1.00 -+025.00,+00.00,01.00,000.00,1.00 -+025.90,+00.00,01.00,000.00,1.00 -+026.80,+00.00,01.00,000.00,1.00 -+027.70,+00.00,01.00,000.00,1.00 -+028.60,+00.00,01.00,000.00,1.00 -+029.50,+00.00,01.00,000.00,1.00 -+030.40,+00.00,01.00,000.00,1.00 -+031.30,+00.00,01.00,000.00,1.00 -+032.20,+00.00,01.00,000.00,1.00 -+033.10,+00.00,01.00,000.00,1.00 -+034.00,+00.00,01.00,000.00,1.00 -+034.90,+00.00,01.00,000.00,1.00 -+035.80,+00.00,01.00,000.00,1.00 -+036.70,+00.00,01.00,000.00,1.00 -+037.60,+00.00,01.00,000.00,1.00 -+038.50,+00.00,01.00,000.00,1.00 -+039.40,+00.00,01.00,000.00,1.00 -+040.30,+00.00,01.00,000.00,1.00 -+041.20,+00.00,01.00,000.00,1.00 -+042.10,+00.00,01.00,000.00,1.00 -+043.00,+00.00,01.00,000.00,1.00 -+043.90,+00.00,01.00,000.00,1.00 -+044.80,+00.00,01.00,000.00,1.00 -+045.70,+00.00,01.00,000.00,1.00 -+046.60,+00.00,01.00,000.00,1.00 -+047.50,+00.00,01.00,000.00,1.00 -+048.40,+00.00,01.00,000.00,1.00 -+049.30,+00.00,01.00,000.00,1.00 -+050.20,+00.00,01.00,000.00,1.00 -+051.10,+00.00,01.00,000.00,1.00 -+052.00,+00.00,01.00,000.00,1.00 -+052.90,+00.00,01.00,000.00,1.00 -+053.80,+00.00,01.00,000.00,1.00 -+054.70,+00.00,01.00,000.00,1.00 -+055.60,+00.00,01.00,000.00,1.00 -+056.50,+00.00,01.00,000.00,1.00 -+057.40,+00.00,01.00,000.00,1.00 -+058.30,+00.00,01.00,000.00,1.00 -+059.20,+00.00,01.00,000.00,1.00 -+060.10,+00.00,01.00,000.00,1.00 -+061.00,+00.00,01.00,000.00,1.00 -+061.90,+00.00,01.00,000.00,1.00 -+062.80,+00.00,01.00,000.00,1.00 -+063.70,+00.00,01.00,000.00,1.00 -+064.60,+00.00,01.00,000.00,1.00 -+065.50,+00.00,01.00,000.00,1.00 -+066.40,+00.00,01.00,000.00,1.00 -+067.30,+00.00,01.00,000.00,1.00 -+068.20,+00.00,01.00,000.00,1.00 -+069.10,+00.00,01.00,000.00,1.00 -+070.00,+00.00,01.00,000.00,1.00 -+070.90,+00.00,01.00,000.00,1.00 -+071.80,+00.00,01.00,000.00,1.00 -+072.70,+00.00,01.00,000.00,1.00 -+073.60,+00.00,01.00,000.00,1.00 -+074.50,+00.00,01.00,000.00,1.00 -+075.40,+00.00,01.00,000.00,1.00 -+076.30,+00.00,01.00,000.00,1.00 -+077.20,+00.00,01.00,000.00,1.00 -+078.10,+00.00,01.00,000.00,1.00 -+079.00,+00.00,01.00,000.00,1.00 -+079.90,+00.00,01.00,000.00,1.00 -+080.80,+00.00,01.00,000.00,1.00 -+081.70,+00.00,01.00,000.00,1.00 -+082.60,+00.00,01.00,000.00,1.00 -+083.50,+00.00,01.00,000.00,1.00 -+084.40,+00.00,01.00,000.00,1.00 -+085.30,+00.00,01.00,000.00,1.00 -+086.20,+00.00,01.00,000.00,1.00 -+087.10,+00.00,01.00,000.00,1.00 -+088.00,+00.00,01.00,000.00,1.00 -+088.90,+00.00,01.00,000.00,1.00 -+089.80,+00.00,01.00,000.00,1.00 -+090.70,+00.00,01.00,000.00,1.00 -+091.60,+00.00,01.00,000.00,1.00 -+092.50,+00.00,01.00,000.00,1.00 -+093.40,+00.00,01.00,000.00,1.00 -+094.30,+00.00,01.00,000.00,1.00 -+095.20,+00.00,01.00,000.00,1.00 -+096.10,+00.00,01.00,000.00,1.00 -+097.00,+00.00,01.00,000.00,1.00 -+097.90,+00.00,01.00,000.00,1.00 -+098.80,+00.00,01.00,000.00,1.00 -+099.70,+00.00,01.00,000.00,1.00 -+100.60,+00.00,01.00,000.00,1.00 -+101.50,+00.00,01.00,000.00,1.00 -+102.40,+00.00,01.00,000.00,1.00 -+103.30,+00.00,01.00,000.00,1.00 -+104.20,+00.00,01.00,000.00,1.00 -+105.10,+00.00,01.00,000.00,1.00 -+106.00,+00.00,01.00,000.00,1.00 -+106.90,+00.00,01.00,000.00,1.00 -+107.80,+00.00,01.00,000.00,1.00 -+108.70,+00.00,01.00,000.00,1.00 -+109.60,+00.00,01.00,000.00,1.00 -+110.50,+00.00,01.00,000.00,1.00 -+111.40,+00.00,01.00,000.00,1.00 -+112.30,+00.00,01.00,000.00,1.00 -+113.20,+00.00,01.00,000.00,1.00 -+114.10,+00.00,01.00,000.00,1.00 -+115.00,+00.00,01.00,000.00,1.00 -+115.90,+00.00,01.00,000.00,1.00 -+116.80,+00.00,01.00,000.00,1.00 -+117.70,+00.00,01.00,000.00,1.00 -+118.60,+00.00,01.00,000.00,1.00 -+119.50,+00.00,01.00,000.00,1.00 -+120.40,+00.00,01.00,000.00,1.00 -+121.30,+00.00,01.00,000.00,1.00 -+122.20,+00.00,01.00,000.00,1.00 -+123.10,+00.00,01.00,000.00,1.00 -+124.00,+00.00,01.00,000.00,1.00 -+124.90,+00.00,01.00,000.00,1.00 -+125.80,+00.00,01.00,000.00,1.00 -+126.70,+00.00,01.00,000.00,1.00 -+127.60,+00.00,01.00,000.00,1.00 -+128.50,+00.00,01.00,000.00,1.00 -+129.40,+00.00,01.00,000.00,1.00 -+130.30,+00.00,01.00,000.00,1.00 -+131.20,+00.00,01.00,000.00,1.00 -+132.10,+00.00,01.00,000.00,1.00 -+133.00,+00.00,01.00,000.00,1.00 -+133.90,+00.00,01.00,000.00,1.00 -+134.80,+00.00,01.00,000.00,1.00 -+135.70,+00.00,01.00,000.00,1.00 -+136.60,+00.00,01.00,000.00,1.00 -+137.50,+00.00,01.00,000.00,1.00 -+138.40,+00.00,01.00,000.00,1.00 -+139.30,+00.00,01.00,000.00,1.00 -+140.20,+00.00,01.00,000.00,1.00 -+141.10,+00.00,01.00,000.00,1.00 -+142.00,+00.00,01.00,000.00,1.00 -+142.90,+00.00,01.00,000.00,1.00 -+143.80,+00.00,01.00,000.00,1.00 -+144.70,+00.00,01.00,000.00,1.00 -+145.60,+00.00,01.00,000.00,1.00 -+146.50,+00.00,01.00,000.00,1.00 -+147.40,+00.00,01.00,000.00,1.00 -+148.30,+00.00,01.00,000.00,1.00 -+149.20,+00.00,01.00,000.00,1.00 -+150.10,+00.00,01.00,000.00,1.00 -+151.00,+00.00,01.00,000.00,1.00 -+151.90,+00.00,01.00,000.00,1.00 -+152.80,+00.00,01.00,000.00,1.00 -+153.70,+00.00,01.00,000.00,1.00 -+154.60,+00.00,01.00,000.00,1.00 -+155.50,+00.00,01.00,000.00,1.00 -+156.40,+00.00,01.00,000.00,1.00 -+157.30,+00.00,01.00,000.00,1.00 -+158.20,+00.00,01.00,000.00,1.00 -+159.10,+00.00,01.00,000.00,1.00 diff --git a/scripts/td_object_renderer/object_renderer_standalone/Makefile b/scripts/td_object_renderer/object_renderer_standalone/Makefile deleted file mode 100644 index 42b762bcfe8f83aa3c5b0a375bcac961f08ed57b..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/object_renderer_standalone/Makefile +++ /dev/null @@ -1,180 +0,0 @@ -# GNU Makefile - -# Paths -SRC_LIBCOM = ../../../lib_com -SRC_LIBDEBUG = ../../../lib_debug -SRC_LIBDEC = ../../../lib_dec -SRC_LIBENC = ../../../lib_enc -SRC_LIBREND = ../../../lib_rend -SRC_LIBUTIL = ../../../lib_util -SRC_APP = ./object_renderer_standalone -BUILD = build -OBJDIR = obj - -SRC_DIRS = $(sort -u $(SRC_LIBCOM) $(SRC_LIBDEBUG) $(SRC_LIBDEC) $(SRC_LIBENC) $(SRC_LIBREND) $(SRC_LIBUTIL) $(SRC_APP)) - -# Name of CLI binaries -CLI_REN ?= renderer_standalone -LIB_LIBCOM ?= libivascom.a -LIB_LIBDEBUG ?= libivasdebug.a -LIB_LIBDEC ?= libivasdec.a -LIB_LIBENC ?= libivasenc.a -LIB_LIBREND ?= libivasrend.a -LIB_LIBUTIL ?= libivasutil.a - -# Default tool settings -CC ?= gcc -RM ?= rm -f -AR ?= ar - -# Detect system -UNAME_S := $(shell uname -s) - -# Switches for cross-platform builds (i.e. build 32 bit code on 64 bit platforms) -ifneq "$(TARGET_PLATFORM)" "" -ifeq ("$(TARGET_PLATFORM)", "$(findstring $(TARGET_PLATFORM), i386 i586 i686)") - CFLAGS += -m32 - LDFLAGS += -m32 -endif - -ifeq ("$(TARGET_PLATFORM)", "$(findstring $(TARGET_PLATFORM), x86_64)") - CFLAGS += -m64 - LDFLAGS += -m64 -endif -endif - -ifndef VERBOSE -QUIET_CC = @echo ' ' Compiling $<; -QUIET_LINK= @echo ' ' Linking $@; -QUIET_AR = @echo ' ' Archiving $@; -QUIET = @ -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 -Wno-unused-parameter \ - -Wno-unused-function -Wno-implicit-fallthrough - -# libs to link -LDLIBS += -lm - -# Clang sanitizer compiler options -CCCLANG = clang -ifeq "$(CLANG)" "1" -CC = $(CCCLANG) -CFLAGS += -fsanitize=memory -LDFLAGS += -fsanitize=memory -endif -ifeq "$(CLANG)" "2" -CC = $(CCCLANG) -CFLAGS += -fsanitize=address -LDFLAGS += -fsanitize=address -endif -ifeq "$(CLANG)" "3" -CC = $(CCCLANG) -CFLAGS += -fsanitize=undefined -LDFLAGS += -fsanitize=undefined -endif - -ifeq "$(RELEASE)" "1" -CFLAGS += -DRELEASE -OPTIM ?= 2 -endif - -ifneq "$(DEBUG)" "0" -CFLAGS += -g3 -LDFLAGS += -g3 -endif - -ifeq "$(GCOV)" "1" -CFLAGS += -fprofile-arcs -ftest-coverage -LDFLAGS += -fprofile-arcs -ftest-coverage -endif - -ifeq "$(STRIP)" "1" -CFLAGS += -fdata-sections -ffunction-sections -ifneq ($(UNAME_S),Darwin) -LDFLAGS += -Wl,-gc-sections -static -else -LDFLAGS += -Wl,-dead_strip -endif -endif - -OPTIM ?= 0 -CFLAGS += -O$(OPTIM) - -CFLAGS += $(foreach DIR,$(SRC_DIRS),-I$(DIR)) - -# Source file search paths -VPATH = $(SRC_DIRS) - -############################################################################### - -SRCS_LIBCOM = $(foreach DIR,$(SRC_LIBCOM),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) -SRCS_LIBDEBUG = $(foreach DIR,$(SRC_LIBDEBUG),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) -SRCS_LIBDEC = $(foreach DIR,$(SRC_LIBDEC),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) -SRCS_LIBENC = $(foreach DIR,$(SRC_LIBENC),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) -SRCS_LIBREND = $(foreach DIR,$(SRC_LIBREND),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c))) -SRCS_LIBUTIL = $(foreach DIR,$(SRC_LIBUTIL),$(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)) -OBJS_LIBENC = $(addprefix $(OBJDIR)/,$(SRCS_LIBENC:.c=.o)) -OBJS_LIBREND = $(addprefix $(OBJDIR)/,$(SRCS_LIBREND:.c=.o)) -OBJS_LIBUTIL = $(addprefix $(OBJDIR)/,$(SRCS_LIBUTIL:.c=.o)) -OBJS_REN = $(OBJDIR)/renderer_standalone.o - - -DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS_LIBDEC:.c=.P) \ - $(SRCS_LIBENC:.c=.P) $(SRCS_LIBUTIL:.c=.P)) - -############################################################################### - -.PHONY: all clean clean_all - -all: $(CLI_REN) - -$(OBJDIR): - $(QUIET)mkdir -p $(OBJDIR) - -$(LIB_LIBCOM): $(OBJS_LIBCOM) - $(QUIET_AR)$(AR) rcs $@ $^ - -$(LIB_LIBDEBUG): $(OBJS_LIBDEBUG) - $(QUIET_AR)$(AR) rcs $@ $^ - -$(LIB_LIBDEC): $(OBJS_LIBDEC) $(OBJS_LIBREND) - $(QUIET_AR)$(AR) rcs $@ $^ - -$(LIB_LIBENC): $(OBJS_LIBENC) - $(QUIET_AR)$(AR) rcs $@ $^ - -$(LIB_LIBREND): $(OBJS_LIBREND) - $(QUIET_AR)$(AR) rcs $@ $^ - -$(LIB_LIBUTIL): $(OBJS_LIBUTIL) - $(QUIET_AR)$(AR) rcs $@ $^ - -$(CLI_REN): $(LIB_LIBENC) $(LIB_LIBDEC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(OBJS_REN) - $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_REN) -L. -livasdebug -livasutil -livasenc -livasdec -livascom $(LDLIBS) -o $(CLI_REN) - -libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBREND) $(LIB_LIBUTIL) - -clean: - $(QUIET)$(RM) $(OBJS_LIBENC) $(OBJS_LIBDEC) $(OBJS_REN) $(DEPS) - $(QUIET)$(RM) $(DEPS:.P=.d) - $(QUIET)test ! -d $(OBJDIR) || rm -rf $(OBJDIR) - -clean_all: clean - $(QUIET)$(RM) $(CLI_REN) $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) $(LIB_LIBREND) - -$(OBJDIR)/%.o : %.c | $(OBJDIR) - $(QUIET_CC)$(CC) $(CFLAGS) -c -MD -o $@ $< - @cp $(OBJDIR)/$*.d $(OBJDIR)/$*.P; \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(OBJDIR)/$*.d >> $(OBJDIR)/$*.P; \ - $(RM) $(OBJDIR)/$*.d - --include $(DEPS) diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.sln b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.sln deleted file mode 100644 index 72b93504062711e923ce58c9cdf47f3eac127050..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.sln +++ /dev/null @@ -1,68 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.136 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_dec", "..\..\..\Workspace_msvc\lib_dec.vcxproj", "{E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_com", "..\..\..\Workspace_msvc\lib_com.vcxproj", "{39EC200D-7795-4FF8-B214-B24EDA5526AE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_rend", "..\..\..\Workspace_msvc\lib_rend.vcxproj", "{718DE063-A18B-BB72-9150-62B892E6FFA6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_util", "..\..\..\Workspace_msvc\lib_util.vcxproj", "{2FA8F384-0775-F3B7-F8C3-85209222FC70}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_debug", "..\..\..\Workspace_msvc\lib_debug.vcxproj", "{54509728-928B-44D9-A118-A6F92F08B34F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "object_renderer_standalone", "object_renderer_standalone.vcxproj", "{75AE3898-3FDF-4AE2-86A1-838D0E78545E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - Unittests|Win32 = Unittests|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {75AE3898-3FDF-4AE2-86A1-838D0E78545E}.Debug|Win32.ActiveCfg = Debug|Win32 - {75AE3898-3FDF-4AE2-86A1-838D0E78545E}.Debug|Win32.Build.0 = Debug|Win32 - {75AE3898-3FDF-4AE2-86A1-838D0E78545E}.Release|Win32.ActiveCfg = Release|Win32 - {75AE3898-3FDF-4AE2-86A1-838D0E78545E}.Release|Win32.Build.0 = Release|Win32 - {75AE3898-3FDF-4AE2-86A1-838D0E78545E}.Unittests|Win32.ActiveCfg = Release|Win32 - {75AE3898-3FDF-4AE2-86A1-838D0E78545E}.Unittests|Win32.Build.0 = Release|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Debug|Win32.ActiveCfg = Debug|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Debug|Win32.Build.0 = Debug|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Release|Win32.ActiveCfg = Release|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Release|Win32.Build.0 = Release|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {2FA8F384-0775-F3B7-F8C3-85209222FC70}.Unittests|Win32.Build.0 = Unittests|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Debug|Win32.ActiveCfg = Debug|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Debug|Win32.Build.0 = Debug|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Release|Win32.ActiveCfg = Release|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Release|Win32.Build.0 = Release|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {E822DDAF-0F5F-4CD0-A694-38AE69DE74D3}.Unittests|Win32.Build.0 = Unittests|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Debug|Win32.Build.0 = Debug|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Release|Win32.ActiveCfg = Release|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Release|Win32.Build.0 = Release|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {39EC200D-7795-4FF8-B214-B24EDA5526AE}.Unittests|Win32.Build.0 = Unittests|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Debug|Win32.ActiveCfg = Debug|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Debug|Win32.Build.0 = Debug|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Release|Win32.ActiveCfg = Release|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Release|Win32.Build.0 = Release|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {54509728-928B-44D9-A118-A6F92F08B34F}.Unittests|Win32.Build.0 = Unittests|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Debug|Win32.ActiveCfg = Debug|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Debug|Win32.Build.0 = Debug|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Release|Win32.ActiveCfg = Release|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Release|Win32.Build.0 = Release|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Unittests|Win32.ActiveCfg = Unittests|Win32 - {718DE063-A18B-BB72-9150-62B892E6FFA6}.Unittests|Win32.Build.0 = Unittests|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {16E75611-7E35-43B5-B2CA-01E9C9B952F1} - EndGlobalSection -EndGlobal diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.vcxproj b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.vcxproj deleted file mode 100644 index 925450bae201f6a5cf38b5db945a12256ba5bd47..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.vcxproj +++ /dev/null @@ -1,121 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - 15.0 - {75AE3898-3FDF-4AE2-86A1-838D0E78545E} - objectrendererstandalone - 10.0.17763.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - .\ - .\Debug_Renderer_Standalone\ - renderer_standalone - false - - - .\ - .\Release_Renderer_Standalone\ - renderer_standalone - false - - - - Level4 - Disabled - true - false - ..\..\..\lib_enc;..\..\..\lib_dec;..\..\..\lib_com;..\..\..\lib_debug;..\..\..\lib_util;..\..\..\lib_rend;%(AdditionalIncludeDirectories) - OldStyle - false - _CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions);TDREND_HRTF_TABLE_METHODS - MultiThreadedDebug - .\Debug_Renderer_Standalone\renderer_standalone.pdb - - false - - - .\renderer_standalone.exe - .\Debug_Renderer_Standalone\renderer_standalone.pdb - Console - - - - - Level3 - MaxSpeed - true - true - true - true - ..\..\..\lib_enc;..\..\..\lib_dec;..\..\..\lib_com;..\..\..\lib_debug;..\..\..\lib_util;..\..\..\lib_rend;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions);OBJECT_RENDERER_EXTERNAL_METADATA - MultiThreaded - $(IntDir)renderer_standalone.pdb - - - true - true - .\renderer_standalone.exe - false - - - - - - - - {39ec200d-7795-4ff8-b214-b24eda5526ae} - - - {54509728-928b-44d9-a118-a6f92f08b34f} - - - {e822ddaf-0f5f-4cd0-a694-38ae69de74d3} - - - {718de063-a18b-bb72-9150-62b892e6ffa6} - - - {2fa8f384-0775-f3b7-f8c3-85209222fc70} - - - - - - \ No newline at end of file diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.vcxproj.filters b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.vcxproj.filters deleted file mode 100644 index 880c4e60a81aeba35f93e74b3bfe073fc546114d..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c deleted file mode 100644 index 948da8a4259ed4da853bdd6ca0da696a6753f972..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ /dev/null @@ -1,646 +0,0 @@ -/****************************************************************************************************** - - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. - -*******************************************************************************************************/ -#include -#include -#include - -#define _USE_MATH_DEFINES -#include - -#include "options.h" -#include "stdint.h" -#include "prot.h" -#include "ivas_prot.h" -#include "ivas_cnst.h" -#include "ivas_stat_dec.h" -#include "cnst.h" -#include "wmops.h" -#include "hrtf_file_reader.h" -#include "ivas_error.h" - -/*------------------------------------------------------------------------------------------* - * Constants - *------------------------------------------------------------------------------------------*/ - -#define META_LINE_LENGTH 200 /* max number of characters at one line of metadata input/output file */ -#define NUM_ISM_METADATA_PER_LINE 4 /* Number of ISM metadata per line in a metadata file */ - -/*---------------------------------------------------------------------* - * Local function prototypes - *---------------------------------------------------------------------*/ -static char *to_upper( char *str ); -static void usage_rend( void ); -static void readMetadata( FILE *file, ISM_METADATA_HANDLE hIsmMetaData ); - -static void ivas_binaural_add_LFE_local( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - int16_t output_frame, /* i : length of input frame */ - float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ - const int8_t render_lfe /* i : render lfe flag */ -); - -/*---------------------------------------------------------------------* - * usage_rend() - * - * Print the usage of the "renderer_standalone" program - *---------------------------------------------------------------------*/ - -static void usage_rend( void ) -{ - fprintf( stdout, "Usage: renderer_standalone.exe [Options] Channels Metadata Fs InputAudio OutputAudio\n\n" ); - - fprintf( stdout, "Mandatory parameters:\n" ); - fprintf( stdout, "---------------------\n" ); - fprintf( stdout, "Channels : Number of channels\n" ); - fprintf( stdout, "Metadata : Metadata files, number of files specified by Channels\n" ); - fprintf( stdout, "Fs : Sampling rate\n" ); - fprintf( stdout, "InputAudio : Audio to be rendered, interleaved Channels\n" ); - fprintf( stdout, "OutputAudio : Rendered output audio\n\n" ); - - fprintf( stdout, "Options:\n" ); - fprintf( stdout, "--------\n" ); - fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); - fprintf( stdout, "-hrtf File : HRTF filter file (if not specified: use default model from ROM)\n" ); - fprintf( stdout, "-mc Conf : Run renderer on multichannel input, where Conf is one of \n" ); - fprintf( stdout, " 5_1, 7_1, 5_1_2, 5_1_4 and 7_1_4. Note: In this mode the Channels\n" ); - fprintf( stdout, " and Metadata arguments are omitted.\n" ); - fprintf( stdout, "\n" ); - - exit( -1 ); -} - - -/*------------------------------------------------------------------------------------------* - * Global variables - *------------------------------------------------------------------------------------------*/ - -int32_t frame = 0; /* Counter of frames */ - - -/*------------------------------------------------------------------------------------------* - * Standalone Renderer program - * - * - *------------------------------------------------------------------------------------------*/ -int main( int argc, char *argv[] ) -{ - int16_t nFrameLength; - int16_t n, nS, nSamplesRead, i, j; -#ifndef FIX_ITD - int16_t offset; -#endif - - float *MixFrame; - float output[MAX_CICP_CHANNELS][L_FRAME48k]; - int16_t NumLdspks = 2; - int16_t *MixFrameWav; - int16_t *input_buff; - int16_t nChannels; - float tmp; - int32_t noClipping; - FILE *f_input; - FILE *f_output; - FILE *f_quat_traj; - float x, y, z, w; - FILE *f_metadata[MAX_NUM_OBJECTS]; - Decoder_Struct st_ivas_static; - Decoder_Struct *st_ivas = &st_ivas_static; - - MixFrame = count_malloc( 2 * L_FRAME48k * sizeof( float ) ); - MixFrameWav = count_malloc( 2 * L_FRAME48k * sizeof( int16_t ) ); - input_buff = count_malloc( MAX_CICP_CHANNELS * L_FRAME48k * sizeof( int16_t ) ); - nChannels = 0; - noClipping = 0; - - for ( i = 0; i < 2 * L_FRAME48k; i++ ) - { - MixFrame[i] = 0.0; - MixFrameWav[i] = 0; - } - for ( i = 0; i < MAX_NUM_OBJECTS; ++i ) - { - f_metadata[i] = NULL; - } - - - /*------------------------------------------------------------------------------------------* - * Struct initializations - *------------------------------------------------------------------------------------------*/ - st_ivas->hHrtfTD = NULL; - st_ivas->hRenderConfig = NULL; - st_ivas->hHeadTrackData = NULL; - st_ivas->ivas_format = ISM_FORMAT; - f_quat_traj = NULL; - if ( ( st_ivas->hDecoderConfig = (DECODER_CONFIG_HANDLE) count_malloc( sizeof( DECODER_CONFIG ) ) ) == NULL ) - { - return IVAS_ERR_FAILED_ALLOC; - } - st_ivas->hDecoderConfig->Opt_Headrotation = FALSE; - - /* ISm metadata handles */ - for ( n = 0; n < MAX_NUM_OBJECTS; n++ ) - { - st_ivas->hIsmMetaData[n] = NULL; - } - - /*------------------------------------------------------------------------------------------* - * Parse command line and initialize renderer - *------------------------------------------------------------------------------------------*/ - if ( ( argc ) < 5 ) - { - fprintf( stderr, "Not enough input arguments!\n\n" ); - usage_rend(); - } - i = 1; - /* Optional arguments */ - while ( argv[i][0] == '-' ) - { - if ( strcmp( to_upper( argv[i] ), "-HRTF" ) == 0 ) - { - i++; - ivas_HRTF_binary_open( &( st_ivas->hHrtfTD ) ); - i++; - } - else if ( strcmp( to_upper( argv[i] ), "-T" ) == 0 ) - { - i++; - f_quat_traj = fopen( argv[i], "r" ); - - if ( f_quat_traj == NULL ) - { - fprintf( stderr, "\nError: Unable to open head-rotation file %s \n\n", argv[i] ); - usage_rend(); - } - i++; - } - else if ( strcmp( to_upper( argv[i] ), "-MC" ) == 0 ) - { - st_ivas->ivas_format = MC_FORMAT; - st_ivas->mc_mode = MC_MODE_MCT; - i++; - if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 ) - { - st_ivas->transport_config = AUDIO_CONFIG_5_1; - nChannels = 6; - } - else if ( strcmp( to_upper( argv[i] ), "7_1" ) == 0 ) - { - st_ivas->transport_config = AUDIO_CONFIG_7_1; - nChannels = 8; - } - else if ( strcmp( to_upper( argv[i] ), "5_1_2" ) == 0 ) - { - st_ivas->transport_config = AUDIO_CONFIG_5_1_2; - nChannels = 8; - } - else if ( strcmp( to_upper( argv[i] ), "5_1_4" ) == 0 ) - { - st_ivas->transport_config = AUDIO_CONFIG_5_1_4; - nChannels = 10; - } - else if ( strcmp( to_upper( argv[i] ), "7_1_4" ) == 0 ) - { - st_ivas->transport_config = AUDIO_CONFIG_7_1_4; - nChannels = 12; - } - else - { - fprintf( stderr, "\nError: Unknown MC configuration %s \n\n", argv[i] ); - usage_rend(); - } - st_ivas->nchan_transport = nChannels; - st_ivas->hIntSetup.num_lfe = 1; - st_ivas->hIntSetup.nchan_out_woLFE = nChannels - 1; - st_ivas->hIntSetup.index_lfe[0] = 3; - i++; - } - else - { - fprintf( stderr, "Unknown option: %s\n\n", argv[i] ); - usage_rend(); - } - } - - if ( st_ivas->ivas_format == ISM_FORMAT ) - { - - if ( ( argc - i ) < 5 ) - { - fprintf( stderr, "Not enough input arguments!\n\n" ); - usage_rend(); - } - - /* Mandatory arguments */ - nChannels = (int16_t) atoi( argv[i] ); /* Number of channels */ - st_ivas->nSCE = nChannels; - st_ivas->nchan_transport = nChannels; - i++; - - if ( ( argc - i ) < ( 3 + nChannels ) ) - { - fprintf( stderr, "Not enough input arguments for %d channels!\n\n", nChannels ); - usage_rend(); - } - - /* Metadata files */ - for ( j = 0; j < nChannels; j++ ) - { - if ( ( f_metadata[j] = fopen( argv[i], "r" ) ) == NULL ) - { - fprintf( stderr, "\nError: Unable to open metadata file %s \n\n", argv[i] ); - exit( -1 ); - } - st_ivas->hIsmMetaData[j] = (ISM_METADATA_HANDLE) count_malloc( sizeof( ISM_METADATA_FRAME ) ); - i++; - } - } - - - /* Fs and 20ms frame length */ - st_ivas->hDecoderConfig->output_Fs = atoi( argv[i] ) * 1000; - nFrameLength = ( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / 1000 ) ) * 20; /* 20 ms frame */ - i++; - - /* Input, n-channel audio */ - if ( ( f_input = fopen( argv[i], "rb" ) ) == NULL ) - { - fprintf( stderr, "Error: input file %s cannot be opened\n\n", argv[i] ); - exit( -1 ); - } - i++; - - /* Output rendered audio */ - if ( ( f_output = fopen( argv[i], "wb" ) ) == NULL ) - { - fprintf( stderr, "Error: output file %s cannot be opened\n\n", argv[i] ); - exit( -1 ); - } - i++; - - if ( i != argc ) - { - fprintf( stderr, "Too many arguments!\n\n" ); - usage_rend(); - } - - - if ( f_quat_traj != NULL ) - { - st_ivas->hDecoderConfig->Opt_Headrotation = 1; - if ( ( st_ivas->hHeadTrackData = (HEAD_TRACK_DATA_HANDLE) count_malloc( sizeof( HEAD_TRACK_DATA ) ) ) == NULL ) - { - fprintf( stderr, "Can not allocate memory for head-tracking\n" ); - exit( -1 ); - } - st_ivas->hDecoderConfig->Opt_Headrotation = TRUE; - } - else - { - st_ivas->hDecoderConfig->Opt_Headrotation = 0; - } - - /* Init limiter */ - st_ivas->hLimiter = ivas_limiter_open( NumLdspks, st_ivas->hDecoderConfig->output_Fs ); - st_ivas->hDecoderConfig->nchan_out = NumLdspks; - st_ivas->hLimiter->strong_saturation_count = 0; - st_ivas->hLimiter->gain = 1.f; - st_ivas->hLimiter->release_heuristic = 0.f; - - ivas_td_binaural_open( st_ivas ); - - int16_t nFrameCount = 0; - int16_t currFrameLength, currWindowLength; - - /*------------------------------------------------------------------------------------------* - * Main rendering loop - *------------------------------------------------------------------------------------------*/ - fprintf( stdout, "Rendering...\n" ); - while ( 1 ) - { - /* Read the next frame from the file */ - nSamplesRead = (int16_t) fread( input_buff, sizeof( int16_t ), nFrameLength * nChannels, f_input ); - if ( nSamplesRead <= 0 ) - { - if ( frame == 0 ) - { - fprintf( stderr, "Error: no frames processed." ); - } - break; - } - - if ( nSamplesRead % nChannels != 0 ) - { - fprintf( stderr, "Error: total number of entries in input audio was not a multiple of the number of channels.\n\n" ); - break; - } - - currWindowLength = nSamplesRead / nChannels; - if ( currWindowLength < nFrameLength ) - { - currFrameLength = currWindowLength; - } - else - { - currFrameLength = nFrameLength; - } - - - /* Renderer expects non-interleaved channels, so de-interleave here. */ - for ( nS = 0; nS < nChannels; nS++ ) - { - for ( n = 0; n < currFrameLength; n++ ) - { - output[nS][n] = input_buff[nChannels * n + nS]; - } -#ifdef FIX_ITD - /* Pad to full frame length */ - for ( ; n < nFrameLength; n++ ) - { - output[nS][n] = 0; - } -#endif - } -#ifdef FIX_ITD - currFrameLength = nFrameLength; -#endif - - if ( st_ivas->ivas_format == ISM_FORMAT ) - { - /* Read metadata */ - for ( j = 0; j < nChannels; j++ ) - { - readMetadata( f_metadata[j], st_ivas->hIsmMetaData[j] ); - } - } - else /* st_ivas->ivas_format == MC_FORMAT */ - { - ivas_binaural_add_LFE_local( st_ivas, currFrameLength, output, 1 ); - } - - /* Read headrotation */ - if ( f_quat_traj != NULL ) - { - for ( i = 0; i < 4; i++ ) /* MAX_PARAM_SPATIAL_SUBFRAMES = 4 */ - { - if ( 4 == fscanf( f_quat_traj, "%f,%f,%f,%f", &w, &x, &y, &z ) ) - { - st_ivas->hHeadTrackData->num_quaternions = -1; - - st_ivas->hHeadTrackData->Quaternions[i].w = w; - st_ivas->hHeadTrackData->Quaternions[i].x = x; - st_ivas->hHeadTrackData->Quaternions[i].y = y; - st_ivas->hHeadTrackData->Quaternions[i].z = z; - - st_ivas->hHeadTrackData->num_quaternions = 0; - } - else - { - if ( feof( f_quat_traj ) ) - { - rewind( f_quat_traj ); - i--; /* Rewind and re-read the value for i */ - } - else - { - fprintf( stderr, "Incorrect format in headrotation file! \n\n" ); - exit( -1 ); - } - } - } - } - - /* Renderer */ - ObjRenderIVASFrame( st_ivas, output, currFrameLength ); - - /* Write the rendered audio to file. */ - - /* Apply limiter */ - ivas_limiter_dec( st_ivas->hLimiter, output, st_ivas->hDecoderConfig->nchan_out, nFrameLength, FALSE ); - - -#ifndef FIX_ITD - /* Trim first frame to compensate for delay */ - if ( nFrameCount == 0 ) - { - offset = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / 200 ); /* 240 samples for 48kHz etc */ - } - else - { - offset = 0; - } -#endif - - /* For Wav: Interleave, convert to int16_t */ -#ifdef FIX_ITD - for ( n = 0; n < currFrameLength; n++ ) -#else - for ( n = 0; n < ( currFrameLength - offset ); n++ ) -#endif - { - for ( nS = 0; nS < NumLdspks; nS++ ) - { -#ifdef FIX_ITD - tmp = output[nS][n] + 0.5f * sign( output[nS][n] ); -#else - tmp = output[nS][n + offset] + 0.5f * sign( output[nS][n + offset] ); -#endif - if ( tmp > MAX16B_FLT ) - { - tmp = MAX16B_FLT; - noClipping++; - } - if ( tmp < MIN16B_FLT ) - { - tmp = MIN16B_FLT; - noClipping++; - } - MixFrameWav[n * NumLdspks + nS] = (int16_t) ( tmp ); - } - } -#ifdef FIX_ITD - fwrite( MixFrameWav, sizeof( int16_t ), ( currFrameLength ) * NumLdspks, f_output ); -#else - fwrite( MixFrameWav, sizeof( int16_t ), ( currFrameLength - offset ) * NumLdspks, f_output ); -#endif - - nFrameCount++; - - frame++; - - fprintf( stdout, "." ); - } - fprintf( stdout, "\n" ); - - - /*------------------------------------------------------------------------------------------* - * Close and deallocate memory - *------------------------------------------------------------------------------------------*/ - - fclose( f_input ); - fclose( f_output ); - - count_free( MixFrame ); - count_free( MixFrameWav ); - count_free( input_buff ); - - ivas_td_binaural_close( &st_ivas->hBinRendererTd ); - count_free( st_ivas->hDecoderConfig ); - st_ivas->hHrtfTD = NULL; - - /* ISM metadata handles */ - for ( n = 0; n < MAX_NUM_OBJECTS; n++ ) - { - if ( st_ivas->hIsmMetaData[n] != NULL ) - { - count_free( st_ivas->hIsmMetaData[n] ); - st_ivas->hIsmMetaData[n] = NULL; - } - } - - if ( st_ivas->hHeadTrackData != NULL ) - { - count_free( st_ivas->hHeadTrackData ); - fclose( f_quat_traj ); - } - - ivas_limiter_close( &st_ivas->hLimiter ); - -#ifdef RAM_COUNTING_TOOL - mem_count_summary( USE_DEFAULT ); -#endif - -#ifdef DEBUGGING - dbgclose(); -#endif - - fprintf( stdout, "Done rendering %d frames.\n", nFrameCount ); - if ( noClipping > 0 ) - { - fprintf( stderr, "*** Clipping on %d samples.\n", noClipping ); - } - /* system( "pause" ); */ - return 0; -} - -/*---------------------------------------------------------------------* - * to_upper() - * - * Capitalize all letters of a string. - * (normally to_upper() function would be used but it does not work in Unix) - *---------------------------------------------------------------------*/ -static char *to_upper( - char *str ) -{ - int16_t i; - char *p = str; - - i = 0; - while ( str[i] != 0 ) - { - if ( str[i] >= 'a' && str[i] <= 'z' ) - { - str[i] -= 0x20; - } - i++; - } - - return p; -} - -/*---------------------------------------------------------------------* - * readMetadata() - * - * Read one frame of metadata - *---------------------------------------------------------------------*/ -static void readMetadata( - FILE *file, - ISM_METADATA_HANDLE hIsmMetaData ) -{ - char char_buff[META_LINE_LENGTH]; - float meta_prm[NUM_ISM_METADATA_PER_LINE]; - char *char_ptr; - int16_t j; - - if ( fgets( char_buff, META_LINE_LENGTH, file ) == NULL ) - { - fprintf( stderr, "\n!!!Error: Early EOF met while reading ISM metadata input file. Exiting!!!\n\n" ); - exit( -1 ); - } - - j = 0; - char_ptr = strtok( char_buff, "," ); - meta_prm[j++] = (float) atof( char_ptr ); - while ( char_ptr != NULL && j < NUM_ISM_METADATA_PER_LINE ) - { - char_ptr = strtok( NULL, "," ); - meta_prm[j++] = (float) atof( char_ptr ); - } - - hIsmMetaData->azimuth = meta_prm[0]; - hIsmMetaData->elevation = meta_prm[1]; - - return; -} - -/*KLUDGE: Copied here instead of moving ivas_binaural_add_LFE to a separate file. */ -static void ivas_binaural_add_LFE_local( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - int16_t output_frame, /* i : length of input frame */ - float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ - const int8_t render_lfe /* i : render lfe flag */ -) -{ - - if ( render_lfe ) - { - float gain; - int16_t ch, idx_lfe; - - gain = GAIN_LFE / st_ivas->hIntSetup.nchan_out_woLFE; - - /* copy lfe to all other channels */ - for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ ) - { - v_multc( output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], gain, output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_frame ); - - for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ ) - { - if ( st_ivas->hIntSetup.index_lfe[idx_lfe] != ch ) - { - v_add( output_f[ch], output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_f[ch], output_frame ); - } - } - } - } - - return; -} diff --git a/scripts/td_object_renderer/td_object_renderer_readme.txt b/scripts/td_object_renderer/td_object_renderer_readme.txt deleted file mode 100644 index 92ae257b572a6b07958b20152e1a163e88e4c365..0000000000000000000000000000000000000000 --- a/scripts/td_object_renderer/td_object_renderer_readme.txt +++ /dev/null @@ -1,71 +0,0 @@ -/****************************************************************************************************** - - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. - -*******************************************************************************************************/ - - -Time Domain binaural renderer, standalone program -------------------------------------------------- - -The TD binaural renderer is part of the IVAS decoder but can also be run as a standalone program to render unprocessed audio. -The renderer uses the same metadata format as the IVAS encoder and supports headtracking using a headtracking trajectory file -like the IVAS decoder. It may use the default HRTF model from table ROM or load an HRTF from file. - -To run the renderer in standalone mode, without encoding/decoding via the IVAS codec: -- build the renderer_standalone project (under scripts/td_object_renderer/object_renderer_standalone/) in Visual Studio, or -- use the Makefile (i.e. 'make' in scripts/td_object_renderer/object_renderer_standalone/). - - -Usage: renderer_standalone.exe [Options] Channels Metadata Fs InputAudio OutputAudio - -Mandatory parameters: ---------------------- -Channels : Number of channels -Metadata : Metadata files, number of files specified by Channels -Fs : Sampling rate -InputAudio : Audio to be rendered, interleaved Channels -OutputAudio : Rendered output audio - -Options: --------- --T File : Head rotation specified by external trajectory File --hrtf File : HRTF filter file (if not specified: use default model from ROM) --mc Conf : Run renderer on multichannel input, where Conf is one of - 5_1, 7_1, 5_1_2, 5_1_4 and 7_1_4. Note: In this mode the Channels - and Metadata arguments are omitted. - - - -Support for rendering using the table-format HRTFs is included by building (either the decoder or renderer_standalone) with the -switch TDREND_HRTF_TABLE_METHODS active. It is active by default in the standalone renderer. In that case HRTF files in table -format may also be provided, e.g.: - IVAS_dec.exe -hrtf hrfilter_table_48kHz.bin BINAURAL 48 encoded_1ch.ivs rendered.pcm -or - renderer_standalone.exe -hrtf hrfilter_table_48kHz.bin 1 scripts/td_object_renderer/metadata/csv/t01_ch1.csv 48 audio_1ch.pcm rendered.pcm diff --git a/scripts/testv/FEC_6pct2.bin b/scripts/testv/FEC_6pct2.bin new file mode 100644 index 0000000000000000000000000000000000000000..dcbaf95698a59cabba1468d2fdbb5943132f4bc7 --- /dev/null +++ b/scripts/testv/FEC_6pct2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe697a3a0c812eeff5f960c1842ae36868383338a7bbf90487ab102f0f18adcc +size 50000 diff --git a/scripts/testv/dirac_12ch_16k.wav b/scripts/testv/dirac_12ch_16k.wav new file mode 100644 index 0000000000000000000000000000000000000000..770a0962929995d549724b694b8ba9976685f061 --- /dev/null +++ b/scripts/testv/dirac_12ch_16k.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1480c94da2e6c1337dd8a6cf2394283a28739be9fd02f4a598c7c2fef578882e +size 4992156 diff --git a/scripts/testv/dirac_12ch_32k.wav b/scripts/testv/dirac_12ch_32k.wav new file mode 100644 index 0000000000000000000000000000000000000000..e363158e34523c8aaae5eb96accb3bd102950a23 --- /dev/null +++ b/scripts/testv/dirac_12ch_32k.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9adc43c1031a4799ad66c46a68d26ab34b4b4052aa05755f7081f06fd3b3a42 +size 9984132 diff --git a/scripts/testv/dirac_12ch_48k.wav b/scripts/testv/dirac_12ch_48k.wav new file mode 100644 index 0000000000000000000000000000000000000000..e6c45bcab5d722f4d788d0ef4e9be12845ccf71c --- /dev/null +++ b/scripts/testv/dirac_12ch_48k.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cfbf8de4b0792f6a9155b048fb45bf56f907c1cb6446a2f7428cc50d6ba19d7 +size 14976044 diff --git a/scripts/testv/test_8ch_16k.wav b/scripts/testv/test_8ch_16k.wav new file mode 100644 index 0000000000000000000000000000000000000000..112985edbc8c48385a93f276266457851c951fa1 --- /dev/null +++ b/scripts/testv/test_8ch_16k.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b4a5f2c895033427626ce2cc05199cdcfbdd266cc8b2d75f8480bf0d051b54a +size 2304148 diff --git a/scripts/testv/test_8ch_32k.wav b/scripts/testv/test_8ch_32k.wav new file mode 100644 index 0000000000000000000000000000000000000000..abd795767ba2f89375179f56d870b20b674c6b14 --- /dev/null +++ b/scripts/testv/test_8ch_32k.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6a7ade09d04d823320157061558a177d00270bba789edff8bf554805ac35c61 +size 4608132 diff --git a/scripts/testv/test_8ch_48k.wav b/scripts/testv/test_8ch_48k.wav new file mode 100644 index 0000000000000000000000000000000000000000..dc170a11b9c962dae329e8a019b6eccc75b57c8a --- /dev/null +++ b/scripts/testv/test_8ch_48k.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83cec3fb6760866285003140f482b9b8b1f52045072bdf8f6814973bbbea2d35 +size 6912044 diff --git a/scripts/tools/Darwin/wmc_tool b/scripts/tools/Darwin/wmc_tool new file mode 100755 index 0000000000000000000000000000000000000000..1393aaa77f752e4595dfb5898a5a0b8a3e010ede Binary files /dev/null and b/scripts/tools/Darwin/wmc_tool differ diff --git a/scripts/tools/Linux/networkSimulator_g192 b/scripts/tools/Linux/networkSimulator_g192 new file mode 100755 index 0000000000000000000000000000000000000000..8b1a6de4d97a252e16e8ce1993f46ebcaf5a62ea Binary files /dev/null and b/scripts/tools/Linux/networkSimulator_g192 differ diff --git a/scripts/tools/Linux/wmc_tool b/scripts/tools/Linux/wmc_tool new file mode 100755 index 0000000000000000000000000000000000000000..fa197f0647c5d4fc951fc688cd07695c6b66f1cd Binary files /dev/null and b/scripts/tools/Linux/wmc_tool differ diff --git a/scripts/tools/Win32/wmc_tool.exe b/scripts/tools/Win32/wmc_tool.exe new file mode 100755 index 0000000000000000000000000000000000000000..2c4859e0e56c4b5f62dc92e2427095aa94fe99be --- /dev/null +++ b/scripts/tools/Win32/wmc_tool.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85947566be9633b14ed4c2cf0b822333a2820ce02a3675ab837bc32b791790dc +size 176128 diff --git a/scripts/wmc_tool.exe b/scripts/wmc_tool.exe deleted file mode 100644 index 552430288695e2ec39dd000b7aec9e84232e718a..0000000000000000000000000000000000000000 --- a/scripts/wmc_tool.exe +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b213d20b8edf59a094f0d9d4dd2624d4bf9944d1cf7f9732b302c580b790bed1 -size 207360 diff --git a/tests/cmp_custom.py b/tests/cmp_custom.py deleted file mode 100755 index ab22bc0ceb9793dc81166f29089fbd00fe75f513..0000000000000000000000000000000000000000 --- a/tests/cmp_custom.py +++ /dev/null @@ -1,201 +0,0 @@ -#!/usr/bin/env python3 - -__copyright__ = \ -""" -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, -Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., -Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, -Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other -contributors to this repository. All Rights Reserved. - -This software is protected by copyright law and by international treaties. -The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, -Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., -Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, -Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other -contributors to this repository retain full ownership rights in their respective contributions in -the software. This notice grants no license of any kind, including but not limited to patent -license, nor is any license granted by implication, estoppel or otherwise. - -Contributors are required to enter into the IVAS codec Public Collaboration agreement before making -contributions. - -This software is provided "AS IS", without any express or implied warranties. The software is in the -development stage. It is intended exclusively for experts who have experience with such software and -solely for the purpose of inspection. All implied warranties of non-infringement, merchantability -and fitness for a particular purpose are hereby disclaimed and excluded. - -Any dispute, controversy or claim arising under or in relation to providing this software shall be -submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in -accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and -the United Nations Convention on Contracts on the International Sales of Goods. -""" - -__doc__ = \ -""" -Script to compare samples in 2 PCM files. - -USAGE : cmp_custom.py file_1 file_2 sample_size_in_bytes tolerance [end_samples_to_skip] -file_1, file_2 : files to compare -sample_size_in_bytes : 1, 2, 4, 8, these many bytes will be compared in single iteration -tolerance : abs error tolerance, will be computed based on sample_size_in_bytes -end_samples_to_skip : num of samples to be skipped at the end -""" - -import sys -import platform - - -class CompareSamples: - """ - A class to compare PCM samples. - """ - - def __init__( - self, - filename_1: str, - filename_2: str, - sample_size_in_bytes: int, - tolerance: int, - end_samples_to_skip: int, - ): - self.file_1 = open(filename_1, "rb") - self.file_2 = open(filename_2, "rb") - self.sample_size = sample_size_in_bytes - self.tolerance = tolerance - self.end_samples_to_skip = end_samples_to_skip - self.samples = 0 - self.max_diff = 0 - self.max_diff_sample_num = 0 - self.diff_present = False - self.first_diff_sample_num = 0 - self.first_diff = 0 - self.file_samples_to_read = 0 - self.file_size_1_samples = 0 - self.file_size_2_samples = 0 - - def get_file_sizes(self): - """ - Determine the file sizes in samples of the 2 PCM files. - """ - self.file_1.seek(0, 2) - self.file_2.seek(0, 2) - self.file_size_1_samples = self.file_1.tell() / self.sample_size - self.file_size_2_samples = self.file_2.tell() / self.sample_size - self.file_samples_to_read = ( - min(self.file_size_1_samples, self.file_size_2_samples) - - self.end_samples_to_skip - ) - self.file_1.seek(0) - self.file_2.seek(0) - - def print_summary(self) -> (int, str): - """ - Print the summary of the comparison. - """ - print("Compare Custom Report") - print("=====================") - print( - f"file size in samples: file 1 = {self.file_size_1_samples},", - f"file 2 = {self.file_size_2_samples}", - ) - if self.file_size_1_samples != self.file_size_2_samples: - print("WARNING !!!! file size different") - print(f"Total number of samples compared = {self.samples}") - if not self.diff_present: - print("Comparison success") - print("") - return 0, "Comparison success" - - # comparison failed - print( - f"First unmatched diff ==> {self.first_diff}", - f"at sample num {self.first_diff_sample_num}", - ) - diff_msg = f"MAXIMUM ABS DIFF ==> {self.max_diff} at sample num {self.max_diff_sample_num}" - print(diff_msg) - print("Comparison failed") - print("") - return 1, f"Comparison failed, {diff_msg}" - - def compare_next_sample(self): - """ - Compare the next input sample from both files. - """ - if self.samples == self.file_samples_to_read: - return 1 - val1_c = self.file_1.read(self.sample_size) - val2_c = self.file_2.read(self.sample_size) - if (len(val1_c) != self.sample_size) or (len(val2_c) != self.sample_size): - return 1 - - val1 = int.from_bytes(val1_c, byteorder="little", signed=True) - val2 = int.from_bytes(val2_c, byteorder="little", signed=True) - - self.samples = self.samples + 1 - abs_diff = (val1 - val2) if (val1 > val2) else (val2 - val1) - if abs_diff > self.tolerance: - if abs_diff > self.max_diff: - self.max_diff = abs_diff - self.max_diff_sample_num = self.samples - if not self.diff_present: - self.first_diff = abs_diff - self.first_diff_sample_num = self.samples - self.diff_present = True - return 0 - - -def usage(): - print(__doc__) - return 1, "" - - -def cmp_custom( - file_1_name, - file_2_name, - sample_size_in_bytes_str, - tolerance_str, - end_samples_to_skip_str="0", -) -> (int, str): - """ - Function to compare the samples in 2 PCM files. - """ - - # check for python >= 3.7 - if sys.version_info[0] < 3 or sys.version_info[1] < 7: - sys.exit( - "This script is written for Python >= 3.7. Found: " - + platform.python_version() - ) - - sample_size_in_bytes = int(sample_size_in_bytes_str) - if sample_size_in_bytes not in [1, 2, 4, 8]: - print(f"Error: unsupported sample size ({sample_size_in_bytes})") - return usage() - - cmp_samples = CompareSamples( - file_1_name, - file_2_name, - sample_size_in_bytes, - int(tolerance_str), - int(end_samples_to_skip_str), - ) - - cmp_samples.get_file_sizes() - - result = 0 - while result == 0: - result = cmp_samples.compare_next_sample() - - return cmp_samples.print_summary() - - -def main(argv) -> int: - if len(argv) < 5: - return usage() - retval, _reason = cmp_custom(*argv[1:]) - return retval - - -if __name__ == "__main__": - sys.exit(main(sys.argv)) diff --git a/tests/cmp_pcm.py b/tests/cmp_pcm.py new file mode 100755 index 0000000000000000000000000000000000000000..a54aa2cf11fc56b6b5650adbe2b19855281f5227 --- /dev/null +++ b/tests/cmp_pcm.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 + +import os +import sys +import argparse + +THIS_PATH = os.path.join(os.getcwd(), __file__) +sys.path.append(os.path.join(os.path.dirname(THIS_PATH), "../scripts")) + +import pyaudio3dtools +import pyivastest +import numpy as np + + +def cmp_pcm(file1, file2, out_config, fs) -> (int, str): + """ + Compare 2 PCM files for bitexactness + """ + print("Cmp PCM Report") + print("=====================") + + out_config = "MONO" if out_config == "" else out_config + if out_config.upper() not in pyivastest.constants.OC_TO_NCHANNELS: + out_config_in_file_names = os.path.splitext(os.path.basename(out_config))[0] + nchannels = ( + pyivastest.IvasScriptsCommon.IvasScript.get_n_channels_from_ls_layout( + out_config + ) + ) + else: + out_config_in_file_names = out_config + nchannels = pyivastest.constants.OC_TO_NCHANNELS[out_config.upper()] + + s1, _ = pyaudio3dtools.audiofile.readfile(file1, nchannels, fs, outdtype=np.int16) + s2, _ = pyaudio3dtools.audiofile.readfile(file2, nchannels, fs, outdtype=np.int16) + + if s1.shape != s2.shape: + print( + f"file size in samples: file 1 = {s1.shape[0]},", + f"file 2 = {s2.shape[0]}", + ) + return 1, "FAIL: File lengths differ" + + cmp_result = pyaudio3dtools.audioarray.compare(s1, s2, fs, per_frame=False) + + if cmp_result["bitexact"]: + return 0, "SUCCESS: Files are bitexact" + else: + diff_msg = f"MAXIMUM ABS DIFF ==> {cmp_result['max_abs_diff']} at sample num {cmp_result['max_abs_diff_pos_sample']} (assuming {nchannels} channels)" + first_msg = f"First diff found at sample num {cmp_result['first_diff_pos_sample']} in channel {cmp_result['first_diff_pos_channel']}, frame {cmp_result['first_diff_pos_frame']} (assuming {nchannels} channels, {fs} sampling rate)" + print(diff_msg) + print(first_msg) + return 1, "FAIL: Files have different content" + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("file1", type=str) + parser.add_argument("file2", type=str) + parser.add_argument( + "-o", + "--out_config", + type=str.upper, + default="MONO", + choices=pyivastest.constants.OC_TO_NCHANNELS.keys(), + ) + parser.add_argument("-s", "--sampling_rate", type=int, default=48000, dest="fs") + args = parser.parse_args() + + result, msg = cmp_pcm(**vars(args)) + print(msg) + sys.exit(result) diff --git a/tests/conftest.py b/tests/conftest.py index a4678c7d28df778dbb0b4bb464b1c8589a1864e6..9896c4908fadbe48b84edaeffc87bf5fe1265c12 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,6 @@ __copyright__ = \ """ -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/tests/create_short_testvectors.py b/tests/create_short_testvectors.py index bb9207b75d96cba49716e2d90ebf7486283a87b8..3b17bf431ce1051f026f358ffc59117aecf0153e 100755 --- a/tests/create_short_testvectors.py +++ b/tests/create_short_testvectors.py @@ -2,7 +2,7 @@ __copyright__ = \ """ -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/tests/cut_pcm.py b/tests/cut_pcm.py index 938cb6fc43549aba239304e980f1ddcd54f6058a..0027e3178d214ba6ba00af1404380aca6af5a887 100755 --- a/tests/cut_pcm.py +++ b/tests/cut_pcm.py @@ -2,7 +2,7 @@ __copyright__ = \ """ -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/tests/prepare_pytests.py b/tests/prepare_pytests.py index 8f6b20065e4469709d808ce37ea64a129bb1f31e..9074a6704ab501a485af902fa8d0d99dbf575bc8 100755 --- a/tests/prepare_pytests.py +++ b/tests/prepare_pytests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 __copyright__ = """ -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/tests/renderer/README.md b/tests/renderer/README.md index b819e43c5ca61325806826e2dde67bf454f20006..9748d8abf1f67f311eab36b6c80d23b19ae9905a 100644 --- a/tests/renderer/README.md +++ b/tests/renderer/README.md @@ -2,24 +2,10 @@ See also the [contribution page](https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/wikis/Contributions/2-external-renderer) for related presentations. -## Running Tests - -### Two testfiles are located in `tests/renderer/`: - -* `test_renderer.py` -* `test_renderer_vs_decoder.py` \ - (requires `DEC_TO_REND_FLOAT_DUMP` defined in `options.h`, cannot be run in parallel i.e. `-n 1` argument must be used for the `pytest-xdist` plugin) - ### Run tests with: `python3 -m pytest -q -n auto tests/renderer/test_renderer.py` -OR - -:warning: `DEC_TO_REND_FLOAT_DUMP` must be defined before compiling! :warning: - -`python3 -m pytest -q -n 1 tests/renderer/test_renderer_vs_decoder.py` - ### Important flags (see [pytest docs](https://docs.pytest.org/en/7.2.x/) for more information): * `-k` flag can filter test cases, e.g. `-k "test_ism_binaural_static"` @@ -37,9 +23,7 @@ this option will also report captured logs, **required for obtaining the command ├── cut -> Default location for output files for test conditions ├── data -> Input test vectors ├── ref -> Default location for output files for reference conditions -├── run_test_renderer_vs_decoder.sh -> Compiles and runs test_renderer_vs_decoder.py with CMake and DEC_TO_REND_FLOAT_DUMP defined ├── test_renderer_be_comparison.py -> Tests for CI Merge Request pipeline to compare renderer bit-exactness -├── test_renderer.py -> Comparison of renderer against standalone executables / python scripts (to be deprecated soon) -├── test_renderer_vs_decoder.py -> Comparison of renderer against decoder (to be deprecated soon) +├── test_renderer.py -> Runs the renderer for all modes └── utils.py -> Wrapper functions for executables for use in testcases ``` diff --git a/tests/renderer/constants.py b/tests/renderer/constants.py index 4c890cd026d22b77698f11242edbbb68d138ae00..d71f73e5b767d7503690fd109745ddcf61949764 100644 --- a/tests/renderer/constants.py +++ b/tests/renderer/constants.py @@ -42,26 +42,6 @@ TESTV_DIR = SCRIPTS_DIR.joinpath("testv") BIN_SUFFIX_MERGETARGET = "_ref" -""" Encoder commandline template """ -IVAS_COD_CMD = [ - str(TESTS_DIR.parent.parent.joinpath("IVAS_cod")), - "", # 1 -> mode - "", # 2 -> options for mode - "", # 3 -> bitrate - "48", # 4 -> input fs - "", # 5 -> input file - "", # 6 -> bitstream file -] - -""" Decoder commandline template """ -IVAS_DEC_CMD = [ - str(TESTS_DIR.parent.parent.joinpath("IVAS_dec")), - "-no_delay_cmp", - "", # 2 -> output format, - "48", # 3 -> output fs - "", # 4 -> bitstream file - "", # 5 -> output file -] """ Renderer commandline template """ RENDERER_CMD = [ @@ -81,39 +61,6 @@ RENDERER_CMD = [ "-q", ] -""" TD Object Renderer commandline template """ -TDRENDERER_CMD = [ - str( - SCRIPTS_DIR.joinpath("td_object_renderer") - .joinpath("object_renderer_standalone") - .joinpath("renderer_standalone") - ), - "48", - "", # 4 -> input file - "", # 5 -> output file -] - -""" CREND commandline template """ -CREND_CMD = [ - str( - SCRIPTS_DIR.joinpath("ivas_pytests/tests/unit_tests/crend/IVAS_crend_unit_test") - ), - "-test", - "1", - "-sr", - "48", - "-ifmt", - "", # 4 -> input format - "-ofmt", - "", # 8 -> output format - "-i", - "", # 2 -> input file - "-o", - "/dev/null", # 6 -> output file - # "-lp_lfe", - "-limiter" - # "-no_delay_cmp" -] """ Format to file mappings """ NCHAN_TO_FILE = { @@ -132,7 +79,7 @@ NCHAN_TO_FILE = { 16: TEST_VECTOR_DIR.joinpath("spectral_test_16ch_48kHz.wav"), } -FORMAT_TO_FILE = { +FORMAT_TO_FILE_SMOKETEST = { "MONO": NCHAN_TO_FILE[1], "STEREO": NCHAN_TO_FILE[2], "5_1": NCHAN_TO_FILE[6], @@ -157,16 +104,33 @@ FORMAT_TO_FILE = { "MASA2": TESTV_DIR.joinpath("stv_IVASMASA_2dir2TC.pcm"), "META": TEST_VECTOR_DIR.joinpath("mixed_scene.txt"), "16ch_8+4+4": NCHAN_TO_FILE[16], - "4d0": NCHAN_TO_FILE[4], "4d4": NCHAN_TO_FILE[8], - "cicp1": NCHAN_TO_FILE[1], - "cicp20": NCHAN_TO_FILE[15], - "cicp2": NCHAN_TO_FILE[2], - "custom1": NCHAN_TO_FILE[11], - "itu_4+5+1": NCHAN_TO_FILE[11], "t_design_4": NCHAN_TO_FILE[12], } +FORMAT_TO_FILE_COMPARETEST = { + "MONO": TESTV_DIR.joinpath("test_mono.wav"), + "STEREO": TESTV_DIR.joinpath("test_stereo.wav"), + "5_1": TESTV_DIR.joinpath("test_MC51.wav"), + "7_1": TESTV_DIR.joinpath("test_MC71.wav"), + "5_1_2": TESTV_DIR.joinpath("test_MC51p2.wav"), + "5_1_4": TESTV_DIR.joinpath("test_MC51p4.wav"), + "7_1_4": TESTV_DIR.joinpath("test_MC71p4.wav"), + "FOA": TESTV_DIR.joinpath("test_FOA.wav"), + "HOA2": TESTV_DIR.joinpath("test_HOA2.wav"), + "HOA3": TESTV_DIR.joinpath("test_HOA3.wav"), + "ISM1": TESTV_DIR.joinpath("test_ISM_1obj.wav"), + "ISM2": TESTV_DIR.joinpath("test_ISM_2obj.wav"), + "ISM3": TESTV_DIR.joinpath("test_ISM_3obj.wav"), + "ISM4": TESTV_DIR.joinpath("test_ISM_4obj.wav"), + "MASA1": TESTV_DIR.joinpath("stv_IVASMASA_1dir1TC.pcm"), + "MASA2": TESTV_DIR.joinpath("stv_IVASMASA_2dir2TC.pcm"), + "META": TEST_VECTOR_DIR.joinpath("mixed_scene.txt"), + "16ch_8+4+4": TESTV_DIR.joinpath("test_HOA3.wav"), + "4d4": TESTV_DIR.joinpath("test_MC71.wav"), + "t_design_4": TESTV_DIR.joinpath("test_MC71p4.wav"), +} + FORMAT_TO_METADATA_FILES = { "ISM1": [str(TESTV_DIR.joinpath("stvISM1.csv"))], "ISM2": [ @@ -188,54 +152,6 @@ FORMAT_TO_METADATA_FILES = { "MASA2": [str(TESTV_DIR.joinpath("stv_IVASMASA_2dir2TC.met"))], } -FORMAT_TO_IVAS = { - "MONO": ["", ""], - "STEREO": ["-stereo", ""], - "FOA": ["-sba", "1"], - "HOA2": ["-sba", "2"], - "HOA3": ["-sba", "3"], - "5_1": ["-mc", "5_1"], - "7_1": ["-mc", "7_1"], - "5_1_2": ["-mc", "5_1_2"], - "5_1_4": ["-mc", "5_1_4"], - "7_1_4": ["-mc", "7_1_4"], - "ISM1": ["-ism", "1"], - "ISM2": ["-ism", "2"], - "ISM3": ["-ism", "3"], - "ISM4": ["-ism", "4"], -} - -FORMAT_TO_IVAS_BR = { - "MONO": "128000", - "STEREO": "256000", - "FOA": "512000", - "HOA2": "512000", - "HOA3": "512000", - "5_1": "512000", - "7_1": "512000", - "5_1_2": "512000", - "5_1_4": "512000", - "7_1_4": "512000", - "ISM1": "256000", - "ISM2": "256000", - "ISM3": "256000", - "ISM4": "256000", -} - -FORMAT_TO_CREND_FORMAT = { - "MONO": "0", - "STEREO": "1", - "BINAURAL": "2", - "BINAURAL_ROOM": "2", - "FOA": "3", - "5_1": "4", - "7_1": "5", - "5_1_2": "6", - "5_1_4": "7", - "7_1_4": "8", - "HOA2": "9", - "HOA3": "10", -} """ Input formats """ INPUT_FORMATS_AMBI = ["FOA", "HOA2", "HOA3"] @@ -263,7 +179,6 @@ OUTPUT_FORMATS = [ CUSTOM_LS_TO_TEST = [ "t_design_4", "4d4", - "itu_4+5+1", "16ch_8+4+4", ] @@ -279,7 +194,8 @@ HR_TRAJECTORIES_TO_TEST = [ ] """ Per-testcase xfail SNR thresholds (dB) """ -pass_snr = { +pass_snr = dict() # not relevant for tests anymore, should be deprecated soon +_pass_snr = { #################################################################### # # External Renderer vs Standalone and pyaudio3dtools renderers tests @@ -441,136 +357,4 @@ pass_snr = { "test_metadata[mixed_scene-7_1]": 48, "test_metadata[mixed_scene-7_1_4]": 47, "test_metadata[mixed_scene-5_1_4]": 47, - ##################################### - # - # External vs Internal Renderer tests - # - ##################################### - # Failure reason: only fails for this trajectory with very high SNR, possible minor diff. in crossfade - # or due to usage of multiple TD Object Renderer instances - "test_ism_binaural_headrotation_vs_decoder[ISM2-BINAURAL-rotate_yaw_pitch_roll1]": 84, - "test_ism_binaural_headrotation_vs_decoder[ISM3-BINAURAL-rotate_yaw_pitch_roll1]": 78, - "test_ism_binaural_headrotation_vs_decoder[ISM4-BINAURAL-rotate_yaw_pitch_roll1]": 85, - # TODO needs investigation - # Failure reason: conversion to 7_1_4 could be implemented differently w.r.t decoder - "test_ism_binaural_headrotation_vs_decoder[ISM1-BINAURAL_ROOM-full_circle_in_15s]": 15, - "test_ism_binaural_headrotation_vs_decoder[ISM1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 15, - "test_ism_binaural_headrotation_vs_decoder[ISM2-BINAURAL-rotate_yaw_pitch_roll1]": 55, - "test_ism_binaural_headrotation_vs_decoder[ISM2-BINAURAL_ROOM-full_circle_in_15s]": 12, - "test_ism_binaural_headrotation_vs_decoder[ISM2-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 13, - "test_ism_binaural_headrotation_vs_decoder[ISM3-BINAURAL-full_circle_in_15s]": 72, - "test_ism_binaural_headrotation_vs_decoder[ISM3-BINAURAL-rotate_yaw_pitch_roll1]": 73, - "test_ism_binaural_headrotation_vs_decoder[ISM3-BINAURAL_ROOM-full_circle_in_15s]": 12, - "test_ism_binaural_headrotation_vs_decoder[ISM3-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 13, - "test_ism_binaural_headrotation_vs_decoder[ISM4-BINAURAL-full_circle_in_15s]": 71, - "test_ism_binaural_headrotation_vs_decoder[ISM4-BINAURAL-rotate_yaw_pitch_roll1]": 61, - "test_ism_binaural_headrotation_vs_decoder[ISM4-BINAURAL_ROOM-full_circle_in_15s]": 12, - "test_ism_binaural_headrotation_vs_decoder[ISM4-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 13, - # TODO needs investigation - "test_ism_binaural_static_vs_decoder[ISM1-BINAURAL_ROOM]": 15, - "test_ism_binaural_static_vs_decoder[ISM2-BINAURAL_ROOM]": 12, - "test_ism_binaural_static_vs_decoder[ISM3-BINAURAL_ROOM]": 12, - "test_ism_binaural_static_vs_decoder[ISM4-BINAURAL_ROOM]": 12, - "test_ism_binaural_static_vs_decoder[ISM3-BINAURAL]": 72, - "test_ism_binaural_static_vs_decoder[ISM4-BINAURAL]": 71, - # Failure reason: Decoder sets elevation for non-planar output layouts to 0 - "test_ism_vs_decoder[ISM1-5_1]": 27, - "test_ism_vs_decoder[ISM1-7_1]": 27, - "test_ism_vs_decoder[ISM2-5_1]": 6, - "test_ism_vs_decoder[ISM2-7_1]": 5, - "test_ism_vs_decoder[ISM3-MONO]": 73, - "test_ism_vs_decoder[ISM3-5_1]": 8, - "test_ism_vs_decoder[ISM3-7_1]": 7, - "test_ism_vs_decoder[ISM4-MONO]": 72, - "test_ism_vs_decoder[ISM4-5_1]": 8, - "test_ism_vs_decoder[ISM4-7_1]": 7, - # Failure reason: Bit-exact except for first frame; renderer fades in from defaultObjectPosition(), decoder fades in from 0 - "test_ism_vs_decoder[ISM1-5_1_2]": 27, - "test_ism_vs_decoder[ISM1-5_1_4]": 27, - "test_ism_vs_decoder[ISM1-7_1_4]": 27, - "test_ism_vs_decoder[ISM1-FOA]": 27, - "test_ism_vs_decoder[ISM1-HOA2]": 27, - "test_ism_vs_decoder[ISM1-HOA3]": 27, - "test_ism_vs_decoder[ISM1-STEREO]": 27, - "test_ism_vs_decoder[ISM2-5_1_2]": 32, - "test_ism_vs_decoder[ISM2-5_1_4]": 32, - "test_ism_vs_decoder[ISM2-7_1_4]": 32, - "test_ism_vs_decoder[ISM2-FOA]": 32, - "test_ism_vs_decoder[ISM2-HOA2]": 32, - "test_ism_vs_decoder[ISM2-HOA3]": 32, - "test_ism_vs_decoder[ISM2-STEREO]": 32, - "test_ism_vs_decoder[ISM3-5_1_2]": 33, - "test_ism_vs_decoder[ISM3-5_1_4]": 33, - "test_ism_vs_decoder[ISM3-7_1_4]": 33, - "test_ism_vs_decoder[ISM3-FOA]": 33, - "test_ism_vs_decoder[ISM3-HOA2]": 33, - "test_ism_vs_decoder[ISM3-HOA3]": 33, - "test_ism_vs_decoder[ISM3-STEREO]": 33, - "test_ism_vs_decoder[ISM4-5_1_2]": 31, - "test_ism_vs_decoder[ISM4-5_1_4]": 31, - "test_ism_vs_decoder[ISM4-7_1_4]": 31, - "test_ism_vs_decoder[ISM4-FOA]": 31, - "test_ism_vs_decoder[ISM4-HOA2]": 30, - "test_ism_vs_decoder[ISM4-HOA3]": 29, - "test_ism_vs_decoder[ISM4-MONO]": 77, - "test_ism_vs_decoder[ISM4-STEREO]": 31, - # TODO needs investigation - # Failure reason: headrotation and crossfade could have differences - "test_multichannel_binaural_headrotation_vs_decoder[5_1_2-BINAURAL-full_circle_in_15s]": 4, - "test_multichannel_binaural_headrotation_vs_decoder[5_1_2-BINAURAL-rotate_yaw_pitch_roll1]": 0, - "test_multichannel_binaural_headrotation_vs_decoder[5_1_4-BINAURAL-full_circle_in_15s]": 4, - "test_multichannel_binaural_headrotation_vs_decoder[5_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 0, - "test_multichannel_binaural_headrotation_vs_decoder[7_1_4-BINAURAL-full_circle_in_15s]": 4, - "test_multichannel_binaural_headrotation_vs_decoder[7_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 0, - # # TODO needs investigation - "test_multichannel_binaural_headrotation_vs_decoder[5_1-BINAURAL_ROOM-full_circle_in_15s]": 7, - "test_multichannel_binaural_headrotation_vs_decoder[5_1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 6, - "test_multichannel_binaural_headrotation_vs_decoder[5_1_2-BINAURAL_ROOM-full_circle_in_15s]": 3, - "test_multichannel_binaural_headrotation_vs_decoder[5_1_2-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 2, - "test_multichannel_binaural_headrotation_vs_decoder[5_1_4-BINAURAL_ROOM-full_circle_in_15s]": 2, - "test_multichannel_binaural_headrotation_vs_decoder[5_1_4-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 2, - "test_multichannel_binaural_headrotation_vs_decoder[7_1-BINAURAL_ROOM-full_circle_in_15s]": 7, - "test_multichannel_binaural_headrotation_vs_decoder[7_1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 5, - "test_multichannel_binaural_headrotation_vs_decoder[7_1_4-BINAURAL_ROOM-full_circle_in_15s]": 16, - "test_multichannel_binaural_headrotation_vs_decoder[7_1_4-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 16, - # Failure reason: Differences seem to be purely in late reverb part - "test_multichannel_binaural_static_vs_decoder[5_1-BINAURAL_ROOM]": 18, - "test_multichannel_binaural_static_vs_decoder[5_1_2-BINAURAL_ROOM]": 18, - "test_multichannel_binaural_static_vs_decoder[5_1_4-BINAURAL]": 74, - "test_multichannel_binaural_static_vs_decoder[5_1_4-BINAURAL_ROOM]": 18, - "test_multichannel_binaural_static_vs_decoder[7_1-BINAURAL]": 74, - "test_multichannel_binaural_static_vs_decoder[7_1-BINAURAL_ROOM]": 19, - "test_multichannel_binaural_static_vs_decoder[7_1_4-BINAURAL_ROOM]": 18, - # Failure reason: Active dmx (decoder) vs Passive dmx (renderer) - "test_multichannel_vs_decoder[5_1-5_1_2]": 62, - "test_multichannel_vs_decoder[5_1-5_1_4]": 62, - "test_multichannel_vs_decoder[5_1-7_1]": 62, - "test_multichannel_vs_decoder[5_1-7_1_4]": 62, - "test_multichannel_vs_decoder[5_1-MONO]": 43, - "test_multichannel_vs_decoder[5_1-STEREO]": 48, - "test_multichannel_vs_decoder[5_1_2-5_1]": 63, - "test_multichannel_vs_decoder[5_1_2-5_1_4]": 63, - "test_multichannel_vs_decoder[5_1_2-7_1]": 63, - "test_multichannel_vs_decoder[5_1_2-7_1_4]": 63, - "test_multichannel_vs_decoder[5_1_2-MONO]": 38, - "test_multichannel_vs_decoder[5_1_2-STEREO]": 44, - "test_multichannel_vs_decoder[5_1_4-5_1]": 62, - "test_multichannel_vs_decoder[5_1_4-5_1_2]": 63, - "test_multichannel_vs_decoder[5_1_4-7_1]": 62, - "test_multichannel_vs_decoder[5_1_4-7_1_4]": 61, - "test_multichannel_vs_decoder[5_1_4-MONO]": 42, - "test_multichannel_vs_decoder[5_1_4-STEREO]": 48, - "test_multichannel_vs_decoder[7_1-5_1]": 63, - "test_multichannel_vs_decoder[7_1-5_1_2]": 63, - "test_multichannel_vs_decoder[7_1-5_1_4]": 63, - "test_multichannel_vs_decoder[7_1-7_1_4]": 63, - "test_multichannel_vs_decoder[7_1-MONO]": 38, - "test_multichannel_vs_decoder[7_1-STEREO]": 44, - "test_multichannel_vs_decoder[7_1_4-5_1]": 62, - "test_multichannel_vs_decoder[7_1_4-5_1_2]": 63, - "test_multichannel_vs_decoder[7_1_4-5_1_4]": 63, - "test_multichannel_vs_decoder[7_1_4-7_1]": 62, - "test_multichannel_vs_decoder[7_1_4-MONO]": 41, - "test_multichannel_vs_decoder[7_1_4-STEREO]": 46, - "test_multichannel_vs_decoder[STEREO-MONO]": 17, } diff --git a/tests/renderer/data/renderer_config_format_readme.txt b/tests/renderer/data/renderer_config_format_readme.txt index adf4f0136276b8c2de29a85722c39dd1d419efd7..1fe493b279511f0ba4a733a95b7568e8e6e09ae7 100644 --- a/tests/renderer/data/renderer_config_format_readme.txt +++ b/tests/renderer/data/renderer_config_format_readme.txt @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/tests/renderer/run_test_renderer_vs_decoder.sh b/tests/renderer/run_test_renderer_vs_decoder.sh deleted file mode 100755 index 215a6435b0d1489dba398c0bb7b489543a1dd71b..0000000000000000000000000000000000000000 --- a/tests/renderer/run_test_renderer_vs_decoder.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# WARNING! This script is a temporary helper, ideally these steps should be done manually and the pytest suite also run manually -cd ../../ -mkdir build -cmake -B build -G "Unix Makefiles" -DDEC_TO_REND_FLOAT_DUMP=true -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true -cmake --build build -- -j -python3 -m pytest -q -n 1 -rA tests/renderer/test_renderer_vs_decoder.py - -echo "WARNING! Existing executables in root were overwritten!" diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 97ccf03c940374d2c9a0deaa6365d83df843bcae..866d2eee2c91eb9f231705d4117f5fe5a532dda6 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -28,30 +28,30 @@ import pytest + from .utils import * """ Ambisonics """ -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics(test_info, in_fmt, out_fmt): - compare_renderer_vs_pyscripts(test_info, in_fmt, out_fmt) + run_renderer(in_fmt, out_fmt) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt): - compare_renderer_vs_crend_unit_test(test_info, in_fmt, out_fmt) + run_renderer(in_fmt, out_fmt) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): - compare_renderer_vs_crend_unit_test( - test_info, + run_renderer( in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), @@ -61,10 +61,10 @@ def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): """ Multichannel """ -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) def test_multichannel(test_info, in_fmt, out_fmt): - compare_renderer_vs_pyscripts(test_info, in_fmt, out_fmt) + run_renderer(in_fmt, out_fmt) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @@ -73,7 +73,7 @@ def test_multichannel_binaural_static(test_info, in_fmt, out_fmt): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - compare_renderer_vs_crend_unit_test(test_info, in_fmt, out_fmt) + run_renderer(in_fmt, out_fmt) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -84,15 +84,13 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file pytest.skip("MONO or STEREO to Binaural rendering unsupported") if (in_fmt == "5_1" or in_fmt == "7_1") and out_fmt == "BINAURAL": - compare_renderer_vs_td_standalone( - test_info, + run_renderer( in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), ) else: - compare_renderer_vs_crend_unit_test( - test_info, + run_renderer( in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), @@ -102,12 +100,10 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file """ ISM """ -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) def test_ism(test_info, in_fmt, out_fmt): - compare_renderer_vs_pyscripts( - test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt] - ) + run_renderer(in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt]) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @@ -119,13 +115,9 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt): in_meta_files = None if out_fmt == "BINAURAL": - compare_renderer_vs_td_standalone( - test_info, in_fmt, out_fmt, in_meta_files=in_meta_files - ) + run_renderer(in_fmt, out_fmt, in_meta_files=in_meta_files) else: - compare_renderer_vs_pyscripts( - test_info, in_fmt, out_fmt, in_meta_files=in_meta_files - ) + run_renderer(in_fmt, out_fmt, in_meta_files=in_meta_files) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -138,16 +130,14 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): in_meta_files = None if out_fmt == "BINAURAL": - compare_renderer_vs_td_standalone( - test_info, + run_renderer( in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, ) else: - compare_renderer_vs_pyscripts( - test_info, + run_renderer( in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), @@ -158,12 +148,9 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): """ MASA """ -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) def test_masa(test_info, in_fmt, out_fmt): - # # TODO: implement MASA in Python, compare BE - # compare_renderer_vs_pyscripts( test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt] - # ) run_renderer(in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt]) @@ -182,19 +169,16 @@ def test_masa(test_info, in_fmt, out_fmt): """ Custom loudspeaker layouts """ -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) def test_custom_ls_input(test_info, in_layout, out_fmt): - compare_renderer_vs_pyscripts( - test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt - ) + run_renderer(CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt) @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) -@pytest.mark.parametrize("in_fmt", OUTPUT_FORMATS) +@pytest.mark.parametrize("in_fmt", OUTPUT_FORMATS[2:]) def test_custom_ls_output(test_info, in_fmt, out_fmt): - compare_renderer_vs_pyscripts( - test_info, + run_renderer( in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), ) @@ -203,8 +187,7 @@ def test_custom_ls_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("in_fmt", CUSTOM_LS_TO_TEST) def test_custom_ls_input_output(test_info, in_fmt, out_fmt): - compare_renderer_vs_pyscripts( - test_info, + run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_fmt}.txt"), CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), ) @@ -213,8 +196,7 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt): - compare_renderer_vs_pyscripts( - test_info, + run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, ) @@ -224,8 +206,7 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, trj_file): - compare_renderer_vs_pyscripts( - test_info, + run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), @@ -235,11 +216,10 @@ def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, tr """ Metadata / scene description input """ -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST) def test_metadata(test_info, in_fmt, out_fmt): - compare_renderer_vs_pyscripts( - test_info, + run_renderer( "META", out_fmt, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), diff --git a/tests/renderer/test_renderer_be_comparison.py b/tests/renderer/test_renderer_be_comparison.py index 5d89136a890dbdd0298fde5f18d94be8276d8929..815d7fd640b2d53dd5fffcc5f3402e3a8c552a52 100644 --- a/tests/renderer/test_renderer_be_comparison.py +++ b/tests/renderer/test_renderer_be_comparison.py @@ -37,13 +37,13 @@ from .utils import * @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics(test_info, in_fmt, out_fmt): - compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt) + compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt): - compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt) + compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -55,6 +55,7 @@ def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + is_comparetest=True, ) @@ -64,7 +65,7 @@ def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) def test_multichannel(test_info, in_fmt, out_fmt): - compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt) + compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @@ -73,7 +74,7 @@ def test_multichannel_binaural_static(test_info, in_fmt, out_fmt): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt) + compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -88,6 +89,7 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + is_comparetest=True, ) @@ -111,7 +113,7 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt): in_meta_files = None compare_renderer_vs_mergetarget( - test_info, in_fmt, out_fmt, in_meta_files=in_meta_files + test_info, in_fmt, out_fmt, in_meta_files=in_meta_files, is_comparetest=True ) @@ -130,6 +132,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, + is_comparetest=True, ) @@ -143,7 +146,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) def test_custom_ls_input(test_info, in_layout, out_fmt): compare_renderer_vs_mergetarget( - test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt + test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, is_comparetest=True ) @@ -151,7 +154,7 @@ def test_custom_ls_input(test_info, in_layout, out_fmt): @pytest.mark.parametrize("in_fmt", OUTPUT_FORMATS) def test_custom_ls_output(test_info, in_fmt, out_fmt): compare_renderer_vs_mergetarget( - test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt") + test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), is_comparetest=True ) @@ -162,6 +165,7 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_fmt}.txt"), CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), + is_comparetest=True, ) @@ -169,9 +173,7 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt): compare_renderer_vs_mergetarget( - test_info, - CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), - out_fmt, + test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, is_comparetest=True ) @@ -184,6 +186,7 @@ def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, tr CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + is_comparetest=True, ) @@ -198,4 +201,5 @@ def test_metadata(test_info, in_fmt, out_fmt): "META", out_fmt, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), + is_comparetest=True, ) diff --git a/tests/renderer/test_renderer_vs_decoder.py b/tests/renderer/test_renderer_vs_decoder.py deleted file mode 100644 index cd88580d9b9644c056a2498dd78ed1ab646deff0..0000000000000000000000000000000000000000 --- a/tests/renderer/test_renderer_vs_decoder.py +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env python3 - -""" - (C) 2022 Baseline Development Group with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies OY, Orange, - Panasonic Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The Baseline Development Group consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies OY, Orange, - Panasonic Corporation, Qualcomm Technologies, Inc., and VoiceAge Corporation retain full ownership - rights in their respective contributions in the software. No license of any kind, including but not - limited to patent license, of any foregoing parties is hereby granted by implication, estoppel or - otherwise. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and/or fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. -""" - -from .utils import * - -""" Ambisonics """ - - -@pytest.mark.skip("Ambisonics comparison requires CLDFB interface") -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics_vs_decoder(test_info, in_fmt, out_fmt): - compare_renderer_vs_decoder(test_info, in_fmt, out_fmt) - - -@pytest.mark.skip("Ambisonics comparison requires CLDFB interface") -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics_binaural_static_vs_decoder(test_info, in_fmt, out_fmt): - compare_renderer_vs_decoder(test_info, in_fmt, out_fmt) - - -@pytest.mark.skip("Ambisonics comparison requires CLDFB interface") -@pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics_binaural_headrotation_vs_decoder( - test_info, in_fmt, out_fmt, trj_file -): - compare_renderer_vs_decoder( - test_info, - in_fmt, - out_fmt, - trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - ) - - -""" Multichannel """ - - -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel_vs_decoder(test_info, in_fmt, out_fmt): - if in_fmt == "MONO": - pytest.skip("(EVS) Mono decoder rendering unsupported") - - if in_fmt == "STEREO" and out_fmt in ["FOA", "HOA2", "HOA3"]: - pytest.skip("Stereo to Ambisonics rendering unsupported in the decoder") - - compare_renderer_vs_decoder(test_info, in_fmt, out_fmt) - - -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel_binaural_static_vs_decoder(test_info, in_fmt, out_fmt): - if in_fmt in ["MONO", "STEREO"]: - pytest.skip("MONO or STEREO to Binaural rendering unsupported") - - compare_renderer_vs_decoder(test_info, in_fmt, out_fmt) - - -@pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel_binaural_headrotation_vs_decoder( - test_info, in_fmt, out_fmt, trj_file -): - if in_fmt in ["MONO", "STEREO"]: - pytest.skip("MONO or STEREO to Binaural rendering unsupported") - - compare_renderer_vs_decoder( - test_info, - in_fmt, - out_fmt, - trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - ) - - -""" ISM """ - - -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism_vs_decoder(test_info, in_fmt, out_fmt): - compare_renderer_vs_decoder(test_info, in_fmt, out_fmt) - - -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism_binaural_static_vs_decoder(test_info, in_fmt, out_fmt): - compare_renderer_vs_decoder(test_info, in_fmt, out_fmt) - - -@pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) -@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism_binaural_headrotation_vs_decoder(test_info, in_fmt, out_fmt, trj_file): - compare_renderer_vs_decoder( - test_info, - in_fmt, - out_fmt, - trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - ) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 6030440f074ed8757a61d215a6713045df0a004e..143c33b066eaa5961ad3421ffe0793bea94720d6 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -100,51 +100,6 @@ def check_BE( ) -def run_enc( - in_fmt: str, - bit_file: str, - in_meta_files: Optional[list] = None, -) -> None: - - cmd = IVAS_COD_CMD[:] - cmd[1] = FORMAT_TO_IVAS[in_fmt][0] - cmd[2] = FORMAT_TO_IVAS[in_fmt][1] - cmd[3] = FORMAT_TO_IVAS_BR[in_fmt] - cmd[5] = str(FORMAT_TO_FILE[in_fmt]) - cmd[6] = bit_file - - if in_meta_files is not None: - cmd[3:3] = [*in_meta_files] - - if in_fmt == "MONO": - cmd.pop(1) - cmd.pop(1) - elif in_fmt == "STEREO": - cmd.pop(2) - - run_cmd(cmd) - - -def run_dec( - bit_file: str, - out_file: str, - out_fmt: str, - trj_file: Optional[str] = None, -) -> Tuple[np.ndarray, int]: - - cmd = IVAS_DEC_CMD[:] - cmd[2] = out_fmt - cmd[4] = bit_file - cmd[5] = out_file - - if trj_file is not None and out_fmt in ["BINAURAL", "BINAURAL_ROOM"]: - cmd[1:1] = ["-T", str(trj_file)] - - run_cmd(cmd) - - return pyaudio3dtools.audiofile.readfile(out_file) - - def run_renderer( in_fmt: str, out_fmt: str, @@ -153,6 +108,7 @@ def run_renderer( trj_file: Optional[str] = None, output_path_base: str = OUTPUT_PATH_CUT, binary_suffix: str = "", + is_comparetest: Optional[bool] = False, ) -> Tuple[np.ndarray, int]: """CuT creation with standalone renderer""" if trj_file is not None: @@ -165,6 +121,11 @@ def run_renderer( else: out_name = out_fmt + if is_comparetest: + FORMAT_TO_FILE = FORMAT_TO_FILE_COMPARETEST + else: + FORMAT_TO_FILE = FORMAT_TO_FILE_SMOKETEST + if metadata_input is not None: in_file = metadata_input in_name = metadata_input.stem @@ -196,159 +157,13 @@ def run_renderer( return pyaudio3dtools.audiofile.readfile(out_file) -def run_renderer_ext( - in_file: str, - in_fmt: str, - out_fmt: str, - in_meta_files: Optional[list] = None, - trj_file: Optional[str] = None, -) -> Tuple[np.ndarray, int]: - """Run renderer with decoder float dump""" - if trj_file is not None: - trj_name = f"_{trj_file.stem}" - else: - trj_name = "" - - if not isinstance(out_fmt, str): - out_name = f"{out_fmt.stem}" - else: - out_name = out_fmt - - in_name = in_fmt - - out_file = str(OUTPUT_PATH_CUT.joinpath(f"{in_name}_to_{out_name}{trj_name}.wav")) - - cmd = RENDERER_CMD[:] - cmd[2] = str(in_file) - cmd[4] = str(in_fmt) - cmd[6] = str(out_file) - cmd[8] = str(out_fmt) - - if in_meta_files is not None: - cmd[5:5] = ["-im", *in_meta_files] - - if trj_file is not None: - cmd.extend(["-tf", str(trj_file)]) - - run_cmd(cmd) - - return pyaudio3dtools.audiofile.readfile(out_file) - - -def run_crend_unittest( - in_fmt: str, - out_fmt: str, - metadata_input: Optional[str] = None, - in_meta_files: Optional[list] = None, - trj_file: Optional[str] = None, -) -> Tuple[np.ndarray, int]: - """Reference creation with standalone renderer""" - if trj_file is not None: - trj_name = f"_{trj_file.stem}" - else: - trj_name = "" - - if not isinstance(out_fmt, str): - out_name = f"{out_fmt.stem}" - else: - out_name = out_fmt - - if metadata_input is not None: - in_file = metadata_input - in_name = metadata_input.stem - elif not isinstance(in_fmt, str): - in_file = FORMAT_TO_FILE[in_fmt.stem] - in_name = in_fmt.stem - else: - in_file = FORMAT_TO_FILE[in_fmt] - in_name = in_fmt - - out_file = str(OUTPUT_PATH_REF.joinpath(f"{in_name}_to_{out_name}{trj_name}.wav")) - - cmd = CREND_CMD[:] - cmd[6] = FORMAT_TO_CREND_FORMAT[str(in_fmt)] - cmd[8] = FORMAT_TO_CREND_FORMAT[str(out_fmt)] - cmd[10] = str(in_file) - cmd[12] = str(out_file) - if out_fmt == "BINAURAL_ROOM": - cmd.append("-brir") - - if trj_file is not None: - cmd.extend(["-t", str(trj_file)]) - cmd.extend(["-otr", "REF"]) - - run_cmd(cmd) - - return pyaudio3dtools.audiofile.readfile(out_file) - - -def run_td_standalone( - in_fmt: str, - out_fmt: str, - metadata_input: Optional[str] = None, - in_meta_files: Optional[list] = None, - trj_file: Optional[str] = None, -): - """Reference creation with TD Object renderer""" - if trj_file is not None: - trj_name = f"_{trj_file.stem}" - else: - trj_name = "" - - if not isinstance(out_fmt, str): - out_name = f"{out_fmt.stem}" - else: - out_name = out_fmt - - if metadata_input is not None: - in_file = metadata_input - in_name = metadata_input.stem - elif not isinstance(in_fmt, str): - in_file = FORMAT_TO_FILE[in_fmt.stem] - in_name = in_fmt.stem - else: - in_file = FORMAT_TO_FILE[in_fmt] - in_name = in_fmt - - out_file = str(OUTPUT_PATH_REF.joinpath(f"{in_name}_to_{out_name}{trj_name}.pcm")) - - in_spfmt = pyaudio3dtools.spatialaudioformat.Format(in_fmt) - - with TemporaryDirectory() as tmp_dir: - # write PCM tmp file - tmp_dir = Path(tmp_dir) - in_file_pcm = tmp_dir.joinpath(in_file.stem + ".pcm") - - in_sig, _ = pyaudio3dtools.audiofile.readfile(in_file) - pyaudio3dtools.audiofile.writefile(in_file_pcm, in_sig) - - cmd = TDRENDERER_CMD[:] - cmd[2] = str(in_file_pcm) - cmd[3] = str(out_file) - - if in_spfmt.isloudspeaker: - cmd[1:1] = ["-mc", in_spfmt.name] - else: - cmd[1:1] = str(in_spfmt.nchannels) - if in_meta_files is not None: - cmd[2:2] = in_meta_files - else: - cmd[2:2] = ["NULL"] * in_spfmt.nchannels - - if trj_file is not None: - cmd[1:1] = ["-T", str(trj_file)] - - run_cmd(cmd) - - return pyaudio3dtools.audiofile.readfile(out_file, nchannels=2) - - def run_pyscripts( in_fmt, out_fmt, metadata_input: Optional[str] = None, in_meta_files: Optional[list] = None, trj_file: Optional[str] = None, + is_comparetest: Optional[bool] = False, ) -> Tuple[np.ndarray, int]: """Reference creation with pyaudio3dtools""" if trj_file is not None: @@ -361,6 +176,11 @@ def run_pyscripts( else: out_name = out_fmt + if is_comparetest: + FORMAT_TO_FILE = FORMAT_TO_FILE_COMPARETEST + else: + FORMAT_TO_FILE = FORMAT_TO_FILE_SMOKETEST + if metadata_input is not None: in_file = metadata_input in_name = metadata_input.stem @@ -402,60 +222,3 @@ def compare_renderer_vs_pyscripts(test_info, in_fmt, out_fmt, **kwargs): ref, ref_fs = run_pyscripts(in_fmt, out_fmt, **kwargs) cut, cut_fs = run_renderer(in_fmt, out_fmt, **kwargs) check_BE(test_info, ref, ref_fs, cut, cut_fs) - - -def compare_renderer_vs_crend_unit_test(test_info, in_fmt, out_fmt, **kwargs): - ref, ref_fs = run_crend_unittest(in_fmt, out_fmt, **kwargs) - cut, cut_fs = run_renderer(in_fmt, out_fmt, **kwargs) - check_BE(test_info, ref, ref_fs, cut, cut_fs) - - -def compare_renderer_vs_td_standalone(test_info, in_fmt, out_fmt, **kwargs): - ref, ref_fs = run_td_standalone(in_fmt, out_fmt, **kwargs) - cut, cut_fs = run_renderer(in_fmt, out_fmt, **kwargs) - check_BE(test_info, ref, ref_fs, cut, cut_fs) - - -def compare_renderer_vs_decoder(test_info, in_fmt, out_fmt, **kwargs): - if "trj_file" in kwargs: - trj_name = f"_{kwargs['trj_file'].stem}" - else: - trj_name = "" - with TemporaryDirectory() as tmp_dir: - tmp_dir = Path(tmp_dir) - - in_meta_files = None - bit_file = str(tmp_dir.joinpath(f"{in_fmt}_to_{out_fmt}{trj_name}.192")) - out_file_decoder = str( - OUTPUT_PATH_REF.joinpath(f"{in_fmt}_to_{out_fmt}{trj_name}.wav") - ) - - # Ref: cod -> dec (out_fmt) - if in_fmt in FORMAT_TO_METADATA_FILES.keys(): - in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] - - # encoder - run_enc(in_fmt, bit_file, in_meta_files=in_meta_files) - # decoder renderer - ref, ref_fs = run_dec(bit_file, out_file_decoder, out_fmt, **kwargs) - - # CuT cod -> dec (in_fmt) -> rend - if in_fmt in FORMAT_TO_METADATA_FILES.keys(): - tmp_fmt = "EXT" - in_meta_files = [ - str(tmp_dir.joinpath(f"{in_fmt}_to_EXT{trj_name}.wav.{n}.csv")) - for n in range(int(in_fmt[-1])) - ] - else: - tmp_fmt = in_fmt - - out_file_ext = str(tmp_dir.joinpath(f"{in_fmt}_to_{tmp_fmt}{trj_name}.wav")) - - # passthrough decoder - run_dec(bit_file, out_file_ext, tmp_fmt, **kwargs) - # external renderer - cut, cut_fs = run_renderer_ext( - out_file_ext, in_fmt, out_fmt, in_meta_files=in_meta_files, **kwargs - ) - - check_BE(test_info, ref, ref_fs, cut, cut_fs) diff --git a/tests/run_pytests.py b/tests/run_pytests.py index 1fc66147622b20faf1359eed855f53b937f4c7c6..d20de6ef720096eae11b1389d82c975c26470d3a 100755 --- a/tests/run_pytests.py +++ b/tests/run_pytests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 __copyright__ = """ -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/tests/test_param_file.py b/tests/test_param_file.py index 730acd5c00ce6d065ab2002948b451e45b6067db..a4cfa12e2ad2ad488b82fbce4aa2d2fbb905d0bb 100644 --- a/tests/test_param_file.py +++ b/tests/test_param_file.py @@ -1,6 +1,6 @@ __copyright__ = \ """ -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,8 @@ import errno import platform from subprocess import run import pytest -from cmp_custom import cmp_custom +from cmp_pcm import cmp_pcm +from cut_pcm import cut_samples from conftest import EncoderFrontend, DecoderFrontend from testconfig import PARAM_FILE @@ -148,9 +149,20 @@ def test_param_file_tests( bitstream_file = enc_split.pop() testv_file = enc_split.pop() - sampling_rate = int(enc_split.pop()) + fs = enc_split.pop() + sampling_rate = int(fs) bitrate = enc_split.pop() + sba_br_switching_dtx = 0 + if ( + not bitrate.isdigit() + and "-dtx" in enc_opts.split() + and "-sba" in enc_opts.split() + ): + sba_br_switching_dtx = 1 + cut_file = pre_proc_input(testv_file, fs) + testv_file = cut_file + # bitrate can be a filename: remove leading "../" if bitrate.startswith("../"): bitrate = bitrate[3:] @@ -176,7 +188,10 @@ def test_param_file_tests( enc_split, update_ref, ) - + if sba_br_switching_dtx == 1: + is_exist = os.path.exists(cut_file) + if is_exist: + os.remove(cut_file) # check for networkSimulator_g192 command line if sim_opts != "": sim_split = sim_opts.split() @@ -271,12 +286,12 @@ def test_param_file_tests( tracefile_dec, ) - # compare if update_ref in [0, 2]: - compare( - f"{dut_base_path}/param_file/dec/{output_file}", - f"{reference_path}/param_file/dec/{output_file}", - ) + dut_file = f"{dut_base_path}/param_file/dec/{output_file}" + ref_file = f"{reference_path}/param_file/dec/{output_file}" + fs = int(sampling_rate) * 1000 + cmp_result, reason = cmp_pcm(dut_file, ref_file, output_config, fs) + assert cmp_result == 0, reason # remove DUT output files when test result is OK (to save disk space) if not keep_files: @@ -335,6 +350,23 @@ def encode( ) +def pre_proc_input(testv_file, fs): + cut_from = "0.0" + cut_len = "5.0" + cut_gain = "0.004" + if "stvFOA" in testv_file: + num_channel = "4" + elif "stv2OA" in testv_file: + num_channel = "9" + elif "stv3OA" in testv_file: + num_channel = "16" + cut_file = testv_file.replace(".pcm", num_channel + "chn_" + cut_gain + ".pcm") + cut_samples( + testv_file, cut_file, num_channel, fs + "000", cut_from, cut_len, cut_gain + ) + return cut_file + + def simulate( reference_path, dut_base_path, @@ -356,14 +388,10 @@ def simulate( if platform.system() == "Windows": netsim = [os.path.join(rootdir, "scripts", "tools", "Win32", "networkSimulator_g192.exe")] - elif platform.system() == "Linux": - # there is no Linux binary available -> use the Win32 binary via wine - netsim = [ - "wine", - os.path.join(rootdir, "scripts", "tools", "Win32", "networkSimulator_g192.exe"), - ] - elif platform.system() == "Darwin": - netsim = [os.path.join(rootdir, "scripts", "tools", "Darwin", "networkSimulator_g192")] + elif platform.system() in ["Linux", "Darwin"]: + netsim = [os.path.join(rootdir, "scripts", "tools", platform.system(), "networkSimulator_g192")] + else: + assert False, f"networkSimulator_g192 not available for {platform.system()}" if update_ref == 1 or update_ref == 2 and not os.path.exists(ref_out_file): # call network simulator on REF encoder output @@ -442,19 +470,3 @@ def decode( dut_out_file, add_option_list=add_option_list, ) - - -def compare( - pcm_file_1, - pcm_file_2, -): - """ - Compare two PCM files. - Currently, both PCM files are treated like mono files. - This is just fine when checking for bit-exactness. - More advanced comparisons are possible and might come with a future update. - """ - sample_size = "2" # 16-bit samples - tolerance = "0" # zero tolerance for BE testing - cmp_result, reason = cmp_custom(pcm_file_1, pcm_file_2, sample_size, tolerance) - assert cmp_result == 0, reason diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index b885c06ddd03f36fd9c361eedae712f213e3f73c..4920a9c59cec4cae613850989fb2802065dbf37a 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -1,6 +1,6 @@ __copyright__ = \ """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -38,7 +38,7 @@ import os import errno import pytest -from cmp_custom import cmp_custom +from cmp_pcm import cmp_pcm from conftest import DecoderFrontend # params @@ -49,7 +49,7 @@ ivas_br_list = ['32000', '64000', '96000', '256000'] sampling_rate_list = ['48', '32', '16'] agc_list = [-1, 0, 1] -AbsTol = '3' +AbsTol = '0' def check_and_makedir(dir_path): @@ -151,12 +151,13 @@ def sba_dec_plc( dut_out_raw = f"{dut_out_dir}/{plc_tag_out}.raw" ref_out_raw = f"{ref_out_dir}/{plc_tag_out}.raw" + output_config = "FOA" if ref_decoder_path: ref_decoder = DecoderFrontend(ref_decoder_path, "REF") # call REF decoder ref_decoder.run( - "FOA", + output_config, sampling_rate, ref_in_pkt, ref_out_raw, @@ -166,7 +167,7 @@ def sba_dec_plc( if update_ref == 0: # call DUT decoder decoder_frontend.run( - "FOA", + output_config, sampling_rate, ref_in_pkt_dutenc, dut_out_raw, @@ -174,16 +175,8 @@ def sba_dec_plc( ) # -------------- compare cmd -------------- - - end_skip_samples = '0' - - cmp_result, reason = cmp_custom( - dut_out_raw, - ref_out_raw, - "2", - AbsTol, - end_skip_samples - ) + fs = int(sampling_rate) * 1000 + cmp_result, reason = cmp_pcm(dut_out_raw, ref_out_raw, output_config, fs) # report compare result assert cmp_result == 0, reason diff --git a/tests/test_sba_bs_enc.py b/tests/test_sba_bs_enc.py index fcf1c00fba6a23b073e08c3255ca28ddc526bf5f..2b659432c214b3f7145b6d8ddb5250d5ffb73aad 100644 --- a/tests/test_sba_bs_enc.py +++ b/tests/test_sba_bs_enc.py @@ -1,6 +1,6 @@ __copyright__ = \ """ - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other @@ -39,7 +39,7 @@ import os import errno import pytest -from cmp_custom import cmp_custom +from cmp_pcm import cmp_pcm from cut_pcm import cut_samples from conftest import EncoderFrontend, DecoderFrontend @@ -63,7 +63,7 @@ agc_list = [-1, 0, 1] sample_rate_bw_idx_list = [('48', 'SWB'), ('48', 'WB'), ('32', 'WB')] -AbsTol = '4' +AbsTol = '0' def check_and_makedir(dir_path): @@ -593,17 +593,8 @@ def sba_dec( dut_out_raw, ) - # -------------- compare cmd -------------- - - end_skip_samples = '0' - - cmp_result, reason = cmp_custom( - dut_out_raw, - ref_out_raw, - "2", - AbsTol, - end_skip_samples - ) + fs = int(sampling_rate) * 1000 + cmp_result, reason = cmp_pcm(dut_out_raw, ref_out_raw, output_config, fs) # report compare result assert cmp_result == 0, reason diff --git a/tests/testconfig.py b/tests/testconfig.py index f4827a004f91b5e63a1330edc71c2da70fbd2967..12d170ba8db49171e16add1f827a590ffcb09bd3 100644 --- a/tests/testconfig.py +++ b/tests/testconfig.py @@ -1,6 +1,6 @@ __copyright__ = \ """ -(C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +(C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other diff --git a/work_in_progress/readme.txt b/work_in_progress/readme.txt index e06e36def1b96e1283b85e34001d1e553450f87d..02be8c90f2f1ad57a9b3e225f171abe1e95774c0 100644 --- a/work_in_progress/readme.txt +++ b/work_in_progress/readme.txt @@ -1,6 +1,6 @@ /****************************************************************************************************** - (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other