From 20c523122a882a5cf2416339635b7aaa740c7fa8 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Tue, 20 Feb 2024 16:47:44 +0100 Subject: [PATCH 1/7] Fix for #777 - render config reader with combined configurations --- lib_com/options.h | 1 + lib_util/render_config_reader.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 0803c5bcfd..0e53de46f7 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,6 +170,7 @@ #define BE_FIX_567_DOUBLE_STEREO_DMX /* NTT: Fix formal issues */ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ +#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC #define NONBE_FIX_947_STEREO_DMX_ROMOPT /* Orange: ROM optimisation for POC*/ diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index 43e0246898..c27bec2b6d 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -2301,7 +2301,11 @@ ivas_error RenderConfigReader_read( /* RT60 */ else if ( strcmp( item, "RT60" ) == 0 ) { +#ifdef FIX_777_COMBI_RENDER_CONFIG_FILE + if ( read_txt_vector( pValue, pRenderConfigReader->pAE[acIdx].pFG->nrBands, pRenderConfigReader->pAE[acIdx].pRT60 ) ) +#else if ( read_txt_vector( pValue, pRenderConfigReader->pFG[idx].nrBands, pRenderConfigReader->pAE[acIdx].pRT60 ) ) +#endif { errorHandler( item, ERROR_VALUE_INVALID ); return IVAS_ERR_INVALID_RENDER_CONFIG; @@ -2311,7 +2315,11 @@ ivas_error RenderConfigReader_read( /* DSR */ else if ( strcmp( item, "DSR" ) == 0 ) { +#ifdef FIX_777_COMBI_RENDER_CONFIG_FILE + if ( read_txt_vector( pValue, pRenderConfigReader->pAE[acIdx].pFG->nrBands, pRenderConfigReader->pAE[acIdx].pDSR ) ) +#else if ( read_txt_vector( pValue, pRenderConfigReader->pFG[idx].nrBands, pRenderConfigReader->pAE[acIdx].pDSR ) ) +#endif { errorHandler( item, ERROR_VALUE_INVALID ); return IVAS_ERR_INVALID_RENDER_CONFIG; -- GitLab From 25f8c5b4192c0b8a9398687151de2d0348a207e6 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Wed, 21 Feb 2024 13:29:18 +0100 Subject: [PATCH 2/7] Test cases added for combined room acoustics configuration --- scripts/config/self_test.prm | 4 ++++ scripts/config/self_test_ltv.prm | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 83aa9ac504..040434581c 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -539,6 +539,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -dtx -ism +4 testv/stvISM1.csv NULL testv/stvISM_with_no_diegetic_switch.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48n.wav bit ../IVAS_dec BINAURAL 48 bit testv/stv+4ISM48n+non_diegetic_pan.wav_brate_256000-48_DTX_binaural.tst +// 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 +../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav + // SBA at 13.2 kbps, 32kHz in, 32kHz out, HOA3 out, bandwidth switching ../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -sba 3 13200 32 testv/stv3OA32c.wav bit diff --git a/scripts/config/self_test_ltv.prm b/scripts/config/self_test_ltv.prm index 9b9bccf657..6c656abdf7 100644 --- a/scripts/config/self_test_ltv.prm +++ b/scripts/config/self_test_ltv.prm @@ -539,6 +539,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -dtx -ism +4 testv/ltvISM1.csv NULL testv/ltvISM3.csv testv/ltvISM4.csv 256000 48 testv/ltv48_4ISM.wav bit ../IVAS_dec BINAURAL 48 bit testv/ltv48_4ISM_non_diegetic_pan.wav_brate_256000-48_DTX_binaural.tst +// 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 +../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bi +../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav + // SBA at 13.2 kbps, 32kHz in, 32kHz out, HOA3 out, bandwidth switching ../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -sba 3 13200 32 testv/ltv32_HOA3.wav bit -- GitLab From aa0fbf05e7265c6aca0311e01991915e97e8bf91 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Wed, 21 Feb 2024 13:59:20 +0100 Subject: [PATCH 3/7] Combined room acoustics configuration added --- scripts/testv/rend_config_combined.cfg | 101 +++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 scripts/testv/rend_config_combined.cfg diff --git a/scripts/testv/rend_config_combined.cfg b/scripts/testv/rend_config_combined.cfg new file mode 100644 index 0000000000..37c76d0dd1 --- /dev/null +++ b/scripts/testv/rend_config_combined.cfg @@ -0,0 +1,101 @@ +[directivitySetting] +directivityCount = 4; + +[directivityPattern:0] +directivity = [0.0, 360.0, 0.2512] +[directivityPattern:1] +directivity = [0.0, 360.0, 0.5] +[directivityPattern:2] +directivity = [15.0, 345.0, 0.701] +[directivityPattern:3] +directivity = [90.0, 270.0, 0.1] + +[roomAcoustics] +frequencyGridCount = 2; +acousticEnvironmentCount = 3; + +[frequencyGrid:0] +method = individualFrequencies; +nrBands = 31; +frequencies = [20.0, 25.0, 31.5, 40.0, + 50.0, 63.0, 80.0, 100.0, + 125.0, 160.0, 200.0, 250.0, + 315.0, 400.0, 500.0, 630.0, + 800.0, 1000.0, 1250.0, 1600.0, + 2000.0, 2500.0, 3150.0, 4000.0, + 5000.0, 6300.0, 8000.0, 10000.0, + 12500.0, 16000.0, 20000.0]; + +[frequencyGrid:1] +method = individualFrequencies; +nrBands = 24; +frequencies = [50.0, 63.0, 80.0, 100.0, + 125.0, 160.0, 200.0, 250.0, + 315.0, 400.0, 500.0, 630.0, + 800.0, 1000.0, 1250.0, 1600.0, + 2000.0, 2500.0, 3150.0, 4000.0, + 5000.0, 6300.0, 8000.0, 10000.0]; + +[acousticEnvironment:0] +frequencyGridIndex = 0; +predelay = 0.1; +rt60 = [1.3622, 1.4486, 1.3168, 1.5787, + 1.4766, 1.3954, 1.2889, 1.3462, + 1.0759, 1.0401, 1.0970, 1.0850, + 1.0910, 1.0404, 1.0499, 1.0699, + 1.1028, 1.1714, 1.1027, 1.0666, + 1.0550, 1.0553, 1.0521, 1.0569, + 1.0421, 0.97822, 0.80487, 0.75944, + 0.71945, 0.61682, 0.60031]; + +dsr = [1.8811e-08, 2.1428e-08, 1.3972e-08, 1.51e-08, + 1.287e-08, 1.8747e-08, 2.413e-08, 3.9927e-08, + 8.9719e-08, 1.902e-07, 3.702e-07, 6.1341e-07, + 7.1432e-07, 6.5331e-07, 4.6094e-07, 5.4683e-07, + 7.0134e-07, 6.856e-07, 7.114e-07, 6.9604e-07, + 5.2939e-07, 5.699e-07, 6.1773e-07, 5.7488e-07, + 4.7748e-07, 2.7213e-07, 1.3681e-07, 1.0941e-07, + 6.2001e-08, 2.8483e-08, 2.6267e-08]; + +[acousticEnvironment:1] +frequencyGridIndex = 1; +predelay = 0.108; +rt60 = [0.87, 0.66, 0.47, 0.41, + 0.32, 0.37, 0.28, 0.30, + 0.29, 0.29, 0.28, 0.30, + 0.31, 0.34, 0.34, 0.34, + 0.34, 0.33, 0.32, 0.29, + 0.28, 0.24, 0.24, 0.2]; + +dsr = [2.511887e-07, 1e-07, 1.2589251e-07, 1e-07, + 5.01187e-08, 5.01187e-08, 7.9432844e-08, 1e-07, + 6.309576e-08, 5.01187e-08, 7.9432844e-08, 1e-07, + 5.01187e-08, 1e-07, 7.9432844e-08, 6.309576e-08, + 7.9432844e-08, 5.01187e-08, 6.309576e-08, 3.9810708e-08, + 3.9810708e-08, 2.511887e-08, 1.9952632e-08, 1.2589251e-08]; + +earlyReflectionsSize = [4.0, 4.0, 5.0]; +absorptionCoeffs = [ 0.1, 0.2, 0.2, 0.2, 0.1, 0.1 ]; +lowComplexity = TRUE; +listenerOrigin = [-1, 0.5, 1.5]; + +[acousticEnvironment:2] +frequencyGridIndex = 1; +predelay = 0.108; +rt60 = [0.87, 0.66, 0.47, 0.41, + 0.32, 0.37, 0.28, 0.30, + 0.29, 0.29, 0.28, 0.30, + 0.31, 0.34, 0.34, 0.34, + 0.34, 0.33, 0.32, 0.29, + 0.28, 0.24, 0.24, 0.2]; + +dsr = [2.511887e-07, 1e-07, 1.2589251e-07, 1e-07, + 5.01187e-08, 5.01187e-08, 7.9432844e-08, 1e-07, + 6.309576e-08, 5.01187e-08, 7.9432844e-08, 1e-07, + 5.01187e-08, 1e-07, 7.9432844e-08, 6.309576e-08, + 7.9432844e-08, 5.01187e-08, 6.309576e-08, 3.9810708e-08, + 3.9810708e-08, 2.511887e-08, 1.9952632e-08, 1.2589251e-08]; + +earlyReflectionsSize = [3.0, 3.0, 4.0]; +absorptionCoeffs = [ 0.3, 0.2, 0.2, 0.2, 0.3, 0.1 ]; +lowComplexity = FALSE; -- GitLab From 822b65bf0e8b234d6adbc0b0d9f69e51a98722f4 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Wed, 21 Feb 2024 14:31:53 +0100 Subject: [PATCH 4/7] Additional tests commented out --- scripts/config/self_test.prm | 4 ++-- scripts/config/self_test_ltv.prm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 040434581c..5602c5a619 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -540,8 +540,8 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit testv/stv+4ISM48n+non_diegetic_pan.wav_brate_256000-48_DTX_binaural.tst // 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 -../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bit -../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav +//../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav // SBA at 13.2 kbps, 32kHz in, 32kHz out, HOA3 out, bandwidth switching diff --git a/scripts/config/self_test_ltv.prm b/scripts/config/self_test_ltv.prm index 6c656abdf7..6301755a28 100644 --- a/scripts/config/self_test_ltv.prm +++ b/scripts/config/self_test_ltv.prm @@ -540,8 +540,8 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit testv/ltv48_4ISM_non_diegetic_pan.wav_brate_256000-48_DTX_binaural.tst // 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 -../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bi -../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav +//../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bi +//../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav // SBA at 13.2 kbps, 32kHz in, 32kHz out, HOA3 out, bandwidth switching -- GitLab From 3105cd1d67e78fa1faeabdd806331baa7cc73a3e Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 21 Feb 2024 14:54:25 +0100 Subject: [PATCH 5/7] fix ltv command line --- scripts/config/self_test_ltv.prm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config/self_test_ltv.prm b/scripts/config/self_test_ltv.prm index 6301755a28..4964cb31c6 100644 --- a/scripts/config/self_test_ltv.prm +++ b/scripts/config/self_test_ltv.prm @@ -540,7 +540,7 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit testv/ltv48_4ISM_non_diegetic_pan.wav_brate_256000-48_DTX_binaural.tst // 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 -//../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bi +//../IVAS_cod -ism 4 testv/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv testv/ltvISM4.csv 128000 48 testv/ltv_4ISM.wav bit //../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav -- GitLab From 037b546bb6b51d364cac82fde6e08b157ee6dcbd Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 21 Feb 2024 15:06:22 +0100 Subject: [PATCH 6/7] improve command lines --- scripts/config/self_test.prm | 2 +- scripts/config/self_test_ltv.prm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 5602c5a619..4d7d53e22e 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -541,7 +541,7 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 // 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 //../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 128000 48 testv/stv4ISM48n.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav +//../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 3 0 2 1 BINAURAL_ROOM_REVERB 48 bit testv/stv4ISM48n+combined_render_config_brate_128000-48-binaural_room_reverb.wav // SBA at 13.2 kbps, 32kHz in, 32kHz out, HOA3 out, bandwidth switching diff --git a/scripts/config/self_test_ltv.prm b/scripts/config/self_test_ltv.prm index 4964cb31c6..9a40a073ca 100644 --- a/scripts/config/self_test_ltv.prm +++ b/scripts/config/self_test_ltv.prm @@ -540,8 +540,8 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit testv/ltv48_4ISM_non_diegetic_pan.wav_brate_256000-48_DTX_binaural.tst // 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 -//../IVAS_cod -ism 4 testv/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv testv/ltvISM4.csv 128000 48 testv/ltv_4ISM.wav bit -//../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit out.wav +//../IVAS_cod -ism 4 testv/ltvISM1.csv testv/ltvISM2.csv testv/ltvISM3.csv testv/ltvISM4.csv 128000 48 testv/ltv48_4ISM.wav bit +//../IVAS_dec -render_config testv/rend_config_combined.cfg -dpid 0 0 0 0 BINAURAL_ROOM_REVERB 48 bit testv/ltv48_4ISM+combined_render_config_brate_128000-48-binaural_room_reverb.wav // SBA at 13.2 kbps, 32kHz in, 32kHz out, HOA3 out, bandwidth switching -- GitLab From 30a249b13af15d640dcc632d01c018cdf81e8fd7 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Thu, 22 Feb 2024 13:00:37 +0100 Subject: [PATCH 7/7] Fix for botched merge of options.h --- lib_com/options.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 22b35e05db..a4741e2861 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -153,6 +153,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ +#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ #define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */ #define FIX_699_FILE_READER_JBM_TSM /* VA: issue 699: complement FileReader_getFilePath() logic for TSM and JBM */ #define FIX_997_REMOVE_SPAR_DEC_UPMIXER /* VA: issue 997: remove obsolete function ivas_spar_dec_upmixer() */ @@ -170,18 +171,6 @@ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_978_MC_TDREND_REVERB /* Eri : activate reverb for TDREND with headtracking */ -#define BE_FIX_567_DOUBLE_STEREO_DMX /* NTT: Fix formal issues */ -#define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ -#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ -#define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ -#ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC -#define NONBE_FIX_947_STEREO_DMX_ROMOPT /* Orange: ROM optimisation for POC*/ -#endif -#define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ -#ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA -#define NONBE_FIX_947_STEREO_DMX_FADOPT /* Orange: Fading optimisation */ -#endif -#define NONBE_FIX_982_OMASA_DELAY_COMP_5MS /* FhG : issue #982 : 5ms and 20ms output different for OMASA */ #ifdef SPLIT_REND_WITH_HEAD_ROT #define SPLIT_REND_LCLD_5MS /* Dlb: LCLD 5ms framing operation */ -- GitLab