From cbe1cb6fb5d2911dcbeca5ff8e2bb915b2cd6160 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 Jan 2024 11:32:21 +0100 Subject: [PATCH 01/15] restore old hrtf file format --- .../binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin | 4 ++-- .../binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin | 4 ++-- .../binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin index ffb4662687..ecf077ad83 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:600f05865baeeb01c6435725f87c6a91e6e75e481ffae2ec3d6a7c62aba5fc7c -size 1971974 +oid sha256:4ad61e24a0be84cd5c9506b1b1b24bd9efffad1cbdedb5fb399b2599ea8b515c +size 1971738 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin index 97190b44f8..b835127817 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cda90cc841793f0a1ed76b580e46b9989564b055b664ed6746ebfa0033a74f2b -size 2430778 +oid sha256:e3cd94b6325244546f888fd1e6a703619c8c8f952fbfc477e45ab915214504db +size 2430542 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin index e1f6981162..4751e031a7 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1654ead069a420b97af8755edbb1c358806aa3c5c07db3113789fe0942642de -size 2673946 +oid sha256:879ad86ab39e789500ad973a2ae8f5e5350bd28eb57823619804e66085710fe0 +size 2673710 -- GitLab From 839a0e92a08e497c1cd868fe3c21c84f16bd793f Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 Jan 2024 12:32:27 +0100 Subject: [PATCH 02/15] restore even older HRTF file format --- .../binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin | 4 ++-- .../binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin | 4 ++-- .../binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin index ecf077ad83..9a988eb588 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ad61e24a0be84cd5c9506b1b1b24bd9efffad1cbdedb5fb399b2599ea8b515c -size 1971738 +oid sha256:a263c5498fc7ec0407c4f448e78e1f0aaf97163234ef44f2f79a1dfcb5adc37f +size 1968026 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin index b835127817..73f151217e 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3cd94b6325244546f888fd1e6a703619c8c8f952fbfc477e45ab915214504db -size 2430542 +oid sha256:8622b0f7969a3126f8ab147c10392916b5e9cbe8d8bd9c04798abd3836e36c76 +size 2431246 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin index 4751e031a7..d847e74613 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:879ad86ab39e789500ad973a2ae8f5e5350bd28eb57823619804e66085710fe0 -size 2673710 +oid sha256:30bcf48f0c851d4e676d5b92be7eb3032442f5106a1072ef8fc9b335d60d0fbf +size 2673694 -- GitLab From ae8cdf891373d650a62fe2659804eed96ce63039 Mon Sep 17 00:00:00 2001 From: knj Date: Tue, 5 Mar 2024 15:20:26 +0100 Subject: [PATCH 03/15] add helper script for removing unsupported testcases --- ci/remove_unsupported_testcases.py | 112 +++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 ci/remove_unsupported_testcases.py diff --git a/ci/remove_unsupported_testcases.py b/ci/remove_unsupported_testcases.py new file mode 100644 index 0000000000..1c2b05e44b --- /dev/null +++ b/ci/remove_unsupported_testcases.py @@ -0,0 +1,112 @@ +__copyright__ = """ +(C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. 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. +""" + +from pathlib import Path +import argparse + +# Enter tag of testcases to remove here WITHOUT the leading // +TESTCASES = [ + "SBA at 48 kbps, 32kHz in, 48kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", + "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, exo, random FER at 5%", + "SBA at 128 kbps, 32kHZ in, 16kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", + "Planar SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", + "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR", + "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file)", + "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 16kHz out, BINAURAL_ROOM out (Model from file)", + "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 32kHz out, BINAURAL out (Model from file)", + "3 ISM with metadata at 192 kbps, 48 kHz in, 48 kHz out, BINAURAL out (Model from file)", + "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out (Model from file)", + "Planar SBA at 128 kbps, 48kHZ in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", + "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR, exo", + "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, random FER at 5%", + "OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out", + "OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out", + "OSBA FOA 4ISM at 384 kbps, 32kHz in, 32kHz out, BINAURAL ROOM IR (Model from file) out", + "4 ISM with extended metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out, combined render config, directivity configuration with identifiers", + "OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out", + "OSBA FOA 1ISM at 48 kbps, 16kHz in, 16kHz out, BINAURAL_ROOM_REVERB (Model from file) out", + "OSBA planar 2OA 4ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL ROOM REVERB (Model from file) out", + "OSBA FOA 4ISM at 512 kbps, 48kHz in, 48kHz out, BINAURAL (Model from file) out", + "SBA at 48 kbps, 32kHz in, 48kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", + "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, exo, random FER at 5%", + "SBA at 128 kbps, 32kHZ in, 16kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", + "Planar SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", + "Multi-channel 5_1 bitrate switching from 24.4 kbps to 256 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 10%, bandwidth switching", + "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR", + "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file)", + "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 16kHz out, BINAURAL_ROOM out (Model from file)", + "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 32kHz out, BINAURAL out (Model from file)", + "3 ISM with metadata at 192 kbps, 48 kHz in, 48 kHz out, BINAURAL out (Model from file)", + "OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 5%, bandwidth switching", + "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out (Model from file)", + "Planar SBA at 128 kbps, 48kHZ in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", + "OSBA FOA 2ISM at 64 kbps, 48kHz in, 48kHz out, HOA3 out, bandwidth switching", + "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR, exo", + "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, random FER at 5%", + "OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out", + "OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out", + "OSBA FOA 4ISM at 384 kbps, 32kHz in, 32kHz out, BINAURAL ROOM IR (Model from file) out", + "4 ISM with extended metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out, combined render config, directivity configuration with identifiers", + "OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out", + "OSBA FOA 1ISM at 48 kbps, 16kHz in, 16kHz out, BINAURAL_ROOM_REVERB (Model from file) out", + "OSBA planar 2OA 4ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL ROOM REVERB (Model from file) out", + "OSBA FOA 4ISM at 512 kbps, 48kHz in, 48kHz out, BINAURAL (Model from file) out", +] + + +def remove_testcases(cfg: Path, testcases: list): + """ + Go through file line by line and copy all testcases except the given ones + """ + with open(cfg, "r") as f: + content_in = f.readlines() + + content_out = list() + copy_flag = True + for line in content_in: + if any([tc in line for tc in testcases]): + copy_flag = False + + if copy_flag: + content_out.append(line) + elif line == "\n": + copy_flag = True + + with open(cfg, "w") as f: + f.write("".join(content_out)) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("cfg_files", nargs="+", type=Path) + args = parser.parse_args() + + for f in args.cfg_files: + remove_testcases(f, TESTCASES) -- GitLab From 5962bcc968a7344cbe33bba452a2533538e18046 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 6 Mar 2024 09:39:35 +0100 Subject: [PATCH 04/15] add hrtf testcases back --- ci/remove_unsupported_testcases.py | 34 ------------------------------ 1 file changed, 34 deletions(-) diff --git a/ci/remove_unsupported_testcases.py b/ci/remove_unsupported_testcases.py index 1c2b05e44b..fbf2d8453c 100644 --- a/ci/remove_unsupported_testcases.py +++ b/ci/remove_unsupported_testcases.py @@ -33,51 +33,17 @@ import argparse # Enter tag of testcases to remove here WITHOUT the leading // TESTCASES = [ - "SBA at 48 kbps, 32kHz in, 48kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", - "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, exo, random FER at 5%", - "SBA at 128 kbps, 32kHZ in, 16kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", - "Planar SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", - "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR", - "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file)", - "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 16kHz out, BINAURAL_ROOM out (Model from file)", - "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 32kHz out, BINAURAL out (Model from file)", - "3 ISM with metadata at 192 kbps, 48 kHz in, 48 kHz out, BINAURAL out (Model from file)", - "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out (Model from file)", - "Planar SBA at 128 kbps, 48kHZ in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", - "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR, exo", - "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, random FER at 5%", "OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out", "OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out", - "OSBA FOA 4ISM at 384 kbps, 32kHz in, 32kHz out, BINAURAL ROOM IR (Model from file) out", "4 ISM with extended metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out, combined render config, directivity configuration with identifiers", "OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out", - "OSBA FOA 1ISM at 48 kbps, 16kHz in, 16kHz out, BINAURAL_ROOM_REVERB (Model from file) out", - "OSBA planar 2OA 4ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL ROOM REVERB (Model from file) out", - "OSBA FOA 4ISM at 512 kbps, 48kHz in, 48kHz out, BINAURAL (Model from file) out", - "SBA at 48 kbps, 32kHz in, 48kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", - "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, exo, random FER at 5%", - "SBA at 128 kbps, 32kHZ in, 16kHz out, BINAURAL_ROOM_REVERB out (Model from file), HR", - "Planar SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", "Multi-channel 5_1 bitrate switching from 24.4 kbps to 256 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 10%, bandwidth switching", - "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR", - "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file)", - "Multi-channel 5_1_4 at 512 kbps, 48kHz in, 16kHz out, BINAURAL_ROOM out (Model from file)", - "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 32kHz out, BINAURAL out (Model from file)", - "3 ISM with metadata at 192 kbps, 48 kHz in, 48 kHz out, BINAURAL out (Model from file)", "OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 5%, bandwidth switching", - "Multi-channel 7_1_4 at 512 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out (Model from file)", - "Planar SBA at 128 kbps, 48kHZ in, 32kHz out, BINAURAL_ROOM_REVERB out (Model from file), Config renderer, HR", "OSBA FOA 2ISM at 64 kbps, 48kHz in, 48kHz out, HOA3 out, bandwidth switching", - "2 ISM with metadata at 128 kbps, 48 kHz in, 32 kHz out, BINAURAL out (Model from file), HR, exo", - "1 ISM with metadata at 80 kbps, 48 kHz in, 16 kHz out, BINAURAL out (Model from file), HR, random FER at 5%", "OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out", "OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out", - "OSBA FOA 4ISM at 384 kbps, 32kHz in, 32kHz out, BINAURAL ROOM IR (Model from file) out", "4 ISM with extended metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out, combined render config, directivity configuration with identifiers", "OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out", - "OSBA FOA 1ISM at 48 kbps, 16kHz in, 16kHz out, BINAURAL_ROOM_REVERB (Model from file) out", - "OSBA planar 2OA 4ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL ROOM REVERB (Model from file) out", - "OSBA FOA 4ISM at 512 kbps, 48kHz in, 48kHz out, BINAURAL (Model from file) out", ] -- GitLab From 622b6c60d8511a70e02663a20fe70ad3ebd9ba67 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 14 Mar 2024 15:17:09 +0100 Subject: [PATCH 05/15] Fix tests/test_26444.py --- tests/test_26444.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_26444.py b/tests/test_26444.py index 3bcef2567a..d6850491cf 100644 --- a/tests/test_26444.py +++ b/tests/test_26444.py @@ -78,9 +78,14 @@ def test_evs_26444(test_tag): if enc_opts: enc_opts = enc_opts.replace("./", TEST_DIR + "/") - subprocess.run(["./IVAS_cod", "-q"] + enc_opts.split()[1:]) + enc_opts = enc_opts.replace("-rf rf_config.cfg", "-rf " + TEST_DIR + "/rf_config.cfg") # Special handling of this arguments since the path is missing + cmd = ["./IVAS_cod", "-q"] + enc_opts.split()[1:] + print(" ".join(["Encoder command: "] + cmd)) + subprocess.run(cmd) if dec_opts: dec_opts = dec_opts.replace("./", TEST_DIR + "/") + cmd = ["./IVAS_dec", "-q"] + dec_opts.split()[1:] + print(" ".join(["Decoder command: "] + cmd)) subprocess.run(["./IVAS_dec", "-q"] + dec_opts.split()[1:]) diff_opts = diff_opts.replace("./", TEST_DIR + "/") -- GitLab From c613d8b2b9cf737f078981188aae00793fab89f5 Mon Sep 17 00:00:00 2001 From: norvell Date: Fri, 15 Mar 2024 09:27:25 +0000 Subject: [PATCH 06/15] Add one test case to remove_unsupported_testcases.py --- ci/remove_unsupported_testcases.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/remove_unsupported_testcases.py b/ci/remove_unsupported_testcases.py index fbf2d8453c..2d23be7910 100644 --- a/ci/remove_unsupported_testcases.py +++ b/ci/remove_unsupported_testcases.py @@ -44,6 +44,7 @@ TESTCASES = [ "OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out", "4 ISM with extended metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out, combined render config, directivity configuration with identifiers", "OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out", + "SBA 3OA at 128 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB combined renderer configuration with selected acoustic environment", ] -- GitLab From a400a8a77ba10c9647b0faf33ffde9a1b39523ea Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 21 Mar 2024 19:11:24 +0100 Subject: [PATCH 07/15] Reverted tests/scale_pcm.py --- tests/scale_pcm.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/scale_pcm.py b/tests/scale_pcm.py index 356cdd90e1..9aef914da1 100755 --- a/tests/scale_pcm.py +++ b/tests/scale_pcm.py @@ -1,33 +1,33 @@ #!/usr/bin/env python3 -import argparse import os -import pathlib import sys +import argparse +import pathlib THIS_PATH = os.path.join(os.getcwd(), __file__) sys.path.append(os.path.join(os.path.dirname(THIS_PATH), "../scripts")) -import concurrent.futures - import pyaudio3dtools +import pyivastest +import numpy as np +import concurrent.futures def scale_folder(folder, factor): + files = list(folder.glob("*.wav")) with concurrent.futures.ThreadPoolExecutor() as executor: executor.map(scale_file, files, files, [factor] * len(files)) - -def scale_file(file1, file2, factor=1.0) -> None: +def scale_file(file1, file2, factor = 1.0) -> None: """ Scale file1 to file2 """ s1, fs = pyaudio3dtools.audiofile.readfile(file1) - s2 = s1 * factor + s2 = s1 * factor; pyaudio3dtools.audiofile.writefile(file2, s2, fs) - if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("folder", type=pathlib.Path) -- GitLab From bab1eb8072ff23fcc33daf188309778ac7815565 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Wed, 27 Mar 2024 17:03:56 +0100 Subject: [PATCH 08/15] Update ci/remove_unsupported_testcases.py --- ci/remove_unsupported_testcases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/remove_unsupported_testcases.py b/ci/remove_unsupported_testcases.py index 2d23be7910..5d01fe7791 100644 --- a/ci/remove_unsupported_testcases.py +++ b/ci/remove_unsupported_testcases.py @@ -42,9 +42,9 @@ TESTCASES = [ "OSBA FOA 2ISM at 64 kbps, 48kHz in, 48kHz out, HOA3 out, bandwidth switching", "OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out", "OSBA planar FOA 2ISM at 512 kbps, 48 kHz in, 48 kHz out, BINAURAL out", - "4 ISM with extended metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out, combined render config, directivity configuration with identifiers", "OSBA planar FOA 1ISM at 256 kbps, 48 kHz in, 48 kHz out, BINAURAL out", "SBA 3OA at 128 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB combined renderer configuration with selected acoustic environment", + "OSBA FOA 4ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 16kHz out, BINAURAL out (Model from file), FER at 5%, bandwidth switching", ] -- GitLab From 2ba920fe70282719cf2e8ef4ddb0882fd26ff9a9 Mon Sep 17 00:00:00 2001 From: norvell Date: Mon, 6 May 2024 12:00:09 +0000 Subject: [PATCH 09/15] Change input type to scipy.signal.resample to float, since int16 renders a zero output vector --- scripts/pyaudio3dtools/audioarray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pyaudio3dtools/audioarray.py b/scripts/pyaudio3dtools/audioarray.py index 8fabd5ca1c..6e73c795e5 100644 --- a/scripts/pyaudio3dtools/audioarray.py +++ b/scripts/pyaudio3dtools/audioarray.py @@ -334,8 +334,8 @@ def compare( for i in range(nchannels): tmpfile_ref = Path(tmpdir).joinpath(f"ref_ch{i+1}.wav") tmpfile_test = Path(tmpdir).joinpath(f"test_ch{i+1}.wav") - r48 = resample(ref[:, i], fs, 48000) - t48 = resample(test[:, i], fs, 48000) + r48 = resample(ref[:, i].astype(float), fs, 48000).astype(np.dtype('int16')) + t48 = resample(test[:, i].astype(float), fs, 48000).astype(np.dtype('int16')) wavfile.write(str(tmpfile_ref), 48000, r48) wavfile.write(str(tmpfile_test), 48000, t48) out = subprocess.check_output([mld, tmpfile_ref, tmpfile_test]) -- GitLab From e09229861b5f3a7e5e425f1ee553de751caa5056 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 7 May 2024 15:52:01 +0200 Subject: [PATCH 10/15] fix missing import and sampling rate --- tests/renderer/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index a538df7ee8..f854574b71 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -41,10 +41,10 @@ import numpy as np import pytest from .compare_audio import compare_audio_arrays -from .constants import * - +from .constants import SCRIPTS_DIR, OUTPUT_PATH_REF, OUTPUT_PATH_CUT, FORMAT_TO_FILE_COMPARETEST, FORMAT_TO_FILE_SMOKETEST, RENDERER_CMD, BIN_SUFFIX_MERGETARGET sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile +from .. import cmp_pcm # fixture returns test information, enabling per-testcase SNR @@ -117,6 +117,7 @@ def run_renderer( hrtf_file: Optional[str] = None, get_mld=False, mld_lim=0, + get_mld_lim=0, ) -> str: # prepare arguments and filepaths if trj_file is not None: @@ -238,6 +239,8 @@ def run_renderer( out_file_ref = str(OUTPUT_PATH_REF.joinpath(out_file_stem)) if get_mld: + # see constants.py + ref_fs = cmd[10] output_differs, reason = cmp_pcm( out_file, out_file_ref, -- GitLab From 23a5e7fd1bf105a538dd946a5fbf8b53d6f0c92c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 7 May 2024 15:52:48 +0200 Subject: [PATCH 11/15] run formatter --- tests/renderer/utils.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index f854574b71..d569fff6c7 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -41,7 +41,16 @@ import numpy as np import pytest from .compare_audio import compare_audio_arrays -from .constants import SCRIPTS_DIR, OUTPUT_PATH_REF, OUTPUT_PATH_CUT, FORMAT_TO_FILE_COMPARETEST, FORMAT_TO_FILE_SMOKETEST, RENDERER_CMD, BIN_SUFFIX_MERGETARGET +from .constants import ( + SCRIPTS_DIR, + OUTPUT_PATH_REF, + OUTPUT_PATH_CUT, + FORMAT_TO_FILE_COMPARETEST, + FORMAT_TO_FILE_SMOKETEST, + RENDERER_CMD, + BIN_SUFFIX_MERGETARGET, +) + sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile from .. import cmp_pcm @@ -70,7 +79,7 @@ def check_BE( cut: np.ndarray, cut_fs: int, xfail: bool = False, - atol: int = 2 + atol: int = 2, ): if ref is None or np.array_equal(ref, np.zeros_like(ref)): pytest.fail("REF signal does not exist or is zero!") -- GitLab From 4c2a1eaddcc433752001dc342866b02e3c751284 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 16 May 2024 11:26:40 +0200 Subject: [PATCH 12/15] fix name errors --- tests/renderer/test_renderer.py | 40 ++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 8576dd8d10..4075c590d9 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -32,7 +32,25 @@ import pytest -from .utils import * +from constants import ( + OUTPUT_FORMATS, + INPUT_FORMATS_AMBI, + FRAMING_TO_TEST, + EXE_SUFFIX, + OUTPUT_FORMATS_BINAURAL, + HR_TRAJECTORIES_TO_TEST, + HR_TRAJECTORY_DIR, + INPUT_FORMATS_MC, + INPUT_FORMATS_ISM, + FORMAT_TO_METADATA_FILES, + INPUT_FORMATS_MASA, + METADATA_SCENES_TO_TEST_MASA_PREREND, + TEST_VECTOR_DIR, + CUSTOM_LS_TO_TEST, + CUSTOM_LAYOUT_DIR, + METADATA_SCENES_TO_TEST, +) +from utils import run_renderer, compare_renderer_args ############################################################################## # Bit-exactness tests @@ -354,8 +372,8 @@ def test_masa_prerend(record_property, test_info, in_fmt, get_mld, get_mld_lim): "MASA2", metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), binary_suffix=EXE_SUFFIX, - get_mld=get_mld, - mld_lim=get_mld_lim, + get_mld=get_mld, + mld_lim=get_mld_lim, ) @@ -393,8 +411,8 @@ def test_custom_ls_output( in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), binary_suffix=EXE_SUFFIX, - get_mld=get_mld, - mld_lim=get_mld_lim, + get_mld=get_mld, + mld_lim=get_mld_lim, ) @@ -410,8 +428,8 @@ def test_custom_ls_input_output( CUSTOM_LAYOUT_DIR.joinpath(f"{in_fmt}.txt"), CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), binary_suffix=EXE_SUFFIX, - get_mld=get_mld, - mld_lim=get_mld_lim, + get_mld=get_mld, + mld_lim=get_mld_lim, ) @@ -502,8 +520,8 @@ def test_non_diegetic_pan_static( out_fmt, non_diegetic_pan=non_diegetic_pan, binary_suffix=EXE_SUFFIX, - get_mld=get_mld, - mld_lim=get_mld_lim, + get_mld=get_mld, + mld_lim=get_mld_lim, ) @@ -521,8 +539,8 @@ def test_non_diegetic_pan_ism_static( out_fmt, non_diegetic_pan=non_diegetic_pan, binary_suffix=EXE_SUFFIX, - get_mld=get_mld, - mld_lim=get_mld_lim, + get_mld=get_mld, + mld_lim=get_mld_lim, ) -- GitLab From 05a2975af7dff9d91fb816cfabe7e592e6b30537 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 16 May 2024 11:39:56 +0200 Subject: [PATCH 13/15] fix relative import --- tests/renderer/test_renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 4075c590d9..6fb39e2817 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -32,7 +32,7 @@ import pytest -from constants import ( +from .constants import ( OUTPUT_FORMATS, INPUT_FORMATS_AMBI, FRAMING_TO_TEST, -- GitLab From b75f994de4ab7eba95a082679979d56ed2309152 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 16 May 2024 15:28:31 +0200 Subject: [PATCH 14/15] fir another relative import --- tests/renderer/test_renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 6fb39e2817..850ad77539 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -50,7 +50,7 @@ from .constants import ( CUSTOM_LAYOUT_DIR, METADATA_SCENES_TO_TEST, ) -from utils import run_renderer, compare_renderer_args +from .utils import run_renderer, compare_renderer_args ############################################################################## # Bit-exactness tests -- GitLab From 931c7106ded3a1a07adffc75a07d1420dc8f2b6a Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 16 May 2024 15:38:53 +0200 Subject: [PATCH 15/15] import fixture --- tests/renderer/test_renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 850ad77539..ca71224aea 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -50,7 +50,7 @@ from .constants import ( CUSTOM_LAYOUT_DIR, METADATA_SCENES_TO_TEST, ) -from .utils import run_renderer, compare_renderer_args +from .utils import run_renderer, compare_renderer_args, test_info ############################################################################## # Bit-exactness tests -- GitLab