From 80d652e5e3ae969a900e5f2be9ba74e7bd935876 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Mon, 13 May 2024 21:41:28 +0200 Subject: [PATCH 01/11] Add -aeid file tests --- scripts/config/self_test.prm | 12 ++++++++++++ scripts/config/self_test_ltv.prm | 12 ++++++++++++ scripts/testv/aeid1.txt | 3 +++ scripts/testv/aeid2.txt | 3 +++ scripts/testv/aeid3.txt | 3 +++ tests/renderer/test_renderer.py | 25 +++++++++++++++++++++++++ 6 files changed, 58 insertions(+) create mode 100644 scripts/testv/aeid1.txt create mode 100644 scripts/testv/aeid2.txt create mode 100644 scripts/testv/aeid3.txt diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 413ea8cb12..175ed9b809 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -1292,6 +1292,18 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -mc 5_1 512000 48 testv/stv51MC48c.wav bit ../IVAS_dec -render_config testv/rend_config_renderer.cfg BINAURAL_ROOM_REVERB 16 bit testv/stv51MC48c.wav_MC51_512000_48-16_MC_Config_renderer.tst +// Multi-channel 5_1 at 512 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (CREND) +//../IVAS_cod -mc 5_1 512000 48 testv/stv51MC48c.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst + +// Multi-channel 5_1 at 64 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (FastConv) +//../IVAS_cod -mc 5_1 64000 48 testv/stv51MC48c.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst + +// Multi-channel 5_1 at 32 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (ParamBin) +//../IVAS_cod -mc 5_1 32000 48 testv/stv51MC48c.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst + // Multi-channel 5_1 at 32 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out Config hospital_patientroom ../IVAS_cod -mc 5_1 32000 48 testv/stv51MC48c.wav bit ../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_32000_48-48_MC_Config_hospital_patientroom.tst diff --git a/scripts/config/self_test_ltv.prm b/scripts/config/self_test_ltv.prm index 18d2f5ec5c..23df973a9a 100644 --- a/scripts/config/self_test_ltv.prm +++ b/scripts/config/self_test_ltv.prm @@ -1291,6 +1291,18 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -mc 5_1 512000 48 testv/ltv48_MC51.wav bit ../IVAS_dec -render_config testv/rend_config_renderer.cfg BINAURAL_ROOM_REVERB 16 bit testv/ltv48_MC51.wav_MC51_512000_48-16_MC_Config_renderer.tst +// Multi-channel 5_1 at 512 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (CREND) +//../IVAS_cod -mc 5_1 512000 48 testv/ltv51MC48c.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst + +// Multi-channel 5_1 at 64 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (FastConv) +//../IVAS_cod -mc 5_1 64000 48 testv/ltv51MC48c.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst + +// Multi-channel 5_1 at 32 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (ParamBin) +//../IVAS_cod -mc 5_1 32000 48 testv/ltv51MC48c.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst + // Multi-channel 5_1 at 32 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out Config hospital_patientroom ../IVAS_cod -mc 5_1 32000 48 testv/ltv48_MC51.wav bit ../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/ltv48_MC51.wav_MC51_80000_48-48_MC_Config_hospital_patientroom.tst diff --git a/scripts/testv/aeid1.txt b/scripts/testv/aeid1.txt new file mode 100644 index 0000000000..976a68f8a8 --- /dev/null +++ b/scripts/testv/aeid1.txt @@ -0,0 +1,3 @@ +1:200 +0:100 +2:500 \ No newline at end of file diff --git a/scripts/testv/aeid2.txt b/scripts/testv/aeid2.txt new file mode 100644 index 0000000000..d92636103a --- /dev/null +++ b/scripts/testv/aeid2.txt @@ -0,0 +1,3 @@ +1:500 +2:100 +0:300 \ No newline at end of file diff --git a/scripts/testv/aeid3.txt b/scripts/testv/aeid3.txt new file mode 100644 index 0000000000..57a94dd90b --- /dev/null +++ b/scripts/testv/aeid3.txt @@ -0,0 +1,3 @@ +0:100 +2:500 +1:200 \ No newline at end of file diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index b9b9d08317..559112f8e9 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -133,6 +133,31 @@ def test_dynamic_acoustic_environment( aeid=aeid, ) +@pytest.mark.create_ref +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL[2:]) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +@pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) +def test_dynamic_acoustic_environment_file( + record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim, aeid +): + rend_config_path = TESTV_DIR.joinpath(f"rend_config_combined.cfg") + rend_config_path.with_stem(f"rend_config") + + aeid = TESTV_DIR.joinpath(f"aeid1.txt") + + run_renderer( + record_property, + test_info, + in_fmt, + out_fmt, + binary_suffix=EXE_SUFFIX, + frame_size=frame_size, + get_mld=get_mld, + mld_lim=get_mld_lim, + config_file=rend_config_path, + aeid=aeid, + ) + """ Multichannel """ -- GitLab From 0ad5a4ee09169b287578b79b62b19e6608239cb3 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Thu, 16 May 2024 10:12:17 +0200 Subject: [PATCH 02/11] Uncomment aeid file tests --- scripts/config/self_test.prm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 6e18b501fc..364e9fae9a 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -1293,16 +1293,16 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec -render_config testv/rend_config_renderer.cfg BINAURAL_ROOM_REVERB 16 bit testv/stv51MC48c.wav_MC51_512000_48-16_MC_Config_renderer.tst // Multi-channel 5_1 at 512 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (CREND) -//../IVAS_cod -mc 5_1 512000 48 testv/stv51MC48c.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst +../IVAS_cod -mc 5_1 512000 48 testv/stv51MC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst // Multi-channel 5_1 at 64 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (FastConv) -//../IVAS_cod -mc 5_1 64000 48 testv/stv51MC48c.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst +../IVAS_cod -mc 5_1 64000 48 testv/stv51MC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst // Multi-channel 5_1 at 32 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (ParamBin) -//../IVAS_cod -mc 5_1 32000 48 testv/stv51MC48c.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst +../IVAS_cod -mc 5_1 32000 48 testv/stv51MC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/stv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst // Multi-channel 5_1 at 32 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out Config hospital_patientroom ../IVAS_cod -mc 5_1 32000 48 testv/stv51MC48c.wav bit -- GitLab From 1e1a4d0d4121e3d38544123cac29e0b1ed981e01 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Thu, 16 May 2024 13:25:51 +0200 Subject: [PATCH 03/11] Update test files --- scripts/testv/aeid1.txt | 6 +++--- scripts/testv/aeid2.txt | 6 +++--- scripts/testv/aeid3.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/testv/aeid1.txt b/scripts/testv/aeid1.txt index 976a68f8a8..66cd02723f 100644 --- a/scripts/testv/aeid1.txt +++ b/scripts/testv/aeid1.txt @@ -1,3 +1,3 @@ -1:200 -0:100 -2:500 \ No newline at end of file +1 200 +0 100 +2 500 \ No newline at end of file diff --git a/scripts/testv/aeid2.txt b/scripts/testv/aeid2.txt index d92636103a..0c7700c444 100644 --- a/scripts/testv/aeid2.txt +++ b/scripts/testv/aeid2.txt @@ -1,3 +1,3 @@ -1:500 -2:100 -0:300 \ No newline at end of file +1 500 +2 100 +0 300 \ No newline at end of file diff --git a/scripts/testv/aeid3.txt b/scripts/testv/aeid3.txt index 57a94dd90b..7136bcabbc 100644 --- a/scripts/testv/aeid3.txt +++ b/scripts/testv/aeid3.txt @@ -1,3 +1,3 @@ -0:100 -2:500 -1:200 \ No newline at end of file +0 100 +2 500 +1 200 \ No newline at end of file -- GitLab From 9f9bb7ba51e27ae3aa6f7ee83779f2f9cae1feb1 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Tue, 21 May 2024 09:44:27 +0200 Subject: [PATCH 04/11] Address another missing distAtt initialization --- lib_rend/lib_rend.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index e6d8044295..087c86118e 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4443,6 +4443,9 @@ int16_t IVAS_REND_FeedRenderConfig( mvr2r( renderConfig.roomAcoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.roomAcoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS ); +#ifdef FIX_1053_REVERB_RECONFIGURATION + mvr2r( renderConfig.distAtt, hRenderConfig->distAtt, 3 ); +#endif hRenderConfig->roomAcoustics.use_er = 0; if ( renderConfig.roomAcoustics.use_er == 1 ) -- GitLab From 73cf0e4d447fab337990da2d5920df5103264b49 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Fri, 31 May 2024 15:30:23 +0200 Subject: [PATCH 05/11] Address missing distAtt initialization in decoder --- lib_dec/lib_dec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 9f59528a0c..133b40fbf0 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2132,6 +2132,10 @@ static ivas_error copyRendererConfigStruct( mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS ); +#ifdef FIX_1053_REVERB_RECONFIGURATION + mvr2r( hRCin->distAtt, hRCout->distAtt, 3 ); +#endif + #ifdef SPLIT_REND_WITH_HEAD_ROT /* TODO: This seems wrong. Why set default instead of copying from hRCin? * Currently seems to work because we only ever copy from a default-initialized handle anyway */ -- GitLab From 2e7aaa6c437a24eb426954443d7a8509488ed804 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Wed, 5 Jun 2024 13:51:51 +0200 Subject: [PATCH 06/11] Add switch --- lib_com/options.h | 5 ++--- lib_dec/lib_dec.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index ea4a4576ec..be8283881b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,14 +164,13 @@ #define FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK /* VA: issue 1081: correct error print-out when BINAURAL_SPLIT_PCM is requested */ #endif -//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT /* Orange issue 1031 : new fix point hrtf binary file format */ +//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT /* Orange issue 1031 : new fix point hrtf binary file format */ //#define FIX_CREND_SIMPLIFY_CODE /* Ora : simplify line code in crend */ #define FLOAT_FIX_POINT_HRTF_FILE_FORMAT /* allows reading floation or fix point hrtf binary file format */ #define FIX_1082_INSTRUM_FAILED_LC3PLUS /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */ - - #define FIX_1099_JBM_MD_HANDLE_ALLOC /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */ +#define FIX_1053_AEID_FILE_TEST /* Philips: Tests for the -aeid file and fix for memory error */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 318bad7fd3..2d85b85580 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2149,7 +2149,7 @@ static ivas_error copyRendererConfigStruct( mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS ); -#ifdef FIX_1053_REVERB_RECONFIGURATION +#ifdef FIX_1053_AEID_FILE_TEST mvr2r( hRCin->distAtt, hRCout->distAtt, 3 ); #endif -- GitLab From d2ec3b08adbbfa6c26b56f02f34971addf41c469 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Wed, 5 Jun 2024 16:46:05 +0200 Subject: [PATCH 07/11] Fix errors related to path --- scripts/config/self_test_ltv.prm | 12 ++++++------ tests/renderer/test_renderer.py | 13 +++++++++---- tests/renderer/utils.py | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/scripts/config/self_test_ltv.prm b/scripts/config/self_test_ltv.prm index a83b3fce51..47ac2f0c23 100644 --- a/scripts/config/self_test_ltv.prm +++ b/scripts/config/self_test_ltv.prm @@ -1308,16 +1308,16 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec -render_config testv/rend_config_renderer.cfg BINAURAL_ROOM_REVERB 16 bit testv/ltv48_MC51.wav_MC51_512000_48-16_MC_Config_renderer.tst // Multi-channel 5_1 at 512 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (CREND) -//../IVAS_cod -mc 5_1 512000 48 testv/ltv51MC48c.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst +../IVAS_cod -mc 5_1 512000 48 testv/ltv51MC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid1.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_512000_48-48_MC_reverb_sequence.tst // Multi-channel 5_1 at 64 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (FastConv) -//../IVAS_cod -mc 5_1 64000 48 testv/ltv51MC48c.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst +../IVAS_cod -mc 5_1 64000 48 testv/ltv51MC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid2.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_64000_48-48_MC_reverb_sequence.tst // Multi-channel 5_1 at 32 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (ParamBin) -//../IVAS_cod -mc 5_1 32000 48 testv/ltv51MC48c.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst +../IVAS_cod -mc 5_1 32000 48 testv/ltv51MC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -aeid testv/aeid3.txt BINAURAL_ROOM_REVERB 48 bit testv/ltv51MC48c.wav_MC51_32000_48-48_MC_reverb_sequence.tst // Multi-channel 5_1 at 32 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out Config hospital_patientroom ../IVAS_cod -mc 5_1 32000 48 testv/ltv48_MC51.wav bit diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index d713d62ac6..c761072388 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -30,6 +30,7 @@ the United Nations Convention on Contracts on the International Sales of Goods. """ +from pathlib import Path import pytest from .constants import ( @@ -137,6 +138,9 @@ def test_dynamic_acoustic_environment( ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") + + aeid_path = Path(aeid) + aeid_path.with_stem(aeid) run_renderer( record_property, @@ -148,7 +152,7 @@ def test_dynamic_acoustic_environment( get_mld=get_mld, mld_lim=get_mld_lim, config_file=rend_config_path, - aeid=aeid, + aeid=aeid_path, ) @pytest.mark.create_ref @@ -156,12 +160,13 @@ def test_dynamic_acoustic_environment( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_dynamic_acoustic_environment_file( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim, aeid + record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim ): - rend_config_path = TESTV_DIR.joinpath(f"rend_config_combined.cfg") + rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") - aeid = TESTV_DIR.joinpath(f"aeid1.txt") + aeid = TEST_VECTOR_DIR.joinpath(f"aeid1.txt") + aeid.with_stem(f"aeid1.txt") run_renderer( record_property, diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 9bd2b8f4b7..bdf830520e 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -198,7 +198,7 @@ def run_renderer( framing_name = "" if aeid is not None: - aeid_name = f"_{aeid}" + aeid_name = f"_{aeid.stem}" else: aeid_name = "" -- GitLab From 5074c78ec68d75bc8fb7502d78ee6ac6cb74c2f3 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Tue, 11 Jun 2024 15:01:44 +0200 Subject: [PATCH 08/11] Whitespace change --- lib_com/options.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index e9d6ae121d..89fa848838 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -155,9 +155,11 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT /* Orange issue 1031 : new fix point hrtf binary file format */ +//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT /* Orange issue 1031 : new fix point hrtf binary file format */ //#define FIX_CREND_SIMPLIFY_CODE /* Ora : simplify line code in crend */ #define FLOAT_FIX_POINT_HRTF_FILE_FORMAT /* allows reading floation or fix point hrtf binary file format */ + + #define FIX_1099_JBM_MD_HANDLE_ALLOC /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */ #define FIX_1053_AEID_FILE_TEST /* Philips: Tests for the -aeid file and fix for memory error */ -- GitLab From 18cf84a51b4327696ee9899ae6d7e7b32c21351f Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Tue, 11 Jun 2024 15:03:30 +0200 Subject: [PATCH 09/11] Whitespace change 2 --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 89fa848838..c6d541e05a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -155,7 +155,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT /* Orange issue 1031 : new fix point hrtf binary file format */ +//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT /* Orange issue 1031 : new fix point hrtf binary file format */ //#define FIX_CREND_SIMPLIFY_CODE /* Ora : simplify line code in crend */ #define FLOAT_FIX_POINT_HRTF_FILE_FORMAT /* allows reading floation or fix point hrtf binary file format */ -- GitLab From 43ee8ce9a4a806428263109a46efb4ccedb792b4 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Fri, 14 Jun 2024 09:28:38 +0200 Subject: [PATCH 10/11] Review comments --- tests/renderer/test_renderer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index c761072388..ed33545985 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -166,7 +166,6 @@ def test_dynamic_acoustic_environment_file( rend_config_path.with_stem(f"rend_config") aeid = TEST_VECTOR_DIR.joinpath(f"aeid1.txt") - aeid.with_stem(f"aeid1.txt") run_renderer( record_property, -- GitLab From 7938e4b24ca5d45c82a9ec9144cf06d13242f4c2 Mon Sep 17 00:00:00 2001 From: Serdar Buyuksarac Date: Fri, 14 Jun 2024 16:41:08 +0200 Subject: [PATCH 11/11] Use Union to support multiple types --- tests/renderer/test_renderer.py | 5 +---- tests/renderer/utils.py | 10 +++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index ed33545985..e89096ceed 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -138,9 +138,6 @@ def test_dynamic_acoustic_environment( ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") - - aeid_path = Path(aeid) - aeid_path.with_stem(aeid) run_renderer( record_property, @@ -152,7 +149,7 @@ def test_dynamic_acoustic_environment( get_mld=get_mld, mld_lim=get_mld_lim, config_file=rend_config_path, - aeid=aeid_path, + aeid=aeid, ) @pytest.mark.create_ref diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index bdf830520e..239e846ca0 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -33,9 +33,10 @@ import filecmp import logging import os +from pathlib import Path import subprocess as sp import sys -from typing import Dict, Optional +from typing import Dict, Optional, Union import numpy as np import pytest @@ -164,7 +165,7 @@ def run_renderer( get_mld=False, mld_lim=0, get_mld_lim=0, - aeid: Optional[str] = None, + aeid: Optional[Union[Path, int]] = None, ) -> str: # prepare arguments and filepaths if trj_file is not None: @@ -198,7 +199,10 @@ def run_renderer( framing_name = "" if aeid is not None: - aeid_name = f"_{aeid.stem}" + if isinstance(aeid, Path): + aeid_name = f"_{aeid.stem}" + else: + aeid_name = aeid else: aeid_name = "" -- GitLab