From e626f904917a0035cf3be56848dc91c5b912b83b Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Fri, 4 Aug 2023 13:16:11 +0300 Subject: [PATCH 1/4] add OMASA smoke tests. add script for generating combined format smoke tests inputs. --- .gitignore | 4 + ci/smoke_test.sh | 15 +- scripts/config/ci_linux.json | 18 +- scripts/config/ivas_modes.json | 858 ++++++++++++++++++++++ scripts/prepare_combined_format_inputs.py | 101 +++ 5 files changed, 990 insertions(+), 6 deletions(-) create mode 100755 scripts/prepare_combined_format_inputs.py diff --git a/.gitignore b/.gitignore index de9e357339..9de6ea6bb4 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,10 @@ tests/**/[c|d]ut tests/**/ref tests/*/testv scripts/testv/*_cut*.pcm +scripts/testv/stvOMASA_*.met +scripts/testv/stvOMASA_*.csv +scripts/testv/stvOMASA_2ISM_1MASA1TC48c.wav +scripts/testv/stvOMASA_3ISM_1MASA1TC48c.wav # default reference binary name IVAS_cod_ref IVAS_dec_ref diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 2bbf06bcd3..2ad57894dd 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -75,10 +75,14 @@ if [ $BUILD -eq 1 ];then fi +# prepare combined format test signals +echo "\n======================= 0. preparing combined format test inputs =======================\n\n" +./scripts/prepare_combined_format_inputs.py + # run all modes vanilla-fashion # treat ISM modes separately because passing the metadata files to MASA modes causes crashes -ism_modes=$(./scripts/runIvasCodec.py -l | grep ISM) -non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ISM) +ism_modes=$(./scripts/runIvasCodec.py -l | grep ^ISM) +non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ^ISM) echo "\n======================= 1. non-ism modes no FEC =======================\n\n" ./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg $duration_arg $WORKERS | tee smoke_test_output.txt echo "\n======================= 2. ism modes no FEC =======================\n\n" @@ -88,15 +92,16 @@ echo "\n======================= 3. all modes with FEC =======================\n\ ./scripts/runIvasCodec.py -p $cfg $duration_arg $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) -modes_with_ext_out=$(./scripts/runIvasCodec.py -l | grep 'MASA\|ISM' | grep -v ISM+) +# OMASA disabled for now +modes_with_no_ext_out=$(./scripts/runIvasCodec.py -l | grep -v ^MASA | grep -v ^ISM | grep -v OMASA) +modes_with_ext_out=$(./scripts/runIvasCodec.py -l | grep 'MASA\|ISM' | grep -v ^ISM+ | grep -v OMASA) echo "\n======================= 4. JBM, modes with no EXT =======================\n\n" ./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg $duration_arg $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt echo "\n======================= 5. JBM, modes with EXT =======================\n\n" ./scripts/runIvasCodec.py -m $modes_with_ext_out -p $cfg $duration_arg $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM_IR 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" +modes_with_bin_out="SBA PlanarSBA MASA MC ISM1 ISM2 ISM3 ISM4 OMASA" bin_out_modes="BINAURAL BINAURAL_ROOM_IR" echo "\n======================= 6. binaural out with HRTF files - WB =======================\n\n" diff --git a/scripts/config/ci_linux.json b/scripts/config/ci_linux.json index 1cb1141752..f7d6c4ec4b 100644 --- a/scripts/config/ci_linux.json +++ b/scripts/config/ci_linux.json @@ -20,6 +20,22 @@ "ISM1": "/usr/local/testv/stv1ISM48s.wav", "ISM2": "/usr/local/testv/stv2ISM48s.wav", "ISM3": "/usr/local/testv/stv3ISM48s.wav", - "ISM4": "/usr/local/testv/stv4ISM48s.wav" + "ISM4": "/usr/local/testv/stv4ISM48s.wav", + "OMASA_ISM1_1TC1DIR": "/usr/local/testv/stvOMASA_1ISM_1MASA1TC48c.wav", + "OMASA_ISM1_1TC2DIR": "/usr/local/testv/stvOMASA_1ISM_2MASA1TC48c.wav", + "OMASA_ISM1_2TC1DIR": "/usr/local/testv/stvOMASA_1ISM_1MASA2TC48c.wav", + "OMASA_ISM1_2TC2DIR": "/usr/local/testv/stvOMASA_1ISM_2MASA2TC48c.wav", + "OMASA_ISM2_1TC1DIR": "/usr/local/testv/stvOMASA_2ISM_1MASA1TC48c.wav", + "OMASA_ISM2_1TC2DIR": "/usr/local/testv/stvOMASA_2ISM_2MASA1TC48c.wav", + "OMASA_ISM2_2TC1DIR": "/usr/local/testv/stvOMASA_2ISM_1MASA2TC48c.wav", + "OMASA_ISM2_2TC2DIR": "/usr/local/testv/stvOMASA_2ISM_2MASA2TC48c.wav", + "OMASA_ISM3_1TC1DIR": "/usr/local/testv/stvOMASA_3ISM_1MASA1TC48c.wav", + "OMASA_ISM3_1TC2DIR": "/usr/local/testv/stvOMASA_3ISM_2MASA1TC48c.wav", + "OMASA_ISM3_2TC1DIR": "/usr/local/testv/stvOMASA_3ISM_1MASA2TC48c.wav", + "OMASA_ISM3_2TC2DIR": "/usr/local/testv/stvOMASA_3ISM_2MASA2TC48c.wav", + "OMASA_ISM4_1TC1DIR": "/usr/local/testv/stvOMASA_4ISM_1MASA1TC48c.wav", + "OMASA_ISM4_1TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA1TC48c.wav", + "OMASA_ISM4_2TC1DIR": "/usr/local/testv/stvOMASA_4ISM_1MASA2TC48c.wav", + "OMASA_ISM4_2TC2DIR": "/usr/local/testv/stvOMASA_4ISM_2MASA2TC48c.wav" } } diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index 97bfb263f8..c48ba73d15 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -3802,5 +3802,863 @@ } } } + }, + + "OMASA": { + "OMASA_ISM1_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "1", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM1_2TC1DIR", + "table_name": "OMASA ISM1 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OMASA_ISM1_2TC_2DIR_b{bitrate}_{bandwidth}_vbr": { + "encmodeoption": [ + "-ism_masa", + "1", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM1_2TC2DIR", + "table_name": "OMASA ISM1 2TC 2DIR@{table_bitrate} RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OMASA_ISM1_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "1", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM1_1TC1DIR", + "table_name": "OMASA ISM1 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ], + "swb": [ + 16400, + 48000, + 96000, + 256000 + ], + "fb": [ + 24400, + 64000, + 128000, + 384000 + ] + } + }, + "OMASA_ISM1_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "1", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM1_1TC2DIR", + "table_name": "OMASA ISM1 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 16400, + 48000, + 96000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ] + } + }, + + + "OMASA_ISM2_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "2", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM2_2TC1DIR", + "table_name": "OMASA ISM2 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OMASA_ISM2_2TC_2DIR_b{bitrate}_{bandwidth}_vbr": { + "encmodeoption": [ + "-ism_masa", + "2", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM2_2TC2DIR", + "table_name": "OMASA ISM2 2TC 2DIR@{table_bitrate} RS {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OMASA_ISM2_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "2", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM2_1TC1DIR", + "table_name": "OMASA ISM2 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 80000, + 192000, + 512000 + ], + "swb": [ + 48000, + 96000, + 160000, + 256000 + ], + "fb": [ + 64000, + 128000, + 384000 + ] + } + }, + "OMASA_ISM2_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "2", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM2_1TC2DIR", + "table_name": "OMASA ISM2 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 16400, + 48000, + 96000, + 160000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ] + } + }, + + + "OMASA_ISM3_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "3", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM3_2TC1DIR", + "table_name": "OMASA ISM3 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OMASA_ISM3_2TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "3", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM3_2TC2DIR", + "table_name": "OMASA ISM3 2TC 2DIR@{table_bitrate} RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin" + } + } + }, + "OMASA_ISM3_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "3", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM3_1TC1DIR", + "table_name": "OMASA ISM3 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 192000, + 512000 + ], + "swb": [ + 96000, + 160000, + 256000 + ], + "fb": [ + 128000, + 384000 + ] + } + }, + "OMASA_ISM3_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "3", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM3_1TC2DIR", + "table_name": "OMASA ISM3 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 16400, + 48000, + 96000, + 160000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ] + } + }, + + + "OMASA_ISM4_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "4", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM4_2TC1DIR", + "table_name": "OMASA ISM4 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "swb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ], + "fb": [ + 13200, + 16400, + 24400, + 32000, + 48000, + 64000, + 80000, + 96000, + 128000, + 192000, + 256000, + 384000, + 512000 + ] + } + }, + "OMASA_ISM4_2TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "4", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM4_2TC2DIR", + "table_name": "OMASA ISM4 2TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, + "OMASA_ISM4_1TC_1DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "4", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "OMASA_ISM4_1TC1DIR", + "table_name": "OMASA ISM4 1TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 192000, + 512000 + ], + "swb": [ + 160000, + 256000 + ], + "fb": [ + 128000, + 384000 + ] + } + }, + "OMASA_ISM4_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "encmodeoption": [ + "-ism_masa", + "4", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [] + }, + "in_config": "OMASA_ISM4_1TC2DIR", + "table_name": "OMASA ISM4 1TC 2DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 5, + "metadatafilenames": [ + "{item}_ISM1.csv", + "{item}_ISM2.csv", + "{item}_ISM3.csv", + "{item}_ISM4.csv", + "{item}.met" + ], + "rs": false, + "amr": false, + "mono": false, + "bitrates": { + "wb": [ + 16400, + 48000, + 96000, + 256000 + ], + "swb": [ + 24400, + 64000, + 128000, + 384000 + ], + "fb": [ + 13200, + 32000, + 80000, + 192000, + 512000 + ] + } + } } } diff --git a/scripts/prepare_combined_format_inputs.py b/scripts/prepare_combined_format_inputs.py new file mode 100755 index 0000000000..709d55d1b1 --- /dev/null +++ b/scripts/prepare_combined_format_inputs.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python3 + +__license__ = \ +""" + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. 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 os +import shutil + +import numpy as np + +from pyaudio3dtools import audiofile, audioarray + + +# scripts/testv/ path +input_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'testv') +output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'testv') + +# # prepare combined input for OMASA tests +force_overwrite = False # overwrite existing files + +# define MASA test item files +masa_alts = ({'masa_meta_file': 'stv2MASA2TC48c.met', + 'masa_audio_file': 'stv2MASA2TC48c.wav', + 'masa_tag': '2MASA2TC'}, + {'masa_meta_file': 'stv2MASA1TC48c.met', + 'masa_audio_file': 'stv2MASA1TC48c.wav', + 'masa_tag': '2MASA1TC'}, + {'masa_meta_file': 'stv1MASA2TC48c.met', + 'masa_audio_file': 'stv1MASA2TC48c.wav', + 'masa_tag': '1MASA2TC'}, + {'masa_meta_file': 'stv1MASA1TC48c.met', + 'masa_audio_file': 'stv1MASA1TC48c.wav', + 'masa_tag': '1MASA1TC'}) + +# files containing 1-4 ISMs as channels +ism_files = ('stv1ISM48s.wav', 'stv2ISM48s.wav', 'stv3ISM48s.wav', 'stv4ISM48s.wav') +# per-object metadata +ism_meta_files = ('stvISM1.csv', 'stvISM2.csv', 'stvISM3.csv', 'stvISM4.csv') + +wrote_files = [] +for enum_idx, (ism_audio_file, ism_meta_file) in enumerate(zip(ism_files, ism_meta_files)): + n_isms = enum_idx + 1 + ism_audio, ism_fs = audiofile.readfile(filename=os.path.join(input_dir, ism_audio_file)) + + for masa_item in masa_alts: + masa_tag = masa_item['masa_tag'] + + omasa_file_body = f'stvOMASA_{n_isms}ISM_{masa_tag}48c' + omasa_file = os.path.join(output_dir, f'{omasa_file_body}.wav') + + if not os.path.exists(omasa_file) or force_overwrite: + audiofile.combinefiles(in_filenames=[os.path.join(input_dir, ism_audio_file), + os.path.join(input_dir, masa_item['masa_audio_file'])], + out_file=omasa_file) + wrote_files.append(omasa_file) + + # copy ISM metadata files under names matching the combined file + for ism_idx in range(n_isms): + ism_file_name = os.path.join(output_dir, f'{omasa_file_body}_ISM{ism_idx+1}{os.path.splitext(ism_meta_file)[1]}') + if not os.path.exists(ism_file_name) or force_overwrite: + shutil.copyfile(os.path.join(input_dir, ism_meta_file), ism_file_name) + wrote_files.append(ism_file_name) + + # copy MASA metadata file under a matching name + masa_meta_name = os.path.join(output_dir, f'{omasa_file_body}{os.path.splitext(masa_item["masa_meta_file"])[1]}') + + if not os.path.exists(masa_meta_name) or force_overwrite: + shutil.copyfile(os.path.join(input_dir, masa_item['masa_meta_file']), masa_meta_name) + wrote_files.append(masa_meta_name) + +# info print. helps setting up .gitignore +if len(wrote_files) > 0: + print('New files written: {}'.format('\n'.join(wrote_files))) -- GitLab From 4b4ea19fbf47b1584c8640b5f5149d41e797b87a Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Mon, 7 Aug 2023 10:13:56 +0200 Subject: [PATCH 2/4] fix SID start test failing by not checking for OMASA test vectors for it --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82738a8e51..d06da74fb7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -803,6 +803,8 @@ check-first-frame-is-sid: script: - *print-common-info - *update-ltv-repo + # Temporary fix to test only SID start config files in this job + - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json - *check-for-testvectors - cmake . - make -j -- GitLab From da6854686b350931c4b2fe564dddb876cd6f4728 Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Mon, 7 Aug 2023 10:40:54 +0200 Subject: [PATCH 3/4] when creating combined format test vectors, write them into into TESTV_DIR if that is defined --- scripts/prepare_combined_format_inputs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/prepare_combined_format_inputs.py b/scripts/prepare_combined_format_inputs.py index 709d55d1b1..b8ad685579 100755 --- a/scripts/prepare_combined_format_inputs.py +++ b/scripts/prepare_combined_format_inputs.py @@ -41,7 +41,12 @@ from pyaudio3dtools import audiofile, audioarray # scripts/testv/ path input_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'testv') -output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'testv') +if 'TESTV_DIR' in os.environ: + output_dir = os.environ['TESTV_DIR'] +else: + output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'testv') + +print(f'Writing new files into {output_dir}') # # prepare combined input for OMASA tests force_overwrite = False # overwrite existing files -- GitLab From 3c9b39d84573d26c01bcd4fbcda10969bade56fb Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Tue, 8 Aug 2023 15:24:45 +0300 Subject: [PATCH 4/4] test tag typo fix for OMASA RS tests. disable HRTF file tests for OMASA temporarily --- ci/smoke_test.sh | 2 +- scripts/config/ivas_modes.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 2ad57894dd..96e661238d 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -101,7 +101,7 @@ echo "\n======================= 5. JBM, modes with EXT =======================\n ./scripts/runIvasCodec.py -m $modes_with_ext_out -p $cfg $duration_arg $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM_IR 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 OMASA" +modes_with_bin_out="SBA PlanarSBA MASA MC ISM1 ISM2 ISM3 ISM4" bin_out_modes="BINAURAL BINAURAL_ROOM_IR" echo "\n======================= 6. binaural out with HRTF files - WB =======================\n\n" diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index c48ba73d15..a5d2cd6bdc 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -3880,7 +3880,7 @@ ] } }, - "OMASA_ISM1_2TC_2DIR_b{bitrate}_{bandwidth}_vbr": { + "OMASA_ISM1_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-ism_masa", "1", @@ -4094,7 +4094,7 @@ ] } }, - "OMASA_ISM2_2TC_2DIR_b{bitrate}_{bandwidth}_vbr": { + "OMASA_ISM2_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-ism_masa", "2", @@ -4308,7 +4308,7 @@ ] } }, - "OMASA_ISM3_2TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "OMASA_ISM3_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-ism_masa", "3", @@ -4523,7 +4523,7 @@ ] } }, - "OMASA_ISM4_2TC_2DIR_b{bitrate}_{bandwidth}_cbr": { + "OMASA_ISM4_2TC_2DIR_b{bitrate}_{bandwidth}_rs": { "encmodeoption": [ "-ism_masa", "4", @@ -4540,7 +4540,7 @@ "stereo": [] }, "in_config": "OMASA_ISM4_2TC2DIR", - "table_name": "OMASA ISM4 2TC 2DIR@{table_bitrate} kbps {bandwidth}", + "table_name": "OMASA ISM4 2TC 2DIR@{table_bitrate} RS {bandwidth}", "nummetadata": 5, "metadatafilenames": [ "{item}_ISM1.csv", -- GitLab