From 30b0b23d961d5d74d2f49fc20c5d444720e48232 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 4 Nov 2025 15:06:40 +0100 Subject: [PATCH 1/3] port FIX_1330_JBM_MEMORY_FIX --- lib_com/options.h | 3 +-- lib_dec/ivas_jbm_dec.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index a98f995caa..a1ba22df99 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -189,9 +189,8 @@ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS /* FhG: fix non-BE in DFT stereo encoder between optimization levels */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 /* FhG: fix even more non-BEnesses */ - /*#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP*/ /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ - +#define FIX_1330_JBM_MEMORY_FIX /* VA: basop issue: 2179 fix non-BE difference in FIX_1330_JBM_MEMORY */ #define NONBE_1380_OMASA_BUILD_DIFF /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index b19f0bdf7e..570deda672 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -791,6 +791,9 @@ void ivas_jbm_dec_feed_tc_to_renderer( for ( ch = 0; ch < max( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full ); ch++ ) { hTcBuffer->tc[ch] = &hTcBuffer->tc_buffer[offset]; +#ifdef FIX_1330_JBM_MEMORY_FIX + st_ivas->p_output_f[ch] = hTcBuffer->tc[ch]; +#endif offset += len_offset; } } -- GitLab From 54f0b37b7da285e2dfe3f88fb71fc78db4a4b73c Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 6 Nov 2025 15:45:53 +0100 Subject: [PATCH 2/3] merge --- ivas_be_conf_test_gen.sh | 42 - lib_com/options.h | 4 + .../binauralRenderer_interface/CMakeLists.txt | 9 +- .../ivas_binaural_custom_16kHz.bin | 4 +- .../ivas_binaural_custom_32kHz.bin | 4 +- .../ivas_binaural_custom_48kHz.bin | 4 +- .../brir_low_complexity_optim.cfg | 6 +- .../clearButKeepNeededVariables.m | 2 +- .../fastconv/generate_BRIR_CLDFB_FASTCONV.m | 5 +- .../fastconv/generate_tables_for_fastconv.m | 46 +- .../fastconv/get_ivas_binary_header.m | 4 +- .../fastconv/write_fastconv_rom_table_fx.m | 78 +- .../generate_crend_ivas_tables_from_sofa.c | 1206 +++++++++++++++-- ...erate_ivas_binauralizer_tables_from_sofa.m | 71 +- ...zer_tables_from_sofa_test_other_database.m | 197 ++- .../ivas_crend_binaural_filter_design.c | 11 + .../matlab_hrir_generation_scripts/SD_2_ROM.m | 8 +- .../SHD_2_ROM.m | 8 +- .../SOFA_save_to_mat.m | 3 +- .../convert_SD2SHD_HRIRs.m | 8 +- .../generate_HOA_HRIRs_MOD_lens.m | 4 +- .../generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m | 19 +- .../generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m | 4 +- ...erate_tables_for_parametric_binauralizer.m | 144 +- scripts/config/self_test.prm | 480 +++---- .../modeling_tool/Gen_Hrf_IVAS_Binary.m | 13 + .../modeling_tool/Mod_Hrf_Itd_Main.m | 5 + tests/requirements.txt | 1 + tests/split_rendering/utils.py | 2 +- 29 files changed, 1767 insertions(+), 625 deletions(-) delete mode 100644 ivas_be_conf_test_gen.sh diff --git a/ivas_be_conf_test_gen.sh b/ivas_be_conf_test_gen.sh deleted file mode 100644 index 2536de1f89..0000000000 --- a/ivas_be_conf_test_gen.sh +++ /dev/null @@ -1,42 +0,0 @@ -make -f Makefile clean -make -f Makefile -j CLANG=0 -cp IVAS_cod IVAS_cod_ref -cp IVAS_dec IVAS_dec_ref -cp IVAS_rend IVAS_rend_ref -cp ISAR_post_rend ISAR_post_rend_ref -python3 scripts/prepare_combined_format_inputs.py -python3 -m pytest -q tests/codec_be_on_mr_nonselection tests/renderer_short/test_renderer.py tests/split_rendering/test_split_rendering.py -v -n auto --update_ref 1 --create_ref --keep_files --html=report_cmd.html --self-contained-html -python3 scripts/parse_commands.py report_cmd.html Readme_IVAS.txt -rm -rf testvec -mkdir testvec -mkdir testvec/binauralRenderer_interface -mkdir testvec/testv -mkdir testvec/testv/renderer_short -mkdir testvec/testv/split_rendering -mkdir testvec/bin -cp -r scripts/testv/* testvec/testv -cp -r scripts/ls_layouts testvec -cp -r scripts/object_edit testvec -cp -r scripts/switchPaths testvec -cp -r scripts/trajectories testvec -cp -r scripts/binauralRenderer_interface/binaural_renderers_hrtf_data testvec/binauralRenderer_interface -cp -r tests/ref testvec/testv/ref -cp -r tests/renderer_short/ref testvec/testv/renderer_short/ref -cp -r tests/split_rendering/ref testvec/testv/split_rendering/ref -cp -r tests/split_rendering/renderer_configs testvec/testv/split_rendering/renderer_configs -cp -r tests/split_rendering/error_patterns testvec/testv/split_rendering/error_patterns - -python3 scripts/cleanup_26252.py - -cp -r tests/conformance-test testvec/ -cp Readme_IVAS_dec.txt testvec -cp Readme_IVAS_enc.txt testvec -cp Readme_IVAS_rend.txt testvec -cp Readme_IVAS_JBM_dec.txt testvec -cp Readme_IVAS_ISAR_dec.txt testvec -cp Readme_IVAS_ISAR_post_rend.txt testvec - -cp IVAS_cod testvec/bin -cp IVAS_dec testvec/bin -cp IVAS_rend testvec/bin -cp ISAR_post_rend testvec/bin diff --git a/lib_com/options.h b/lib_com/options.h index a1ba22df99..9987545b97 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -189,8 +189,12 @@ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS /* FhG: fix non-BE in DFT stereo encoder between optimization levels */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 /* FhG: fix even more non-BEnesses */ +<<<<<<< HEAD /*#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP*/ /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ #define FIX_1330_JBM_MEMORY_FIX /* VA: basop issue: 2179 fix non-BE difference in FIX_1330_JBM_MEMORY */ +======= +#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ +>>>>>>> remotes/origin/main #define NONBE_1380_OMASA_BUILD_DIFF /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */ /* ##################### End NON-BE switches ########################### */ diff --git a/scripts/binauralRenderer_interface/CMakeLists.txt b/scripts/binauralRenderer_interface/CMakeLists.txt index 5864adf58e..2a2ba13d35 100644 --- a/scripts/binauralRenderer_interface/CMakeLists.txt +++ b/scripts/binauralRenderer_interface/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(generate_crend_ivas_tables) @@ -71,6 +71,13 @@ set(SOURCE_FILES_H ${IVAS_TRUNK_REND_PATH}/ivas_rom_rend.h ) +# require to be bit exact with main branch +if(MSVC) + add_compile_options("/fp:precise") +else() + add_compile_options("-ffp-contract=off") +endif() + add_library(${PROJECT_NAME}_lib STATIC ${SOURCE_FILES_C} ${SOURCE_FILES_H}) add_executable(${PROJECT_NAME} generate_crend_ivas_tables_from_sofa.c) diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin index c423932724..a9b2998241 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b938fe3032ef8587a054cebeddc3ad112f57a432dba8796769c3e703e8b1631 -size 897948 +oid sha256:af5ce183c25940d74fb42203e9ee2727a7ef20b5a19e45c28a36b4dfee8c5fa7 +size 826672 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin index da7feb7102..c09bc1f557 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ae00c9af63642234cc2123c469bf675040f6ef871436b7738ee2d6b47124bde -size 1066176 +oid sha256:efdb397c01b6ff225b1e0f4f855c3e2a1d02df5a9f6edf2aa1b504bca498df8a +size 958940 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin index 90fba58890..95dee97f34 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5aeb1c04b60ac119bd2415238f979810f6f3a27ff25a95a43cea37c02d86d6a9 -size 1184160 +oid sha256:fac6547ae0c906c75866c194675adbdd840f933435950e18245c4b667c531061 +size 1077628 diff --git a/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg b/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg index 4869082f51..4d7eeeb761 100644 --- a/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg +++ b/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg @@ -3,10 +3,10 @@ optimize = true; harmonizeLateReverbBinauralGain = false; lateReverbCompensationGain = [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]; directCutOffFreqThreshold = -15; -diffuseCutOffFreqThreshold = -10; +diffuseCutOffFreqThreshold = -30; directEnergyThreshold = -15; diffuseEnergyThreshold = -30; beginEnergyThreshold = -50; endEnergyThreshold = -120; -maxNumDirectBlocks = 40; -maxNumDiffuseBlocks = 40; \ No newline at end of file +maxNumDirectBlocks = 1; +maxNumDiffuseBlocks = 60; \ No newline at end of file diff --git a/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m b/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m index ba02ecccfb..b02b810409 100644 --- a/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m +++ b/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m @@ -1 +1 @@ -clear -regexp ^((?!writeRomFileOutput|writeBinaryOutput|generateBinaryFile|generateCustomBinaryFile|writeEachRendererBinaryOutput|rom_file|bin_file|hrir_file|brir_file|ivas_path|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name|rom_path).)*$ +clear -regexp ^((?!writeRomFileOutput|makeBE|performDiffuseFieldEq|normalize|writeBinaryOutput|writeRomFileFx|makeFxFltBE|generateBinaryFile|generateCustomBinaryFile|writeEachRendererBinaryOutput|fx_rom_file|rom_file|bin_file|hrir_file|brir_file|ivas_path|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name|rom_path).)*$ diff --git a/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m b/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m index 63f10f42e5..25a2b81492 100644 --- a/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m +++ b/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m @@ -51,7 +51,7 @@ if isfolder("../matlab_hrir_generation_scripts") addpath("../matlab_hrir_generation_scripts"); end sofaData = hrtf_library_loader(); -sofaData.readSOFA(char(sofa_file),'Combined',true); +sofaData.readSOFA(char(sofa_file),'Combined',false); ls_struct = get_ls_layout_config('Combined'); IR = permute(sofaData.Data.IR(:,:,:), [3 2 1]) ; @@ -142,6 +142,9 @@ end % Step 3: Compute EDC (Energy Decay Curve) in_struct.num_bands = size(IR_cldfb,1); in_struct.timeSlots = size(IR_cldfb,2); + +in_struct.max_index = in_struct.timeSlots; % Needs to be changed according to IRs + if in_struct.max_index > in_struct.timeSlots in_struct.max_index = in_struct.timeSlots; end diff --git a/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m b/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m index 2a5d79bc45..54563a696c 100644 --- a/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m +++ b/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m @@ -46,6 +46,9 @@ end if ~exist("writeRomFileOutput",'var') writeRomFileOutput = true; end +if ~exist("normalize",'var') + normalize = true; +end if ~exist("writeRomFileFx",'var') writeRomFileFx = false; end @@ -61,6 +64,9 @@ end if ~exist("rom_file",'var') rom_file = fullfile('.', 'ivas_rom_binauralRenderer.c'); end +if ~exist("fx_rom_file",'var') + fx_rom_file = fullfile('.', 'ivas_rom_binauralRenderer_fx.c'); +end if ~exist("bin_file",'var') bin_file = fullfile('.', 'fastconv_rom.bin'); end @@ -79,34 +85,39 @@ end %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SHD) if generateCustomBinaryFile disp('Processing HRIRs (FOA) for FastConv renderer...'); - FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, -1); + FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, -1, 5, normalize); disp('Processing HRIRs (HOA2) for FastConv renderer...'); - FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, -1); + FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, -1, 5, normalize); disp('Processing HRIRs (HOA3) for FastConv renderer...'); - FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, -1); + FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, -1, 5, normalize); + + %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SD) + disp('Processing HRIRs (SD) for FastConv renderer...'); + FastConv_SD_IR_float = SD_2_ROM(hrir_file, 5, normalize); else disp('Processing HRIRs (FOA) for FastConv renderer...'); - FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, 128); + FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, 128,3, normalize); disp('Processing HRIRs (HOA2) for FastConv renderer...'); - FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, 128); + FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, 128, 3,normalize); disp('Processing HRIRs (HOA3) for FastConv renderer...'); - FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, 128); + FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, 128,3, normalize); + + %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SD) + disp('Processing HRIRs (SD) for FastConv renderer...'); + FastConv_SD_IR_float = SD_2_ROM(hrir_file,3,normalize); end -%% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SD) -disp('Processing HRIRs (SD) for FastConv renderer...'); -FastConv_SD_IR_float = SD_2_ROM(hrir_file); %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV_ROOM (SD) disp('Processing BRIRs (SD) for FastConv renderer...'); FastConv_SD_BRIR_float = generate_BRIR_CLDFB_FASTCONV(brir_file); -if generateCustomBinaryFile == true - FastConv_SD_BRIR_float.rev_param.rt60 = FastConv_SD_BRIR_float.rev_param.rt60 * 2; - FastConv_SD_BRIR_float.rev_param.nrgLr = FastConv_SD_BRIR_float.rev_param.nrgLr * 2; +if generateCustomBinaryFile == false + FastConv_SD_BRIR_float.rev_param.rt60 = [0.420013, 0.206696, 0.203613, 0.207458, 0.217255, 0.236176, 0.230164, 0.228912, 0.228210, 0.219788, 0.225983, 0.220184, 0.222015, 0.223114, 0.223572, 0.227478, 0.227905, 0.223450, 0.219910, 0.218597, 0.220428, 0.218262, 0.213257, 0.210327, 0.207428, 0.198761, 0.196259, 0.194916, 0.190338, 0.184509, 0.180328, 0.176178, 0.176514, 0.177582, 0.183594, 0.195923, 0.203247, 0.208405, 0.214661, 0.220001, 0.222931, 0.230408, 0.233917, 0.233643, 0.236328, 0.237427, 0.241638, 0.241119, 0.238861, 0.242371, 0.247253, 0.245941, 0.248566, 0.245392, 0.243958, 0.244110, 0.239014, 0.241791, 0.234833, 0.253052]; + FastConv_SD_BRIR_float.rev_param.nrgLr = [0.000579833984, 0.000213623047, 0.000244140625, 0.000213623047, 0.000244140625, 0.00152587891, 0.00115966797, 0.00109863281, 0.0012512207, 0.00131225586, 0.00231933594, 0.00244140625, 0.00268554688, 0.00271606445, 0.00262451172, 0.00256347656, 0.00274658203, 0.00271606445, 0.00259399414, 0.00253295898, 0.00341796875, 0.00177001953, 0.0009765625, 0.000701904296, 0.000610351563, 0.000549316406, 0.000518798828, 0.000579833984, 0.000610351563, 0.000549316406, 0.0012512207, 0.00122070313, 0.000946044921, 0.000610351563, 0.000274658203, 0.0000915527343, 0.0000610351563, 0.0000610351563, 0.0000305175781, 0.0000305175781, 0.0000305175781, 0.0000305175781, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; end %% compute scaling factor and set floating point precision to int16_t @@ -130,14 +141,11 @@ FastConv_SD_BRIR = FastConv_SD_BRIR_float; [FastConv_SD_BRIR.rev_param.nrgLr, FastConv_SD_BRIR.rev_param.factorQ_nrgLr] = make_be_with_fx(FastConv_SD_BRIR_float.rev_param.nrgLr,15); if writeRomFileOutput - if writeRomFileFx - write_fastconv_rom_table_fx(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); + write_fastconv_rom_table_fx(fx_rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); + if makeFxFltBE + write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); else - if makeFxFltBE - write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); - else - write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA_float, FastConv_SHD_IR_HOA2_float, FastConv_SHD_IR_HOA3_float, FastConv_SD_IR_float, FastConv_SD_BRIR_float); - end + write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA_float, FastConv_SHD_IR_HOA2_float, FastConv_SHD_IR_HOA3_float, FastConv_SD_IR_float, FastConv_SD_BRIR_float); end end diff --git a/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m b/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m index ae7eac29b0..9838f42ddb 100644 --- a/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m +++ b/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m @@ -66,8 +66,8 @@ else error('Renderer type could not be matched to IVAS enum values!'); end -ivas_cnst_path = fullfile(ivas_path, 'lib_com/ivas_cnst.h'); % must be replaced if this file is moved -c = fileread(ivas_cnst_path); +%ivas_cnst_path = fullfile(ivas_path, 'lib_com/ivas_cnst.h'); % must be replaced if this file is moved +c = fileread(hrtf_file_reader_path); % regex for BINAURAL_INPUT_AUDIO_CONFIG ic_expr = '^\s+(BINAURAL_INPUT\w+)'; diff --git a/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m b/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m index f7a5d35fa9..e50caec29b 100644 --- a/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m +++ b/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m @@ -44,57 +44,57 @@ function write_fastconv_rom_table_fx(output_file, FastConv_SHD_IR_FOA, FastConv_ %% HRIRs (SHD) % HOA3 FastConv_SHD_IR_HOA3.IR = FastConv_SHD_IR_HOA3.IR .* (2.^double(FastConv_SHD_IR_HOA3.factorQ)); - fprintf(fid, ['const int16_t FASTCONV_' FastConv_SHD_IR_HOA3.order '_latency_s_factorQ = %d;\n'], FastConv_SHD_IR_HOA3.latency_s_factorQ); - fprintf(fid, ['const int32_t FASTCONV_' FastConv_SHD_IR_HOA3.order '_latency_s = %ld;\n'], FastConv_SHD_IR_HOA3.latency_s * (2.^double(FastConv_SHD_IR_HOA3.latency_s_factorQ))); - fprintf(fid, ['const int16_t FASTCONV_HRIR_' FastConv_SHD_IR_HOA3.order '_factorQ = %d;\n'], FastConv_SHD_IR_HOA3.factorQ); - writeData3L(fid, ['const int16_t leftHRIRReal_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d', real(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); - writeData3L(fid, ['const int16_t leftHRIRImag_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); - writeData3L(fid, ['const int16_t rightHRIRReal_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); - writeData3L(fid, ['const int16_t rightHRIRImag_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); + fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA3.order '_latency_s_fx = %d;\n'], FastConv_SHD_IR_HOA3.latency_s_factorQ); + fprintf(fid, ['const Word32 FASTCONV_' FastConv_SHD_IR_HOA3.order '_latency_s_fx = %ld;\n'], FastConv_SHD_IR_HOA3.latency_s * (2.^double(FastConv_SHD_IR_HOA3.latency_s_factorQ))); + fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA3.order '_fx= %d;\n'], FastConv_SHD_IR_HOA3.factorQ); + writeData3L(fid, ['const Word16 leftHRIRReal_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d', real(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); + writeData3L(fid, ['const Word16 leftHRIRImag_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); + writeData3L(fid, ['const Word16 rightHRIRReal_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); + writeData3L(fid, ['const Word16 rightHRIRImag_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); % HOA2 FastConv_SHD_IR_HOA2.IR = FastConv_SHD_IR_HOA2.IR .* (2.^double(FastConv_SHD_IR_HOA2.factorQ)); - fprintf(fid, ['const int16_t FASTCONV_' FastConv_SHD_IR_HOA2.order '_latency_s_factorQ = %d;\n'], FastConv_SHD_IR_HOA2.latency_s_factorQ); - fprintf(fid, ['const int32_t FASTCONV_' FastConv_SHD_IR_HOA2.order '_latency_s = %ld;\n'], FastConv_SHD_IR_HOA2.latency_s * (2.^double(FastConv_SHD_IR_HOA2.latency_s_factorQ))); - fprintf(fid, ['const int16_t FASTCONV_HRIR_' FastConv_SHD_IR_HOA2.order '_factorQ = %d;\n'], FastConv_SHD_IR_HOA2.factorQ); - writeData3L(fid, ['const int16_t leftHRIRReal_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); - writeData3L(fid, ['const int16_t leftHRIRImag_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); - writeData3L(fid, ['const int16_t rightHRIRReal_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'],'%d', real(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); - writeData3L(fid, ['const int16_t rightHRIRImag_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); + fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA2.order '_latency_s_fx = %d;\n'], FastConv_SHD_IR_HOA2.latency_s_factorQ); + fprintf(fid, ['const Word32 FASTCONV_' FastConv_SHD_IR_HOA2.order '_latency_s_fx = %ld;\n'], FastConv_SHD_IR_HOA2.latency_s * (2.^double(FastConv_SHD_IR_HOA2.latency_s_factorQ))); + fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA2.order '_fx = %d;\n'], FastConv_SHD_IR_HOA2.factorQ); + writeData3L(fid, ['const Word16 leftHRIRReal_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); + writeData3L(fid, ['const Word16 leftHRIRImag_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); + writeData3L(fid, ['const Word16 rightHRIRReal_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'],'%d', real(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); + writeData3L(fid, ['const Word16 rightHRIRImag_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); % FOA FastConv_SHD_IR_FOA.IR = FastConv_SHD_IR_FOA.IR .* (2.^double(FastConv_SHD_IR_FOA.factorQ)); - fprintf(fid, ['const int16_t FASTCONV_' FastConv_SHD_IR_FOA.order '_latency_s_factorQ = %d;\n'], FastConv_SHD_IR_FOA.latency_s_factorQ); - fprintf(fid, ['const int32_t FASTCONV_' FastConv_SHD_IR_FOA.order '_latency_s = %ld;\n'], FastConv_SHD_IR_FOA.latency_s * (2.^double(FastConv_SHD_IR_FOA.latency_s_factorQ))); - fprintf(fid, ['const int16_t FASTCONV_HRIR_' FastConv_SHD_IR_FOA.order '_factorQ = %d;\n'], FastConv_SHD_IR_FOA.factorQ); - writeData3L(fid, ['const int16_t leftHRIRReal_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); - writeData3L(fid, ['const int16_t leftHRIRImag_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); - writeData3L(fid, ['const int16_t rightHRIRReal_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); - writeData3L(fid, ['const int16_t rightHRIRImag_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); + fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_FOA.order '_latency_s_fx = %d;\n'], FastConv_SHD_IR_FOA.latency_s_factorQ); + fprintf(fid, ['const Word32 FASTCONV_' FastConv_SHD_IR_FOA.order '_latency_s_fx = %ld;\n'], FastConv_SHD_IR_FOA.latency_s * (2.^double(FastConv_SHD_IR_FOA.latency_s_factorQ))); + fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_FOA.order '_fx = %d;\n'], FastConv_SHD_IR_FOA.factorQ); + writeData3L(fid, ['const Word16 leftHRIRReal_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); + writeData3L(fid, ['const Word16 leftHRIRImag_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); + writeData3L(fid, ['const Word16 rightHRIRReal_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); + writeData3L(fid, ['const Word16 rightHRIRImag_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); %% HRIRs (SD) FastConv_SD_IR.IR = FastConv_SD_IR.IR .* (2.^double(FastConv_SD_IR.factorQ)); - fprintf(fid, 'const int16_t FASTCONV_HRIR_latency_s_factorQ = %d;\n', FastConv_SD_IR.latency_s_factorQ); - fprintf(fid, 'const int32_t FASTCONV_HRIR_latency_s = %ld;\n', FastConv_SD_IR.latency_s * (2.^double(FastConv_SD_IR.latency_s_factorQ))); - fprintf(fid, 'const int16_t FASTCONV_HRIR_factorQ = %d;\n', FastConv_SD_IR.factorQ); - writeData3L(fid, 'const int16_t leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); - writeData3L(fid, 'const int16_t leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); - writeData3L(fid, 'const int16_t rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); - writeData3L(fid, 'const int16_t rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); + fprintf(fid, 'const Word16 FASTCONV_factor_Q_HRIR_latency_s_fx = %d;\n', FastConv_SD_IR.latency_s_factorQ); + fprintf(fid, 'const Word32 FASTCONV_HRIR_latency_s_fx = %ld;\n', FastConv_SD_IR.latency_s * (2.^double(FastConv_SD_IR.latency_s_factorQ))); + fprintf(fid, 'const Word16 FASTCONV_factor_Q_HRIR_fx = %d;\n', FastConv_SD_IR.factorQ); + writeData3L(fid, 'const Word16 leftHRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); + writeData3L(fid, 'const Word16 leftHRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); + writeData3L(fid, 'const Word16 rightHRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); + writeData3L(fid, 'const Word16 rightHRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); %% BRIRs (SD) fprintf(fid, '/* Binaural rendering data set based on BRIRs \n'); fprintf(fid, ' * Tables derived from Mozart IIS BRIRs.*/\n'); FastConv_SD_BRIR.IR = FastConv_SD_BRIR.IR .* (2.^double(FastConv_SD_BRIR.factorQ)); - fprintf(fid, 'const int16_t FASTCONV_BRIR_latency_s_factorQ = %d;\n', FastConv_SD_BRIR.rev_param.latency_s_factorQ); - fprintf(fid, 'const int32_t FASTCONV_BRIR_latency_s = %ld;\n', FastConv_SD_BRIR.rev_param.latency_s * (2.^double(FastConv_SD_BRIR.rev_param.latency_s_factorQ))); - fprintf(fid, 'const int16_t FASTCONV_BRIR_factorQ = %d;\n', FastConv_SD_BRIR.factorQ); - writeData3L(fid, 'const int16_t leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); - writeData3L(fid, 'const int16_t leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]', '%d',imag(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); - writeData3L(fid, 'const int16_t rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); - writeData3L(fid, 'const int16_t rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', imag(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + fprintf(fid, 'const Word16 FASTCONV_factor_Q_BRIR_latency_s_fx = %d;\n', FastConv_SD_BRIR.rev_param.latency_s_factorQ); + fprintf(fid, 'const Word32 FASTCONV_BRIR_latency_s_fx = %ld;\n', FastConv_SD_BRIR.rev_param.latency_s * (2.^double(FastConv_SD_BRIR.rev_param.latency_s_factorQ))); + fprintf(fid, 'const Word16 FASTCONV_factor_Q_BRIR_fx= %d;\n', FastConv_SD_BRIR.factorQ); + writeData3L(fid, 'const Word16 leftBRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + writeData3L(fid, 'const Word16 leftBRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]', '%d',imag(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + writeData3L(fid, 'const Word16 rightBRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + writeData3L(fid, 'const Word16 rightBRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', imag(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); % RT60 - fprintf(fid, 'const int16_t fastconvReverberationTimes_factorQ = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_rt60); - fprintf(fid,'const int16_t fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX] = \n{'); + fprintf(fid, 'const Word16 FASTCONV_factor_Q_reverberationTimes_fx = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_rt60); + fprintf(fid,'const Word16 fastconvReverberationTimes_fx[CLDFB_NO_CHANNELS_MAX] = \n{'); fprintf(fid,'\n '); FastConv_SD_BRIR.rev_param.rt60 = FastConv_SD_BRIR.rev_param.rt60 .* (2.^double(FastConv_SD_BRIR.rev_param.factorQ_rt60)); for bandIdx = 1:FastConv_SD_BRIR.rev_param.kAna @@ -104,8 +104,8 @@ function write_fastconv_rom_table_fx(output_file, FastConv_SHD_IR_FOA, FastConv_ fprintf(fid,'\n\n'); % energyReverb - fprintf(fid, 'const int16_t fastconvReverberationEneCorrections_factorQ = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_nrgLr); - fprintf(fid,'const int16_t fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = \n{'); + fprintf(fid, 'const Word16 FASTCONV_factor_Q_reverberationEneCorrections_fx = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_nrgLr); + fprintf(fid,'const Word16 fastconvReverberationEneCorrections_fx[CLDFB_NO_CHANNELS_MAX] = \n{'); fprintf(fid,'\n '); FastConv_SD_BRIR.rev_param.nrgLr = FastConv_SD_BRIR.rev_param.nrgLr .* (2.^double(FastConv_SD_BRIR.rev_param.factorQ_nrgLr)); for bandIdx = 1:FastConv_SD_BRIR.rev_param.kAna diff --git a/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c b/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c index 67911ad5b8..1bd9b1cadd 100644 --- a/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +++ b/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c @@ -74,8 +74,6 @@ #define TEMPLTATE_C_ROM_FILE_NAME "ivas_license_header.template" #define ROM_FILE_NAME "ivas_rom_binaural_crend_head" #define FORMAT_FLOAT "%a" -#define FORMAT_FLOAT_REVERB "%a" -#define FORMAT_FLOAT_LATENCY "%a" #define NUM_SAMPLES_PER_LINES 96 #define NUM_SAMPLES_PER_LINES_REVERB 9 #define DECLARATION_NAME "CRendBin" @@ -90,6 +88,8 @@ #define DEFAULT_BINARY_FILE_PATH "./bin" #endif +#define MAX_CICP_CHANNELS 16 + /* ------------------------------------------------------------------------------------------ * Struct *------------------------------------------------------------------------------------------ */ @@ -129,8 +129,12 @@ void get_ls_layout_config( AUDIO_CONFIG ls_layout_config, struct ivas_layout_con int generate_crend_ivas_tables_from_sofa( const char *sofa_file_path, ConfigReader *cfgReader ); void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len ); void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ); -void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ); +void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, const int32_t samplerate, const int16_t len ); void update_h_file_with_reverb( const int32_t samplerate ); +void update_h_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len ); +void update_c_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ); +void update_c_file_with_reverb_fx( int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ); +void update_h_file_with_reverb_fx( const int32_t samplerate ); int generate_reverb_ivas_tables_from_sofa( const char *file_path ); extern int32_t float2int32_t( float, int16_t ); @@ -228,11 +232,14 @@ void usage_gen_crend_tables( void ) int32_t frame = 0; /* Counter of frames */ char *c_file_path = NULL; char *h_file_path = NULL; +char *c_file_path_fx = NULL; +char *h_file_path_fx = NULL; char *rom_file_name = NULL; uint16_t frame_len_ms = 5; int32_t sample_rates[3] = { DEFAULT_SAMPLERATE, 32000, LAST_SAMPLERATE }; /* Hz */ /* 8000 Hz not supported by mdft */ char *binary_file_path = NULL; char *lib_rend_path = NULL; +char *lib_rend_path_fx = NULL; /*------------------------------------------------------------------------------------------* * Standalone Renderer program @@ -259,6 +266,7 @@ int main( int argc, char *argv[] ) char *sofa_file_path_for_reverb = NULL; bool add_define = false; int notEndingWithFileSeparator = 0; + int notEndingWithFileSeparator_fx = 0; char *sofa_name = NULL; int i; @@ -297,6 +305,21 @@ int main( int argc, char *argv[] ) notEndingWithFileSeparator = ( ( argv[i][strlen( argv[i] ) - 1] == '\\' ) || ( ( argv[i][strlen( argv[i] ) - 1] == '/' ) ) ) ? 0 : 1; i++; } + else if ( strcmp( to_upper( argv[i] ), "-LIB_REND_PATH_FX" ) == 0 ) + { + i++; + if ( strlen( argv[i] ) == 0 ) + { + fprintf( stderr, "Wrong lib_rend path: %s\n\n", argv[i] ); + usage_gen_crend_tables(); + return -1; + } + lib_rend_path_fx = malloc( strlen( argv[i] ) + 1 ); + convert_backslash( argv[i] ); + strcpy( lib_rend_path_fx, argv[i] ); + notEndingWithFileSeparator_fx = ( ( argv[i][strlen( argv[i] ) - 1] == '\\' ) || ( ( argv[i][strlen( argv[i] ) - 1] == '/' ) ) ) ? 0 : 1; + i++; + } else if ( strcmp( to_upper( argv[i] ), "-COMPUTE_REVERB_ROM" ) == 0 ) { i++; @@ -377,6 +400,8 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -393,6 +418,8 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -414,6 +441,8 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -449,8 +478,18 @@ int main( int argc, char *argv[] ) { fprintf( stderr, "Memory issue for c file path\n\n" ); usage_gen_crend_tables(); + if ( c_file_path ) + free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -462,12 +501,20 @@ int main( int argc, char *argv[] ) fp = fopen( c_file_path, "w" ); if ( fp == NULL ) { - fprintf( stderr, "Wrong lib_rend path: %s\n\n", lib_rend_path ); + fprintf( stderr, "Wrong lib_rend path: %s\n\n", c_file_path ); usage_gen_crend_tables(); if ( c_file_path ) free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -504,8 +551,16 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( c_file_path ) free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -517,14 +572,162 @@ int main( int argc, char *argv[] ) fp = fopen( h_file_path, "w" ); if ( fp == NULL ) { - fprintf( stderr, "Wrong lib_rend path: %s\n\n", lib_rend_path ); + fprintf( stderr, "Wrong lib_rend path: %s\n\n", h_file_path ); + usage_gen_crend_tables(); + if ( c_file_path ) + free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); + if ( lib_rend_path ) + free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); + if ( binary_path ) + free( binary_path ); + if ( binary_common_file_name ) + free( binary_common_file_name ); + if ( sofa_file_path_for_reverb ) + free( sofa_file_path_for_reverb ); + return -1; + } + fclose( fp ); + + c_file_path_fx = (char *) malloc( sizeof( char ) * ( strlen( lib_rend_path_fx ) + strlen( ROM_FILE_NAME ) + 2 + 1 + 3 + notEndingWithFileSeparator_fx ) ); + if ( c_file_path_fx ) + { + if ( notEndingWithFileSeparator_fx ) + { +#ifdef WIN32 + sprintf( c_file_path_fx, "%s\\%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); +#else + sprintf( c_file_path_fx, "%s/%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); +#endif + } + else + { +#ifdef WIN32 + sprintf( c_file_path_fx, "%s%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); +#else + sprintf( c_file_path_fx, "%s%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); +#endif + } + } + else + { + fprintf( stderr, "Memory issue for c file path\n\n" ); + usage_gen_crend_tables(); + if ( c_file_path ) + free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); + if ( lib_rend_path ) + free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); + if ( binary_path ) + free( binary_path ); + if ( binary_common_file_name ) + free( binary_common_file_name ); + if ( sofa_file_path_for_reverb ) + free( sofa_file_path_for_reverb ); + return -1; + } + fp = fopen( c_file_path_fx, "w" ); + if ( fp == NULL ) + { + fprintf( stderr, "Wrong lib_rend_fx path: %s\n\n", c_file_path_fx ); + usage_gen_crend_tables(); + if ( c_file_path ) + free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); + if ( lib_rend_path ) + free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); + if ( binary_path ) + free( binary_path ); + if ( binary_common_file_name ) + free( binary_common_file_name ); + if ( sofa_file_path_for_reverb ) + free( sofa_file_path_for_reverb ); + return -1; + } + fclose( fp ); + + h_file_path_fx = (char *) malloc( sizeof( char ) * ( strlen( lib_rend_path_fx ) + strlen( ROM_FILE_NAME ) + 2 + 1 + 3 + notEndingWithFileSeparator_fx ) ); + if ( h_file_path_fx ) + { + if ( notEndingWithFileSeparator_fx ) + { +#ifdef WIN32 + sprintf( h_file_path_fx, "%s\\%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); +#else + sprintf( h_file_path_fx, "%s/%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); +#endif + } + else + { +#ifdef WIN32 + sprintf( h_file_path_fx, "%s%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); +#else + sprintf( h_file_path_fx, "%s%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); +#endif + } + } + else + { + fprintf( stderr, "Memory issue: for header file path\n\n" ); usage_gen_crend_tables(); + if ( c_file_path ) + free( c_file_path ); if ( h_file_path ) free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); + if ( lib_rend_path ) + free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); + if ( binary_path ) + free( binary_path ); + if ( binary_common_file_name ) + free( binary_common_file_name ); + if ( sofa_file_path_for_reverb ) + free( sofa_file_path_for_reverb ); + return -1; + } + fp = fopen( h_file_path_fx, "w" ); + if ( fp == NULL ) + { + fprintf( stderr, "Wrong lib_rend_fx path: %s\n\n", h_file_path_fx ); + usage_gen_crend_tables(); if ( c_file_path ) free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -536,6 +739,7 @@ int main( int argc, char *argv[] ) fclose( fp ); } + if ( binary_path != NULL && binary_common_file_name != NULL ) { if ( binary_file_path != NULL ) @@ -568,12 +772,18 @@ int main( int argc, char *argv[] ) { fprintf( stderr, "Memory issue for binary file path\n\n" ); usage_gen_crend_tables(); - if ( h_file_path ) - free( h_file_path ); if ( c_file_path ) free( c_file_path ); + if ( h_file_path ) + free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); + if ( lib_rend_path_fx ) + free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -665,6 +875,68 @@ int main( int argc, char *argv[] ) } } + if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) + { + + FILE *fpt = fopen( TEMPLTATE_C_ROM_FILE_NAME, "rb" ); + + if ( fpt ) + { + fseek( fpt, 0, SEEK_END ); + size_t fsize = ftell( fpt ); + fseek( fpt, 0, SEEK_SET ); + char *tmpc = (char *) malloc( fsize + 1 ); + size_t ret = fread( tmpc, fsize, 1, fpt ); + tmpc[fsize] = '\0'; + if ( ret * fsize == fsize ) + { + fp = fopen( c_file_path_fx, "wb" ); + if ( fp ) + { + fwrite( tmpc, fsize, 1, fp ); + fclose( fp ); + } + + fp = fopen( h_file_path_fx, "wb" ); + if ( fp ) + { + fwrite( tmpc, fsize, 1, fp ); + fclose( fp ); + } + } + + fclose( fpt ); + } + fp = fopen( h_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n/* clang-format off */\n" ); + fprintf( fp, "\n/*-------------------------------------------------------------------------" ); + fprintf( fp, "\n* Binaural rendering related ROM tables" ); + fprintf( fp, "\n*------------------------------------------------------------------------*/\n" ); + fprintf( fp, "\n/* Binaural rendering data set based on HRIRs */" ); + fprintf( fp, "\n/* Tables generated by scripts/binauralRenderer_interface/generate_cren_ivas_tables.c, see mixer_conv_sofa_to_rom_table_converter_readme.txt */" ); + fprintf( fp, "\n/* Can be replaced by your own generated HRIR or BRIR tables */\n\n\n" ); + fprintf( fp, "\n#ifndef _%s_FX_\n", to_upper( rom_file_name ) ); + fprintf( fp, "#define _%s_FX_\n", to_upper( rom_file_name ) ); + fprintf( fp, "\n#include \"ivas_cnst.h\"\n\n" ); + fclose( fp ); + } + + fp = fopen( c_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n/* clang-format off */\n" ); + fprintf( fp, "\n/*-------------------------------------------------------------------------" ); + fprintf( fp, "\n* Binaural rendering related ROM tables" ); + fprintf( fp, "\n*------------------------------------------------------------------------*/\n" ); + fprintf( fp, "\n/* Binaural rendering data set based on HRIRs */" ); + fprintf( fp, "\n/* Tables generated by scripts/binauralRenderer_interface/generate_cren_ivas_tables.c, see mixer_conv_sofa_to_rom_table_converter_readme.txt */" ); + fprintf( fp, "\n/* Can be replaced by your own generated HRIR or BRIR tables */\n\n\n" ); + fprintf( fp, "\n#include \n#include \"ivas_cnst.h\"\n\n/* clang-format off */\n\n#define WMC_TOOL_SKIP\n\n" ); + fclose( fp ); + } + } char current_path[MAX_PATH]; char ivas_path[MAX_PATH]; @@ -739,6 +1011,66 @@ int main( int argc, char *argv[] ) } #endif + + if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) + { + if ( add_define ) + { + fp = fopen( c_file_path_fx, "a" ); + if ( fp ) + { + sofa_name = strrchr( argv[i], '/' ); + size_t size_path = strlen( sofa_name ); + sofa_name = malloc( sizeof( char ) * size_path - 5 ); + strncpy( sofa_name, strrchr( argv[i], '/' ) + 1, size_path - 5 ); + sofa_name[size_path - 6] = '\0'; + fprintf( fp, "\n#ifdef USE_%s\n", to_upper( sofa_name ) ); + fclose( fp ); + } + fp = fopen( h_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n#ifdef USE_%s\n", to_upper( sofa_name ) ); + fclose( fp ); + } + } + } + +#ifdef USE_MATLAB_ENG + Engine *ep = NULL; + char *tmpChar = strstr( argv[i], ".sofa" ); + if ( tmpChar != NULL ) + { + if ( !( ep = engOpen( NULL ) ) ) + { + printf( "Error starting matlab engine\n" ); + return -1; + } + const char addPathCmdStr[] = "addpath(['.' filesep() 'matlab_hrir_generation_scripts']);"; + const char startCmdStr[] = "SOFA_save_to_mat('"; + const char endCmdStr[] = "');"; + char *cdCmd; + char *cmdStr; + int ret; + cdCmd = (char *) malloc( strlen( current_path ) + 4 ); + sprintf( cdCmd, "cd %s", current_path ); + cmdStr = (char *) malloc( strlen( startCmdStr ) + strlen( argv[i] ) + strlen( endCmdStr ) + 1 ); + sprintf( cmdStr, "%s%s%s", startCmdStr, argv[i], endCmdStr ); + + ret = engEvalString( ep, cdCmd ); + ret = engEvalString( ep, addPathCmdStr ); + ret = engEvalString( ep, cmdStr ); + + strcpy( tmpChar, ".mat" ); + tmpChar[4] = '\0'; + + free( cdCmd ); + free( cmdStr ); + engClose( ep ); + } + +#endif + convert_backslash( argv[i] ); err = generate_crend_ivas_tables_from_sofa( argv[i], &cfgBrirOptim ); @@ -778,27 +1110,77 @@ int main( int argc, char *argv[] ) } } } - } - - if ( sofa_file_path_for_reverb != NULL ) - { - err = generate_reverb_ivas_tables_from_sofa( sofa_file_path_for_reverb ); - if ( err != 0 ) - return err; - } - if ( ( h_file_path != NULL ) && ( c_file_path != NULL ) ) - { - - fp = fopen( h_file_path, "a" ); - if ( fp ) + if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) { - fprintf( fp, "\n\n#endif /* _%s_ */\n", to_upper( rom_file_name ) ); - fclose( fp ); - } - fp = fopen( c_file_path, "a" ); - if ( fp ) - { + fp = fopen( c_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n\n" ); + fclose( fp ); + } + fp = fopen( h_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n\n" ); + fclose( fp ); + } + if ( err != 0 ) + return err; + if ( add_define ) + { + fp = fopen( c_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n#endif /* USE_%s */\n ", to_upper( sofa_name ) ); + fclose( fp ); + } + fp = fopen( h_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n#endif /* USE_%s */\n", to_upper( sofa_name ) ); + fclose( fp ); + } + } + } + } + + if ( sofa_file_path_for_reverb != NULL ) + { + err = generate_reverb_ivas_tables_from_sofa( sofa_file_path_for_reverb ); + if ( err != 0 ) + return err; + } + if ( ( h_file_path != NULL ) && ( c_file_path != NULL ) ) + { + + fp = fopen( h_file_path, "a" ); + if ( fp ) + { + fprintf( fp, "\n\n#endif /* _%s_ */\n", to_upper( rom_file_name ) ); + fclose( fp ); + } + + fp = fopen( c_file_path, "a" ); + if ( fp ) + { + fprintf( fp, "\n\n#undef WMC_TOOL_SKIP\n\n" ); + fclose( fp ); + } + } + if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) + { + + fp = fopen( h_file_path_fx, "a" ); + if ( fp ) + { + fprintf( fp, "\n\n#endif /* _%s_ */\n", to_upper( rom_file_name ) ); + fclose( fp ); + } + + fp = fopen( c_file_path_fx, "a" ); + if ( fp ) + { fprintf( fp, "\n\n#undef WMC_TOOL_SKIP\n\n" ); fclose( fp ); } @@ -807,6 +1189,10 @@ int main( int argc, char *argv[] ) free( c_file_path ); if ( h_file_path ) free( h_file_path ); + if ( c_file_path_fx ) + free( c_file_path_fx ); + if ( h_file_path_fx ) + free( h_file_path_fx ); if ( rom_file_name ) free( rom_file_name ); @@ -866,6 +1252,8 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c long sofa_sample_rate = 0; double a[3] = { 0 }; double t[3] = { 0 }; + double ac[3] = { 0 }; + double tc[3] = { 0 }; long nearest; sofa_file_path = (char *) malloc( sizeof( char ) * ( strlen( file_path ) + 1 ) ); @@ -1065,6 +1453,9 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } t[1] = lscfg.ele[i]; /* elevation in deg */ t[2] = sofa_src_pos_val[2]; /* radius in m */ + tc[0] = t[2] * cos( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); + tc[1] = t[2] * sin( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); + tc[2] = t[2] * sin( t[1] * M_PI / 180. ); nearest = find_pos_spheric( sofa_src_pos_cart_val, sofa_M, t ); if ( ( nearest >= 0 ) && ( nearest < sofa_M ) ) { @@ -1075,10 +1466,13 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } a[1] = sofa_src_pos_val[nearest * 3 + 1] * 180. / M_PI; a[2] = sofa_src_pos_val[nearest * 3 + 2]; + ac[0] = sofa_src_pos_cart_val[nearest * 3]; + ac[1] = sofa_src_pos_cart_val[nearest * 3 + 1]; + ac[2] = sofa_src_pos_cart_val[nearest * 3 + 2]; } - float prodScal = ( t[0] * a[0] + t[1] * a[1] + t[2] * a[2] ) / ( sqrtf( ( t[0] * t[0] + t[1] * t[1] + t[2] * t[2] ) ) * sqrtf( ( a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ) ) ); - float cosAngleMin = cosf( PI_OVER_180 * MAX_DIFF_ANGLE ); + double prodScal = ( tc[0] * ac[0] + tc[1] * ac[1] + tc[2] * ac[2] ) / ( sqrt( ( tc[0] * tc[0] + tc[1] * tc[1] + tc[2] * tc[2] ) ) * sqrt( ( ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2] ) ) ); + double cosAngleMin = cos( PI_OVER_180 * MAX_DIFF_ANGLE ); if ( prodScal < cosAngleMin ) { mxDestroyArray( sofa ); @@ -1266,7 +1660,7 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } hrtf_data.latency_s += 0.000000001f; - if ( ( hrtf_data.num_iterations[0][0] > 2 ) ) + if ( ( hrtf_data.num_iterations[0][0] > 2 ) || ( hrtf_data.num_iterations_diffuse[0] > 0 ) ) { strcpy( &lscfg.name[len_ls_cfg_name], "_BRIR" ); } @@ -1280,7 +1674,6 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c latency_48k_optim = hrtf_data.latency_s; } - int16_t factorQ[3]; make_fx_be( &hrtf_data, lscfg, sample_rates[indSR], frame_len, factorQ ); if ( lib_rend_path != NULL ) @@ -1288,6 +1681,11 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c update_h_file( &hrtf_data, lscfg, sample_rates[indSR], frame_len ); update_c_file( &hrtf_data, lscfg, sample_rates[indSR], frame_len, factorQ ); } + if ( lib_rend_path_fx != NULL ) + { + update_h_file_fx( &hrtf_data, lscfg, sample_rates[indSR], frame_len ); + update_c_file_fx( &hrtf_data, lscfg, sample_rates[indSR], frame_len, factorQ ); + } if ( binary_file_path != NULL ) { @@ -1865,7 +2263,12 @@ int generate_reverb_ivas_tables_from_sofa( const char *file_path ) if ( lib_rend_path != NULL ) { update_h_file_with_reverb( sample_rates[indSR] ); - update_c_file_with_reverb( p_avg_lr, &p_avg_lr[nr_fc_fft_filter], pCoherence, p_avg_lr_fx, &p_avg_lr_fx[nr_fc_fft_filter], pCoherence_fx, factorQ, sample_rates[indSR], nr_fc_fft_filter ); + update_c_file_with_reverb( p_avg_lr, &p_avg_lr[nr_fc_fft_filter], pCoherence, sample_rates[indSR], nr_fc_fft_filter ); + } + if ( lib_rend_path_fx != NULL ) + { + update_h_file_with_reverb_fx( sample_rates[indSR] ); + update_c_file_with_reverb_fx( p_avg_lr_fx, &p_avg_lr_fx[nr_fc_fft_filter], pCoherence_fx, factorQ, sample_rates[indSR], nr_fc_fft_filter ); } if ( binary_file_path != NULL ) { @@ -1958,7 +2361,7 @@ void write_array_float_to_file( FILE *fp, float *vec, int32_t size_vec, int32_t for ( l = 0; l < sample_per_ligne; l++ ) { fprintf( fp, format, vec[k * sample_per_ligne + l] ); - if ( strcmp( format, "%a" ) ) + if ( strcmp( format, FORMAT_FLOAT ) ) fprintf( fp, "f, " ); else fprintf( fp, ", " ); @@ -1972,20 +2375,20 @@ void write_array_float_to_file( FILE *fp, float *vec, int32_t size_vec, int32_t for ( l = 0; l < remaining_samples - 1; l++ ) { fprintf( fp, format, vec[k * sample_per_ligne + l] ); - if ( strcmp( format, "%a" ) ) + if ( strcmp( format, FORMAT_FLOAT ) ) fprintf( fp, "f, " ); else fprintf( fp, ", " ); } fprintf( fp, format, vec[k * sample_per_ligne + l] ); - if ( strcmp( format, "%a" ) ) + if ( strcmp( format, FORMAT_FLOAT ) ) fprintf( fp, "f}" ); else fprintf( fp, "}" ); } /*---------------------------------------------------------------------* - *write_array_float_to_file(); + *write_array_uint16_to_file(); *---------------------------------------------------------------------*/ void write_array_uint16_to_file( FILE *fp, uint16_t *vec, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) { @@ -2093,7 +2496,7 @@ void write_array_int32_t_to_file( FILE *fp, int32_t *vec, int32_t size_vec, int3 } /*---------------------------------------------------------------------* - *write_array_int32_t_to_file(); + *write_array_int16_t_to_file(); *---------------------------------------------------------------------*/ void write_array_int16_t_to_file( FILE *fp, int16_t *vec, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) { @@ -2145,11 +2548,120 @@ void write_array_int16_t_to_file( FILE *fp, int16_t *vec, int32_t size_vec, int3 } fprintf( fp, "}" ); } +/*---------------------------------------------------------------------* + *write_array_uint16_t_to_file(); + *---------------------------------------------------------------------*/ +void write_array_uint16_t_to_file( FILE *fp, uint16_t *vec, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) +{ + int32_t k, l, num_iter, remaining_samples; + int16_t i; + + num_iter = size_vec / sample_per_ligne; + remaining_samples = size_vec % sample_per_ligne; + if ( remaining_samples == 0 ) + { + num_iter--; + remaining_samples = sample_per_ligne; + } + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + + fprintf( fp, "{" ); + for ( k = 0; k < num_iter; k++ ) + { + if ( k != 0 ) + { + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + } + for ( l = 0; l < sample_per_ligne; l++ ) + { + fprintf( fp, "%u", vec[k * sample_per_ligne + l] ); + fprintf( fp, ", " ); + } + fprintf( fp, "\n" ); + } + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + for ( l = 0; l < remaining_samples - 1; l++ ) + { + fprintf( fp, "%u", vec[k * sample_per_ligne + l] ); + fprintf( fp, ", " ); + } + fprintf( fp, "%u", vec[k * sample_per_ligne + l] ); + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + fprintf( fp, "}" ); +} + + +/*---------------------------------------------------------------------* + *write_array_float_to_int16_t_to_file(); + *---------------------------------------------------------------------*/ +void write_array_float_to_int16_t_to_file( FILE *fp, float *vec, int16_t factor_Q, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) +{ + int32_t k, l, num_iter, remaining_samples; + int16_t i; + + num_iter = size_vec / sample_per_ligne; + remaining_samples = size_vec % sample_per_ligne; + if ( remaining_samples == 0 ) + { + num_iter--; + remaining_samples = sample_per_ligne; + } + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + + fprintf( fp, "{" ); + for ( k = 0; k < num_iter; k++ ) + { + if ( k != 0 ) + { + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + } + for ( l = 0; l < sample_per_ligne; l++ ) + { + fprintf( fp, "%d", float2int16_t( vec[k * sample_per_ligne + l], factor_Q ) ); + fprintf( fp, ", " ); + } + fprintf( fp, "\n" ); + } + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + for ( l = 0; l < remaining_samples - 1; l++ ) + { + fprintf( fp, "%d", float2int16_t( vec[k * sample_per_ligne + l], factor_Q ) ); + fprintf( fp, ", " ); + } + fprintf( fp, "%d", float2int16_t( vec[k * sample_per_ligne + l], factor_Q ) ); + for ( i = 0; i < num_tab; i++ ) + { + fprintf( fp, "%s", tab ); + } + fprintf( fp, "}" ); +} + /*---------------------------------------------------------------------* *update_c_file_with_reverb(); *---------------------------------------------------------------------*/ -void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ) +void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, const int32_t samplerate, const int16_t len ) { char len_str[26] = "LR_IAC_LENGTH_NR_FC"; if ( samplerate == 16000 ) @@ -2183,40 +2695,338 @@ void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherenc /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ fprintf( fp, "\nconst float defaultHRIR_coherence_%dkHz[%s] = \n", samplerate / 1000, len_str ); - write_array_float_to_file( fp, pCoherence, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, pCoherence, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst float defaultHRIR_left_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); + write_array_float_to_file( fp, pEner_l, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst float defaultHRIR_right_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); + write_array_float_to_file( fp, pEner_r, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + + if ( fp ) + fclose( fp ); + + return; +} +/*---------------------------------------------------------------------* + *update_c_file_with_reverb_fx(); + *---------------------------------------------------------------------*/ +void update_c_file_with_reverb_fx( int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ) +{ + char len_str[26] = "LR_IAC_LENGTH_NR_FC"; + if ( samplerate == 16000 ) + { + strcpy( len_str, "LR_IAC_LENGTH_NR_FC_16KHZ" ); + } + + if ( c_file_path_fx == NULL ) + return; + + if ( pEner_l_fx == NULL ) + return; + + if ( pEner_r_fx == NULL ) + return; + + if ( pCoherence_fx == NULL ) + return; + + FILE *fp = fopen( c_file_path_fx, "a" ); + + if ( fp == NULL ) + return; + + if ( samplerate == DEFAULT_SAMPLERATE ) + { + fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/" ); + } + + fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); + + fprintf( fp, "\nconst Word16 defaultHRIR_Q_%dkHz_fx = %d;", samplerate / 1000, factorQ ); + + /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst Word16 defaultHRIR_coherence_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); + write_array_int16_t_to_file( fp, pCoherence_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ";\n" ); - /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst float defaultHRIR_left_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); - write_array_float_to_file( fp, pEner_l, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); + /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); + write_array_int16_t_to_file( fp, pEner_l_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); + write_array_int16_t_to_file( fp, pEner_r_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + if ( fp ) + fclose( fp ); + + return; +} +/*---------------------------------------------------------------------* + *update_c_file(); + *---------------------------------------------------------------------*/ +void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ) +{ + + if ( c_file_path == NULL ) + return; + + FILE *fp = fopen( c_file_path, "a" ); + int16_t i, j; + uint32_t *pTotalNumFreqSampPerIterations[2], maxTotalNumFreqSampPerIterations; + uint32_t pTotalNumFreqSampPerIterationsDiffuse[2], maxTotalNumFreqSampPerIterationsDiffuse; + const char *format_float = FORMAT_FLOAT; + const char *format_float_latency = FORMAT_FLOAT; + + pTotalNumFreqSampPerIterations[0] = malloc( sizeof( float ) * hrtf->max_num_ir ); + pTotalNumFreqSampPerIterations[1] = malloc( sizeof( float ) * hrtf->max_num_ir ); + + if ( fp == NULL ) + return; + if ( hrtf == NULL ) + return; + + if ( samplerate == DEFAULT_SAMPLERATE ) + { + /* float latency_s; */ + fprintf( fp, "\n\n/********************** %s_%s **********************/\n", DECLARATION_NAME, lscfg.name ); + fprintf( fp, "\nconst float %s_%s_latency_s = ", DECLARATION_NAME, lscfg.name ); + fprintf( fp, format_float_latency, hrtf->latency_s ); + fprintf( fp, ";" ); + } + + fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); + + /* int16_t max_num_iterations; */ + fprintf( fp, "\nconst int16_t %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); + /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ + fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) + { + fprintf( fp, "{%u, %u}, ", hrtf->num_iterations[i][0], hrtf->num_iterations[i][1] ); + } + fprintf( fp, "{%u, %u} ", hrtf->num_iterations[i][0], hrtf->num_iterations[i][1] ); + fprintf( fp, "};" ); + + /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ + fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS] = {%u, %u};", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[1] ); + + maxTotalNumFreqSampPerIterations = 0; + for ( i = 0; i < hrtf->max_num_ir; i++ ) + { + pTotalNumFreqSampPerIterations[0][i] = 0; + pTotalNumFreqSampPerIterations[1][i] = 0; + for ( j = 0; j < hrtf->num_iterations[i][0]; j++ ) + { + pTotalNumFreqSampPerIterations[0][i] += hrtf->pIndex_frequency_max_dyn[i][0][j]; + } + if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[0][i] ) + { + maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[0][i]; + } + for ( j = 0; j < hrtf->num_iterations[i][1]; j++ ) + { + pTotalNumFreqSampPerIterations[1][i] += hrtf->pIndex_frequency_max_dyn[i][1][j]; + } + if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[1][i] ) + { + maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[1][i]; + } + } + + pTotalNumFreqSampPerIterationsDiffuse[0] = 0; + pTotalNumFreqSampPerIterationsDiffuse[1] = 0; + maxTotalNumFreqSampPerIterationsDiffuse = 0; + for ( j = 0; j < hrtf->num_iterations_diffuse[0]; j++ ) + { + pTotalNumFreqSampPerIterationsDiffuse[0] += hrtf->pIndex_frequency_max_diffuse_dyn[0][j]; + } + if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[0] ) + { + maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[0]; + } + for ( j = 0; j < hrtf->num_iterations_diffuse[1]; j++ ) + { + pTotalNumFreqSampPerIterationsDiffuse[1] += hrtf->pIndex_frequency_max_diffuse_dyn[1][j]; + } + if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[1] ) + { + maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[1]; + } + + /*uint16_t *pIndex_frequency_max_dyn[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ + fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); + for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) + { + fprintf( fp, "{" ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "," ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "}," ); + } + fprintf( fp, "{" ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "," ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "}" ); + fprintf( fp, "};" ); + + /* uint16_t index_frequency_max_diffuse; */ + fprintf( fp, "\nconst uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); + + /* float inv_diffuse_weight[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ + fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[BINAURAL_CHANNELS][%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "{" ); + write_array_float_to_file( fp, hrtf->inv_diffuse_weight[0], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "," ); + write_array_float_to_file( fp, hrtf->inv_diffuse_weight[1], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "}" ); + fprintf( fp, ";" ); + + /* uint16_t *pIndex_frequency_max_diffuse_dyn[BINAURAL_CHANNELS];*/ + if ( hrtf->pIndex_frequency_max_diffuse_dyn[0] == NULL ) + { + fprintf( fp, "\nconst uint16_t *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + } + else + { + fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[0], hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[0], 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "," ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[1], hrtf->num_iterations_diffuse[1], hrtf->num_iterations_diffuse[1], 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "};" ); + } + + /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ + if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else + { + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + } + for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) + { + fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ",\n" ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); + } + fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ",\n" ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n};" ); + + if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else + { + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + } + for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) + { + fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ",\n" ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); + } + fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ",\n" ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n};" ); + - /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst float defaultHRIR_right_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); - write_array_float_to_file( fp, pEner_r, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); + /* float *pOut_to_bin_diffuse_re_dyn[BINAURAL_CHANNELS];*/ + if ( hrtf->pOut_to_bin_diffuse_re_dyn[0] == NULL ) + { + fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + } + else + { + fprintf( fp, "\nconst float %s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ",\n" ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n};" ); + } + /* float *pOut_to_bin_diffuse_im_dyn[BINAURAL_CHANNELS];*/ + if ( hrtf->pOut_to_bin_diffuse_im_dyn[0] == NULL ) + { + fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + } + else + { + fprintf( fp, "\nconst float %s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ",\n" ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\n};" ); + } if ( fp ) fclose( fp ); + if ( pTotalNumFreqSampPerIterations[0] ) + { + free( pTotalNumFreqSampPerIterations[0] ); + } + if ( pTotalNumFreqSampPerIterations[1] ) + { + free( pTotalNumFreqSampPerIterations[1] ); + } + return; } /*---------------------------------------------------------------------* *update_c_file(); *---------------------------------------------------------------------*/ -void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ) +void update_c_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factor_Q[3] ) { - if ( c_file_path == NULL ) + if ( c_file_path_fx == NULL ) return; - FILE *fp = fopen( c_file_path, "a" ); + FILE *fp = fopen( c_file_path_fx, "a" ); int16_t i, j; uint32_t *pTotalNumFreqSampPerIterations[2], maxTotalNumFreqSampPerIterations; uint32_t pTotalNumFreqSampPerIterationsDiffuse[2], maxTotalNumFreqSampPerIterationsDiffuse; const char *format_float = FORMAT_FLOAT; - const char *format_float_latency = FORMAT_FLOAT_LATENCY; + const char *format_float_latency = FORMAT_FLOAT; pTotalNumFreqSampPerIterations[0] = malloc( sizeof( float ) * hrtf->max_num_ir ); pTotalNumFreqSampPerIterations[1] = malloc( sizeof( float ) * hrtf->max_num_ir ); @@ -2230,17 +3040,16 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int { /* float latency_s; */ fprintf( fp, "\n\n/********************** %s_%s **********************/\n", DECLARATION_NAME, lscfg.name ); - fprintf( fp, "\nconst float %s_%s_latency_s = ", DECLARATION_NAME, lscfg.name ); - fprintf( fp, format_float_latency, hrtf->latency_s ); - fprintf( fp, ";" ); + fprintf( fp, "\nconst Word16 %s_%s_Q_latency_s_fx = %d;", DECLARATION_NAME, lscfg.name, factor_Q[0] ); + fprintf( fp, "\nconst Word32 %s_%s_latency_s_fx = %d;/*Q-31*/", DECLARATION_NAME, lscfg.name, float2int32_t( hrtf->latency_s, factor_Q[0] ) ); } fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); /* int16_t max_num_iterations; */ - fprintf( fp, "\nconst int16_t %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); + fprintf( fp, "\nconst Word16 %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "{%u, %u}, ", hrtf->num_iterations[i][0], hrtf->num_iterations[i][1] ); @@ -2249,7 +3058,7 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int fprintf( fp, "};" ); /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ - fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS] = {%u, %u};", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[1] ); + fprintf( fp, "\nconst Word16 %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS] = {%u, %u};", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[1] ); maxTotalNumFreqSampPerIterations = 0; for ( i = 0; i < hrtf->max_num_ir; i++ ) @@ -2295,137 +3104,140 @@ void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int } /*uint16_t *pIndex_frequency_max_dyn[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ - fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); + fprintf( fp, "\nconst Word16 %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "{" ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "}," ); } fprintf( fp, "{" ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "}" ); fprintf( fp, "};" ); /* uint16_t index_frequency_max_diffuse; */ - fprintf( fp, "\nconst uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); + fprintf( fp, "\nconst Word16 %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); - /* float inv_diffuse_weight[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ - fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[BINAURAL_CHANNELS][%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_inv_diffuse_weight_Q_%2dkHz_fx = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, factor_Q[1] ); + /* float inv_diffuse_weight_fx[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ + fprintf( fp, "\nconst Word16 %s_%s_inv_diffuse_weight_%2dkHz_fx[BINAURAL_CHANNELS][%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); fprintf( fp, "{" ); - write_array_float_to_file( fp, hrtf->inv_diffuse_weight[0], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->inv_diffuse_weight[0], factor_Q[1], hrtf->max_num_ir, hrtf->max_num_ir, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_float_to_file( fp, hrtf->inv_diffuse_weight[1], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->inv_diffuse_weight[1], factor_Q[1], hrtf->max_num_ir, hrtf->max_num_ir, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "}" ); fprintf( fp, ";" ); /* uint16_t *pIndex_frequency_max_diffuse_dyn[BINAURAL_CHANNELS];*/ if ( hrtf->pIndex_frequency_max_diffuse_dyn[0] == NULL ) { - fprintf( fp, "\nconst uint16_t *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + fprintf( fp, "\nconst Word16 *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); } else { - fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[0], hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[0], 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\nconst Word16 %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); + write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[0], hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[0], 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[1], hrtf->num_iterations_diffuse[1], hrtf->num_iterations_diffuse[1], 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[1], hrtf->num_iterations_diffuse[1], hrtf->num_iterations_diffuse[1], 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "};" ); } + fprintf( fp, "\nconst Word16 %s_%s_coeff_Q_%2dkHz_fx = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, factor_Q[2] ); + /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); } + for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); } fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); } for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); } fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); - - /* float *pOut_to_bin_diffuse_re_dyn[BINAURAL_CHANNELS];*/ + /* float *pOut_to_bin_diffuse_re[BINAURAL_CHANNELS];*/ if ( hrtf->pOut_to_bin_diffuse_re_dyn[0] == NULL ) { - fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + fprintf( fp, "\nconst Word16 *%s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); } else { - fprintf( fp, "\nconst float %s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[0], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[1], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); } - /* float *pOut_to_bin_diffuse_im_dyn[BINAURAL_CHANNELS];*/ + /* float *pOut_to_bin_diffuse_im[BINAURAL_CHANNELS];*/ if ( hrtf->pOut_to_bin_diffuse_im_dyn[0] == NULL ) { - fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + fprintf( fp, "\nconst Word16 *%s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); } else { - fprintf( fp, "\nconst float %s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\nconst Word16 %s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[0], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[1], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); } @@ -2636,6 +3448,204 @@ void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int } return; } +/*---------------------------------------------------------------------* + *update_h_file_with_reverb + *---------------------------------------------------------------------*/ +void update_h_file_with_reverb_fx( int32_t samplerate ) +{ + char len_str[26] = "LR_IAC_LENGTH_NR_FC"; + if ( samplerate == 16000 ) + { + strcpy( len_str, "LR_IAC_LENGTH_NR_FC_16KHZ" ); + } + + if ( h_file_path_fx == NULL ) + return; + + FILE *fp = fopen( h_file_path_fx, "a" ); + + if ( fp == NULL ) + return; + + + if ( samplerate == DEFAULT_SAMPLERATE ) + { + fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/\n" ); + } + + fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); + + fprintf( fp, "\nextern const Word16 defaultHRIR_Q_%dkHz_fx;", samplerate / 1000 ); + /* Word16 *defaultHRIR_coherence_[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ + fprintf( fp, "\nextern const Word16 defaultHRIR_coherence_%dkHz_fx[%s];", samplerate / 1000, len_str ); + /* Word16 *defaultHRIR_left_avg_power[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ + fprintf( fp, "\nextern const Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); + fprintf( fp, "\nextern const Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); + + if ( fp ) + fclose( fp ); + + return; +} +/*---------------------------------------------------------------------* + *update_h_file(); + *---------------------------------------------------------------------*/ +void update_h_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len ) +{ + uint16_t i, j; + uint32_t *pTotalNumFreqSampPerIterations[2], maxTotalNumFreqSampPerIterations; + uint32_t pTotalNumFreqSampPerIterationsDiffuse[2], maxTotalNumFreqSampPerIterationsDiffuse; + + if ( h_file_path_fx == NULL ) + return; + + pTotalNumFreqSampPerIterations[0] = malloc( sizeof( float ) * hrtf->max_num_ir ); + pTotalNumFreqSampPerIterations[1] = malloc( sizeof( float ) * hrtf->max_num_ir ); + FILE *fp = fopen( h_file_path_fx, "a" ); + + if ( fp == NULL ) + return; + if ( hrtf == NULL ) + return; + + maxTotalNumFreqSampPerIterations = 0; + for ( i = 0; i < hrtf->max_num_ir; i++ ) + { + pTotalNumFreqSampPerIterations[0][i] = 0; + pTotalNumFreqSampPerIterations[1][i] = 0; + for ( j = 0; j < hrtf->num_iterations[i][0]; j++ ) + { + pTotalNumFreqSampPerIterations[0][i] += hrtf->pIndex_frequency_max_dyn[i][0][j]; + } + if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[0][i] ) + { + maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[0][i]; + } + for ( j = 0; j < hrtf->num_iterations[i][1]; j++ ) + { + pTotalNumFreqSampPerIterations[1][i] += hrtf->pIndex_frequency_max_dyn[i][1][j]; + } + if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[1][i] ) + { + maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[1][i]; + } + } + + pTotalNumFreqSampPerIterationsDiffuse[0] = 0; + pTotalNumFreqSampPerIterationsDiffuse[1] = 0; + maxTotalNumFreqSampPerIterationsDiffuse = 0; + for ( j = 0; j < hrtf->num_iterations_diffuse[0]; j++ ) + { + pTotalNumFreqSampPerIterationsDiffuse[0] += hrtf->pIndex_frequency_max_diffuse_dyn[0][j]; + } + if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[0] ) + { + maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[0]; + } + for ( j = 0; j < hrtf->num_iterations_diffuse[1]; j++ ) + { + pTotalNumFreqSampPerIterationsDiffuse[1] += hrtf->pIndex_frequency_max_diffuse_dyn[1][j]; + } + if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[1] ) + { + maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[1]; + } + + if ( samplerate == DEFAULT_SAMPLERATE ) + { + /* float latency_s; */ + fprintf( fp, "\n\n/********************** %s_%s **********************/\n", DECLARATION_NAME, lscfg.name ); + fprintf( fp, "\nextern const Word16 %s_%s_Q_latency_s_fx;", DECLARATION_NAME, lscfg.name ); + fprintf( fp, "\nextern const Word32 %s_%s_latency_s_fx;", DECLARATION_NAME, lscfg.name ); + } + + fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); + + /* int16_t max_num_iterations; */ + fprintf( fp, "\nextern const Word16 %s_%s_max_num_iterations_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ + fprintf( fp, "\nextern const Word16 %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + + /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ + fprintf( fp, "\nextern const Word16 %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + + /*uint16_t *pIndex_frequency_max_dyn[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ + fprintf( fp, "\nextern const Word16 %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); + + /* uint16_t index_frequency_max_diffuse; */ + fprintf( fp, "\nextern const Word16 %s_%s_index_frequency_max_diffuse_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + + /* Word16 inv_diffuse_weight_fx[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ + fprintf( fp, "\nextern const Word16 %s_%s_inv_diffuse_weight_Q_%2dkHz_fx;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + fprintf( fp, "\nextern const Word16 %s_%s_inv_diffuse_weight_%2dkHz_fx[BINAURAL_CHANNELS][%s];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + + /* uint16_t *pIndex_frequency_max_diffuse[BINAURAL_CHANNELS];*/ + if ( hrtf->pIndex_frequency_max_diffuse_dyn[0] == NULL ) + { + fprintf( fp, "\nextern const Word16 *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + } + else + { + fprintf( fp, "\nextern const Word16 %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); + } + + /* Word16 *pOut_to_bin_fx[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ + fprintf( fp, "\nextern const Word16 %s_%s_coeff_Q_%2dkHz_fx;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ + if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + } + else + { + fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + } + + /* float *pOut_to_bin_diffuse_re_fx[BINAURAL_CHANNELS];*/ + if ( hrtf->pOut_to_bin_diffuse_re_dyn[0] == NULL ) + { + fprintf( fp, "\nextern const Word16 *%s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + } + else + { + fprintf( fp, "\nextern const Word16 %s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + } + + /* float *pOut_to_bin_diffuse_im_fx[BINAURAL_CHANNELS];*/ + if ( hrtf->pOut_to_bin_diffuse_im_dyn[0] == NULL ) + { + fprintf( fp, "\nextern const Word16 *%s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + } + else + { + fprintf( fp, "\nextern const Word16 %s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + } + + if ( fp ) + fclose( fp ); + + if ( pTotalNumFreqSampPerIterations[0] ) + { + free( pTotalNumFreqSampPerIterations[0] ); + } + if ( pTotalNumFreqSampPerIterations[1] ) + { + free( pTotalNumFreqSampPerIterations[1] ); + } + return; +} /*---------------------------------------------------------------------* * get_tables_dimensions(); @@ -3335,7 +4345,7 @@ ivas_error write_binary_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, } /*---------------------------------------------------------------------* - * make_fx_be(); + * make_reverb_fx_be(); *---------------------------------------------------------------------*/ ivas_error make_reverb_fx_be( float *pEner_l, float *pEner_r, float *pCoherence, const int32_t samplerate, int16_t *factorQ ) { diff --git a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m index 86df31620b..638e477bd5 100644 --- a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m +++ b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m @@ -53,6 +53,9 @@ addpath(genpath('../td_object_renderer/modeling_tool/')); %% Set arguments generateCustomBinaryFile = false; +normalize = true; % put a true to normalize input HRTF file. Diffuse field spectrum will be equal to one at 1 khz. Shall not be used with BRIR +makeBE = true; % put at true to generate BE rom table and at false to support more type of sofa file +performDiffuseFieldEq = true; % at true perform diffuse field equalization during param bin taps computation. Should not by used when HRIR are alredy diffuse field equalized writeRomFileOutput = true & ~generateCustomBinaryFile; %% generation of rom files if true writeBinaryOutput = true; %% generation of binary files if true. Always true for TD renderer writeEachRendererBinaryOutput = false; %% generation of binary split files each containing binary data for individual renderer @@ -61,9 +64,29 @@ ivas_path = ['..' filesep '..' filesep]; %% Set input files if generateCustomBinaryFile - hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; - output_bin_name = 'ivas_binaural_custom'; - brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa'; + % output_bin_name = 'ivas_binaural_custom'; + % hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; + % brir_file_name = 'BRIR_Auditorium_S1_R1_CICP19.sofa'; + %brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; + + % output_bin_name = 'ivas_binaural_custom_fabian_hrir'; + % hrir_file_name = 'FABIAN_HRIR_measured_HATO_0_norm.sofa'; + % brir_file_name = 'bbcrdlr_all_speakers.sofa'; + % brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; + + output_bin_name = 'ivas_binaural_custom_no_optim'; + hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; % fail for TD renderer + brir_file_name = 'BRIR_Auditorium_S1_R1_CICP19.sofa'; + brirOptimCfgFile = 'brir_no_optim.cfg'; + + % hrir_file_name = 'ari-dtf_nh2.sofa'; % fail for TD renderer +% hrir_file_name = 'BiLi-IRC_1101_C_HRIR_96000.sofa'; % fail for TD renderer + % hrir_file_name = 'cipic-subject_003.sofa'; % fail for TD renderer + % hrir_file_name = 'Listen-IRC_1002_C_44100.sofa'; % fail for TD renderer + % hrir_file_name = 'mit_kemar_normal_pinna.sofa'; % fail for TD renderer + %hrir_file_name = 'RIEC_hrir_subject_001.sofa'; % fail for TD renderer + % output_bin_name = 'ivas_binaural_custom_no_optim'; + %brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa' else hrir_file_name = 'HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'; output_bin_name = 'ivas_binaural'; @@ -73,6 +96,7 @@ hrir_path = fullfile ('.','HRIRs_sofa'); brir_path = fullfile ('.','BRIRs_sofa'); %% Set output files rom_path = [ivas_path 'lib_rend']; +rom_path_fx = './'; output_binary_path = fullfile ('.','binaural_renderers_hrtf_data'); hrir_file = fullfile( hrir_path, hrir_file_name); @@ -97,9 +121,11 @@ end dataSpec.hrfInDir = hrir_file; dataSpec.hrfOutDir = binary_path; dataSpec.genRomFile = writeRomFileOutput; +dataSpec.genRomFileFx = true; dataSpec.genBinaryFile = writeBinaryOutput; dataSpec.makeFxFltBE = true; dataSpec.romOutDir = rom_path; +dataSpec.romOutDir_fx = rom_path_fx; Mod_Hrf_Itd_Main(dataSpec); %% generate crend rom or binary values @@ -107,15 +133,16 @@ SOFA_save_to_mat(hrir_file); SOFA_save_to_mat(brir_file,'Combined'); if generateCustomBinaryFile - convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1); + convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1,normalize); else - convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128); + convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128,normalize); end command = ['.' filesep() 'generate_crend_ivas_tables']; if writeRomFileOutput == true command = [command ' -lib_rend_path ' rom_path]; + command = [command ' -lib_rend_path_fx ' rom_path_fx]; end if writeBinaryOutput == true command = [command ... @@ -124,10 +151,10 @@ if writeBinaryOutput == true ]; end -if generateCustomBinaryFile +if generateCustomBinaryFile && exist('brirOptimCfgFile', 'var') && isempty(brirOptimCfgFile)==false command = [command ... - ' -brir_optim_config_path' ... - ' brir_low_complexity_optim.cfg ' ... + ' -brir_optim_config_path ' ... + ' ' brirOptimCfgFile ' ' ... ]; end command = [command ... @@ -155,6 +182,7 @@ bin_file = fullfile('.',binary_path, fastconv_bin_file ); if writeRomFileOutput == true rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); + fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); copyfile('ivas_license_header.template',rom_file,'f'); @@ -172,6 +200,24 @@ if writeRomFileOutput == true '#define WMC_TOOL_SKIP'); fclose(fp); + + copyfile('ivas_license_header.template',fx_rom_file,'f'); + + fp_fx = fopen(fx_rom_file,'at'); + fprintf(fp_fx,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... + '#include ', ... + '#include "options.h"', ... + '#ifdef DEBUGGING', ... + '#include "debug.h"', ... + '#endif', ... + '#include "cnst.h"', ... + '#include "ivas_cnst.h"', ... + '#include "wmc_auto.h"', ... + '/* clang-format off */', ... + '#define WMC_TOOL_SKIP'); + + fclose(fp_fx); + end generate_tables_for_fastconv @@ -180,6 +226,7 @@ generate_tables_for_fastconv param_bin_file = ['parambin_' erase(hrir_file_name, '.sofa') '_' erase(brir_file_name, '.sofa') '.bin']; bin_file = fullfile('.',binary_path, param_bin_file ); + generate_tables_for_parametric_binauralizer if writeRomFileOutput == true @@ -190,6 +237,14 @@ if writeRomFileOutput == true fprintf(fp,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); fclose(fp); + + fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); + + fp_fx = fopen(fx_rom_file,'at'); + + fprintf(fp_fx,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); + + fclose(fp_fx); end %% concatenate all previously generated binary files to binary file for IVAS decoder or renderer. One per sample rates diff --git a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m index 320901b205..bf14f1c042 100644 --- a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m +++ b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m @@ -46,7 +46,11 @@ addpath(genpath('../td_object_renderer/modeling_tool/')); %% Set arguments -writeRomFileOutput = false; %% generation of rom files if true +generateCustomBinaryFile = true; +normalize = true; % put a true to normalize input HRTF file. Diffuse field spectrum will be equal to one at 1 khz. Shall not be used with BRIR +makeBE = true; % put at true to generate BE rom table and at false to support more type of sofa file +performDiffuseFieldEq = true; % at true perform diffuse field equalization during param bin taps computation. Should not by used when HRIR are alredy diffuse field equalized +writeRomFileOutput = true & ~generateCustomBinaryFile; %% generation of rom files if true writeBinaryOutput = true; %% generation of binary files if true. Always true for TD renderer writeEachRendererBinaryOutput = true; %% generation of binary split files each containing binary data for individual renderer @@ -54,46 +58,86 @@ writeEachRendererBinaryOutput = true; %% generation of binary split files each c ivas_path = ['..' filesep '..' filesep]; %% Set input files -%hrir_file_name = 'D1_48K_24bit_256tap_FIR_SOFA.sofa'; -%hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; -hrir_file_name = 'HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'; -% hrir_file_name = 'IRC_1100_I_HRIR_48000.sofa'; -% hrir_file_name = 'IRC_1002_C_44100.sofa'; - -brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa'; +if generateCustomBinaryFile + % output_bin_name = 'ivas_binaural_custom'; + % hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; + % brir_file_name = 'BRIR_Auditorium_S1_R1_CICP19.sofa'; + %brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; + + % output_bin_name = 'ivas_binaural_custom_fabian_hrir'; + % hrir_file_name = 'FABIAN_HRIR_measured_HATO_0_norm.sofa'; + % brir_file_name = 'bbcrdlr_all_speakers.sofa'; + % brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; + + output_bin_name = 'ivas_binaural_custom_no_optim'; + hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; % fail for TD renderer + brir_file_name = 'bbcrdlr_all_speakers.sofa'; + brirOptimCfgFile = 'brir_no_optim.cfg'; + + % hrir_file_name = 'ari-dtf_nh2.sofa'; % fail for TD renderer +% hrir_file_name = 'BiLi-IRC_1101_C_HRIR_96000.sofa'; % fail for TD renderer + % hrir_file_name = 'cipic-subject_003.sofa'; % fail for TD renderer + % hrir_file_name = 'Listen-IRC_1002_C_44100.sofa'; % fail for TD renderer + % hrir_file_name = 'mit_kemar_normal_pinna.sofa'; % fail for TD renderer + %hrir_file_name = 'RIEC_hrir_subject_001.sofa'; % fail for TD renderer + % output_bin_name = 'ivas_binaural_custom_no_optim'; + %brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa' +else + hrir_file_name = 'HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'; + output_bin_name = 'ivas_binaural'; + brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa'; +end hrir_path = fullfile ('.','HRIRs_sofa'); brir_path = fullfile ('.','BRIRs_sofa'); %% Set output files rom_path = [ivas_path 'lib_rend']; -rom_path = './'; -binary_path = fullfile ('.','binaural_renderers_hrtf_data'); -binary_name = [erase(hrir_file_name,'.sofa') '+' erase(brir_file_name, '.sofa') ]; -output_bin_name = 'ivas_binaural_irc_1002'; -if(exist(binary_path, 'dir')==0) - mkdir(binary_path); -end +rom_path_fx = './'; +output_binary_path = fullfile ('.','binaural_renderers_hrtf_data'); hrir_file = fullfile( hrir_path, hrir_file_name); brir_file = fullfile( brir_path, brir_file_name); +binary_path = fullfile (output_binary_path,'temp'); +binary_name = [erase(hrir_file_name,'.sofa') '+' erase(brir_file_name, '.sofa') ]; +if ~(exist(binary_path, 'dir')) + mkdir(binary_path); +end + %% generate td binauralizer rom or binary values dataSpec.dataBase = 'IVAS'; -dataSpec.subjId = 'custom'; +if generateCustomBinaryFile + dataSpec.subjId = 'custom'; +else + dataSpec.subjId = 'default'; +end % specify HR filter directory dataSpec.hrfInDir = hrir_file; dataSpec.hrfOutDir = binary_path; dataSpec.genRomFile = writeRomFileOutput; +dataSpec.genRomFileFx = true; +dataSpec.genBinaryFile = writeBinaryOutput; +dataSpec.makeFxFltBE = true; dataSpec.romOutDir = rom_path; +dataSpec.romOutDir_fx = rom_path_fx; Mod_Hrf_Itd_Main(dataSpec); %% generate crend rom or binary values -convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128); +SOFA_save_to_mat(hrir_file); +SOFA_save_to_mat(brir_file,'Combined'); + +if generateCustomBinaryFile + convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1,normalize); +else + convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128,normalize); +end + command = ['.' filesep() 'generate_crend_ivas_tables']; if writeRomFileOutput == true command = [command ' -lib_rend_path ' rom_path]; + command = [command ' -lib_rend_path_fx ' rom_path_fx]; end if writeBinaryOutput == true command = [command ... @@ -102,15 +146,21 @@ if writeBinaryOutput == true ]; end +if generateCustomBinaryFile && exist('brirOptimCfgFile', 'var') && isempty(brirOptimCfgFile)==false + command = [command ... + ' -brir_optim_config_path ' ... + ' ' brirOptimCfgFile ' ' ... + ]; +end command = [command ... ' -compute_reverb_rom ' ... - hrir_file ' ' ... + erase(hrir_file,'.sofa') '.mat ' ... ' 5 ' ... - hrir_file ' ' ... - erase(hrir_file,'.sofa') '_FOA.sofa ' ... - erase(hrir_file,'.sofa') '_HOA2.sofa ' ... - erase(hrir_file,'.sofa') '_HOA3.sofa ' ... - brir_file ]; + erase(hrir_file,'.sofa') '.mat ' ... + erase(hrir_file,'.sofa') '_FOA.mat ' ... + erase(hrir_file,'.sofa') '_HOA2.mat ' ... + erase(hrir_file,'.sofa') '_HOA3.mat ' ... + erase(brir_file,'.sofa') '.mat ' ]; %display(command); @@ -124,30 +174,46 @@ end fastconv_bin_file = ['fastconv_' erase(hrir_file_name, '.sofa') '_' erase(brir_file_name, '.sofa') '.bin']; bin_file = fullfile('.',binary_path, fastconv_bin_file ); -rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); - -copyfile('ivas_license_header.template',rom_file,'f'); - -fp = fopen(rom_file,'at'); -fprintf(fp,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... -'#include ', ... -'#include "options.h"', ... -'#ifdef DEBUGGING', ... -'#include "debug.h"', ... -'#endif', ... -'#include "cnst.h"', ... -'#include "ivas_cnst.h"', ... -'#include "wmc_auto.h"', ... -'/* clang-format off */', ... -'#define WMC_TOOL_SKIP', ... -'/*-------------------------------------------------------------------------', ... -' * Binaural rendering related ROM tables', ... -' *------------------------------------------------------------------------*/', ... -'/* Binaural rendering data set based on HRIRs */', ... -'/* Tables generated by the script at "scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m */', ... -'/* Can be replaced by your own generated HRIR tables */'); - -fclose(fp); + +if writeRomFileOutput == true + rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); + fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); + + copyfile('ivas_license_header.template',rom_file,'f'); + + fp = fopen(rom_file,'at'); + fprintf(fp,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... + '#include ', ... + '#include "options.h"', ... + '#ifdef DEBUGGING', ... + '#include "debug.h"', ... + '#endif', ... + '#include "cnst.h"', ... + '#include "ivas_cnst.h"', ... + '#include "wmc_auto.h"', ... + '/* clang-format off */', ... + '#define WMC_TOOL_SKIP'); + + fclose(fp); + + copyfile('ivas_license_header.template',fx_rom_file,'f'); + + fp_fx = fopen(fx_rom_file,'at'); + fprintf(fp_fx,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... + '#include ', ... + '#include "options.h"', ... + '#ifdef DEBUGGING', ... + '#include "debug.h"', ... + '#endif', ... + '#include "cnst.h"', ... + '#include "ivas_cnst.h"', ... + '#include "wmc_auto.h"', ... + '/* clang-format off */', ... + '#define WMC_TOOL_SKIP'); + + fclose(fp_fx); + +end generate_tables_for_fastconv @@ -155,26 +221,34 @@ generate_tables_for_fastconv param_bin_file = ['parambin_' erase(hrir_file_name, '.sofa') '_' erase(brir_file_name, '.sofa') '.bin']; bin_file = fullfile('.',binary_path, param_bin_file ); -generate_tables_for_parametric_binauralizer - -rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); -fp = fopen(rom_file,'at'); +generate_tables_for_parametric_binauralizer -fprintf(fp,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); +if writeRomFileOutput == true + rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); + + fp = fopen(rom_file,'at'); + + fprintf(fp,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); + + fclose(fp); -fclose(fp); + fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); + + fp_fx = fopen(fx_rom_file,'at'); + + fprintf(fp_fx,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); + + fclose(fp_fx); +end %% concatenate all previously generated binary files to binary file for IVAS decoder or renderer. One per sample rates if writeBinaryOutput == true td_binary_file = ['td_' erase(hrir_file_name,'.sofa') '_model_v003']; - % sampleRates = ['48' ; '32' ; '16' ]; - % for ind = 1 : length(sampleRates) - % command = ['.' filesep() 'Table_Format_Converter' filesep() 'tables_format_converter' ' -' sampleRates(ind,:) ' ']; command = ['.' filesep() 'Table_Format_Converter' filesep() 'tables_format_converter']; command = [command ... - ' -output_file_path ' binary_path ... + ' -output_file_path ' output_binary_path ... ' -output_file_name ' output_bin_name ... ' -input_mixerconv_hrir_file_path ' binary_path ... ' -input_mixerconv_hrir_file_name ' binary_name ... @@ -195,14 +269,12 @@ if writeBinaryOutput == true error(cmdout) return end -% end end %% Foa all previously generated binary files, convert to binary files for IVAS decoder or renderer. One per sample rates and per renderers if writeBinaryOutput == true && writeEachRendererBinaryOutput == true td_binary_file = ['td_' erase(hrir_file_name,'.sofa') '_model_v003']; -% sampleRates = ['48' ; '32' ; '16' ]; command = ['.' filesep() 'Table_Format_Converter' filesep() 'tables_format_converter']; commandRendererList = [... " -input_mixerconv_hrir_file_path " binary_path ... @@ -218,13 +290,11 @@ if writeBinaryOutput == true && writeEachRendererBinaryOutput == true " -input_fastconv_file_path " binary_path ... " -input_fastconv_file_name " fastconv_bin_file ... ]; - % for ind = 1 : length(sampleRates) for indList = 3 : 4 : length(commandRendererList) pos = strfind(commandRendererList{indList},"_"); pos(2) = strfind(commandRendererList{indList},"_file_name"); output_bin_name_list = [output_bin_name commandRendererList{indList}(pos(1):pos(2)-1) ]; -% cmdl = [command ' -output_file_path ' binary_path ' -output_file_name ' output_bin_name_list ' -' sampleRates(ind,:) ' ']; - cmdl = [command ' -output_file_path ' binary_path ' -output_file_name ' output_bin_name_list]; + cmdl = [command ' -output_file_path ' output_binary_path ' -output_file_name ' output_bin_name_list]; cmdl2 = [cmdl ... commandRendererList{indList - 2} ... commandRendererList{indList - 1} ... @@ -237,5 +307,4 @@ if writeBinaryOutput == true && writeEachRendererBinaryOutput == true return end end -% end - end \ No newline at end of file + end diff --git a/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c b/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c index d8a68e10a9..98b3413a95 100644 --- a/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c +++ b/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c @@ -64,6 +64,17 @@ static void printBuf_uint16( const uint16_t *buf, uint16_t size1 ) return; } +static void printBuf_int16( const int16_t *buf, uint16_t size1 ) +{ + uint16_t ii; + for ( ii = 0; ii < size1; ++ii ) + { + printf( "%d ", (int32_t) buf[ii] ); + } + + return; +} + /* static void printBuf_int16( int16_t *buf, uint16_t size1 ) { diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m index 98b4724d99..17aef84f9c 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function FastConv_SD_IR = SD_2_ROM(sofa_file) +function FastConv_SD_IR = SD_2_ROM(sofa_file, num_cldfb_taps, normalize) % SD_2_ROM( rom_c_file, sofa_file, ambisonics_order, hrir_length ) % % Derived from SHD_2_ROM.m @@ -41,15 +41,17 @@ thispath = [thispath,filesep]; if ~exist('sofa_file','var') || isempty(sofa_file) sofa_file = fullfile(thispath,'..','HRIRs_sofa','HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'); end +if ~exist('num_cldfb_taps','var') + num_cldfb_taps = 3; +end %% load SD HRIRs H = hrtf_library_loader(); -H.readSOFA(char(sofa_file),'Combined',true); +H.readSOFA(char(sofa_file),'',normalize); ls_struct = get_ls_layout_config('Combined'); IR_SD = H.XYZ_to_IR_SD([deg2rad(ls_struct.azi); deg2rad(ls_struct.ele)]); %% SD -> CLDFB via least squares error optimization [~,num_ears,num_ch] = size(IR_SD); -num_cldfb_taps = 3; IR_cldfb = zeros(60,num_cldfb_taps,num_ears,num_ch); % 60 frequency bands eval_flag = 0; % optional, = 1 requires signal processing toolbox (fftfilt) legacy_flag = 1; % = 1 used to indicate slightly too short buffers as used to generate tested coefficients diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m index 56b2f993f5..24ab9f5d76 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function FastConv_SHD_IR = SHD_2_ROM( sofa_file, ambi_order, hrir_len ) +function FastConv_SHD_IR = SHD_2_ROM( sofa_file, ambi_order, hrir_len , num_cldfb_taps, normalize) % SHD_2_ROM( sofa_file, ambisonics_order, hrir_length ) % % - converts sphere-sampled Head Related Impulse Responses (HRIRs) given in sofa_file @@ -48,13 +48,15 @@ end if ~exist('hrir_len','var') hrir_len = 128; end +if ~exist('num_cldfb_taps','var') + num_cldfb_taps = 3; +end %% convert sphere-sampled HRIRs to SHD HRIRs [sofa_path,sofa_name, sofa_ext] = fileparts(sofa_file); -IR = generate_HOA_HRIRs_MOD_lens(ambi_order, sofa_path, [sofa_name,sofa_ext], hrir_len); +IR = generate_HOA_HRIRs_MOD_lens(ambi_order, sofa_path, [sofa_name,sofa_ext], hrir_len,normalize); %% SHD -> CLDFB via least squares error optimization [~,num_ears,num_ch] = size(IR); -num_cldfb_taps = 3; IR_cldfb = zeros(60,num_cldfb_taps,num_ears,num_ch); % 60 frequency bands eval_flag = 0; % optional, = 1 requires signal processing toolbox (fftfilt) legacy_flag = 1; % = 1 used to indicate slightly too short buffers as used to generate tested coefficients diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m index 8e6dd088c4..bb98d0a51d 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m @@ -90,8 +90,7 @@ if isfile(Lib_Name) assert( any(strcmpi(Sofa.Units{3}, {'metre','meter','inch'})), 'Unknown units'); if strcmpi(Sofa.Units{3},'inch' ), Sofa.Pos(3,:)=Sofa.Pos(3,:)*0.0254; end Sofa.PosSpherical = Sofa.Pos; - Sofa.Pos = Sofa.Pos(3,:) .* ... - [cos(Sofa.Pos(2,:)).*[cos(Sofa.Pos(1,:));sin(Sofa.Pos(1,:))];sin(Sofa.Pos(2,:))]; + [Sofa.Pos(1,:),Sofa.Pos(2,:),Sofa.Pos(3,:)] = sph2cart(Sofa.PosSpherical(1,:),Sofa.PosSpherical(2,:),Sofa.PosSpherical(3,:)); elseif strcmpi(Sofa.Type, 'cartesian') assert( any(strcmpi(Sofa.Units{1}, {'metre','meter','inch'})), 'Unknown units'); if strcmpi(Sofa.Units{1},'inch' ), Sofa.Pos(3,:)=Sofa.Pos(3,:)*0.0254; end diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m index 26acf573ea..46c3fe5b50 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function convert_SD2SHD_HRIRs(sofa_path, sofa_file, IR_size) +function convert_SD2SHD_HRIRs(sofa_path, sofa_file, IR_size, normalize) data_struct = struct.empty(3,0); @@ -38,7 +38,7 @@ sr_short = [48, 32, 16]; sr_dft_size = [240, 160, 80]; % FOA -data_struct(1).IR_data = generate_HOA_HRIRs_MOD_lens(1, sofa_path, sofa_file, IR_size); +data_struct(1).IR_data = generate_HOA_HRIRs_MOD_lens(1, sofa_path, sofa_file, IR_size,normalize); data_struct(1).HOA_name = 'FOA'; data_struct(1).n_HOA_ch = 4; data_struct(1).sr = sr; @@ -48,7 +48,7 @@ SOFA_save(data_struct(1).IR_data, sr(1), 1/sr(1), [sofa_path filesep() sofa_file SOFA_save_to_mat([sofa_path filesep() erase(sofa_file, '.sofa') '_' data_struct(1).HOA_name '.sofa']); % HOA2 -data_struct(2).IR_data = generate_HOA_HRIRs_MOD_lens(2, sofa_path, sofa_file, IR_size); +data_struct(2).IR_data = generate_HOA_HRIRs_MOD_lens(2, sofa_path, sofa_file, IR_size,normalize); data_struct(2).HOA_name = 'HOA2'; data_struct(2).n_HOA_ch = 9; data_struct(2).sr = sr; @@ -58,7 +58,7 @@ SOFA_save(data_struct(2).IR_data, sr(1), 1/sr(1), [sofa_path filesep() sofa_file SOFA_save_to_mat([sofa_path filesep() erase(sofa_file, '.sofa') '_' data_struct(2).HOA_name '.sofa']); % HOA3 -data_struct(3).IR_data = generate_HOA_HRIRs_MOD_lens(3, sofa_path, sofa_file, IR_size); +data_struct(3).IR_data = generate_HOA_HRIRs_MOD_lens(3, sofa_path, sofa_file, IR_size,normalize); data_struct(3).HOA_name = 'HOA3'; data_struct(3).n_HOA_ch = 16; data_struct(3).sr = sr; diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m index 8f5dc5c358..bf801144b8 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function IR_data = generate_HOA_HRIRs_MOD_lens(order, sofa_path, sofa_file_name, ir_len) +function IR_data = generate_HOA_HRIRs_MOD_lens(order, sofa_path, sofa_file_name, ir_len, normalize) % HRIR convertor - Takes sphere sampled HRIRs and converts them to % HOA HRIRs. % @@ -56,7 +56,7 @@ Vs_hi_res = Vs_hi_res.Vs_hi_res; N = 512; H = hrtf_library_loader(); -H.readSOFA(char(fullfile(sofa_path, sofa_file_name)),'',true); +H.readSOFA(char(fullfile(sofa_path, sofa_file_name)),'',normalize); if (ir_len == -1) ir_len = size(H.Data.IR,3); end diff --git a/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m b/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m index 1cdc56d10b..d2704a4d62 100644 --- a/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m +++ b/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m @@ -31,7 +31,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_inputfile, SHhrtf) +function [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_inputfile, SHhrtf,normalize, makeBE) % % [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_inputfile, SHhrtf) % @@ -41,7 +41,7 @@ function [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir %% Load BRIR input file sofaData = hrtf_library_loader(); -sofaData.readSOFA(brir_inputfile,'Combined',true); +sofaData.readSOFA(brir_inputfile,'Combined',normalize); %% Get data and format it for us @@ -150,8 +150,19 @@ end % Determine T60, early energies, and late energies T60 = zeros(nFFT/2,1); for band = 1:nFFT/2 - [~, lateStart] = max(enes(band, 5:15)); - eneDb = 10*log10(enes(band, :)); + if makeBE + [~, lateStart] = max(enes(band, 5:15)); + eneDb = 10*log10(enes(band, :)); + else + eneBackwardSum = zeros(1,length(enes(band, :))); + eneBackwardSum(end) = enes(band,end); + for indt = length(eneBackwardSum)-1:-1:1 + eneBackwardSum(indt) = eneBackwardSum(indt+1) + enes(band, indt); + end + [~, lateStart] = max(eneBackwardSum(5:15)); + + eneDb = 10*log10(eneBackwardSum); + end indices = [lateStart:maxIndexInRangeSmooth(band)]; % Linear fitting a line, determining T60 based on it diff --git a/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m b/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m index 5fd980cb13..aedea91ab7 100644 --- a/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m +++ b/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m @@ -30,7 +30,7 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function SHhrtf = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_inputfile, performDiffuseFieldEq) +function SHhrtf = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_inputfile, performDiffuseFieldEq, normalize) % % SHhrtf = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_inputfile) % @@ -43,7 +43,7 @@ end %% Load HRIR input file sofaData = hrtf_library_loader(); -sofaData.readSOFA(hrir_inputfile,'',true); +sofaData.readSOFA(hrir_inputfile,'',normalize); %% Get data and format it for us % Input HRIR data from SOFA. After permuation, in order (ear, dirIndex, response) diff --git a/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m b/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m index 06a2c22351..709d2af8c9 100644 --- a/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m +++ b/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m @@ -51,6 +51,15 @@ end if ~exist("writeRomFileOutput",'var') writeRomFileOutput = true; end +if ~exist("normalize",'var') + normalize = true; +end +if ~exist("makeBE",'var') + makeBE = true; +end +if ~exist("performDiffuseFieldEq",'var') + performDiffuseFieldEq = true; +end if ~exist("writeRomFileFx",'var') writeRomFileFx = false; end @@ -66,6 +75,9 @@ end if ~exist("rom_file",'var') rom_file = fullfile('.', 'ivas_rom_binauralRenderer.c'); end +if ~exist("fx_rom_file",'var') + fx_rom_file = fullfile('.', 'ivas_rom_binauralRenderer_fx.c'); +end if ~exist("bin_file",'var') bin_file = fullfile('.', 'parambin_binary_rom.bin'); end @@ -88,43 +100,41 @@ if writeRomFileOutput fprintf(fid, '#ifdef DEBUGGING\n'); fprintf(fid, '/* Generated on %s with Matlab version %s by %s on %s */\n', datetime("today"), version, username, computer); fprintf(fid, '#endif\n\n\n'); + + fid_fx = fopen(fullfile('.', fx_rom_file), 'at'); + fprintf(fid_fx, '#ifdef DEBUGGING\n'); + fprintf(fid_fx, '/* Generated on %s with Matlab version %s by %s on %s */\n', datetime("today"), version, username, computer); + fprintf(fid_fx, '#endif\n\n\n'); + end %% Generate C-code tables for RENDERER_BINAURAL_PARAMETRIC (SHD) disp('Processing HRIR for parametric renderer...'); -SHhrtf_float = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_file, true); +SHhrtf_float = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_file, performDiffuseFieldEq, normalize); -%% compute scaling factor and set floating point precision to int16_t +%% compute scaling factor and set floating point precision to Word16 [SHhrtf, factorQ_SHhrtf] = make_be_with_fx(SHhrtf_float,15); SHhrtf_fx = SHhrtf .* (2.^double(factorQ_SHhrtf)); if writeRomFileOutput - if writeRomFileFx - fprintf(fid, 'const int16_t hrtfShCoeffs_factorQ = %d;\n', factorQ_SHhrtf); - writeData3L(fid, 'const int16_t hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', real(SHhrtf_fx)); - writeData3L(fid, 'const int16_t hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', imag(SHhrtf_fx)); + fprintf(fid_fx, 'const Word16 hrtfShCoeffs_factorQ_fx = %d;\n', factorQ_SHhrtf); + writeData3L(fid_fx, 'const Word16 hrtfShCoeffsRe_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', real(SHhrtf_fx)); + writeData3L(fid_fx, 'const Word16 hrtfShCoeffsIm_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', imag(SHhrtf_fx)); + if makeFxFltBE + writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf)); + writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf)); else - if makeFxFltBE - writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf)); - writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf)); - else - writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf_float)); - writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf_float)); - end + writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf_float)); + writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf_float)); end end %% Generate C-code tables for RENDERER_BINAURAL_PARAMETRIC_ROOM (SHD) disp('Processing BRIR for parametric renderer...'); -[T60_float, lateEnes_float, earlyEnes_float] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_file, SHhrtf); -if generateCustomBinaryFile == true - T60_float = T60_float * 2; - lateEnes_float = lateEnes_float * 2; - earlyEnes_float = earlyEnes_float * 2; -end +[T60_float, lateEnes_float, earlyEnes_float] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_file, SHhrtf, normalize, makeBE); -%% compute scaling factor and ste floating point precision to int32_t +%% compute scaling factor and ste floating point precision to Word32 [T60, factorQ_T60] = make_be_with_fx(T60_float,15); [lateEnes, factorQ_lateEnes] = make_be_with_fx(lateEnes_float,15); [earlyEnes, factorQ_earlyEnes] = make_be_with_fx(earlyEnes_float,15); @@ -134,35 +144,26 @@ earlyEnes_fx = earlyEnes .* (2.^double(factorQ_earlyEnes)); if writeRomFileOutput % Write BRIR parameters to file - if writeRomFileFx - fprintf(fid, 'const int16_t parametricReverberationTimes_factorQ = %d;\n', factorQ_T60); - fprintf(fid, 'const int16_t parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX] = {\n'); - else - fprintf(fid, 'const float parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX] = {\n'); - end + fprintf(fid_fx, 'const Word16 parametricReverberationTimes_factorQ_fx = %d;\n', factorQ_T60); + fprintf(fid_fx, 'const Word16 parametricReverberationTimes_fx[CLDFB_NO_CHANNELS_MAX] = {\n'); + fprintf(fid, 'const float parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX] = {\n'); for k = 1:60 if mod(k-1, 10)==0 fprintf(fid, ' '); end if k < 60 - if writeRomFileFx - fprintf(fid, '%d,', T60_fx(k)); + fprintf(fid_fx, '%d,', T60_fx(k)); + if makeFxFltBE + fprintf(fid, '%s,', flt2hex(T60(k))); else - if makeFxFltBE - fprintf(fid, '%s,', flt2hex(T60(k))); - else - fprintf(fid, '%s,', flt2hex(T60_float(k))); - end + fprintf(fid, '%s,', flt2hex(T60_float(k))); end else - if writeRomFileFx - fprintf(fid, '%d\n};', T60_fx(k)); + fprintf(fid_fx, '%d\n};', T60_fx(k)); + if makeFxFltBE + fprintf(fid, '%s\n};', flt2hex(T60(k))); else - if makeFxFltBE - fprintf(fid, '%s\n};', flt2hex(T60(k))); - else - fprintf(fid, '%s\n};', flt2hex(T60_float(k))); - end + fprintf(fid, '%s\n};', flt2hex(T60_float(k))); end end if k>1 && mod(k, 10)==0 @@ -172,35 +173,26 @@ if writeRomFileOutput end end - if writeRomFileFx - fprintf(fid, '\n\nconst int16_t parametricReverberationEneCorrections_factorQ = %d;\n', factorQ_lateEnes); - fprintf(fid, 'const int16_t parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = {\n'); - else - fprintf(fid, '\n\nconst float parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = {\n'); - end + fprintf(fid_fx, '\n\nconst Word16 parametricReverberationEneCorrections_factorQ_fx = %d;\n', factorQ_lateEnes); + fprintf(fid_fx, 'const Word16 parametricReverberationEneCorrections_fx[CLDFB_NO_CHANNELS_MAX] = {\n'); + fprintf(fid, '\n\nconst float parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = {\n'); for k = 1:60 if mod(k-1, 10)==0 fprintf(fid,' '); end if k < 60 - if writeRomFileFx - fprintf(fid, '%d,', lateEnes_fx(k)); + fprintf(fid_fx, '%d,', lateEnes_fx(k)); + if makeFxFltBE + fprintf(fid, '%s,', flt2hex(lateEnes(k))); else - if makeFxFltBE - fprintf(fid, '%s,', flt2hex(lateEnes(k))); - else - fprintf(fid, '%s,', flt2hex(lateEnes_float(k))); - end + fprintf(fid, '%s,', flt2hex(lateEnes_float(k))); end else - if writeRomFileFx - fprintf(fid, '%d\n};', lateEnes_fx(k)); + fprintf(fid_fx, '%d\n};', lateEnes_fx(k)); + if makeFxFltBE + fprintf(fid, '%s\n};', flt2hex(lateEnes(k))); else - if makeFxFltBE - fprintf(fid, '%s\n};', flt2hex(lateEnes(k))); - else - fprintf(fid, '%s\n};', flt2hex(lateEnes_float(k))); - end + fprintf(fid, '%s\n};', flt2hex(lateEnes_float(k))); end end if k>1 && mod(k, 10)==0 @@ -210,35 +202,26 @@ if writeRomFileOutput end end - if writeRomFileFx - fprintf(fid, '\n\nconst int16_t parametricEarlyPartEneCorrection_factorQ = %d;\n', factorQ_earlyEnes); - fprintf(fid, 'const int16_t parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX] = {\n'); - else - fprintf(fid, '\n\nconst float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX] = {\n'); - end + fprintf(fid_fx, '\n\nconst Word16 parametricEarlyPartEneCorrection_factorQ_fx = %d;\n', factorQ_earlyEnes); + fprintf(fid_fx, 'const Word16 parametricEarlyPartEneCorrection_fx[CLDFB_NO_CHANNELS_MAX] = {\n'); + fprintf(fid, '\n\nconst float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX] = {\n'); for k = 1:60 if mod(k-1, 10)==0 fprintf(fid, ' '); end if k < 60 - if writeRomFileFx - fprintf(fid, '%d,', earlyEnes_fx(k)); + fprintf(fid_fx, '%d,', earlyEnes_fx(k)); + if makeFxFltBE + fprintf(fid, '%s,', flt2hex(earlyEnes(k))); else - if makeFxFltBE - fprintf(fid, '%s,', flt2hex(earlyEnes(k))); - else - fprintf(fid, '%s,', flt2hex(earlyEnes_float(k))); - end + fprintf(fid, '%s,', flt2hex(earlyEnes_float(k))); end else - if writeRomFileFx - fprintf(fid, '%d\n};', earlyEnes_fx(k)); + fprintf(fid_fx, '%d\n};', earlyEnes_fx(k)); + if makeFxFltBE + fprintf(fid, '%s\n};', flt2hex(earlyEnes(k))); else - if makeFxFltBE - fprintf(fid, '%s\n};', flt2hex(earlyEnes(k))); - else - fprintf(fid, '%s\n};', flt2hex(earlyEnes_float(k))); - end + fprintf(fid, '%s\n};', flt2hex(earlyEnes_float(k))); end end if k>1 && mod(k, 10)==0 @@ -251,6 +234,7 @@ end if writeRomFileOutput fclose(fid); + fclose(fid_fx); end %% diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 496a23e70f..e67a517f98 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -626,17 +626,17 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_EXOF_OtrAvg.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FER at 5% -../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c_cut_.004.wav bit +../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32n.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32c_cut.004.wav_SBA_24400_32-32_DTX_Binaural_FER5.tst +../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32n.wav_SBA_24400_32-32_DTX_Binaural_FER5.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR -../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c_cut_.004.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_24400_32-32_DTX_Binaural_Headrot.tst +../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32n.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_24400_32-32_DTX_Binaural_Headrot.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR, exo -../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c_cut_.004.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_24400_32-32_DTX_Binaural_Headrot_EXOF.tst +../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32n.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_24400_32-32_DTX_Binaural_Headrot_EXOF.tst // SBA at 32 kbps, 32kHz in, 32kHz out, FOA out ../IVAS_cod -sba 1 32000 32 testv/stvFOA32c.wav bit @@ -652,8 +652,8 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL_ROOM_IR 32 bit testv/stvFOA32c.wav_SBA_32000_32-32_BINAURAL_ROOM.tst // SBA at 32 kbps, 48kHz in, 48kHz out, MONO out, DTX, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -dtx -sba 1 32000 48 testv/stvFOA48c_cut_.004.wav bit -../IVAS_dec MONO 48 bit testv/stvFOA48c_cut_.004.wav_SBA_32000_48-48_DTX_MONO.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -dtx -sba 1 32000 48 testv/stvFOA48n.wav bit +../IVAS_dec MONO 48 bit testv/stvFOA48n.wav_SBA_32000_48-48_DTX_MONO.tst // SBA at 48 kbps, 32kHz in, 32kHz out, MONO out, random FER at 5% ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.wav bit @@ -701,26 +701,26 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec -t ../scripts/trajectories/full-circle-with-up-and-down-4s.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -rvf ../scripts/trajectories/full-circle-with-up-and-down-4s-Vector3.csv -otr ref_vec_lev BINAURAL_ROOM_IR 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_EXOF_OtrRefPosLev.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FER at 5% -../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c_cut_.004.wav bit +../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32n.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32c_cut_.004.wav_SBA_48000_32-32_DTX_Binaural_FER5.tst +../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32n.wav_SBA_48000_32-32_DTX_Binaural_FER5.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR -../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c_cut_.004.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_48000_32-32_DTX_Binaural_Headrot.tst +../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32n.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_48000_32-32_DTX_Binaural_Headrot.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR, exo -../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c_cut_.004.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_48000_32-32_DTX_Binaural_Headrot_EXOF.tst +../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32n.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_48000_32-32_DTX_Binaural_Headrot_EXOF.tst // SBA at 48 kbps, 48kHz in, 48kHz out, 5_1_2 out ../IVAS_cod -sba 3 48000 48 testv/stv3OA48c.wav bit ../IVAS_dec 5_1_2 48 bit testv/stv3OA48c.wav_SBA_48000_48-48_5_1_2.tst // SBA at 64 kbps, 32kHz in, 32kHz out, FOA out, DTX, random FER at 5% -../IVAS_cod -dtx -sba 1 64000 32 testv/stvFOA32c_cut_.004.wav bit +../IVAS_cod -dtx -sba 1 64000 32 testv/stvFOA32n.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec FOA 32 bit_error testv/stvFOA32c.wav_SBA_64000_32-32_DTX_FOA_FER5.tst +../IVAS_dec FOA 32 bit_error testv/stvFOA32n.wav_SBA_64000_32-32_DTX_FOA_FER5.tst // SBA at 64 kbps, 48kHz in, 48kHz out, 5_1_4 out ../IVAS_cod -sba 1 64000 48 testv/stvFOA48c.wav bit @@ -731,12 +731,12 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 7_1_4 48 bit testv/stvFOA48c.wav_SBA_64000_48-48_7_1_4.tst // SBA at 64 kpbs, 48kHz in, 48kHz out, BINAURAL out, DTX -../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48c_cut_.004.wav bit -../IVAS_dec BINAURAL 48 bit testv/stvFOA48c_cut_.004.wav_SBA_64000_48-48_DTX_BINAURAL.tst +../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48n.wav bit +../IVAS_dec BINAURAL 48 bit testv/stvFOA48n.wav_SBA_64000_48-48_DTX_BINAURAL.tst // SBA at 64 kpbs, 48kHz in, 48kHz out, BINAURAL_ROOM out, DTX -../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48c_cut_.004.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stvFOA48c_cut_.004.wav_SBA_64000_48-48_DTX_BINAURAL_ROOM.tst +../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48n.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stvFOA48n.wav_SBA_64000_48-48_DTX_BINAURAL_ROOM.tst // SBA at 80 kbps, 32kHz in, 32kHz out, HOA3 out ../IVAS_cod -sba 3 80000 32 testv/stv3OA32c.wav bit @@ -789,8 +789,8 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec HOA2 48 bit_error testv/stv3OA48c.wav_SBA_192000_48-48_HOA2_FER5.tst // SBA at 48 kbps, 48kHz in, 48kHz out, DTX on, 5_1 out -../IVAS_cod -sba 3 -dtx 48000 48 testv/stv3OA48c_cut_.004.wav bit -../IVAS_dec 5_1 48 bit testv/stv3OA48c_cut_.004.wav_SBA_48000_48-48_DTX_5_1.tst +../IVAS_cod -sba 3 -dtx 48000 48 testv/stv3OA48n.wav bit +../IVAS_dec 5_1 48 bit testv/stv3OA48n.wav_SBA_48000_48-48_DTX_5_1.tst // SBA at 160 kbps, 32kHz in, 32kHz out, FOA out ../IVAS_cod -sba 1 160000 32 testv/stvFOA32c.wav bit @@ -871,12 +871,12 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 7_1_4 48 bit testv/stv3OA48c.wav_sw_48-48_7_1_4.tst // SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out -../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c_cut_.004.wav bit +../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32n.wav bit ../IVAS_dec BINAURAL 32 bit testv/stvFOA32c.wav_sw_32-32_DTX_BINAURAL.tst // SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, HOA3 out -../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c_cut_.004.wav bit -../IVAS_dec HOA3 32 bit testv/stv3OA32c.wav_sw_32-32_DTX_HOA3.tst +../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32n.wav bit +../IVAS_dec HOA3 32 bit testv/stv3OA32n.wav_sw_32-32_DTX_HOA3.tst // SBA FOA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, FOA out ../IVAS_cod -sba 1 -max_band fb ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvFOA48c.wav bit @@ -923,30 +923,30 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit testv/stvFOA48c.wav_SBA_PCA_256000_48-48_BINAURAL.tst // SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 32kHz in, 32kHz out, DTX on, EXT out -../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c_cut_.004.wav bit -../IVAS_dec EXT 32 bit testv/stvFOA32c_cut_.004.wav_sw_32-32_DTX_EXT.tst +../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32n.wav bit +../IVAS_dec EXT 32 bit testv/stvFOA32n.wav_sw_32-32_DTX_EXT.tst // SBA planar 2OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, EXT out -../IVAS_cod -dtx -sba -2 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv2OA32c_cut_.004.wav bit -../IVAS_dec EXT 32 bit testv/stv2OA32c_cut_.004.wav_sw_32-32_DTX_EXT.tst +../IVAS_cod -dtx -sba -2 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv2OA32n.wav bit +../IVAS_dec EXT 32 bit testv/stv2OA32n.wav_sw_32-32_DTX_EXT.tst // SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, DTX on, random FER at 5%, EXT out -../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv3OA48c_cut_.004.wav bit +../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv3OA48n.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec EXT 48 bit_error testv/stv3OA48c_cut_.004.wav_sw_48-48_DTX_EXT_FER5.tst +../IVAS_dec EXT 48 bit_error testv/stv3OA48n.wav_sw_48-48_DTX_EXT_FER5.tst // SBA planar FOA bitrate switching from 13.2 kbps to 512 kbps, 32kHz in, 32kHz out, EXT out ../IVAS_cod -sba -1 ../scripts/switchPaths/sw_13k2_512k.bin 32 testv/stvFOA32c.wav bit -../IVAS_dec EXT 32 bit testv/stvFOA32c.wav_sw_32-32_DTX_EXT.tst +../IVAS_dec EXT 32 bit testv/stvFOA32c.wav_sw_32-32_EXT.tst // SBA 2OA bitrate switching from 13.2 kbps to 512 kbps, 32kHz in, 32kHz out, EXT out ../IVAS_cod -sba 2 ../scripts/switchPaths/sw_13k2_512k.bin 32 testv/stv2OA32c.wav bit -../IVAS_dec EXT 32 bit testv/stv2OA32c.wav_sw_32-32_DTX_EXT.tst +../IVAS_dec EXT 32 bit testv/stv2OA32c.wav_sw_32-32_EXT.tst // SBA planar 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, random FER at 5%, EXT out ../IVAS_cod -sba -3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv3OA48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec EXT 48 bit_error testv/stv3OA48c.wav_sw_48-48_DTX_EXT_FER5.tst +../IVAS_dec EXT 48 bit_error testv/stv3OA48c.wav_sw_48-48_EXT_FER5.tst // SBA 3OA at 96 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out default configuration ../IVAS_cod -sba 3 512000 48 testv/stv3OA48c.wav bit @@ -958,204 +958,204 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -masa 1 testv/stv1MASA1TC48c.met 13200 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv1MASA1TC48c.wav_13200_48-48_BINAURAL.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -masa 1 testv/stv_20sec_MASA_varDir1TC.met 13200 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_13200_48-48_BINAURAL.tst // MASA 1dir 1TC at 16.4 kbps, 48kHz in, 48kHz out, HOA3 out, random FER at 5% -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 16400 48 testv/stv1MASA1TC48c.wav bit +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 16400 48 testv/stv_20sec_MASA_varDir1TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec HOA3 48 bit_error testv/stv1MASA1TC48c.wav_16400_48-48_HOA3_FER5.tst +../IVAS_dec HOA3 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_16400_48-48_HOA3_FER5.tst // MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 24400 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv1MASA1TC48c.wav_24400_48-48_BinauralRoom.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-48_BinauralRoom.tst // MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 24400 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA1TC48c.wav_24400_48-48_BinauralRoom_Headrot.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-48_BinauralRoom_Headrot.tst // MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, exo -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 24400 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA1TC48c.wav_24400_48-48_BinauralRoom_Headrot_EXOF.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-48_BinauralRoom_Headrot_EXOF.tst // MASA 1dir 1TC at 32 kbps, 48kHz in, 48kHz out, 7_1_4, random FER at 5% -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 32000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 32000 48 testv/stv_20sec_MASA_varDir1TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 7_1_4 48 bit_error testv/stv1MASA1TC48c.wav_32000_48-48_7_1_4_FER5.tst +../IVAS_dec 7_1_4 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_32000_48-48_7_1_4_FER5.tst // MASA 1dir 1TC at 48 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 48000 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec MONO 48 bit testv/stv1MASA1TC48c.wav_48000_48-48_MONO.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 48000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_MASA_varDir1TC.wav_48000_48-48_MONO.tst // MASA 1dir 1TC at 64 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 64000 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec STEREO 48 bit testv/stv1MASA1TC48c.wav_64000_48-48_STEREO.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 64000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec STEREO 48 bit testv/stv_20sec_MASA_varDir1TC.wav_64000_48-48_STEREO.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, random FER at 5% -../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 48 bit_error testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_FER5.tst +../IVAS_dec BINAURAL 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_FER5.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_Subframe.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_Subframe.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, HR -../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_Headrot.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_Headrot.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, HR, exo -../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_Headrot_EXOF.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_Headrot_EXOF.tst // MASA 1dir 2TC at 13.2 kbps, 48kHz in, 48kHz out, 5_1 out, random FER at 5%, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv1MASA2TC48c.met 13200 48 testv/stv1MASA2TC48c.wav bit +../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv_20sec_MASA_varDir2TC.met 13200 48 testv/stv_20sec_MASA_varDir2TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 5_1 48 bit_error testv/stv1MASA2TC48c.wav_13200_48-48_5_1_FER5.tst +../IVAS_dec 5_1 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_13200_48-48_5_1_FER5.tst // MASA 1dir 2TC at 16.4 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 16400 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec 5_1 48 bit testv/stv1MASA2TC48c.wav_16400_48-48_5_1.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 16400 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_16400_48-48_5_1.tst // MASA 1dir 2TC at 24.4 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 24400 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec STEREO 48 bit testv/stv1MASA2TC48c.wav_24400_48-48_STEREO.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 24400 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec STEREO 48 bit testv/stv_20sec_MASA_varDir2TC.wav_24400_48-48_STEREO.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv1MASA2TC48c.wav_32000_48-48_BinauralRoom.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA2TC48c.wav_32000_48-48_BinauralRoom_Headrot.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, exo -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA2TC48c.wav_32000_48-48_BinauralRoom_Headrot_EXOF.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot_EXOF.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, OT -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, OT, exo -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_EXOF_OtrAvg.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot_EXOF_OtrAvg.tst // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FER at 5% -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 48000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 48000 48 testv/stv_20sec_MASA_varDir2TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 7_1_4 48 bit_error testv/stv1MASA2TC48c.wav_48000_48-48_7_1_4_FER5.tst +../IVAS_dec 7_1_4 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_48000_48-48_7_1_4_FER5.tst // MASA 1dir 2TC at 80 kbps, 32kHz in, 16kHz out, STEREO out ../IVAS_cod -masa 2 testv/stv1MASA2TC32c.met 80000 32 testv/stv1MASA2TC32c.wav bit ../IVAS_dec STEREO 16 bit testv/stv1MASA2TC32c.wav_80000_32-16_STEREO.tst // MASA 1dir 2TC at 96 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 96000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec MONO 48 bit testv/stv1MASA2TC48c.wav_96000_48-48_MONO.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 96000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_MASA_varDir2TC.wav_96000_48-48_MONO.tst // MASA 1dir 2TC at 160 kbps, 48kHz in, 48kHz out, HOA3 out, random FER at 5% -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 160000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 160000 48 testv/stv_20sec_MASA_varDir2TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec HOA3 48 bit_error testv/stv1MASA2TC48c.wav_160000_48-48_HOA3_FER5.tst +../IVAS_dec HOA3 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_160000_48-48_HOA3_FER5.tst // MASA 1dir 2TC at 256 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 256000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec 5_1 48 bit testv/stv1MASA2TC48c.wav_256000_48-48_5_1.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 256000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_256000_48-48_5_1.tst // MASA 2dir 2TC at 48 kbps, 48kHz in, 48kHz out, 5_1 out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -masa 2 testv/stv2MASA2TC48c.met 48000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec 5_1 48 bit testv/stv2MASA2TC48c.wav_48000_48-48_5_1.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -masa 2 testv/stv_20sec_MASA_varDir2TC.met 48000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_48000_48-48_5_1.tst // MASA 2dir 2TC at 64 kbps, 48kHz in, 48kHz out, EXTERNAL out, random FER at 5% -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 64000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec EXT 48 bit_error testv/stv2MASA2TC48c.wav_64000_48-48_external_FER5.tst +../IVAS_dec EXT 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_external_FER5.tst // MASA 2dir 2TC at 64 kbps, 48kHz in, 48kHz out, BINAURAL out, HR -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 64000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv2MASA2TC48c.wav_64000_48-48_BINAURAL_Headrot.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_BINAURAL_Headrot.tst // MASA 2dir 2TC at 64 kbps, 48kHz in, 48kHz out, BINAURAL out, HR, exo -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 64000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv2MASA2TC48c.wav_64000_48-48_BINAURAL_Headrot_EXOF.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_BINAURAL_Headrot_EXOF.tst // MASA 2dir 2TC at 128 kbps, 48kHz in, 48kHz out, FOA out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 128000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec FOA 48 bit testv/stv2MASA2TC48c.wav_128000_48-48_FOA.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 128000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec FOA 48 bit testv/stv_20sec_MASA_varDir2TC.wav_128000_48-48_FOA.tst // MASA 2dir 2TC at 192 kbps, 48kHz in, 48kHz out, 5_1_4 out, random FER at 5% -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 192000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 192000 48 testv/stv_20sec_MASA_varDir2TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 5_1_4 48 bit_error testv/stv2MASA2TC48c.wav_192000_48-48_5_1_4_FER5.tst +../IVAS_dec 5_1_4 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_192000_48-48_5_1_4_FER5.tst // MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 384000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv2MASA2TC48c.wav_384000_48-48_BinauralRoom.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 384000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_384000_48-48_BinauralRoom.tst // MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM IR out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv2MASA2TC48c.met 384000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv2MASA2TC48c.wav_384000_48-48_BinauralRoom.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv_20sec_MASA_varDir2TC.met 384000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_384000_48-48_BinauralRoom.tst // MASA 2dir 2TC at 512 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 512000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec 5_1 48 bit testv/stv2MASA2TC48c.wav_512000_48-48_5_1.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 512000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_512000_48-48_5_1.tst // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 13200 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv1MASA1TC48c.wav_13200_48-48_EXT.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 13200 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir1TC.wav_13200_48-48_EXT.tst // MASA 1dir 2TC at 16.4 kbps, 16kHz in, 48kHz out, EXT out ../IVAS_cod -masa 2 testv/stv1MASA2TC16c.met 16400 16 testv/stv1MASA2TC16c.wav bit ../IVAS_dec EXT 48 bit testv/stv1MASA2TC16c.wav_16400_16-48_EXT.tst // MASA 2dir 1TC at 24.4 kbps, 48kHz in, 32kHz out, EXT out -../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 24400 48 testv/stv2MASA1TC48c.wav bit -../IVAS_dec EXT 32 bit testv/stv2MASA1TC48c.wav_24400_48-32_EXT.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec EXT 32 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-32_EXT.tst // MASA 2dir 2TC at 32 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 32000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_32000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_EXT.tst // MASA 1dir 1TC at 48 kbps, 32kHz in, 48kHz out, EXT out ../IVAS_cod -masa 1 testv/stv1MASA1TC32c.met 48000 32 testv/stv1MASA1TC32c.wav bit ../IVAS_dec EXT 48 bit testv/stv1MASA1TC32c.wav_48000_32-48_EXT.tst // MASA 1dir 2TC at 64 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 64000 48 testv/stv1MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv1MASA2TC48c.wav_64000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_EXT.tst // MASA 2dir 1TC at 80 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 80000 48 testv/stv2MASA1TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA1TC48c.wav_80000_48-48_EXT.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 80000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir1TC.wav_80000_48-48_EXT.tst // MASA 2dir 2TC at 96 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 96000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_96000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 96000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_96000_48-48_EXT.tst // MASA 1dir 2TC at 128 kbps, 48kHz in, 48kHz out, DTX on, EXT out ../IVAS_cod -dtx -masa 2 testv/stv1MASA2TC48n.met 128000 48 testv/stv1MASA2TC48n.wav bit ../IVAS_dec EXT 48 bit testv/stv1MASA2TC48n.wav_128000_48-48_DTX_EXT.tst // MASA 2dir 2TC at 160 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 160000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_160000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 160000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_160000_48-48_EXT.tst // MASA 2dir 2TC at 192 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 192000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_192000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 192000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_192000_48-48_EXT.tst // MASA 2dir 2TC at 256 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 256000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_256000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 256000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_256000_48-48_EXT.tst // MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 384000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_384000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 384000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_384000_48-48_EXT.tst // MASA 2dir 2TC at 512 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 512000 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_512000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 512000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_512000_48-48_EXT.tst // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, DTX on, 7_1_4 out ../IVAS_cod -dtx -masa 1 testv/stv1MASA1TC48n.met 13200 48 testv/stv1MASA1TC48n.wav bit @@ -1174,40 +1174,40 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 5_1 48 bit testv/stv1MASA2TC48n.wav_32000_48-48_DTX_5_1.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit -../IVAS_dec 5_1 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_5_1.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_5_1.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit -../IVAS_dec STEREO 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_STEREO.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec STEREO 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_STEREO.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_BINAURAL.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_BINAURAL.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, FOA out -../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit -../IVAS_dec FOA 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_FOA.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec FOA 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_FOA.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) -../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit -../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_BINAURAL.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_BINAURAL.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit -../IVAS_dec MONO 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_MONO.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_MONO.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, 7_1 out -../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit -../IVAS_dec 7_1 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_7_1.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec 7_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_7_1.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, 7_1 out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec 7_1 48 bit testv/stv2MASA2TC48c.wav_sw_48-48_7_1.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec 7_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_7_1.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv2MASA2TC48c.wav_sw_48-48_BINAURAL.tst +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_BINAURAL.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, DTX on, BINAURAL out, random FER at 5% ../IVAS_cod -dtx -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit @@ -1215,25 +1215,25 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit_error testv/stv1MASA2TC48n.wav_sw_48-48_DTX_BINAURAL_FER5.tst // MASA 1dir 1TC at 256kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out default configuration -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48.tst // MASA 1dir 1TC at 256kbps, 48kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out custom configuration -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec -render_config testv/rend_config_combined.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48_custom_config.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48_custom_config.tst // MASA 1dir 1TC at 256kbps, 48kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out default configuration, random FER at 5% -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit_error testv/stv1MASA1TC48c.wav_256000_48-48_BINAURAL_ROOM_REVERB_FER5.tst +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_256000_48-48_BINAURAL_ROOM_REVERB_FER5.tst // MASA 1dir 1TC at 256 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out, HR deafult configuration -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot.tst // MASA 1dir 1TC at 256 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out, HR custom configuration -../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit -../IVAS_dec -render_config testv/rend_config_combined.cfg -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot_custom_config.tst +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot_custom_config.tst // Multi-channel 5_1 at 13.2 kbps, 48kHz in, 48kHz out @@ -1643,59 +1643,59 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 32kHz out, 5_1 out, JBM Prof 5 -../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 5_1 32 netsimoutput testv/stv1MASA1TC48n.wav_sw_48-32_5_1_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 5_1 32 netsimoutput testv/stv_20sec_MASA_varDir1TC.wav_sw_48-32_5_1_JBM5.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, STEREO out, JBM Prof 5 -../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 48 netsimoutput testv/stv1MASA1TC48n.wav_sw_48-48_STEREO_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 48 netsimoutput testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_STEREO_JBM5.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, FOA out, JBM Prof 5 -../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit +../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv1MASA1TC48n.wav_sw_48-48_FOA_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_FOA_JBM5.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 16kHz out, BINAURAL out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv1MASA2TC48n.wav_sw_48-16_BINAURAL_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-16_BINAURAL_JBM5.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 32kHz out, MONO out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 32 netsimoutput testv/stv1MASA2TC48n.wav_sw_48-32_MONO_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 32 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-32_MONO_JBM5.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, EXT out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stv2MASA2TC48c.wav_sw_48-48_EXT_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_EXT_JBM5.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 16kHz out, BINAURAL out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit +../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv2MASA2TC48c.wav_sw_48-16_BINAURAL_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-16_BINAURAL_JBM5.tst // OMASA 2Dir2TC 1ISM at br sw techs 13.2 to 512 kbps start 24.4 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_IR out, JBM Prof 5 -../IVAS_cod -ism_masa 1 2 testv/stvISM1.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_1ism.bin 48 testv/stvOMASA_1ISM_2MASA2TC48c.wav bit +../IVAS_cod -ism_masa 1 2 testv/stv_20sec_oMASA_1ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_1ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_1ism.bin 48 testv/stv_20sec_oMASA_1ISM_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL_ROOM_IR 48 netsimoutput testv/stvOMASA_1ISM_2MASA2TC48c.wav_BINAURAL_ROOM_IR_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL_ROOM_IR 48 netsimoutput testv/stv_20sec_oMASA_1ISM_varDir2TC.wav_BINAURAL_ROOM_IR_sw_48-48_JBM5.tst // OMASA 2Dir2TC 2ISM at br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 48kHz out, 7.1 out, JBM Prof 5 -../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv NULL testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit +../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv NULL testv/stv_20sec_oMASA_2ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 7_1 48 netsimoutput testv/stvOMASA_2ISM_2MASA2TC48c.wav_7_1_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 7_1 48 netsimoutput testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_7_1_sw_48-48_JBM5.tst // OMASA 2Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 160 kbps, 48kHz in, 48kHz out, MONO out, JBM Prof 5 -../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit +../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 48 netsimoutput testv/stvOMASA_3ISM_2MASA2TC48c.wav_MONO_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 48 netsimoutput testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_MONO_sw_48-48_JBM5.tst // OMASA 2Dir1TC 3ISM at br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 32kHz out, STEREO out, JBM Prof 5 -../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit +../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 32 netsimoutput testv/stvOMASA_3ISM_2MASA1TC48c.wav_STEREO_sw_48-32_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 32 netsimoutput testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_STEREO_sw_48-32_JBM5.tst // OMASA 1Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 24.4 kbps, 32kHz in, 48kHz out, 5.1.2 out, JBM Prof 5 ../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin 32 testv/stvOMASA_3ISM_1MASA2TC32c.wav bit @@ -1703,35 +1703,35 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit ../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 5_1_2 48 netsimoutput testv/stvOMASA_3ISM_1MASA2TC32c.wav_5_1_2_sw_32-48_JBM5.tst // OMASA 1Dir1TC 4ISM at br sw techs 13.2 to 512 kbps start 32 kbps, 48kHz in, 48kHz out, BINAURAL out, JBM Prof 5 -../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit +../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_sw_48-48_JBM5.tst // OMASA 1Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, FOA out, JBM Prof 5 -../IVAS_cod -ism_masa 4 2 NULL testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit +../IVAS_cod -ism_masa 4 2 NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stvOMASA_4ISM_1MASA2TC48c.wav_FOA_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_FOA_sw_48-48_JBM5.tst // OMASA 2Dir2TC 4ISM at 256 kbps, 48kHz in, 48kHz out, EXT out, JBM Prof 5 -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv NULL testv/stvISM4.csv testv/stv2MASA2TC48c.met 256000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 256000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stvOMASA_4ISM_2MASA2TC48c.wav_EXT_256000_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_EXT_256000_48-48_JBM5.tst // OMASA 1Dir1TC 4ISM 48 kbps 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out custom configuration -../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met 48000 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit -../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst +../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met 48000 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit +../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst // OMASA 2Dir2TC 4ISM 48 kbps 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out custom configuration -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 48000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 48000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst // OMASA 2Dir2TC 1ISM at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -ism_masa 1 2 NULL testv/stv2MASA2TC48c.met 13200 48 testv/stvOMASA_1ISM_2MASA2TC48c.wav bit -../IVAS_dec BINAURAL 48 bit testv/stvOMASA_1ISM_2MASA2TC48c.wav_BINAURAL_13200_48-48.tst +../IVAS_cod -ism_masa 1 2 NULL testv/stv_20sec_oMASA_1ISM_varDir2TC.met 13200 48 testv/stv_20sec_oMASA_1ISM_varDir2TC.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv_20sec_oMASA_1ISM_varDir2TC.wav_BINAURAL_13200_48-48.tst // OMASA 1Dir2TC 1ISM at 128 kbps, 48kHz in, 48kHz out, EXT out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -ism_masa 1 2 testv/stvISM1.csv testv/stv1MASA2TC48c.met 128000 48 testv/stvOMASA_1ISM_1MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stvOMASA_1ISM_1MASA2TC48c.wav_EXT_128000_48-48.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -ism_masa 1 2 testv/stv_20sec_oMASA_1ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_1ISM_varDir2TC.met 128000 48 testv/stv_20sec_oMASA_1ISM_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_oMASA_1ISM_varDir2TC.wav_EXT_128000_48-48.tst // OMASA 2Dir1TC 1ISM at 512 kbps, 32kHz in, 48kHz out, 7.1.4 out, FER at 5% ../IVAS_cod -ism_masa 1 1 testv/stvISM1.csv testv/stv2MASA1TC48c.met 512000 32 testv/stvOMASA_1ISM_2MASA1TC32c.wav bit @@ -1743,30 +1743,30 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 5_1 48 bit testv/stvOMASA_2ISM_1MASA1TC16c.wav_5_1_16400_16-48.tst // OMASA 2Dir2TC 2ISM at 32 kbps, 48kHz in, 48kHz out, STEREO out, FER at 5% -../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met 32000 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit +../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_2ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec STEREO 48 bit_error testv/stvOMASA_2ISM_2MASA2TC48c.wav_STEREO_32000_48-48_FER5.tst +../IVAS_dec STEREO 48 bit_error testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_STEREO_32000_48-48_FER5.tst // OMASA 1Dir2TC 2ISM at 256 kbps, 48kHz in, 32kHz out, BINAURAL_ROOM_IR out -../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv NULL testv/stv1MASA2TC48c.met 256000 48 testv/stvOMASA_2ISM_1MASA2TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_IR 32 bit testv/stvOMASA_2ISM_1MASA2TC48c.wav_BINAURAL_ROOM_IR_256000_48-32.tst +../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv NULL testv/stv_20sec_oMASA_2ISM_varDir2TC.met 256000 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit +../IVAS_dec BINAURAL_ROOM_IR 32 bit testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_BINAURAL_ROOM_IR_256000_48-32.tst // OMASA 2Dir1TC 3ISM at 24.4 kbps, 48kHz in, 16kHz out, FOA out, FER at 10% -../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met 24400 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit +../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met 24400 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g192 bit_error -../IVAS_dec FOA 16 bit_error testv/stvOMASA_3ISM_2MASA1TC48c.wav_FOA_24400_48-16_FER10.tst +../IVAS_dec FOA 16 bit_error testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_FOA_24400_48-16_FER10.tst // OMASA 1Dir2TC 3ISM at 32 kbps, 48kHz in, 16kHz out, STEREO out -../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met 32000 48 testv/stvOMASA_3ISM_1MASA2TC48c.wav bit -../IVAS_dec STEREO 16 bit testv/stvOMASA_3ISM_1MASA2TC48c.wav_STEREO_32000_48-16.tst +../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit +../IVAS_dec STEREO 16 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_STEREO_32000_48-16.tst // OMASA 2Dir2TC 3ISM at 32 kbps, 48kHz in, 48kHz out, 5.1.2 out -../IVAS_cod -ism_masa 3 2 NULL NULL NULL testv/stv2MASA2TC48c.met 32000 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit -../IVAS_dec 5_1_2 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_5_1_2_32000_48-48.tst +../IVAS_cod -ism_masa 3 2 NULL NULL NULL testv/stv_20sec_oMASA_3ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit +../IVAS_dec 5_1_2 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_5_1_2_32000_48-48.tst // OMASA 2Dir2TC 3ISM at 48 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met 48000 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit -../IVAS_dec MONO 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_MONO_48000_48-48.tst +../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met 48000 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_MONO_48000_48-48.tst // OMASA 1Dir1TC 3ISM at 64 kbps, 32kHz in, 32kHz out, BINAURAL out ../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA1TC48c.met 64000 32 testv/stvOMASA_3ISM_1MASA1TC32c.wav bit @@ -1777,79 +1777,79 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g ../IVAS_dec 5_1_4 16 bit testv/stvOMASA_3ISM_2MASA2TC32c.wav_5_1_4_80000_32-16.tst // OMASA 2Dir1TC 3ISM at 96 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met 96000 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit -../IVAS_dec MONO 48 bit testv/stvOMASA_3ISM_2MASA1TC48c.wav_MONO_96000_48-48.tst +../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met 96000 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_MONO_96000_48-48.tst // OMASA 1Dir2TC 3ISM at 160 kbps, 16kHz in, 32kHz out, HOA3 out ../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met 160000 16 testv/stvOMASA_3ISM_1MASA2TC16c.wav bit ../IVAS_dec HOA3 32 bit testv/stvOMASA_3ISM_1MASA2TC16c.wav_HOA3_160000_16-32.tst // OMASA 2Dir2TC 4ISM at 13.2 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 13200 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec MONO 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_MONO_13200_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 13200 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_MONO_13200_48-48.tst // OMASA 2Dir1TC 4ISM at 24.4 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA1TC48c.met 24400 48 testv/stvOMASA_4ISM_2MASA1TC48c.wav bit -../IVAS_dec STEREO 48 bit testv/stvOMASA_4ISM_2MASA1TC48c.wav_STEREO_24400_48-48.tst +../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met 24400 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit +../IVAS_dec STEREO 48 bit testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_STEREO_24400_48-48.tst // OMASA 1Dir2TC 4ISM at 32 kbps, 48kHz in, 48kHz out, FOA out, FER at 5% -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met 32000 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec FOA 48 bit_error testv/stvOMASA_4ISM_1MASA2TC48c.wav_FOA_32000_48-48_FER5.tst +../IVAS_dec FOA 48 bit_error testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_FOA_32000_48-48_FER5.tst // OMASA 1Dir1TC 4ISM at 48 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out -../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met 48000 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_48000_48-48.tst +../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met 48000 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_ROOM_REVERB_48000_48-48.tst // OMASA 2Dir2TC 4ISM at 64 kbps, 48kHz in, 48kHz out, HOA2 out -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv NULL NULL testv/stvISM4.csv testv/stv2MASA2TC48c.met 64000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec HOA2 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_HOA2_64000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv NULL NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 64000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec HOA2 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_HOA2_64000_48-48.tst // OMASA 1Dir2TC 4ISM at 80 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met 80000 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit -../IVAS_dec MONO 48 bit testv/stvOMASA_4ISM_1MASA2TC48c.wav_MONO_80000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 80000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_MONO_80000_48-48.tst // OMASA 2Dir2TC 4ISM at 192 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 192000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec STEREO 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_STEREO_192000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 192000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec STEREO 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_STEREO_192000_48-48.tst // OMASA 2Dir2TC 4ISM at 384 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 384000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_EXT_384000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 384000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_EXT_384000_48-48.tst // OMASA 2Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 160 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit -../IVAS_dec MONO 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_MONO_sw_48-48.tst +../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit +../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_MONO_sw_48-48.tst // OMASA 2Dir1TC 3ISM at br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 32kHz out, STEREO out, FER at 10% -../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit +../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g192 bit_error -../IVAS_dec STEREO 32 bit_error testv/stvOMASA_3ISM_2MASA1TC48c.wav_STEREO_sw_48-32_FER10.tst +../IVAS_dec STEREO 32 bit_error testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_STEREO_sw_48-32_FER10.tst // OMASA 1Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 24.4 kbps, 32kHz in, 48kHz out, 5.1.4 out ../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin 32 testv/stvOMASA_3ISM_1MASA2TC32c.wav bit ../IVAS_dec 5_1_4 48 bit testv/stvOMASA_3ISM_1MASA2TC32c.wav_5_1_4_sw_32-48.tst // OMASA 1Dir1TC 4ISM at br sw techs 13.2 to 512 kbps start 32 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 5% -../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit +../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 48 bit_error testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_sw_48-48_FER5.tst +../IVAS_dec BINAURAL 48 bit_error testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_sw_48-48_FER5.tst // OMASA 1Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, HOA3 out -../IVAS_cod -ism_masa 4 2 NULL testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit -../IVAS_dec HOA3 48 bit testv/stvOMASA_4ISM_1MASA2TC48c.wav_HOA3_sw_48-48.tst +../IVAS_cod -ism_masa 4 2 NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec HOA3 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_HOA3_sw_48-48.tst // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_ROOM_REVERB_sw_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_ROOM_REVERB_sw_48-48.tst // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 384 kbps, 48kHz in, 16kHz out, BINAURAL out (Model from file) -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_sw_48-16.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_sw_48-16.tst // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv NULL testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec EXT 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_EXT_sw_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec EXT 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_EXT_sw_48-48.tst // OSBA FOA 1ISM at 32 kbps, 48kHz in, 48kHz out, BINAURAL out @@ -1993,22 +1993,22 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit // OMASA 2Dir2TC 4ISM at 80 kbps, 48kHz in, 48kHz out, BINAURAL out, default object editing, 1SEP-PARAM -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 80000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit -../IVAS_dec -obj_edit NULL BINAURAL 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_80000_48-48_OE.tst +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 80000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_dec -obj_edit NULL BINAURAL 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_80000_48-48_OE.tst // OMASA 2Dir2TC 4ISM at 256 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing, JBM Prof 5, DISC -../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 256000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 256000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_256000_48-48_OE_JBM5.tst +../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_256000_48-48_OE_JBM5.tst // OMASA 2Dir2TC 2ISM at 96 kbps, 48kHz in, 48kHz out, FOA out, object editing, JBM Prof 5, DISC -../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met 96000 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit +../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_2ISM_varDir2TC.met 96000 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stvOMASA_2ISM_2MASA2TC48c.wav_FOA_96000_48-48_OE_JBM5.tst +../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_FOA_96000_48-48_OE_JBM5.tst // OMASA 2Dir2TC 2ISM br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing -../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit -../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt BINAURAL 48 bit testv/stvOMASA_2ISM_2MASA2TC48c.wav_BINAURAL_sw_48-48_OE.tst +../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_2ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit +../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt BINAURAL 48 bit testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_BINAURAL_sw_48-48_OE.tst // OSBA 3OA 4ISM at 256 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_IR out, object editing, DISC ../IVAS_cod -ism_sba 4 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stvOSBA_4ISM_3OA48c.wav bit @@ -2081,8 +2081,8 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit ../IVAS_dec -VOIP_hf_only=1 48 bit testv/stv48c.pcm_EVS_13200_48-48_STEREO_rtpdump.tst // OMASA 2Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 160 kbps, 48kHz in, 48kHz out, BINAURAL out, rtpdump, PI data -../IVAS_cod -rtpdump 3 -scene_orientation testv/headrot_case01_3000_q.csv -device_orientation testv/headrot_case00_3000_q.csv -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit -../IVAS_dec -VOIP_hf_only=1 BINAURAL 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_BINAURAL_sw_48-48_rtpdump_PIdata.tst +../IVAS_cod -rtpdump 3 -scene_orientation testv/headrot_case01_3000_q.csv -device_orientation testv/headrot_case00_3000_q.csv -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit +../IVAS_dec -VOIP_hf_only=1 BINAURAL 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_BINAURAL_sw_48-48_rtpdump_PIdata.tst // OSBA 2ISM 2OA at bitrate switching 13.2 to 512 kbps, 48kHz in, 48kHz out, BINAURAL out, rtpdump, PI data ../IVAS_cod -rtpdump 3 -scene_orientation testv/headrot_case00_3000_q.csv -device_orientation testv/headrot_case03_3000_q.csv -ism_sba 2 2 testv/stvISM1.csv testv/stvISM2.csv ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvOSBA_2ISM_2OA48c.wav bit diff --git a/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m b/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m index 5b746c6fdb..00be0d04bc 100644 --- a/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m +++ b/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m @@ -737,6 +737,19 @@ for fs = [48000 32000 16000] [float_EL, integer_EL, Q_EL, diff] = toInt32(EL); [float_ER, integer_ER, Q_ER, diff] = toInt32(ER); + if (Q_EL ~= Q_ER) + if Q_EL < Q_ER + Q_ER = Q_EL; + else + Q_EL = Q_ER; + end + integer_EL = int32(round(EL * 2.^double(Q_EL))); + float_EL = double(integer_EL) * 2.^single(-Q_EL); + diff = max(max(abs(EL-float_EL))); + integer_ER = int32(round(ER * 2.^double(Q_ER))); + float_ER = double(integer_ER) * 2.^single(-Q_ER); + diff = max(max(abs(ER-float_ER))); + end assert(Q_EL == Q_ER, 'hrir strongly asysmetric, cannot be used'); if dataSpec.genBinaryFile fwrite(fileID, Q_EL, "int16"); diff --git a/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m b/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m index cb49e3e341..eeb96ba854 100644 --- a/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m +++ b/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m @@ -42,9 +42,11 @@ clc dataSpec.hrfInDir = fullfile(pwd, '..','..','binauralRenderer_interface','HRIRs_sofa'); dataSpec.hrfOutDir = fullfile(pwd, '..', 'hrtf_data'); dataSpec.genRomFile = true; + dataSpec.genRomFileFx = false; dataSpec.makeFxFltBE = true; dataSpec.genBinaryFile = true; dataSpec.romOutDir = fullfile(pwd, '..','..','..','lib_rend'); + dataSpec.romOutDir_fx = fullfile(pwd, '..','binauralRenderer_interface'); elseif nargin == 1 % dataSpec.dataBase = varargin{1}.dataBase; % dataSpec.subjId = varargin{1}.subjId; @@ -64,4 +66,7 @@ clc %% load model and generate parameters for IVAS Gen_Hrf_IVAS_Binary(dataSpec, modSpec, info); + if dataSpec.genRomFileFx + Gen_Hrf_IVAS_Binary_fx(dataSpec, modSpec, info); + end end diff --git a/tests/requirements.txt b/tests/requirements.txt index 00100fae88..dc8e76baa8 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,6 @@ pytest>=5.3.5 pytest-xdist>=1.31.0 +pytest-html>=4.0.0 scipy>=1.5.2 numpy>=1.19.2 bitstring>=4.3.1 diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index f2125bcc90..ca7a5143c5 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -260,7 +260,7 @@ def run_full_chain_split_rendering( run_ivas_isar_enc_cmd(enc_cmd) if delay_profile: - rtp_bitstream = ivas_bitstream.with_suffix(".rtpg192") + rtp_bitstream = ivas_bitstream.with_suffix(".netsimout") netsim_cmd = [ str(TOOLS_DIR / f"networkSimulator_g192{EXE_SUFFIX}"), str(delay_profile), -- GitLab From f01745554b1eac5bd1f15fd6bfe9826c735090e2 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 6 Nov 2025 15:47:37 +0100 Subject: [PATCH 3/3] Revert "merge" This reverts commit 54f0b37b7da285e2dfe3f88fb71fc78db4a4b73c. --- ivas_be_conf_test_gen.sh | 42 + lib_com/options.h | 4 - .../binauralRenderer_interface/CMakeLists.txt | 9 +- .../ivas_binaural_custom_16kHz.bin | 4 +- .../ivas_binaural_custom_32kHz.bin | 4 +- .../ivas_binaural_custom_48kHz.bin | 4 +- .../brir_low_complexity_optim.cfg | 6 +- .../clearButKeepNeededVariables.m | 2 +- .../fastconv/generate_BRIR_CLDFB_FASTCONV.m | 5 +- .../fastconv/generate_tables_for_fastconv.m | 46 +- .../fastconv/get_ivas_binary_header.m | 4 +- .../fastconv/write_fastconv_rom_table_fx.m | 78 +- .../generate_crend_ivas_tables_from_sofa.c | 1242 ++--------------- ...erate_ivas_binauralizer_tables_from_sofa.m | 71 +- ...zer_tables_from_sofa_test_other_database.m | 197 +-- .../ivas_crend_binaural_filter_design.c | 11 - .../matlab_hrir_generation_scripts/SD_2_ROM.m | 8 +- .../SHD_2_ROM.m | 8 +- .../SOFA_save_to_mat.m | 3 +- .../convert_SD2SHD_HRIRs.m | 8 +- .../generate_HOA_HRIRs_MOD_lens.m | 4 +- .../generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m | 19 +- .../generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m | 4 +- ...erate_tables_for_parametric_binauralizer.m | 144 +- scripts/config/self_test.prm | 480 +++---- .../modeling_tool/Gen_Hrf_IVAS_Binary.m | 13 - .../modeling_tool/Mod_Hrf_Itd_Main.m | 5 - tests/requirements.txt | 1 - tests/split_rendering/utils.py | 2 +- 29 files changed, 643 insertions(+), 1785 deletions(-) create mode 100644 ivas_be_conf_test_gen.sh diff --git a/ivas_be_conf_test_gen.sh b/ivas_be_conf_test_gen.sh new file mode 100644 index 0000000000..2536de1f89 --- /dev/null +++ b/ivas_be_conf_test_gen.sh @@ -0,0 +1,42 @@ +make -f Makefile clean +make -f Makefile -j CLANG=0 +cp IVAS_cod IVAS_cod_ref +cp IVAS_dec IVAS_dec_ref +cp IVAS_rend IVAS_rend_ref +cp ISAR_post_rend ISAR_post_rend_ref +python3 scripts/prepare_combined_format_inputs.py +python3 -m pytest -q tests/codec_be_on_mr_nonselection tests/renderer_short/test_renderer.py tests/split_rendering/test_split_rendering.py -v -n auto --update_ref 1 --create_ref --keep_files --html=report_cmd.html --self-contained-html +python3 scripts/parse_commands.py report_cmd.html Readme_IVAS.txt +rm -rf testvec +mkdir testvec +mkdir testvec/binauralRenderer_interface +mkdir testvec/testv +mkdir testvec/testv/renderer_short +mkdir testvec/testv/split_rendering +mkdir testvec/bin +cp -r scripts/testv/* testvec/testv +cp -r scripts/ls_layouts testvec +cp -r scripts/object_edit testvec +cp -r scripts/switchPaths testvec +cp -r scripts/trajectories testvec +cp -r scripts/binauralRenderer_interface/binaural_renderers_hrtf_data testvec/binauralRenderer_interface +cp -r tests/ref testvec/testv/ref +cp -r tests/renderer_short/ref testvec/testv/renderer_short/ref +cp -r tests/split_rendering/ref testvec/testv/split_rendering/ref +cp -r tests/split_rendering/renderer_configs testvec/testv/split_rendering/renderer_configs +cp -r tests/split_rendering/error_patterns testvec/testv/split_rendering/error_patterns + +python3 scripts/cleanup_26252.py + +cp -r tests/conformance-test testvec/ +cp Readme_IVAS_dec.txt testvec +cp Readme_IVAS_enc.txt testvec +cp Readme_IVAS_rend.txt testvec +cp Readme_IVAS_JBM_dec.txt testvec +cp Readme_IVAS_ISAR_dec.txt testvec +cp Readme_IVAS_ISAR_post_rend.txt testvec + +cp IVAS_cod testvec/bin +cp IVAS_dec testvec/bin +cp IVAS_rend testvec/bin +cp ISAR_post_rend testvec/bin diff --git a/lib_com/options.h b/lib_com/options.h index 9987545b97..a1ba22df99 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -189,12 +189,8 @@ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS /* FhG: fix non-BE in DFT stereo encoder between optimization levels */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 /* FhG: fix even more non-BEnesses */ -<<<<<<< HEAD /*#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP*/ /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ #define FIX_1330_JBM_MEMORY_FIX /* VA: basop issue: 2179 fix non-BE difference in FIX_1330_JBM_MEMORY */ -======= -#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ ->>>>>>> remotes/origin/main #define NONBE_1380_OMASA_BUILD_DIFF /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */ /* ##################### End NON-BE switches ########################### */ diff --git a/scripts/binauralRenderer_interface/CMakeLists.txt b/scripts/binauralRenderer_interface/CMakeLists.txt index 2a2ba13d35..5864adf58e 100644 --- a/scripts/binauralRenderer_interface/CMakeLists.txt +++ b/scripts/binauralRenderer_interface/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.5) project(generate_crend_ivas_tables) @@ -71,13 +71,6 @@ set(SOURCE_FILES_H ${IVAS_TRUNK_REND_PATH}/ivas_rom_rend.h ) -# require to be bit exact with main branch -if(MSVC) - add_compile_options("/fp:precise") -else() - add_compile_options("-ffp-contract=off") -endif() - add_library(${PROJECT_NAME}_lib STATIC ${SOURCE_FILES_C} ${SOURCE_FILES_H}) add_executable(${PROJECT_NAME} generate_crend_ivas_tables_from_sofa.c) diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin index a9b2998241..c423932724 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af5ce183c25940d74fb42203e9ee2727a7ef20b5a19e45c28a36b4dfee8c5fa7 -size 826672 +oid sha256:8b938fe3032ef8587a054cebeddc3ad112f57a432dba8796769c3e703e8b1631 +size 897948 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin index c09bc1f557..da7feb7102 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efdb397c01b6ff225b1e0f4f855c3e2a1d02df5a9f6edf2aa1b504bca498df8a -size 958940 +oid sha256:3ae00c9af63642234cc2123c469bf675040f6ef871436b7738ee2d6b47124bde +size 1066176 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin index 95dee97f34..90fba58890 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_custom_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fac6547ae0c906c75866c194675adbdd840f933435950e18245c4b667c531061 -size 1077628 +oid sha256:5aeb1c04b60ac119bd2415238f979810f6f3a27ff25a95a43cea37c02d86d6a9 +size 1184160 diff --git a/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg b/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg index 4d7eeeb761..4869082f51 100644 --- a/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg +++ b/scripts/binauralRenderer_interface/brir_low_complexity_optim.cfg @@ -3,10 +3,10 @@ optimize = true; harmonizeLateReverbBinauralGain = false; lateReverbCompensationGain = [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]; directCutOffFreqThreshold = -15; -diffuseCutOffFreqThreshold = -30; +diffuseCutOffFreqThreshold = -10; directEnergyThreshold = -15; diffuseEnergyThreshold = -30; beginEnergyThreshold = -50; endEnergyThreshold = -120; -maxNumDirectBlocks = 1; -maxNumDiffuseBlocks = 60; \ No newline at end of file +maxNumDirectBlocks = 40; +maxNumDiffuseBlocks = 40; \ No newline at end of file diff --git a/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m b/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m index b02b810409..ba02ecccfb 100644 --- a/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m +++ b/scripts/binauralRenderer_interface/clearButKeepNeededVariables.m @@ -1 +1 @@ -clear -regexp ^((?!writeRomFileOutput|makeBE|performDiffuseFieldEq|normalize|writeBinaryOutput|writeRomFileFx|makeFxFltBE|generateBinaryFile|generateCustomBinaryFile|writeEachRendererBinaryOutput|fx_rom_file|rom_file|bin_file|hrir_file|brir_file|ivas_path|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name|rom_path).)*$ +clear -regexp ^((?!writeRomFileOutput|writeBinaryOutput|generateBinaryFile|generateCustomBinaryFile|writeEachRendererBinaryOutput|rom_file|bin_file|hrir_file|brir_file|ivas_path|binary_path|output_bin_name|param_bin_file|fastconv_bin_file|td_binary_file|binary_name|rom_path).)*$ diff --git a/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m b/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m index 25a2b81492..63f10f42e5 100644 --- a/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m +++ b/scripts/binauralRenderer_interface/fastconv/generate_BRIR_CLDFB_FASTCONV.m @@ -51,7 +51,7 @@ if isfolder("../matlab_hrir_generation_scripts") addpath("../matlab_hrir_generation_scripts"); end sofaData = hrtf_library_loader(); -sofaData.readSOFA(char(sofa_file),'Combined',false); +sofaData.readSOFA(char(sofa_file),'Combined',true); ls_struct = get_ls_layout_config('Combined'); IR = permute(sofaData.Data.IR(:,:,:), [3 2 1]) ; @@ -142,9 +142,6 @@ end % Step 3: Compute EDC (Energy Decay Curve) in_struct.num_bands = size(IR_cldfb,1); in_struct.timeSlots = size(IR_cldfb,2); - -in_struct.max_index = in_struct.timeSlots; % Needs to be changed according to IRs - if in_struct.max_index > in_struct.timeSlots in_struct.max_index = in_struct.timeSlots; end diff --git a/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m b/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m index 54563a696c..2a5d79bc45 100644 --- a/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m +++ b/scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m @@ -46,9 +46,6 @@ end if ~exist("writeRomFileOutput",'var') writeRomFileOutput = true; end -if ~exist("normalize",'var') - normalize = true; -end if ~exist("writeRomFileFx",'var') writeRomFileFx = false; end @@ -64,9 +61,6 @@ end if ~exist("rom_file",'var') rom_file = fullfile('.', 'ivas_rom_binauralRenderer.c'); end -if ~exist("fx_rom_file",'var') - fx_rom_file = fullfile('.', 'ivas_rom_binauralRenderer_fx.c'); -end if ~exist("bin_file",'var') bin_file = fullfile('.', 'fastconv_rom.bin'); end @@ -85,39 +79,34 @@ end %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SHD) if generateCustomBinaryFile disp('Processing HRIRs (FOA) for FastConv renderer...'); - FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, -1, 5, normalize); + FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, -1); disp('Processing HRIRs (HOA2) for FastConv renderer...'); - FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, -1, 5, normalize); + FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, -1); disp('Processing HRIRs (HOA3) for FastConv renderer...'); - FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, -1, 5, normalize); - - %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SD) - disp('Processing HRIRs (SD) for FastConv renderer...'); - FastConv_SD_IR_float = SD_2_ROM(hrir_file, 5, normalize); + FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, -1); else disp('Processing HRIRs (FOA) for FastConv renderer...'); - FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, 128,3, normalize); + FastConv_SHD_IR_FOA_float = SHD_2_ROM(hrir_file, 1, 128); disp('Processing HRIRs (HOA2) for FastConv renderer...'); - FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, 128, 3,normalize); + FastConv_SHD_IR_HOA2_float = SHD_2_ROM(hrir_file, 2, 128); disp('Processing HRIRs (HOA3) for FastConv renderer...'); - FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, 128,3, normalize); - - %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SD) - disp('Processing HRIRs (SD) for FastConv renderer...'); - FastConv_SD_IR_float = SD_2_ROM(hrir_file,3,normalize); + FastConv_SHD_IR_HOA3_float = SHD_2_ROM(hrir_file, 3, 128); end +%% Generate C-code tables for RENDERER_BINAURAL_FASTCONV (SD) +disp('Processing HRIRs (SD) for FastConv renderer...'); +FastConv_SD_IR_float = SD_2_ROM(hrir_file); %% Generate C-code tables for RENDERER_BINAURAL_FASTCONV_ROOM (SD) disp('Processing BRIRs (SD) for FastConv renderer...'); FastConv_SD_BRIR_float = generate_BRIR_CLDFB_FASTCONV(brir_file); -if generateCustomBinaryFile == false - FastConv_SD_BRIR_float.rev_param.rt60 = [0.420013, 0.206696, 0.203613, 0.207458, 0.217255, 0.236176, 0.230164, 0.228912, 0.228210, 0.219788, 0.225983, 0.220184, 0.222015, 0.223114, 0.223572, 0.227478, 0.227905, 0.223450, 0.219910, 0.218597, 0.220428, 0.218262, 0.213257, 0.210327, 0.207428, 0.198761, 0.196259, 0.194916, 0.190338, 0.184509, 0.180328, 0.176178, 0.176514, 0.177582, 0.183594, 0.195923, 0.203247, 0.208405, 0.214661, 0.220001, 0.222931, 0.230408, 0.233917, 0.233643, 0.236328, 0.237427, 0.241638, 0.241119, 0.238861, 0.242371, 0.247253, 0.245941, 0.248566, 0.245392, 0.243958, 0.244110, 0.239014, 0.241791, 0.234833, 0.253052]; - FastConv_SD_BRIR_float.rev_param.nrgLr = [0.000579833984, 0.000213623047, 0.000244140625, 0.000213623047, 0.000244140625, 0.00152587891, 0.00115966797, 0.00109863281, 0.0012512207, 0.00131225586, 0.00231933594, 0.00244140625, 0.00268554688, 0.00271606445, 0.00262451172, 0.00256347656, 0.00274658203, 0.00271606445, 0.00259399414, 0.00253295898, 0.00341796875, 0.00177001953, 0.0009765625, 0.000701904296, 0.000610351563, 0.000549316406, 0.000518798828, 0.000579833984, 0.000610351563, 0.000549316406, 0.0012512207, 0.00122070313, 0.000946044921, 0.000610351563, 0.000274658203, 0.0000915527343, 0.0000610351563, 0.0000610351563, 0.0000305175781, 0.0000305175781, 0.0000305175781, 0.0000305175781, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +if generateCustomBinaryFile == true + FastConv_SD_BRIR_float.rev_param.rt60 = FastConv_SD_BRIR_float.rev_param.rt60 * 2; + FastConv_SD_BRIR_float.rev_param.nrgLr = FastConv_SD_BRIR_float.rev_param.nrgLr * 2; end %% compute scaling factor and set floating point precision to int16_t @@ -141,11 +130,14 @@ FastConv_SD_BRIR = FastConv_SD_BRIR_float; [FastConv_SD_BRIR.rev_param.nrgLr, FastConv_SD_BRIR.rev_param.factorQ_nrgLr] = make_be_with_fx(FastConv_SD_BRIR_float.rev_param.nrgLr,15); if writeRomFileOutput - write_fastconv_rom_table_fx(fx_rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); - if makeFxFltBE - write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); + if writeRomFileFx + write_fastconv_rom_table_fx(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); else - write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA_float, FastConv_SHD_IR_HOA2_float, FastConv_SHD_IR_HOA3_float, FastConv_SD_IR_float, FastConv_SD_BRIR_float); + if makeFxFltBE + write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA, FastConv_SHD_IR_HOA2, FastConv_SHD_IR_HOA3, FastConv_SD_IR, FastConv_SD_BRIR); + else + write_fastconv_rom_table_flt(rom_file, FastConv_SHD_IR_FOA_float, FastConv_SHD_IR_HOA2_float, FastConv_SHD_IR_HOA3_float, FastConv_SD_IR_float, FastConv_SD_BRIR_float); + end end end diff --git a/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m b/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m index 9838f42ddb..ae7eac29b0 100644 --- a/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m +++ b/scripts/binauralRenderer_interface/fastconv/get_ivas_binary_header.m @@ -66,8 +66,8 @@ else error('Renderer type could not be matched to IVAS enum values!'); end -%ivas_cnst_path = fullfile(ivas_path, 'lib_com/ivas_cnst.h'); % must be replaced if this file is moved -c = fileread(hrtf_file_reader_path); +ivas_cnst_path = fullfile(ivas_path, 'lib_com/ivas_cnst.h'); % must be replaced if this file is moved +c = fileread(ivas_cnst_path); % regex for BINAURAL_INPUT_AUDIO_CONFIG ic_expr = '^\s+(BINAURAL_INPUT\w+)'; diff --git a/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m b/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m index e50caec29b..f7a5d35fa9 100644 --- a/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m +++ b/scripts/binauralRenderer_interface/fastconv/write_fastconv_rom_table_fx.m @@ -44,57 +44,57 @@ function write_fastconv_rom_table_fx(output_file, FastConv_SHD_IR_FOA, FastConv_ %% HRIRs (SHD) % HOA3 FastConv_SHD_IR_HOA3.IR = FastConv_SHD_IR_HOA3.IR .* (2.^double(FastConv_SHD_IR_HOA3.factorQ)); - fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA3.order '_latency_s_fx = %d;\n'], FastConv_SHD_IR_HOA3.latency_s_factorQ); - fprintf(fid, ['const Word32 FASTCONV_' FastConv_SHD_IR_HOA3.order '_latency_s_fx = %ld;\n'], FastConv_SHD_IR_HOA3.latency_s * (2.^double(FastConv_SHD_IR_HOA3.latency_s_factorQ))); - fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA3.order '_fx= %d;\n'], FastConv_SHD_IR_HOA3.factorQ); - writeData3L(fid, ['const Word16 leftHRIRReal_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d', real(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); - writeData3L(fid, ['const Word16 leftHRIRImag_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); - writeData3L(fid, ['const Word16 rightHRIRReal_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); - writeData3L(fid, ['const Word16 rightHRIRImag_' FastConv_SHD_IR_HOA3.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); + fprintf(fid, ['const int16_t FASTCONV_' FastConv_SHD_IR_HOA3.order '_latency_s_factorQ = %d;\n'], FastConv_SHD_IR_HOA3.latency_s_factorQ); + fprintf(fid, ['const int32_t FASTCONV_' FastConv_SHD_IR_HOA3.order '_latency_s = %ld;\n'], FastConv_SHD_IR_HOA3.latency_s * (2.^double(FastConv_SHD_IR_HOA3.latency_s_factorQ))); + fprintf(fid, ['const int16_t FASTCONV_HRIR_' FastConv_SHD_IR_HOA3.order '_factorQ = %d;\n'], FastConv_SHD_IR_HOA3.factorQ); + writeData3L(fid, ['const int16_t leftHRIRReal_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d', real(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); + writeData3L(fid, ['const int16_t leftHRIRImag_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(1,:,:,:)))); + writeData3L(fid, ['const int16_t rightHRIRReal_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); + writeData3L(fid, ['const int16_t rightHRIRImag_' FastConv_SHD_IR_HOA3.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA3.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA3.IR(2,:,:,:)))); % HOA2 FastConv_SHD_IR_HOA2.IR = FastConv_SHD_IR_HOA2.IR .* (2.^double(FastConv_SHD_IR_HOA2.factorQ)); - fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA2.order '_latency_s_fx = %d;\n'], FastConv_SHD_IR_HOA2.latency_s_factorQ); - fprintf(fid, ['const Word32 FASTCONV_' FastConv_SHD_IR_HOA2.order '_latency_s_fx = %ld;\n'], FastConv_SHD_IR_HOA2.latency_s * (2.^double(FastConv_SHD_IR_HOA2.latency_s_factorQ))); - fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_HOA2.order '_fx = %d;\n'], FastConv_SHD_IR_HOA2.factorQ); - writeData3L(fid, ['const Word16 leftHRIRReal_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); - writeData3L(fid, ['const Word16 leftHRIRImag_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); - writeData3L(fid, ['const Word16 rightHRIRReal_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'],'%d', real(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); - writeData3L(fid, ['const Word16 rightHRIRImag_' FastConv_SHD_IR_HOA2.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); + fprintf(fid, ['const int16_t FASTCONV_' FastConv_SHD_IR_HOA2.order '_latency_s_factorQ = %d;\n'], FastConv_SHD_IR_HOA2.latency_s_factorQ); + fprintf(fid, ['const int32_t FASTCONV_' FastConv_SHD_IR_HOA2.order '_latency_s = %ld;\n'], FastConv_SHD_IR_HOA2.latency_s * (2.^double(FastConv_SHD_IR_HOA2.latency_s_factorQ))); + fprintf(fid, ['const int16_t FASTCONV_HRIR_' FastConv_SHD_IR_HOA2.order '_factorQ = %d;\n'], FastConv_SHD_IR_HOA2.factorQ); + writeData3L(fid, ['const int16_t leftHRIRReal_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); + writeData3L(fid, ['const int16_t leftHRIRImag_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(1,:,:,:)))); + writeData3L(fid, ['const int16_t rightHRIRReal_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'],'%d', real(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); + writeData3L(fid, ['const int16_t rightHRIRImag_' FastConv_SHD_IR_HOA2.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_HOA2.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_HOA2.IR(2,:,:,:)))); % FOA FastConv_SHD_IR_FOA.IR = FastConv_SHD_IR_FOA.IR .* (2.^double(FastConv_SHD_IR_FOA.factorQ)); - fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_FOA.order '_latency_s_fx = %d;\n'], FastConv_SHD_IR_FOA.latency_s_factorQ); - fprintf(fid, ['const Word32 FASTCONV_' FastConv_SHD_IR_FOA.order '_latency_s_fx = %ld;\n'], FastConv_SHD_IR_FOA.latency_s * (2.^double(FastConv_SHD_IR_FOA.latency_s_factorQ))); - fprintf(fid, ['const Word16 FASTCONV_factor_Q_' FastConv_SHD_IR_FOA.order '_fx = %d;\n'], FastConv_SHD_IR_FOA.factorQ); - writeData3L(fid, ['const Word16 leftHRIRReal_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); - writeData3L(fid, ['const Word16 leftHRIRImag_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); - writeData3L(fid, ['const Word16 rightHRIRReal_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); - writeData3L(fid, ['const Word16 rightHRIRImag_' FastConv_SHD_IR_FOA.order '_fx[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); + fprintf(fid, ['const int16_t FASTCONV_' FastConv_SHD_IR_FOA.order '_latency_s_factorQ = %d;\n'], FastConv_SHD_IR_FOA.latency_s_factorQ); + fprintf(fid, ['const int32_t FASTCONV_' FastConv_SHD_IR_FOA.order '_latency_s = %ld;\n'], FastConv_SHD_IR_FOA.latency_s * (2.^double(FastConv_SHD_IR_FOA.latency_s_factorQ))); + fprintf(fid, ['const int16_t FASTCONV_HRIR_' FastConv_SHD_IR_FOA.order '_factorQ = %d;\n'], FastConv_SHD_IR_FOA.factorQ); + writeData3L(fid, ['const int16_t leftHRIRReal_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); + writeData3L(fid, ['const int16_t leftHRIRImag_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(1,:,:,:)))); + writeData3L(fid, ['const int16_t rightHRIRReal_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',real(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); + writeData3L(fid, ['const int16_t rightHRIRImag_' FastConv_SHD_IR_FOA.order '[BINAURAL_CONVBANDS][' FastConv_SHD_IR_FOA.order '_CHANNELS][BINAURAL_NTAPS_SBA]'], '%d',imag(squeeze(FastConv_SHD_IR_FOA.IR(2,:,:,:)))); %% HRIRs (SD) FastConv_SD_IR.IR = FastConv_SD_IR.IR .* (2.^double(FastConv_SD_IR.factorQ)); - fprintf(fid, 'const Word16 FASTCONV_factor_Q_HRIR_latency_s_fx = %d;\n', FastConv_SD_IR.latency_s_factorQ); - fprintf(fid, 'const Word32 FASTCONV_HRIR_latency_s_fx = %ld;\n', FastConv_SD_IR.latency_s * (2.^double(FastConv_SD_IR.latency_s_factorQ))); - fprintf(fid, 'const Word16 FASTCONV_factor_Q_HRIR_fx = %d;\n', FastConv_SD_IR.factorQ); - writeData3L(fid, 'const Word16 leftHRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); - writeData3L(fid, 'const Word16 leftHRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); - writeData3L(fid, 'const Word16 rightHRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); - writeData3L(fid, 'const Word16 rightHRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); + fprintf(fid, 'const int16_t FASTCONV_HRIR_latency_s_factorQ = %d;\n', FastConv_SD_IR.latency_s_factorQ); + fprintf(fid, 'const int32_t FASTCONV_HRIR_latency_s = %ld;\n', FastConv_SD_IR.latency_s * (2.^double(FastConv_SD_IR.latency_s_factorQ))); + fprintf(fid, 'const int16_t FASTCONV_HRIR_factorQ = %d;\n', FastConv_SD_IR.factorQ); + writeData3L(fid, 'const int16_t leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); + writeData3L(fid, 'const int16_t leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(1,:,:,:)))); + writeData3L(fid, 'const int16_t rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',real(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); + writeData3L(fid, 'const int16_t rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]', '%d',imag(squeeze(FastConv_SD_IR.IR(2,:,:,:)))); %% BRIRs (SD) fprintf(fid, '/* Binaural rendering data set based on BRIRs \n'); fprintf(fid, ' * Tables derived from Mozart IIS BRIRs.*/\n'); FastConv_SD_BRIR.IR = FastConv_SD_BRIR.IR .* (2.^double(FastConv_SD_BRIR.factorQ)); - fprintf(fid, 'const Word16 FASTCONV_factor_Q_BRIR_latency_s_fx = %d;\n', FastConv_SD_BRIR.rev_param.latency_s_factorQ); - fprintf(fid, 'const Word32 FASTCONV_BRIR_latency_s_fx = %ld;\n', FastConv_SD_BRIR.rev_param.latency_s * (2.^double(FastConv_SD_BRIR.rev_param.latency_s_factorQ))); - fprintf(fid, 'const Word16 FASTCONV_factor_Q_BRIR_fx= %d;\n', FastConv_SD_BRIR.factorQ); - writeData3L(fid, 'const Word16 leftBRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); - writeData3L(fid, 'const Word16 leftBRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]', '%d',imag(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); - writeData3L(fid, 'const Word16 rightBRIRReal_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); - writeData3L(fid, 'const Word16 rightBRIRImag_fx[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', imag(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + fprintf(fid, 'const int16_t FASTCONV_BRIR_latency_s_factorQ = %d;\n', FastConv_SD_BRIR.rev_param.latency_s_factorQ); + fprintf(fid, 'const int32_t FASTCONV_BRIR_latency_s = %ld;\n', FastConv_SD_BRIR.rev_param.latency_s * (2.^double(FastConv_SD_BRIR.rev_param.latency_s_factorQ))); + fprintf(fid, 'const int16_t FASTCONV_BRIR_factorQ = %d;\n', FastConv_SD_BRIR.factorQ); + writeData3L(fid, 'const int16_t leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + writeData3L(fid, 'const int16_t leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]', '%d',imag(squeeze(FastConv_SD_BRIR.IR(1,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + writeData3L(fid, 'const int16_t rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', real(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); + writeData3L(fid, 'const int16_t rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]','%d', imag(squeeze(FastConv_SD_BRIR.IR(2,:,:,1:FastConv_SD_BRIR.rev_param.NFilter)))); % RT60 - fprintf(fid, 'const Word16 FASTCONV_factor_Q_reverberationTimes_fx = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_rt60); - fprintf(fid,'const Word16 fastconvReverberationTimes_fx[CLDFB_NO_CHANNELS_MAX] = \n{'); + fprintf(fid, 'const int16_t fastconvReverberationTimes_factorQ = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_rt60); + fprintf(fid,'const int16_t fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX] = \n{'); fprintf(fid,'\n '); FastConv_SD_BRIR.rev_param.rt60 = FastConv_SD_BRIR.rev_param.rt60 .* (2.^double(FastConv_SD_BRIR.rev_param.factorQ_rt60)); for bandIdx = 1:FastConv_SD_BRIR.rev_param.kAna @@ -104,8 +104,8 @@ function write_fastconv_rom_table_fx(output_file, FastConv_SHD_IR_FOA, FastConv_ fprintf(fid,'\n\n'); % energyReverb - fprintf(fid, 'const Word16 FASTCONV_factor_Q_reverberationEneCorrections_fx = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_nrgLr); - fprintf(fid,'const Word16 fastconvReverberationEneCorrections_fx[CLDFB_NO_CHANNELS_MAX] = \n{'); + fprintf(fid, 'const int16_t fastconvReverberationEneCorrections_factorQ = %d;\n', FastConv_SD_BRIR.rev_param.factorQ_nrgLr); + fprintf(fid,'const int16_t fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = \n{'); fprintf(fid,'\n '); FastConv_SD_BRIR.rev_param.nrgLr = FastConv_SD_BRIR.rev_param.nrgLr .* (2.^double(FastConv_SD_BRIR.rev_param.factorQ_nrgLr)); for bandIdx = 1:FastConv_SD_BRIR.rev_param.kAna diff --git a/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c b/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c index 1bd9b1cadd..67911ad5b8 100644 --- a/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c +++ b/scripts/binauralRenderer_interface/generate_crend_ivas_tables_from_sofa.c @@ -74,6 +74,8 @@ #define TEMPLTATE_C_ROM_FILE_NAME "ivas_license_header.template" #define ROM_FILE_NAME "ivas_rom_binaural_crend_head" #define FORMAT_FLOAT "%a" +#define FORMAT_FLOAT_REVERB "%a" +#define FORMAT_FLOAT_LATENCY "%a" #define NUM_SAMPLES_PER_LINES 96 #define NUM_SAMPLES_PER_LINES_REVERB 9 #define DECLARATION_NAME "CRendBin" @@ -88,8 +90,6 @@ #define DEFAULT_BINARY_FILE_PATH "./bin" #endif -#define MAX_CICP_CHANNELS 16 - /* ------------------------------------------------------------------------------------------ * Struct *------------------------------------------------------------------------------------------ */ @@ -129,12 +129,8 @@ void get_ls_layout_config( AUDIO_CONFIG ls_layout_config, struct ivas_layout_con int generate_crend_ivas_tables_from_sofa( const char *sofa_file_path, ConfigReader *cfgReader ); void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len ); void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ); -void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, const int32_t samplerate, const int16_t len ); +void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ); void update_h_file_with_reverb( const int32_t samplerate ); -void update_h_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len ); -void update_c_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ); -void update_c_file_with_reverb_fx( int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ); -void update_h_file_with_reverb_fx( const int32_t samplerate ); int generate_reverb_ivas_tables_from_sofa( const char *file_path ); extern int32_t float2int32_t( float, int16_t ); @@ -232,14 +228,11 @@ void usage_gen_crend_tables( void ) int32_t frame = 0; /* Counter of frames */ char *c_file_path = NULL; char *h_file_path = NULL; -char *c_file_path_fx = NULL; -char *h_file_path_fx = NULL; char *rom_file_name = NULL; uint16_t frame_len_ms = 5; int32_t sample_rates[3] = { DEFAULT_SAMPLERATE, 32000, LAST_SAMPLERATE }; /* Hz */ /* 8000 Hz not supported by mdft */ char *binary_file_path = NULL; char *lib_rend_path = NULL; -char *lib_rend_path_fx = NULL; /*------------------------------------------------------------------------------------------* * Standalone Renderer program @@ -266,7 +259,6 @@ int main( int argc, char *argv[] ) char *sofa_file_path_for_reverb = NULL; bool add_define = false; int notEndingWithFileSeparator = 0; - int notEndingWithFileSeparator_fx = 0; char *sofa_name = NULL; int i; @@ -305,21 +297,6 @@ int main( int argc, char *argv[] ) notEndingWithFileSeparator = ( ( argv[i][strlen( argv[i] ) - 1] == '\\' ) || ( ( argv[i][strlen( argv[i] ) - 1] == '/' ) ) ) ? 0 : 1; i++; } - else if ( strcmp( to_upper( argv[i] ), "-LIB_REND_PATH_FX" ) == 0 ) - { - i++; - if ( strlen( argv[i] ) == 0 ) - { - fprintf( stderr, "Wrong lib_rend path: %s\n\n", argv[i] ); - usage_gen_crend_tables(); - return -1; - } - lib_rend_path_fx = malloc( strlen( argv[i] ) + 1 ); - convert_backslash( argv[i] ); - strcpy( lib_rend_path_fx, argv[i] ); - notEndingWithFileSeparator_fx = ( ( argv[i][strlen( argv[i] ) - 1] == '\\' ) || ( ( argv[i][strlen( argv[i] ) - 1] == '/' ) ) ) ? 0 : 1; - i++; - } else if ( strcmp( to_upper( argv[i] ), "-COMPUTE_REVERB_ROM" ) == 0 ) { i++; @@ -400,8 +377,6 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -418,8 +393,6 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -441,8 +414,6 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -478,18 +449,8 @@ int main( int argc, char *argv[] ) { fprintf( stderr, "Memory issue for c file path\n\n" ); usage_gen_crend_tables(); - if ( c_file_path ) - free( c_file_path ); - if ( h_file_path ) - free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -501,20 +462,12 @@ int main( int argc, char *argv[] ) fp = fopen( c_file_path, "w" ); if ( fp == NULL ) { - fprintf( stderr, "Wrong lib_rend path: %s\n\n", c_file_path ); + fprintf( stderr, "Wrong lib_rend path: %s\n\n", lib_rend_path ); usage_gen_crend_tables(); if ( c_file_path ) free( c_file_path ); - if ( h_file_path ) - free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -551,16 +504,8 @@ int main( int argc, char *argv[] ) usage_gen_crend_tables(); if ( c_file_path ) free( c_file_path ); - if ( h_file_path ) - free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -572,162 +517,14 @@ int main( int argc, char *argv[] ) fp = fopen( h_file_path, "w" ); if ( fp == NULL ) { - fprintf( stderr, "Wrong lib_rend path: %s\n\n", h_file_path ); - usage_gen_crend_tables(); - if ( c_file_path ) - free( c_file_path ); - if ( h_file_path ) - free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); - if ( lib_rend_path ) - free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); - if ( binary_path ) - free( binary_path ); - if ( binary_common_file_name ) - free( binary_common_file_name ); - if ( sofa_file_path_for_reverb ) - free( sofa_file_path_for_reverb ); - return -1; - } - fclose( fp ); - - c_file_path_fx = (char *) malloc( sizeof( char ) * ( strlen( lib_rend_path_fx ) + strlen( ROM_FILE_NAME ) + 2 + 1 + 3 + notEndingWithFileSeparator_fx ) ); - if ( c_file_path_fx ) - { - if ( notEndingWithFileSeparator_fx ) - { -#ifdef WIN32 - sprintf( c_file_path_fx, "%s\\%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); -#else - sprintf( c_file_path_fx, "%s/%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); -#endif - } - else - { -#ifdef WIN32 - sprintf( c_file_path_fx, "%s%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); -#else - sprintf( c_file_path_fx, "%s%s_fx.c", lib_rend_path_fx, ROM_FILE_NAME ); -#endif - } - } - else - { - fprintf( stderr, "Memory issue for c file path\n\n" ); - usage_gen_crend_tables(); - if ( c_file_path ) - free( c_file_path ); - if ( h_file_path ) - free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); - if ( lib_rend_path ) - free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); - if ( binary_path ) - free( binary_path ); - if ( binary_common_file_name ) - free( binary_common_file_name ); - if ( sofa_file_path_for_reverb ) - free( sofa_file_path_for_reverb ); - return -1; - } - fp = fopen( c_file_path_fx, "w" ); - if ( fp == NULL ) - { - fprintf( stderr, "Wrong lib_rend_fx path: %s\n\n", c_file_path_fx ); - usage_gen_crend_tables(); - if ( c_file_path ) - free( c_file_path ); - if ( h_file_path ) - free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); - if ( lib_rend_path ) - free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); - if ( binary_path ) - free( binary_path ); - if ( binary_common_file_name ) - free( binary_common_file_name ); - if ( sofa_file_path_for_reverb ) - free( sofa_file_path_for_reverb ); - return -1; - } - fclose( fp ); - - h_file_path_fx = (char *) malloc( sizeof( char ) * ( strlen( lib_rend_path_fx ) + strlen( ROM_FILE_NAME ) + 2 + 1 + 3 + notEndingWithFileSeparator_fx ) ); - if ( h_file_path_fx ) - { - if ( notEndingWithFileSeparator_fx ) - { -#ifdef WIN32 - sprintf( h_file_path_fx, "%s\\%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); -#else - sprintf( h_file_path_fx, "%s/%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); -#endif - } - else - { -#ifdef WIN32 - sprintf( h_file_path_fx, "%s%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); -#else - sprintf( h_file_path_fx, "%s%s_fx.h", lib_rend_path_fx, ROM_FILE_NAME ); -#endif - } - } - else - { - fprintf( stderr, "Memory issue: for header file path\n\n" ); + fprintf( stderr, "Wrong lib_rend path: %s\n\n", lib_rend_path ); usage_gen_crend_tables(); - if ( c_file_path ) - free( c_file_path ); if ( h_file_path ) free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); - if ( lib_rend_path ) - free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); - if ( binary_path ) - free( binary_path ); - if ( binary_common_file_name ) - free( binary_common_file_name ); - if ( sofa_file_path_for_reverb ) - free( sofa_file_path_for_reverb ); - return -1; - } - fp = fopen( h_file_path_fx, "w" ); - if ( fp == NULL ) - { - fprintf( stderr, "Wrong lib_rend_fx path: %s\n\n", h_file_path_fx ); - usage_gen_crend_tables(); if ( c_file_path ) free( c_file_path ); - if ( h_file_path ) - free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -739,7 +536,6 @@ int main( int argc, char *argv[] ) fclose( fp ); } - if ( binary_path != NULL && binary_common_file_name != NULL ) { if ( binary_file_path != NULL ) @@ -772,18 +568,12 @@ int main( int argc, char *argv[] ) { fprintf( stderr, "Memory issue for binary file path\n\n" ); usage_gen_crend_tables(); - if ( c_file_path ) - free( c_file_path ); if ( h_file_path ) free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); + if ( c_file_path ) + free( c_file_path ); if ( lib_rend_path ) free( lib_rend_path ); - if ( lib_rend_path_fx ) - free( lib_rend_path_fx ); if ( binary_path ) free( binary_path ); if ( binary_common_file_name ) @@ -875,68 +665,6 @@ int main( int argc, char *argv[] ) } } - if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) - { - - FILE *fpt = fopen( TEMPLTATE_C_ROM_FILE_NAME, "rb" ); - - if ( fpt ) - { - fseek( fpt, 0, SEEK_END ); - size_t fsize = ftell( fpt ); - fseek( fpt, 0, SEEK_SET ); - char *tmpc = (char *) malloc( fsize + 1 ); - size_t ret = fread( tmpc, fsize, 1, fpt ); - tmpc[fsize] = '\0'; - if ( ret * fsize == fsize ) - { - fp = fopen( c_file_path_fx, "wb" ); - if ( fp ) - { - fwrite( tmpc, fsize, 1, fp ); - fclose( fp ); - } - - fp = fopen( h_file_path_fx, "wb" ); - if ( fp ) - { - fwrite( tmpc, fsize, 1, fp ); - fclose( fp ); - } - } - - fclose( fpt ); - } - fp = fopen( h_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n/* clang-format off */\n" ); - fprintf( fp, "\n/*-------------------------------------------------------------------------" ); - fprintf( fp, "\n* Binaural rendering related ROM tables" ); - fprintf( fp, "\n*------------------------------------------------------------------------*/\n" ); - fprintf( fp, "\n/* Binaural rendering data set based on HRIRs */" ); - fprintf( fp, "\n/* Tables generated by scripts/binauralRenderer_interface/generate_cren_ivas_tables.c, see mixer_conv_sofa_to_rom_table_converter_readme.txt */" ); - fprintf( fp, "\n/* Can be replaced by your own generated HRIR or BRIR tables */\n\n\n" ); - fprintf( fp, "\n#ifndef _%s_FX_\n", to_upper( rom_file_name ) ); - fprintf( fp, "#define _%s_FX_\n", to_upper( rom_file_name ) ); - fprintf( fp, "\n#include \"ivas_cnst.h\"\n\n" ); - fclose( fp ); - } - - fp = fopen( c_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n/* clang-format off */\n" ); - fprintf( fp, "\n/*-------------------------------------------------------------------------" ); - fprintf( fp, "\n* Binaural rendering related ROM tables" ); - fprintf( fp, "\n*------------------------------------------------------------------------*/\n" ); - fprintf( fp, "\n/* Binaural rendering data set based on HRIRs */" ); - fprintf( fp, "\n/* Tables generated by scripts/binauralRenderer_interface/generate_cren_ivas_tables.c, see mixer_conv_sofa_to_rom_table_converter_readme.txt */" ); - fprintf( fp, "\n/* Can be replaced by your own generated HRIR or BRIR tables */\n\n\n" ); - fprintf( fp, "\n#include \n#include \"ivas_cnst.h\"\n\n/* clang-format off */\n\n#define WMC_TOOL_SKIP\n\n" ); - fclose( fp ); - } - } char current_path[MAX_PATH]; char ivas_path[MAX_PATH]; @@ -1011,66 +739,6 @@ int main( int argc, char *argv[] ) } #endif - - if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) - { - if ( add_define ) - { - fp = fopen( c_file_path_fx, "a" ); - if ( fp ) - { - sofa_name = strrchr( argv[i], '/' ); - size_t size_path = strlen( sofa_name ); - sofa_name = malloc( sizeof( char ) * size_path - 5 ); - strncpy( sofa_name, strrchr( argv[i], '/' ) + 1, size_path - 5 ); - sofa_name[size_path - 6] = '\0'; - fprintf( fp, "\n#ifdef USE_%s\n", to_upper( sofa_name ) ); - fclose( fp ); - } - fp = fopen( h_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n#ifdef USE_%s\n", to_upper( sofa_name ) ); - fclose( fp ); - } - } - } - -#ifdef USE_MATLAB_ENG - Engine *ep = NULL; - char *tmpChar = strstr( argv[i], ".sofa" ); - if ( tmpChar != NULL ) - { - if ( !( ep = engOpen( NULL ) ) ) - { - printf( "Error starting matlab engine\n" ); - return -1; - } - const char addPathCmdStr[] = "addpath(['.' filesep() 'matlab_hrir_generation_scripts']);"; - const char startCmdStr[] = "SOFA_save_to_mat('"; - const char endCmdStr[] = "');"; - char *cdCmd; - char *cmdStr; - int ret; - cdCmd = (char *) malloc( strlen( current_path ) + 4 ); - sprintf( cdCmd, "cd %s", current_path ); - cmdStr = (char *) malloc( strlen( startCmdStr ) + strlen( argv[i] ) + strlen( endCmdStr ) + 1 ); - sprintf( cmdStr, "%s%s%s", startCmdStr, argv[i], endCmdStr ); - - ret = engEvalString( ep, cdCmd ); - ret = engEvalString( ep, addPathCmdStr ); - ret = engEvalString( ep, cmdStr ); - - strcpy( tmpChar, ".mat" ); - tmpChar[4] = '\0'; - - free( cdCmd ); - free( cmdStr ); - engClose( ep ); - } - -#endif - convert_backslash( argv[i] ); err = generate_crend_ivas_tables_from_sofa( argv[i], &cfgBrirOptim ); @@ -1110,56 +778,23 @@ int main( int argc, char *argv[] ) } } } - if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) + } + + if ( sofa_file_path_for_reverb != NULL ) + { + err = generate_reverb_ivas_tables_from_sofa( sofa_file_path_for_reverb ); + if ( err != 0 ) + return err; + } + if ( ( h_file_path != NULL ) && ( c_file_path != NULL ) ) + { + + fp = fopen( h_file_path, "a" ); + if ( fp ) { - - fp = fopen( c_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n\n" ); - fclose( fp ); - } - fp = fopen( h_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n\n" ); - fclose( fp ); - } - if ( err != 0 ) - return err; - if ( add_define ) - { - fp = fopen( c_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n#endif /* USE_%s */\n ", to_upper( sofa_name ) ); - fclose( fp ); - } - fp = fopen( h_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n#endif /* USE_%s */\n", to_upper( sofa_name ) ); - fclose( fp ); - } - } - } - } - - if ( sofa_file_path_for_reverb != NULL ) - { - err = generate_reverb_ivas_tables_from_sofa( sofa_file_path_for_reverb ); - if ( err != 0 ) - return err; - } - if ( ( h_file_path != NULL ) && ( c_file_path != NULL ) ) - { - - fp = fopen( h_file_path, "a" ); - if ( fp ) - { - fprintf( fp, "\n\n#endif /* _%s_ */\n", to_upper( rom_file_name ) ); - fclose( fp ); - } + fprintf( fp, "\n\n#endif /* _%s_ */\n", to_upper( rom_file_name ) ); + fclose( fp ); + } fp = fopen( c_file_path, "a" ); if ( fp ) @@ -1168,31 +803,10 @@ int main( int argc, char *argv[] ) fclose( fp ); } } - if ( ( h_file_path_fx != NULL ) && ( c_file_path_fx != NULL ) ) - { - - fp = fopen( h_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n\n#endif /* _%s_ */\n", to_upper( rom_file_name ) ); - fclose( fp ); - } - - fp = fopen( c_file_path_fx, "a" ); - if ( fp ) - { - fprintf( fp, "\n\n#undef WMC_TOOL_SKIP\n\n" ); - fclose( fp ); - } - } if ( c_file_path ) free( c_file_path ); if ( h_file_path ) free( h_file_path ); - if ( c_file_path_fx ) - free( c_file_path_fx ); - if ( h_file_path_fx ) - free( h_file_path_fx ); if ( rom_file_name ) free( rom_file_name ); @@ -1252,8 +866,6 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c long sofa_sample_rate = 0; double a[3] = { 0 }; double t[3] = { 0 }; - double ac[3] = { 0 }; - double tc[3] = { 0 }; long nearest; sofa_file_path = (char *) malloc( sizeof( char ) * ( strlen( file_path ) + 1 ) ); @@ -1453,9 +1065,6 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } t[1] = lscfg.ele[i]; /* elevation in deg */ t[2] = sofa_src_pos_val[2]; /* radius in m */ - tc[0] = t[2] * cos( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); - tc[1] = t[2] * sin( t[0] * M_PI / 180. ) * cos( t[1] * M_PI / 180. ); - tc[2] = t[2] * sin( t[1] * M_PI / 180. ); nearest = find_pos_spheric( sofa_src_pos_cart_val, sofa_M, t ); if ( ( nearest >= 0 ) && ( nearest < sofa_M ) ) { @@ -1466,13 +1075,10 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } a[1] = sofa_src_pos_val[nearest * 3 + 1] * 180. / M_PI; a[2] = sofa_src_pos_val[nearest * 3 + 2]; - ac[0] = sofa_src_pos_cart_val[nearest * 3]; - ac[1] = sofa_src_pos_cart_val[nearest * 3 + 1]; - ac[2] = sofa_src_pos_cart_val[nearest * 3 + 2]; } - double prodScal = ( tc[0] * ac[0] + tc[1] * ac[1] + tc[2] * ac[2] ) / ( sqrt( ( tc[0] * tc[0] + tc[1] * tc[1] + tc[2] * tc[2] ) ) * sqrt( ( ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2] ) ) ); - double cosAngleMin = cos( PI_OVER_180 * MAX_DIFF_ANGLE ); + float prodScal = ( t[0] * a[0] + t[1] * a[1] + t[2] * a[2] ) / ( sqrtf( ( t[0] * t[0] + t[1] * t[1] + t[2] * t[2] ) ) * sqrtf( ( a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ) ) ); + float cosAngleMin = cosf( PI_OVER_180 * MAX_DIFF_ANGLE ); if ( prodScal < cosAngleMin ) { mxDestroyArray( sofa ); @@ -1660,7 +1266,7 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c } hrtf_data.latency_s += 0.000000001f; - if ( ( hrtf_data.num_iterations[0][0] > 2 ) || ( hrtf_data.num_iterations_diffuse[0] > 0 ) ) + if ( ( hrtf_data.num_iterations[0][0] > 2 ) ) { strcpy( &lscfg.name[len_ls_cfg_name], "_BRIR" ); } @@ -1674,6 +1280,7 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c latency_48k_optim = hrtf_data.latency_s; } + int16_t factorQ[3]; make_fx_be( &hrtf_data, lscfg, sample_rates[indSR], frame_len, factorQ ); if ( lib_rend_path != NULL ) @@ -1681,11 +1288,6 @@ int generate_crend_ivas_tables_from_sofa( const char *file_path, ConfigReader *c update_h_file( &hrtf_data, lscfg, sample_rates[indSR], frame_len ); update_c_file( &hrtf_data, lscfg, sample_rates[indSR], frame_len, factorQ ); } - if ( lib_rend_path_fx != NULL ) - { - update_h_file_fx( &hrtf_data, lscfg, sample_rates[indSR], frame_len ); - update_c_file_fx( &hrtf_data, lscfg, sample_rates[indSR], frame_len, factorQ ); - } if ( binary_file_path != NULL ) { @@ -2263,12 +1865,7 @@ int generate_reverb_ivas_tables_from_sofa( const char *file_path ) if ( lib_rend_path != NULL ) { update_h_file_with_reverb( sample_rates[indSR] ); - update_c_file_with_reverb( p_avg_lr, &p_avg_lr[nr_fc_fft_filter], pCoherence, sample_rates[indSR], nr_fc_fft_filter ); - } - if ( lib_rend_path_fx != NULL ) - { - update_h_file_with_reverb_fx( sample_rates[indSR] ); - update_c_file_with_reverb_fx( p_avg_lr_fx, &p_avg_lr_fx[nr_fc_fft_filter], pCoherence_fx, factorQ, sample_rates[indSR], nr_fc_fft_filter ); + update_c_file_with_reverb( p_avg_lr, &p_avg_lr[nr_fc_fft_filter], pCoherence, p_avg_lr_fx, &p_avg_lr_fx[nr_fc_fft_filter], pCoherence_fx, factorQ, sample_rates[indSR], nr_fc_fft_filter ); } if ( binary_file_path != NULL ) { @@ -2361,7 +1958,7 @@ void write_array_float_to_file( FILE *fp, float *vec, int32_t size_vec, int32_t for ( l = 0; l < sample_per_ligne; l++ ) { fprintf( fp, format, vec[k * sample_per_ligne + l] ); - if ( strcmp( format, FORMAT_FLOAT ) ) + if ( strcmp( format, "%a" ) ) fprintf( fp, "f, " ); else fprintf( fp, ", " ); @@ -2375,20 +1972,20 @@ void write_array_float_to_file( FILE *fp, float *vec, int32_t size_vec, int32_t for ( l = 0; l < remaining_samples - 1; l++ ) { fprintf( fp, format, vec[k * sample_per_ligne + l] ); - if ( strcmp( format, FORMAT_FLOAT ) ) + if ( strcmp( format, "%a" ) ) fprintf( fp, "f, " ); else fprintf( fp, ", " ); } fprintf( fp, format, vec[k * sample_per_ligne + l] ); - if ( strcmp( format, FORMAT_FLOAT ) ) + if ( strcmp( format, "%a" ) ) fprintf( fp, "f}" ); else fprintf( fp, "}" ); } /*---------------------------------------------------------------------* - *write_array_uint16_to_file(); + *write_array_float_to_file(); *---------------------------------------------------------------------*/ void write_array_uint16_to_file( FILE *fp, uint16_t *vec, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) { @@ -2496,7 +2093,7 @@ void write_array_int32_t_to_file( FILE *fp, int32_t *vec, int32_t size_vec, int3 } /*---------------------------------------------------------------------* - *write_array_int16_t_to_file(); + *write_array_int32_t_to_file(); *---------------------------------------------------------------------*/ void write_array_int16_t_to_file( FILE *fp, int16_t *vec, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) { @@ -2548,120 +2145,11 @@ void write_array_int16_t_to_file( FILE *fp, int16_t *vec, int32_t size_vec, int3 } fprintf( fp, "}" ); } -/*---------------------------------------------------------------------* - *write_array_uint16_t_to_file(); - *---------------------------------------------------------------------*/ -void write_array_uint16_t_to_file( FILE *fp, uint16_t *vec, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) -{ - int32_t k, l, num_iter, remaining_samples; - int16_t i; - - num_iter = size_vec / sample_per_ligne; - remaining_samples = size_vec % sample_per_ligne; - if ( remaining_samples == 0 ) - { - num_iter--; - remaining_samples = sample_per_ligne; - } - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - - fprintf( fp, "{" ); - for ( k = 0; k < num_iter; k++ ) - { - if ( k != 0 ) - { - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - } - for ( l = 0; l < sample_per_ligne; l++ ) - { - fprintf( fp, "%u", vec[k * sample_per_ligne + l] ); - fprintf( fp, ", " ); - } - fprintf( fp, "\n" ); - } - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - for ( l = 0; l < remaining_samples - 1; l++ ) - { - fprintf( fp, "%u", vec[k * sample_per_ligne + l] ); - fprintf( fp, ", " ); - } - fprintf( fp, "%u", vec[k * sample_per_ligne + l] ); - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - fprintf( fp, "}" ); -} - - -/*---------------------------------------------------------------------* - *write_array_float_to_int16_t_to_file(); - *---------------------------------------------------------------------*/ -void write_array_float_to_int16_t_to_file( FILE *fp, float *vec, int16_t factor_Q, int32_t size_vec, int32_t sample_per_ligne, const int num_tab, const char *tab ) -{ - int32_t k, l, num_iter, remaining_samples; - int16_t i; - - num_iter = size_vec / sample_per_ligne; - remaining_samples = size_vec % sample_per_ligne; - if ( remaining_samples == 0 ) - { - num_iter--; - remaining_samples = sample_per_ligne; - } - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - - fprintf( fp, "{" ); - for ( k = 0; k < num_iter; k++ ) - { - if ( k != 0 ) - { - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - } - for ( l = 0; l < sample_per_ligne; l++ ) - { - fprintf( fp, "%d", float2int16_t( vec[k * sample_per_ligne + l], factor_Q ) ); - fprintf( fp, ", " ); - } - fprintf( fp, "\n" ); - } - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - for ( l = 0; l < remaining_samples - 1; l++ ) - { - fprintf( fp, "%d", float2int16_t( vec[k * sample_per_ligne + l], factor_Q ) ); - fprintf( fp, ", " ); - } - fprintf( fp, "%d", float2int16_t( vec[k * sample_per_ligne + l], factor_Q ) ); - for ( i = 0; i < num_tab; i++ ) - { - fprintf( fp, "%s", tab ); - } - fprintf( fp, "}" ); -} - /*---------------------------------------------------------------------* *update_c_file_with_reverb(); *---------------------------------------------------------------------*/ -void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, const int32_t samplerate, const int16_t len ) +void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherence, int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ) { char len_str[26] = "LR_IAC_LENGTH_NR_FC"; if ( samplerate == 16000 ) @@ -2675,358 +2163,60 @@ void update_c_file_with_reverb( float *pEner_l, float *pEner_r, float *pCoherenc if ( pEner_l == NULL ) return; - if ( pEner_r == NULL ) - return; - - if ( pCoherence == NULL ) - return; - - FILE *fp = fopen( c_file_path, "a" ); - - if ( fp == NULL ) - return; - - if ( samplerate == DEFAULT_SAMPLERATE ) - { - fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/" ); - } - - fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); - - /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst float defaultHRIR_coherence_%dkHz[%s] = \n", samplerate / 1000, len_str ); - write_array_float_to_file( fp, pCoherence, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); - - /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst float defaultHRIR_left_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); - write_array_float_to_file( fp, pEner_l, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); - - /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst float defaultHRIR_right_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); - write_array_float_to_file( fp, pEner_r, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); - - - if ( fp ) - fclose( fp ); - - return; -} -/*---------------------------------------------------------------------* - *update_c_file_with_reverb_fx(); - *---------------------------------------------------------------------*/ -void update_c_file_with_reverb_fx( int16_t *pEner_l_fx, int16_t *pEner_r_fx, int16_t *pCoherence_fx, int16_t factorQ, const int32_t samplerate, const int16_t len ) -{ - char len_str[26] = "LR_IAC_LENGTH_NR_FC"; - if ( samplerate == 16000 ) - { - strcpy( len_str, "LR_IAC_LENGTH_NR_FC_16KHZ" ); - } - - if ( c_file_path_fx == NULL ) - return; - - if ( pEner_l_fx == NULL ) - return; - - if ( pEner_r_fx == NULL ) - return; - - if ( pCoherence_fx == NULL ) - return; - - FILE *fp = fopen( c_file_path_fx, "a" ); - - if ( fp == NULL ) - return; - - if ( samplerate == DEFAULT_SAMPLERATE ) - { - fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/" ); - } - - fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); - - fprintf( fp, "\nconst Word16 defaultHRIR_Q_%dkHz_fx = %d;", samplerate / 1000, factorQ ); - - /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst Word16 defaultHRIR_coherence_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); - write_array_int16_t_to_file( fp, pCoherence_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); - - /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); - write_array_int16_t_to_file( fp, pEner_l_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); - - /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ - fprintf( fp, "\nconst Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s] = \n", samplerate / 1000, len_str ); - write_array_int16_t_to_file( fp, pEner_r_fx, len, NUM_SAMPLES_PER_LINES_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ";\n" ); - - if ( fp ) - fclose( fp ); - - return; -} -/*---------------------------------------------------------------------* - *update_c_file(); - *---------------------------------------------------------------------*/ -void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ) -{ - - if ( c_file_path == NULL ) - return; - - FILE *fp = fopen( c_file_path, "a" ); - int16_t i, j; - uint32_t *pTotalNumFreqSampPerIterations[2], maxTotalNumFreqSampPerIterations; - uint32_t pTotalNumFreqSampPerIterationsDiffuse[2], maxTotalNumFreqSampPerIterationsDiffuse; - const char *format_float = FORMAT_FLOAT; - const char *format_float_latency = FORMAT_FLOAT; - - pTotalNumFreqSampPerIterations[0] = malloc( sizeof( float ) * hrtf->max_num_ir ); - pTotalNumFreqSampPerIterations[1] = malloc( sizeof( float ) * hrtf->max_num_ir ); - - if ( fp == NULL ) - return; - if ( hrtf == NULL ) - return; - - if ( samplerate == DEFAULT_SAMPLERATE ) - { - /* float latency_s; */ - fprintf( fp, "\n\n/********************** %s_%s **********************/\n", DECLARATION_NAME, lscfg.name ); - fprintf( fp, "\nconst float %s_%s_latency_s = ", DECLARATION_NAME, lscfg.name ); - fprintf( fp, format_float_latency, hrtf->latency_s ); - fprintf( fp, ";" ); - } - - fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); - - /* int16_t max_num_iterations; */ - fprintf( fp, "\nconst int16_t %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); - /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) - { - fprintf( fp, "{%u, %u}, ", hrtf->num_iterations[i][0], hrtf->num_iterations[i][1] ); - } - fprintf( fp, "{%u, %u} ", hrtf->num_iterations[i][0], hrtf->num_iterations[i][1] ); - fprintf( fp, "};" ); - - /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ - fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS] = {%u, %u};", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[1] ); - - maxTotalNumFreqSampPerIterations = 0; - for ( i = 0; i < hrtf->max_num_ir; i++ ) - { - pTotalNumFreqSampPerIterations[0][i] = 0; - pTotalNumFreqSampPerIterations[1][i] = 0; - for ( j = 0; j < hrtf->num_iterations[i][0]; j++ ) - { - pTotalNumFreqSampPerIterations[0][i] += hrtf->pIndex_frequency_max_dyn[i][0][j]; - } - if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[0][i] ) - { - maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[0][i]; - } - for ( j = 0; j < hrtf->num_iterations[i][1]; j++ ) - { - pTotalNumFreqSampPerIterations[1][i] += hrtf->pIndex_frequency_max_dyn[i][1][j]; - } - if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[1][i] ) - { - maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[1][i]; - } - } - - pTotalNumFreqSampPerIterationsDiffuse[0] = 0; - pTotalNumFreqSampPerIterationsDiffuse[1] = 0; - maxTotalNumFreqSampPerIterationsDiffuse = 0; - for ( j = 0; j < hrtf->num_iterations_diffuse[0]; j++ ) - { - pTotalNumFreqSampPerIterationsDiffuse[0] += hrtf->pIndex_frequency_max_diffuse_dyn[0][j]; - } - if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[0] ) - { - maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[0]; - } - for ( j = 0; j < hrtf->num_iterations_diffuse[1]; j++ ) - { - pTotalNumFreqSampPerIterationsDiffuse[1] += hrtf->pIndex_frequency_max_diffuse_dyn[1][j]; - } - if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[1] ) - { - maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[1]; - } - - /*uint16_t *pIndex_frequency_max_dyn[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ - fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); - for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) - { - fprintf( fp, "{" ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "," ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "}," ); - } - fprintf( fp, "{" ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "," ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "}" ); - fprintf( fp, "};" ); - - /* uint16_t index_frequency_max_diffuse; */ - fprintf( fp, "\nconst uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); - - /* float inv_diffuse_weight[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ - fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[BINAURAL_CHANNELS][%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - fprintf( fp, "{" ); - write_array_float_to_file( fp, hrtf->inv_diffuse_weight[0], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "," ); - write_array_float_to_file( fp, hrtf->inv_diffuse_weight[1], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "}" ); - fprintf( fp, ";" ); - - /* uint16_t *pIndex_frequency_max_diffuse_dyn[BINAURAL_CHANNELS];*/ - if ( hrtf->pIndex_frequency_max_diffuse_dyn[0] == NULL ) - { - fprintf( fp, "\nconst uint16_t *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - } - else - { - fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[0], hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[0], 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "," ); - write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[1], hrtf->num_iterations_diffuse[1], hrtf->num_iterations_diffuse[1], 0, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "};" ); - } - - /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else - { - fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); - } - for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) - { - fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); - } - fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n};" ); - - if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else - { - fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); - } - for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) - { - fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); - } - fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n};" ); - - - /* float *pOut_to_bin_diffuse_re_dyn[BINAURAL_CHANNELS];*/ - if ( hrtf->pOut_to_bin_diffuse_re_dyn[0] == NULL ) - { - fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - } - else - { - fprintf( fp, "\nconst float %s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n};" ); - } + if ( pEner_r == NULL ) + return; - /* float *pOut_to_bin_diffuse_im_dyn[BINAURAL_CHANNELS];*/ - if ( hrtf->pOut_to_bin_diffuse_im_dyn[0] == NULL ) - { - fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - } - else + if ( pCoherence == NULL ) + return; + + FILE *fp = fopen( c_file_path, "a" ); + + if ( fp == NULL ) + return; + + if ( samplerate == DEFAULT_SAMPLERATE ) { - fprintf( fp, "\nconst float %s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, ",\n" ); - write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); - fprintf( fp, "\n};" ); + fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/" ); } + fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); + + /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst float defaultHRIR_coherence_%dkHz[%s] = \n", samplerate / 1000, len_str ); + write_array_float_to_file( fp, pCoherence, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + /* float *defaultHRIR_left_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst float defaultHRIR_left_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); + write_array_float_to_file( fp, pEner_l, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + /* float *defaultHRIR_right_avg_power_[LR_IAC_LENGTH_NR_FC];*/ + fprintf( fp, "\nconst float defaultHRIR_right_avg_power_%dkHz[%s] = \n", samplerate / 1000, len_str ); + write_array_float_to_file( fp, pEner_r, len, NUM_SAMPLES_PER_LINES_REVERB, FORMAT_FLOAT_REVERB, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, ";\n" ); + + if ( fp ) fclose( fp ); - if ( pTotalNumFreqSampPerIterations[0] ) - { - free( pTotalNumFreqSampPerIterations[0] ); - } - if ( pTotalNumFreqSampPerIterations[1] ) - { - free( pTotalNumFreqSampPerIterations[1] ); - } - return; } /*---------------------------------------------------------------------* *update_c_file(); *---------------------------------------------------------------------*/ -void update_c_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factor_Q[3] ) +void update_c_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len, int16_t factorQ[3] ) { - if ( c_file_path_fx == NULL ) + if ( c_file_path == NULL ) return; - FILE *fp = fopen( c_file_path_fx, "a" ); + FILE *fp = fopen( c_file_path, "a" ); int16_t i, j; uint32_t *pTotalNumFreqSampPerIterations[2], maxTotalNumFreqSampPerIterations; uint32_t pTotalNumFreqSampPerIterationsDiffuse[2], maxTotalNumFreqSampPerIterationsDiffuse; const char *format_float = FORMAT_FLOAT; - const char *format_float_latency = FORMAT_FLOAT; + const char *format_float_latency = FORMAT_FLOAT_LATENCY; pTotalNumFreqSampPerIterations[0] = malloc( sizeof( float ) * hrtf->max_num_ir ); pTotalNumFreqSampPerIterations[1] = malloc( sizeof( float ) * hrtf->max_num_ir ); @@ -3040,16 +2230,17 @@ void update_c_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const { /* float latency_s; */ fprintf( fp, "\n\n/********************** %s_%s **********************/\n", DECLARATION_NAME, lscfg.name ); - fprintf( fp, "\nconst Word16 %s_%s_Q_latency_s_fx = %d;", DECLARATION_NAME, lscfg.name, factor_Q[0] ); - fprintf( fp, "\nconst Word32 %s_%s_latency_s_fx = %d;/*Q-31*/", DECLARATION_NAME, lscfg.name, float2int32_t( hrtf->latency_s, factor_Q[0] ) ); + fprintf( fp, "\nconst float %s_%s_latency_s = ", DECLARATION_NAME, lscfg.name ); + fprintf( fp, format_float_latency, hrtf->latency_s ); + fprintf( fp, ";" ); } fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); /* int16_t max_num_iterations; */ - fprintf( fp, "\nconst Word16 %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); + fprintf( fp, "\nconst int16_t %s_%s_max_num_iterations_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->max_num_iterations ); /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - fprintf( fp, "\nconst Word16 %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "{%u, %u}, ", hrtf->num_iterations[i][0], hrtf->num_iterations[i][1] ); @@ -3058,7 +2249,7 @@ void update_c_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const fprintf( fp, "};" ); /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ - fprintf( fp, "\nconst Word16 %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS] = {%u, %u};", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[1] ); + fprintf( fp, "\nconst uint16_t %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS] = {%u, %u};", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[1] ); maxTotalNumFreqSampPerIterations = 0; for ( i = 0; i < hrtf->max_num_ir; i++ ) @@ -3104,140 +2295,137 @@ void update_c_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const } /*uint16_t *pIndex_frequency_max_dyn[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ - fprintf( fp, "\nconst Word16 %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); + fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "{" ); - write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "}," ); } fprintf( fp, "{" ); - write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][0], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_dyn[i][1], hrtf->max_num_iterations, hrtf->max_num_iterations, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "}" ); fprintf( fp, "};" ); /* uint16_t index_frequency_max_diffuse; */ - fprintf( fp, "\nconst Word16 %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); + fprintf( fp, "\nconst uint16_t %s_%s_index_frequency_max_diffuse_%2dkHz = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, hrtf->index_frequency_max_diffuse ); - fprintf( fp, "\nconst Word16 %s_%s_inv_diffuse_weight_Q_%2dkHz_fx = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, factor_Q[1] ); - /* float inv_diffuse_weight_fx[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ - fprintf( fp, "\nconst Word16 %s_%s_inv_diffuse_weight_%2dkHz_fx[BINAURAL_CHANNELS][%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + /* float inv_diffuse_weight[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ + fprintf( fp, "\nconst float %s_%s_inv_diffuse_weight_%2dkHz[BINAURAL_CHANNELS][%s]=", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); fprintf( fp, "{" ); - write_array_float_to_int16_t_to_file( fp, hrtf->inv_diffuse_weight[0], factor_Q[1], hrtf->max_num_ir, hrtf->max_num_ir, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->inv_diffuse_weight[0], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_float_to_int16_t_to_file( fp, hrtf->inv_diffuse_weight[1], factor_Q[1], hrtf->max_num_ir, hrtf->max_num_ir, 0, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->inv_diffuse_weight[1], hrtf->max_num_ir, hrtf->max_num_ir, format_float, 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "}" ); fprintf( fp, ";" ); /* uint16_t *pIndex_frequency_max_diffuse_dyn[BINAURAL_CHANNELS];*/ if ( hrtf->pIndex_frequency_max_diffuse_dyn[0] == NULL ) { - fprintf( fp, "\nconst Word16 *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + fprintf( fp, "\nconst uint16_t *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); } else { - fprintf( fp, "\nconst Word16 %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); - write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[0], hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[0], 0, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\nconst uint16_t %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[0], hrtf->num_iterations_diffuse[0], hrtf->num_iterations_diffuse[0], 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "," ); - write_array_uint16_t_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[1], hrtf->num_iterations_diffuse[1], hrtf->num_iterations_diffuse[1], 0, TAB_WITH_SPACE_OR_NOT ); + write_array_uint16_to_file( fp, hrtf->pIndex_frequency_max_diffuse_dyn[1], hrtf->num_iterations_diffuse[1], hrtf->num_iterations_diffuse[1], 0, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "};" ); } - fprintf( fp, "\nconst Word16 %s_%s_coeff_Q_%2dkHz_fx = %d;", DECLARATION_NAME, lscfg.name, samplerate / 1000, factor_Q[2] ); - /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else { - fprintf( fp, "\nconst Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + fprintf( fp, "\nconst float %s_%s_coeff_re_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); } - for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); } fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_re_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) { - fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); } else { - fprintf( fp, "\nconst Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); + fprintf( fp, "\nconst float %s_%s_coeff_im_%2dkHz[%s][BINAURAL_CHANNELS][%d]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); } for ( i = 0; i < hrtf->max_num_ir - 1; i++ ) { fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s},", TAB_WITH_SPACE_OR_NOT ); } fprintf( fp, "\n%s{\n", TAB_WITH_SPACE_OR_NOT ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], factor_Q[2], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][0], pTotalNumFreqSampPerIterations[0][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], factor_Q[2], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_im_dyn[i][1], pTotalNumFreqSampPerIterations[1][i], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n%s}", TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); - /* float *pOut_to_bin_diffuse_re[BINAURAL_CHANNELS];*/ + + /* float *pOut_to_bin_diffuse_re_dyn[BINAURAL_CHANNELS];*/ if ( hrtf->pOut_to_bin_diffuse_re_dyn[0] == NULL ) { - fprintf( fp, "\nconst Word16 *%s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); } else { - fprintf( fp, "\nconst Word16 %s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[0], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\nconst float %s_%s_coeff_diffuse_re_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[1], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_re_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); } - /* float *pOut_to_bin_diffuse_im[BINAURAL_CHANNELS];*/ + /* float *pOut_to_bin_diffuse_im_dyn[BINAURAL_CHANNELS];*/ if ( hrtf->pOut_to_bin_diffuse_im_dyn[0] == NULL ) { - fprintf( fp, "\nconst Word16 *%s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); + fprintf( fp, "\nconst float *%s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS]={NULL,NULL};", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); } else { - fprintf( fp, "\nconst Word16 %s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[0], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + fprintf( fp, "\nconst float %s_%s_coeff_diffuse_im_%2dkHz[BINAURAL_CHANNELS][%u]={", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[0], pTotalNumFreqSampPerIterationsDiffuse[0], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, ",\n" ); - write_array_float_to_int16_t_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[1], factor_Q[2], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, 2, TAB_WITH_SPACE_OR_NOT ); + write_array_float_to_file( fp, hrtf->pOut_to_bin_diffuse_im_dyn[1], pTotalNumFreqSampPerIterationsDiffuse[1], NUM_SAMPLES_PER_LINES, format_float, 2, TAB_WITH_SPACE_OR_NOT ); fprintf( fp, "\n};" ); } @@ -3448,204 +2636,6 @@ void update_h_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int } return; } -/*---------------------------------------------------------------------* - *update_h_file_with_reverb - *---------------------------------------------------------------------*/ -void update_h_file_with_reverb_fx( int32_t samplerate ) -{ - char len_str[26] = "LR_IAC_LENGTH_NR_FC"; - if ( samplerate == 16000 ) - { - strcpy( len_str, "LR_IAC_LENGTH_NR_FC_16KHZ" ); - } - - if ( h_file_path_fx == NULL ) - return; - - FILE *fp = fopen( h_file_path_fx, "a" ); - - if ( fp == NULL ) - return; - - - if ( samplerate == DEFAULT_SAMPLERATE ) - { - fprintf( fp, "\n/********************** default HRIR reverb rom tables **********************/\n" ); - } - - fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); - - fprintf( fp, "\nextern const Word16 defaultHRIR_Q_%dkHz_fx;", samplerate / 1000 ); - /* Word16 *defaultHRIR_coherence_[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - fprintf( fp, "\nextern const Word16 defaultHRIR_coherence_%dkHz_fx[%s];", samplerate / 1000, len_str ); - /* Word16 *defaultHRIR_left_avg_power[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - fprintf( fp, "\nextern const Word16 defaultHRIR_left_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); - fprintf( fp, "\nextern const Word16 defaultHRIR_right_avg_power_%dkHz_fx[%s];", samplerate / 1000, len_str ); - - if ( fp ) - fclose( fp ); - - return; -} -/*---------------------------------------------------------------------* - *update_h_file(); - *---------------------------------------------------------------------*/ -void update_h_file_fx( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, const int32_t samplerate, const int16_t frame_len ) -{ - uint16_t i, j; - uint32_t *pTotalNumFreqSampPerIterations[2], maxTotalNumFreqSampPerIterations; - uint32_t pTotalNumFreqSampPerIterationsDiffuse[2], maxTotalNumFreqSampPerIterationsDiffuse; - - if ( h_file_path_fx == NULL ) - return; - - pTotalNumFreqSampPerIterations[0] = malloc( sizeof( float ) * hrtf->max_num_ir ); - pTotalNumFreqSampPerIterations[1] = malloc( sizeof( float ) * hrtf->max_num_ir ); - FILE *fp = fopen( h_file_path_fx, "a" ); - - if ( fp == NULL ) - return; - if ( hrtf == NULL ) - return; - - maxTotalNumFreqSampPerIterations = 0; - for ( i = 0; i < hrtf->max_num_ir; i++ ) - { - pTotalNumFreqSampPerIterations[0][i] = 0; - pTotalNumFreqSampPerIterations[1][i] = 0; - for ( j = 0; j < hrtf->num_iterations[i][0]; j++ ) - { - pTotalNumFreqSampPerIterations[0][i] += hrtf->pIndex_frequency_max_dyn[i][0][j]; - } - if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[0][i] ) - { - maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[0][i]; - } - for ( j = 0; j < hrtf->num_iterations[i][1]; j++ ) - { - pTotalNumFreqSampPerIterations[1][i] += hrtf->pIndex_frequency_max_dyn[i][1][j]; - } - if ( maxTotalNumFreqSampPerIterations < pTotalNumFreqSampPerIterations[1][i] ) - { - maxTotalNumFreqSampPerIterations = pTotalNumFreqSampPerIterations[1][i]; - } - } - - pTotalNumFreqSampPerIterationsDiffuse[0] = 0; - pTotalNumFreqSampPerIterationsDiffuse[1] = 0; - maxTotalNumFreqSampPerIterationsDiffuse = 0; - for ( j = 0; j < hrtf->num_iterations_diffuse[0]; j++ ) - { - pTotalNumFreqSampPerIterationsDiffuse[0] += hrtf->pIndex_frequency_max_diffuse_dyn[0][j]; - } - if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[0] ) - { - maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[0]; - } - for ( j = 0; j < hrtf->num_iterations_diffuse[1]; j++ ) - { - pTotalNumFreqSampPerIterationsDiffuse[1] += hrtf->pIndex_frequency_max_diffuse_dyn[1][j]; - } - if ( maxTotalNumFreqSampPerIterationsDiffuse < pTotalNumFreqSampPerIterationsDiffuse[1] ) - { - maxTotalNumFreqSampPerIterationsDiffuse = pTotalNumFreqSampPerIterationsDiffuse[1]; - } - - if ( samplerate == DEFAULT_SAMPLERATE ) - { - /* float latency_s; */ - fprintf( fp, "\n\n/********************** %s_%s **********************/\n", DECLARATION_NAME, lscfg.name ); - fprintf( fp, "\nextern const Word16 %s_%s_Q_latency_s_fx;", DECLARATION_NAME, lscfg.name ); - fprintf( fp, "\nextern const Word32 %s_%s_latency_s_fx;", DECLARATION_NAME, lscfg.name ); - } - - fprintf( fp, "\n\n/* Sample Rate = %ld */\n", (long) samplerate ); - - /* int16_t max_num_iterations; */ - fprintf( fp, "\nextern const Word16 %s_%s_max_num_iterations_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - /* uint16_t num_iterations[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - fprintf( fp, "\nextern const Word16 %s_%s_num_iterations_%2dkHz[%s][BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - - /* uint16_t num_iterations_diffuse[BINAURAL_CHANNELS];*/ - fprintf( fp, "\nextern const Word16 %s_%s_num_iterations_diffuse_%2dkHz[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - - /*uint16_t *pIndex_frequency_max_dyn[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; */ - fprintf( fp, "\nextern const Word16 %s_%s_pIndex_frequency_max_%2dkHz[%s][BINAURAL_CHANNELS][%d];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, hrtf->max_num_iterations ); - - /* uint16_t index_frequency_max_diffuse; */ - fprintf( fp, "\nextern const Word16 %s_%s_index_frequency_max_diffuse_%2dkHz;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - - /* Word16 inv_diffuse_weight_fx[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; */ - fprintf( fp, "\nextern const Word16 %s_%s_inv_diffuse_weight_Q_%2dkHz_fx;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - fprintf( fp, "\nextern const Word16 %s_%s_inv_diffuse_weight_%2dkHz_fx[BINAURAL_CHANNELS][%s];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - - /* uint16_t *pIndex_frequency_max_diffuse[BINAURAL_CHANNELS];*/ - if ( hrtf->pIndex_frequency_max_diffuse_dyn[0] == NULL ) - { - fprintf( fp, "\nextern const Word16 *%s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - } - else - { - fprintf( fp, "\nextern const Word16 %s_%s_pIndex_frequency_max_diffuse_%2dkHz[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, ( hrtf->num_iterations_diffuse[0] > hrtf->num_iterations_diffuse[1] ) ? hrtf->num_iterations_diffuse[0] : hrtf->num_iterations_diffuse[1] ); - } - - /* Word16 *pOut_to_bin_fx[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - fprintf( fp, "\nextern const Word16 %s_%s_coeff_Q_%2dkHz_fx;", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - /* float *pOut_to_bin[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];*/ - if ( samplerate == 48000 && maxTotalNumFreqSampPerIterations == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME48k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else if ( samplerate == 32000 && maxTotalNumFreqSampPerIterations == L_FRAME32k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME32k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else if ( samplerate == 16000 && maxTotalNumFreqSampPerIterations == L_FRAME16k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][L_FRAME16k/MAX_PARAM_SPATIAL_SUBFRAMES];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name ); - } - else - { - fprintf( fp, "\nextern const Word16 %s_%s_coeff_re_%2dkHz_fx[%s][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); - fprintf( fp, "\nextern const Word16 %s_%s_coeff_im_%2dkHz_fx[%s][BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, lscfg.output_config_num_channel_name, maxTotalNumFreqSampPerIterations ); - } - - /* float *pOut_to_bin_diffuse_re_fx[BINAURAL_CHANNELS];*/ - if ( hrtf->pOut_to_bin_diffuse_re_dyn[0] == NULL ) - { - fprintf( fp, "\nextern const Word16 *%s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - } - else - { - fprintf( fp, "\nextern const Word16 %s_%s_coeff_diffuse_re_%2dkHz_fx[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - } - - /* float *pOut_to_bin_diffuse_im_fx[BINAURAL_CHANNELS];*/ - if ( hrtf->pOut_to_bin_diffuse_im_dyn[0] == NULL ) - { - fprintf( fp, "\nextern const Word16 *%s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS];", DECLARATION_NAME, lscfg.name, samplerate / 1000 ); - } - else - { - fprintf( fp, "\nextern const Word16 %s_%s_coeff_diffuse_im_%2dkHz_fx[BINAURAL_CHANNELS][%u];", DECLARATION_NAME, lscfg.name, samplerate / 1000, maxTotalNumFreqSampPerIterationsDiffuse ); - } - - if ( fp ) - fclose( fp ); - - if ( pTotalNumFreqSampPerIterations[0] ) - { - free( pTotalNumFreqSampPerIterations[0] ); - } - if ( pTotalNumFreqSampPerIterations[1] ) - { - free( pTotalNumFreqSampPerIterations[1] ); - } - return; -} /*---------------------------------------------------------------------* * get_tables_dimensions(); @@ -4345,7 +3335,7 @@ ivas_error write_binary_file( HRTFS_DATA *hrtf, struct ivas_layout_config lscfg, } /*---------------------------------------------------------------------* - * make_reverb_fx_be(); + * make_fx_be(); *---------------------------------------------------------------------*/ ivas_error make_reverb_fx_be( float *pEner_l, float *pEner_r, float *pCoherence, const int32_t samplerate, int16_t *factorQ ) { diff --git a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m index 638e477bd5..86df31620b 100644 --- a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m +++ b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m @@ -53,9 +53,6 @@ addpath(genpath('../td_object_renderer/modeling_tool/')); %% Set arguments generateCustomBinaryFile = false; -normalize = true; % put a true to normalize input HRTF file. Diffuse field spectrum will be equal to one at 1 khz. Shall not be used with BRIR -makeBE = true; % put at true to generate BE rom table and at false to support more type of sofa file -performDiffuseFieldEq = true; % at true perform diffuse field equalization during param bin taps computation. Should not by used when HRIR are alredy diffuse field equalized writeRomFileOutput = true & ~generateCustomBinaryFile; %% generation of rom files if true writeBinaryOutput = true; %% generation of binary files if true. Always true for TD renderer writeEachRendererBinaryOutput = false; %% generation of binary split files each containing binary data for individual renderer @@ -64,29 +61,9 @@ ivas_path = ['..' filesep '..' filesep]; %% Set input files if generateCustomBinaryFile - % output_bin_name = 'ivas_binaural_custom'; - % hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; - % brir_file_name = 'BRIR_Auditorium_S1_R1_CICP19.sofa'; - %brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; - - % output_bin_name = 'ivas_binaural_custom_fabian_hrir'; - % hrir_file_name = 'FABIAN_HRIR_measured_HATO_0_norm.sofa'; - % brir_file_name = 'bbcrdlr_all_speakers.sofa'; - % brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; - - output_bin_name = 'ivas_binaural_custom_no_optim'; - hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; % fail for TD renderer - brir_file_name = 'BRIR_Auditorium_S1_R1_CICP19.sofa'; - brirOptimCfgFile = 'brir_no_optim.cfg'; - - % hrir_file_name = 'ari-dtf_nh2.sofa'; % fail for TD renderer -% hrir_file_name = 'BiLi-IRC_1101_C_HRIR_96000.sofa'; % fail for TD renderer - % hrir_file_name = 'cipic-subject_003.sofa'; % fail for TD renderer - % hrir_file_name = 'Listen-IRC_1002_C_44100.sofa'; % fail for TD renderer - % hrir_file_name = 'mit_kemar_normal_pinna.sofa'; % fail for TD renderer - %hrir_file_name = 'RIEC_hrir_subject_001.sofa'; % fail for TD renderer - % output_bin_name = 'ivas_binaural_custom_no_optim'; - %brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa' + hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; + output_bin_name = 'ivas_binaural_custom'; + brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa'; else hrir_file_name = 'HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'; output_bin_name = 'ivas_binaural'; @@ -96,7 +73,6 @@ hrir_path = fullfile ('.','HRIRs_sofa'); brir_path = fullfile ('.','BRIRs_sofa'); %% Set output files rom_path = [ivas_path 'lib_rend']; -rom_path_fx = './'; output_binary_path = fullfile ('.','binaural_renderers_hrtf_data'); hrir_file = fullfile( hrir_path, hrir_file_name); @@ -121,11 +97,9 @@ end dataSpec.hrfInDir = hrir_file; dataSpec.hrfOutDir = binary_path; dataSpec.genRomFile = writeRomFileOutput; -dataSpec.genRomFileFx = true; dataSpec.genBinaryFile = writeBinaryOutput; dataSpec.makeFxFltBE = true; dataSpec.romOutDir = rom_path; -dataSpec.romOutDir_fx = rom_path_fx; Mod_Hrf_Itd_Main(dataSpec); %% generate crend rom or binary values @@ -133,16 +107,15 @@ SOFA_save_to_mat(hrir_file); SOFA_save_to_mat(brir_file,'Combined'); if generateCustomBinaryFile - convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1,normalize); + convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1); else - convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128,normalize); + convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128); end command = ['.' filesep() 'generate_crend_ivas_tables']; if writeRomFileOutput == true command = [command ' -lib_rend_path ' rom_path]; - command = [command ' -lib_rend_path_fx ' rom_path_fx]; end if writeBinaryOutput == true command = [command ... @@ -151,10 +124,10 @@ if writeBinaryOutput == true ]; end -if generateCustomBinaryFile && exist('brirOptimCfgFile', 'var') && isempty(brirOptimCfgFile)==false +if generateCustomBinaryFile command = [command ... - ' -brir_optim_config_path ' ... - ' ' brirOptimCfgFile ' ' ... + ' -brir_optim_config_path' ... + ' brir_low_complexity_optim.cfg ' ... ]; end command = [command ... @@ -182,7 +155,6 @@ bin_file = fullfile('.',binary_path, fastconv_bin_file ); if writeRomFileOutput == true rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); - fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); copyfile('ivas_license_header.template',rom_file,'f'); @@ -200,24 +172,6 @@ if writeRomFileOutput == true '#define WMC_TOOL_SKIP'); fclose(fp); - - copyfile('ivas_license_header.template',fx_rom_file,'f'); - - fp_fx = fopen(fx_rom_file,'at'); - fprintf(fp_fx,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... - '#include ', ... - '#include "options.h"', ... - '#ifdef DEBUGGING', ... - '#include "debug.h"', ... - '#endif', ... - '#include "cnst.h"', ... - '#include "ivas_cnst.h"', ... - '#include "wmc_auto.h"', ... - '/* clang-format off */', ... - '#define WMC_TOOL_SKIP'); - - fclose(fp_fx); - end generate_tables_for_fastconv @@ -226,7 +180,6 @@ generate_tables_for_fastconv param_bin_file = ['parambin_' erase(hrir_file_name, '.sofa') '_' erase(brir_file_name, '.sofa') '.bin']; bin_file = fullfile('.',binary_path, param_bin_file ); - generate_tables_for_parametric_binauralizer if writeRomFileOutput == true @@ -237,14 +190,6 @@ if writeRomFileOutput == true fprintf(fp,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); fclose(fp); - - fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); - - fp_fx = fopen(fx_rom_file,'at'); - - fprintf(fp_fx,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); - - fclose(fp_fx); end %% concatenate all previously generated binary files to binary file for IVAS decoder or renderer. One per sample rates diff --git a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m index bf14f1c042..320901b205 100644 --- a/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m +++ b/scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa_test_other_database.m @@ -46,11 +46,7 @@ addpath(genpath('../td_object_renderer/modeling_tool/')); %% Set arguments -generateCustomBinaryFile = true; -normalize = true; % put a true to normalize input HRTF file. Diffuse field spectrum will be equal to one at 1 khz. Shall not be used with BRIR -makeBE = true; % put at true to generate BE rom table and at false to support more type of sofa file -performDiffuseFieldEq = true; % at true perform diffuse field equalization during param bin taps computation. Should not by used when HRIR are alredy diffuse field equalized -writeRomFileOutput = true & ~generateCustomBinaryFile; %% generation of rom files if true +writeRomFileOutput = false; %% generation of rom files if true writeBinaryOutput = true; %% generation of binary files if true. Always true for TD renderer writeEachRendererBinaryOutput = true; %% generation of binary split files each containing binary data for individual renderer @@ -58,86 +54,46 @@ writeEachRendererBinaryOutput = true; %% generation of binary split files each c ivas_path = ['..' filesep '..' filesep]; %% Set input files -if generateCustomBinaryFile - % output_bin_name = 'ivas_binaural_custom'; - % hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; - % brir_file_name = 'BRIR_Auditorium_S1_R1_CICP19.sofa'; - %brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; - - % output_bin_name = 'ivas_binaural_custom_fabian_hrir'; - % hrir_file_name = 'FABIAN_HRIR_measured_HATO_0_norm.sofa'; - % brir_file_name = 'bbcrdlr_all_speakers.sofa'; - % brirOptimCfgFile = 'brir_low_complexity_optim.cfg'; - - output_bin_name = 'ivas_binaural_custom_no_optim'; - hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; % fail for TD renderer - brir_file_name = 'bbcrdlr_all_speakers.sofa'; - brirOptimCfgFile = 'brir_no_optim.cfg'; - - % hrir_file_name = 'ari-dtf_nh2.sofa'; % fail for TD renderer -% hrir_file_name = 'BiLi-IRC_1101_C_HRIR_96000.sofa'; % fail for TD renderer - % hrir_file_name = 'cipic-subject_003.sofa'; % fail for TD renderer - % hrir_file_name = 'Listen-IRC_1002_C_44100.sofa'; % fail for TD renderer - % hrir_file_name = 'mit_kemar_normal_pinna.sofa'; % fail for TD renderer - %hrir_file_name = 'RIEC_hrir_subject_001.sofa'; % fail for TD renderer - % output_bin_name = 'ivas_binaural_custom_no_optim'; - %brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa' -else - hrir_file_name = 'HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'; - output_bin_name = 'ivas_binaural'; - brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa'; -end +%hrir_file_name = 'D1_48K_24bit_256tap_FIR_SOFA.sofa'; +%hrir_file_name = 'HRIR_128_Meth5_IRC_51_Q10_symL_Itrp1_48000.sofa'; +hrir_file_name = 'HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'; +% hrir_file_name = 'IRC_1100_I_HRIR_48000.sofa'; +% hrir_file_name = 'IRC_1002_C_44100.sofa'; + +brir_file_name = 'IIS_BRIR_officialMPEG_Combined.sofa'; hrir_path = fullfile ('.','HRIRs_sofa'); brir_path = fullfile ('.','BRIRs_sofa'); %% Set output files rom_path = [ivas_path 'lib_rend']; -rom_path_fx = './'; -output_binary_path = fullfile ('.','binaural_renderers_hrtf_data'); - -hrir_file = fullfile( hrir_path, hrir_file_name); -brir_file = fullfile( brir_path, brir_file_name); - -binary_path = fullfile (output_binary_path,'temp'); +rom_path = './'; +binary_path = fullfile ('.','binaural_renderers_hrtf_data'); binary_name = [erase(hrir_file_name,'.sofa') '+' erase(brir_file_name, '.sofa') ]; -if ~(exist(binary_path, 'dir')) +output_bin_name = 'ivas_binaural_irc_1002'; +if(exist(binary_path, 'dir')==0) mkdir(binary_path); end +hrir_file = fullfile( hrir_path, hrir_file_name); +brir_file = fullfile( brir_path, brir_file_name); + %% generate td binauralizer rom or binary values dataSpec.dataBase = 'IVAS'; -if generateCustomBinaryFile - dataSpec.subjId = 'custom'; -else - dataSpec.subjId = 'default'; -end +dataSpec.subjId = 'custom'; % specify HR filter directory dataSpec.hrfInDir = hrir_file; dataSpec.hrfOutDir = binary_path; dataSpec.genRomFile = writeRomFileOutput; -dataSpec.genRomFileFx = true; -dataSpec.genBinaryFile = writeBinaryOutput; -dataSpec.makeFxFltBE = true; dataSpec.romOutDir = rom_path; -dataSpec.romOutDir_fx = rom_path_fx; Mod_Hrf_Itd_Main(dataSpec); %% generate crend rom or binary values -SOFA_save_to_mat(hrir_file); -SOFA_save_to_mat(brir_file,'Combined'); - -if generateCustomBinaryFile - convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,-1,normalize); -else - convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128,normalize); -end - +convert_SD2SHD_HRIRs(hrir_path,hrir_file_name,128); command = ['.' filesep() 'generate_crend_ivas_tables']; if writeRomFileOutput == true command = [command ' -lib_rend_path ' rom_path]; - command = [command ' -lib_rend_path_fx ' rom_path_fx]; end if writeBinaryOutput == true command = [command ... @@ -146,21 +102,15 @@ if writeBinaryOutput == true ]; end -if generateCustomBinaryFile && exist('brirOptimCfgFile', 'var') && isempty(brirOptimCfgFile)==false - command = [command ... - ' -brir_optim_config_path ' ... - ' ' brirOptimCfgFile ' ' ... - ]; -end command = [command ... ' -compute_reverb_rom ' ... - erase(hrir_file,'.sofa') '.mat ' ... + hrir_file ' ' ... ' 5 ' ... - erase(hrir_file,'.sofa') '.mat ' ... - erase(hrir_file,'.sofa') '_FOA.mat ' ... - erase(hrir_file,'.sofa') '_HOA2.mat ' ... - erase(hrir_file,'.sofa') '_HOA3.mat ' ... - erase(brir_file,'.sofa') '.mat ' ]; + hrir_file ' ' ... + erase(hrir_file,'.sofa') '_FOA.sofa ' ... + erase(hrir_file,'.sofa') '_HOA2.sofa ' ... + erase(hrir_file,'.sofa') '_HOA3.sofa ' ... + brir_file ]; %display(command); @@ -174,46 +124,30 @@ end fastconv_bin_file = ['fastconv_' erase(hrir_file_name, '.sofa') '_' erase(brir_file_name, '.sofa') '.bin']; bin_file = fullfile('.',binary_path, fastconv_bin_file ); - -if writeRomFileOutput == true - rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); - fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); - - copyfile('ivas_license_header.template',rom_file,'f'); - - fp = fopen(rom_file,'at'); - fprintf(fp,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... - '#include ', ... - '#include "options.h"', ... - '#ifdef DEBUGGING', ... - '#include "debug.h"', ... - '#endif', ... - '#include "cnst.h"', ... - '#include "ivas_cnst.h"', ... - '#include "wmc_auto.h"', ... - '/* clang-format off */', ... - '#define WMC_TOOL_SKIP'); - - fclose(fp); - - copyfile('ivas_license_header.template',fx_rom_file,'f'); - - fp_fx = fopen(fx_rom_file,'at'); - fprintf(fp_fx,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... - '#include ', ... - '#include "options.h"', ... - '#ifdef DEBUGGING', ... - '#include "debug.h"', ... - '#endif', ... - '#include "cnst.h"', ... - '#include "ivas_cnst.h"', ... - '#include "wmc_auto.h"', ... - '/* clang-format off */', ... - '#define WMC_TOOL_SKIP'); - - fclose(fp_fx); - -end +rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); + +copyfile('ivas_license_header.template',rom_file,'f'); + +fp = fopen(rom_file,'at'); +fprintf(fp,"\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n", ... +'#include ', ... +'#include "options.h"', ... +'#ifdef DEBUGGING', ... +'#include "debug.h"', ... +'#endif', ... +'#include "cnst.h"', ... +'#include "ivas_cnst.h"', ... +'#include "wmc_auto.h"', ... +'/* clang-format off */', ... +'#define WMC_TOOL_SKIP', ... +'/*-------------------------------------------------------------------------', ... +' * Binaural rendering related ROM tables', ... +' *------------------------------------------------------------------------*/', ... +'/* Binaural rendering data set based on HRIRs */', ... +'/* Tables generated by the script at "scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m */', ... +'/* Can be replaced by your own generated HRIR tables */'); + +fclose(fp); generate_tables_for_fastconv @@ -221,34 +155,26 @@ generate_tables_for_fastconv param_bin_file = ['parambin_' erase(hrir_file_name, '.sofa') '_' erase(brir_file_name, '.sofa') '.bin']; bin_file = fullfile('.',binary_path, param_bin_file ); - generate_tables_for_parametric_binauralizer -if writeRomFileOutput == true - rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); - - fp = fopen(rom_file,'at'); - - fprintf(fp,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); - - fclose(fp); +rom_file = fullfile(rom_path, 'ivas_rom_binauralRenderer.c'); - fx_rom_file = fullfile(rom_path_fx, 'ivas_rom_binauralRenderer_fx.c'); - - fp_fx = fopen(fx_rom_file,'at'); - - fprintf(fp_fx,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); - - fclose(fp_fx); -end +fp = fopen(rom_file,'at'); + +fprintf(fp,"\n%s\n\n%s\n", '#undef WMC_TOOL_SKIP', '/* clang-format on */'); + +fclose(fp); %% concatenate all previously generated binary files to binary file for IVAS decoder or renderer. One per sample rates if writeBinaryOutput == true td_binary_file = ['td_' erase(hrir_file_name,'.sofa') '_model_v003']; + % sampleRates = ['48' ; '32' ; '16' ]; + % for ind = 1 : length(sampleRates) + % command = ['.' filesep() 'Table_Format_Converter' filesep() 'tables_format_converter' ' -' sampleRates(ind,:) ' ']; command = ['.' filesep() 'Table_Format_Converter' filesep() 'tables_format_converter']; command = [command ... - ' -output_file_path ' output_binary_path ... + ' -output_file_path ' binary_path ... ' -output_file_name ' output_bin_name ... ' -input_mixerconv_hrir_file_path ' binary_path ... ' -input_mixerconv_hrir_file_name ' binary_name ... @@ -269,12 +195,14 @@ if writeBinaryOutput == true error(cmdout) return end +% end end %% Foa all previously generated binary files, convert to binary files for IVAS decoder or renderer. One per sample rates and per renderers if writeBinaryOutput == true && writeEachRendererBinaryOutput == true td_binary_file = ['td_' erase(hrir_file_name,'.sofa') '_model_v003']; +% sampleRates = ['48' ; '32' ; '16' ]; command = ['.' filesep() 'Table_Format_Converter' filesep() 'tables_format_converter']; commandRendererList = [... " -input_mixerconv_hrir_file_path " binary_path ... @@ -290,11 +218,13 @@ if writeBinaryOutput == true && writeEachRendererBinaryOutput == true " -input_fastconv_file_path " binary_path ... " -input_fastconv_file_name " fastconv_bin_file ... ]; + % for ind = 1 : length(sampleRates) for indList = 3 : 4 : length(commandRendererList) pos = strfind(commandRendererList{indList},"_"); pos(2) = strfind(commandRendererList{indList},"_file_name"); output_bin_name_list = [output_bin_name commandRendererList{indList}(pos(1):pos(2)-1) ]; - cmdl = [command ' -output_file_path ' output_binary_path ' -output_file_name ' output_bin_name_list]; +% cmdl = [command ' -output_file_path ' binary_path ' -output_file_name ' output_bin_name_list ' -' sampleRates(ind,:) ' ']; + cmdl = [command ' -output_file_path ' binary_path ' -output_file_name ' output_bin_name_list]; cmdl2 = [cmdl ... commandRendererList{indList - 2} ... commandRendererList{indList - 1} ... @@ -307,4 +237,5 @@ if writeBinaryOutput == true && writeEachRendererBinaryOutput == true return end end - end +% end + end \ No newline at end of file diff --git a/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c b/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c index 98b3413a95..d8a68e10a9 100644 --- a/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c +++ b/scripts/binauralRenderer_interface/ivas_crend_binaural_filter_design.c @@ -64,17 +64,6 @@ static void printBuf_uint16( const uint16_t *buf, uint16_t size1 ) return; } -static void printBuf_int16( const int16_t *buf, uint16_t size1 ) -{ - uint16_t ii; - for ( ii = 0; ii < size1; ++ii ) - { - printf( "%d ", (int32_t) buf[ii] ); - } - - return; -} - /* static void printBuf_int16( int16_t *buf, uint16_t size1 ) { diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m index 17aef84f9c..98b4724d99 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SD_2_ROM.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function FastConv_SD_IR = SD_2_ROM(sofa_file, num_cldfb_taps, normalize) +function FastConv_SD_IR = SD_2_ROM(sofa_file) % SD_2_ROM( rom_c_file, sofa_file, ambisonics_order, hrir_length ) % % Derived from SHD_2_ROM.m @@ -41,17 +41,15 @@ thispath = [thispath,filesep]; if ~exist('sofa_file','var') || isempty(sofa_file) sofa_file = fullfile(thispath,'..','HRIRs_sofa','HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa'); end -if ~exist('num_cldfb_taps','var') - num_cldfb_taps = 3; -end %% load SD HRIRs H = hrtf_library_loader(); -H.readSOFA(char(sofa_file),'',normalize); +H.readSOFA(char(sofa_file),'Combined',true); ls_struct = get_ls_layout_config('Combined'); IR_SD = H.XYZ_to_IR_SD([deg2rad(ls_struct.azi); deg2rad(ls_struct.ele)]); %% SD -> CLDFB via least squares error optimization [~,num_ears,num_ch] = size(IR_SD); +num_cldfb_taps = 3; IR_cldfb = zeros(60,num_cldfb_taps,num_ears,num_ch); % 60 frequency bands eval_flag = 0; % optional, = 1 requires signal processing toolbox (fftfilt) legacy_flag = 1; % = 1 used to indicate slightly too short buffers as used to generate tested coefficients diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m index 24ab9f5d76..56b2f993f5 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SHD_2_ROM.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function FastConv_SHD_IR = SHD_2_ROM( sofa_file, ambi_order, hrir_len , num_cldfb_taps, normalize) +function FastConv_SHD_IR = SHD_2_ROM( sofa_file, ambi_order, hrir_len ) % SHD_2_ROM( sofa_file, ambisonics_order, hrir_length ) % % - converts sphere-sampled Head Related Impulse Responses (HRIRs) given in sofa_file @@ -48,15 +48,13 @@ end if ~exist('hrir_len','var') hrir_len = 128; end -if ~exist('num_cldfb_taps','var') - num_cldfb_taps = 3; -end %% convert sphere-sampled HRIRs to SHD HRIRs [sofa_path,sofa_name, sofa_ext] = fileparts(sofa_file); -IR = generate_HOA_HRIRs_MOD_lens(ambi_order, sofa_path, [sofa_name,sofa_ext], hrir_len,normalize); +IR = generate_HOA_HRIRs_MOD_lens(ambi_order, sofa_path, [sofa_name,sofa_ext], hrir_len); %% SHD -> CLDFB via least squares error optimization [~,num_ears,num_ch] = size(IR); +num_cldfb_taps = 3; IR_cldfb = zeros(60,num_cldfb_taps,num_ears,num_ch); % 60 frequency bands eval_flag = 0; % optional, = 1 requires signal processing toolbox (fftfilt) legacy_flag = 1; % = 1 used to indicate slightly too short buffers as used to generate tested coefficients diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m index bb98d0a51d..8e6dd088c4 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/SOFA_save_to_mat.m @@ -90,7 +90,8 @@ if isfile(Lib_Name) assert( any(strcmpi(Sofa.Units{3}, {'metre','meter','inch'})), 'Unknown units'); if strcmpi(Sofa.Units{3},'inch' ), Sofa.Pos(3,:)=Sofa.Pos(3,:)*0.0254; end Sofa.PosSpherical = Sofa.Pos; - [Sofa.Pos(1,:),Sofa.Pos(2,:),Sofa.Pos(3,:)] = sph2cart(Sofa.PosSpherical(1,:),Sofa.PosSpherical(2,:),Sofa.PosSpherical(3,:)); + Sofa.Pos = Sofa.Pos(3,:) .* ... + [cos(Sofa.Pos(2,:)).*[cos(Sofa.Pos(1,:));sin(Sofa.Pos(1,:))];sin(Sofa.Pos(2,:))]; elseif strcmpi(Sofa.Type, 'cartesian') assert( any(strcmpi(Sofa.Units{1}, {'metre','meter','inch'})), 'Unknown units'); if strcmpi(Sofa.Units{1},'inch' ), Sofa.Pos(3,:)=Sofa.Pos(3,:)*0.0254; end diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m index 46c3fe5b50..26acf573ea 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/convert_SD2SHD_HRIRs.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function convert_SD2SHD_HRIRs(sofa_path, sofa_file, IR_size, normalize) +function convert_SD2SHD_HRIRs(sofa_path, sofa_file, IR_size) data_struct = struct.empty(3,0); @@ -38,7 +38,7 @@ sr_short = [48, 32, 16]; sr_dft_size = [240, 160, 80]; % FOA -data_struct(1).IR_data = generate_HOA_HRIRs_MOD_lens(1, sofa_path, sofa_file, IR_size,normalize); +data_struct(1).IR_data = generate_HOA_HRIRs_MOD_lens(1, sofa_path, sofa_file, IR_size); data_struct(1).HOA_name = 'FOA'; data_struct(1).n_HOA_ch = 4; data_struct(1).sr = sr; @@ -48,7 +48,7 @@ SOFA_save(data_struct(1).IR_data, sr(1), 1/sr(1), [sofa_path filesep() sofa_file SOFA_save_to_mat([sofa_path filesep() erase(sofa_file, '.sofa') '_' data_struct(1).HOA_name '.sofa']); % HOA2 -data_struct(2).IR_data = generate_HOA_HRIRs_MOD_lens(2, sofa_path, sofa_file, IR_size,normalize); +data_struct(2).IR_data = generate_HOA_HRIRs_MOD_lens(2, sofa_path, sofa_file, IR_size); data_struct(2).HOA_name = 'HOA2'; data_struct(2).n_HOA_ch = 9; data_struct(2).sr = sr; @@ -58,7 +58,7 @@ SOFA_save(data_struct(2).IR_data, sr(1), 1/sr(1), [sofa_path filesep() sofa_file SOFA_save_to_mat([sofa_path filesep() erase(sofa_file, '.sofa') '_' data_struct(2).HOA_name '.sofa']); % HOA3 -data_struct(3).IR_data = generate_HOA_HRIRs_MOD_lens(3, sofa_path, sofa_file, IR_size,normalize); +data_struct(3).IR_data = generate_HOA_HRIRs_MOD_lens(3, sofa_path, sofa_file, IR_size); data_struct(3).HOA_name = 'HOA3'; data_struct(3).n_HOA_ch = 16; data_struct(3).sr = sr; diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m index bf801144b8..8f5dc5c358 100644 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/generate_HOA_HRIRs_MOD_lens.m @@ -29,7 +29,7 @@ % the United Nations Convention on Contracts on the International Sales of Goods. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function IR_data = generate_HOA_HRIRs_MOD_lens(order, sofa_path, sofa_file_name, ir_len, normalize) +function IR_data = generate_HOA_HRIRs_MOD_lens(order, sofa_path, sofa_file_name, ir_len) % HRIR convertor - Takes sphere sampled HRIRs and converts them to % HOA HRIRs. % @@ -56,7 +56,7 @@ Vs_hi_res = Vs_hi_res.Vs_hi_res; N = 512; H = hrtf_library_loader(); -H.readSOFA(char(fullfile(sofa_path, sofa_file_name)),'',normalize); +H.readSOFA(char(fullfile(sofa_path, sofa_file_name)),'',true); if (ir_len == -1) ir_len = size(H.Data.IR,3); end diff --git a/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m b/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m index d2704a4d62..1cdc56d10b 100644 --- a/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m +++ b/scripts/binauralRenderer_interface/param_bin/generate_BRIR_in_SHD_CLDFB_PARAMETRIC.m @@ -31,7 +31,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_inputfile, SHhrtf,normalize, makeBE) +function [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_inputfile, SHhrtf) % % [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_inputfile, SHhrtf) % @@ -41,7 +41,7 @@ function [T60, lateEnes, earlyEnes] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir %% Load BRIR input file sofaData = hrtf_library_loader(); -sofaData.readSOFA(brir_inputfile,'Combined',normalize); +sofaData.readSOFA(brir_inputfile,'Combined',true); %% Get data and format it for us @@ -150,19 +150,8 @@ end % Determine T60, early energies, and late energies T60 = zeros(nFFT/2,1); for band = 1:nFFT/2 - if makeBE - [~, lateStart] = max(enes(band, 5:15)); - eneDb = 10*log10(enes(band, :)); - else - eneBackwardSum = zeros(1,length(enes(band, :))); - eneBackwardSum(end) = enes(band,end); - for indt = length(eneBackwardSum)-1:-1:1 - eneBackwardSum(indt) = eneBackwardSum(indt+1) + enes(band, indt); - end - [~, lateStart] = max(eneBackwardSum(5:15)); - - eneDb = 10*log10(eneBackwardSum); - end + [~, lateStart] = max(enes(band, 5:15)); + eneDb = 10*log10(enes(band, :)); indices = [lateStart:maxIndexInRangeSmooth(band)]; % Linear fitting a line, determining T60 based on it diff --git a/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m b/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m index aedea91ab7..5fd980cb13 100644 --- a/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m +++ b/scripts/binauralRenderer_interface/param_bin/generate_HRIR_in_SHD_CLDFB_PARAMETRIC.m @@ -30,7 +30,7 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function SHhrtf = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_inputfile, performDiffuseFieldEq, normalize) +function SHhrtf = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_inputfile, performDiffuseFieldEq) % % SHhrtf = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_inputfile) % @@ -43,7 +43,7 @@ end %% Load HRIR input file sofaData = hrtf_library_loader(); -sofaData.readSOFA(hrir_inputfile,'',normalize); +sofaData.readSOFA(hrir_inputfile,'',true); %% Get data and format it for us % Input HRIR data from SOFA. After permuation, in order (ear, dirIndex, response) diff --git a/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m b/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m index 709d2af8c9..06a2c22351 100644 --- a/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m +++ b/scripts/binauralRenderer_interface/param_bin/generate_tables_for_parametric_binauralizer.m @@ -51,15 +51,6 @@ end if ~exist("writeRomFileOutput",'var') writeRomFileOutput = true; end -if ~exist("normalize",'var') - normalize = true; -end -if ~exist("makeBE",'var') - makeBE = true; -end -if ~exist("performDiffuseFieldEq",'var') - performDiffuseFieldEq = true; -end if ~exist("writeRomFileFx",'var') writeRomFileFx = false; end @@ -75,9 +66,6 @@ end if ~exist("rom_file",'var') rom_file = fullfile('.', 'ivas_rom_binauralRenderer.c'); end -if ~exist("fx_rom_file",'var') - fx_rom_file = fullfile('.', 'ivas_rom_binauralRenderer_fx.c'); -end if ~exist("bin_file",'var') bin_file = fullfile('.', 'parambin_binary_rom.bin'); end @@ -100,41 +88,43 @@ if writeRomFileOutput fprintf(fid, '#ifdef DEBUGGING\n'); fprintf(fid, '/* Generated on %s with Matlab version %s by %s on %s */\n', datetime("today"), version, username, computer); fprintf(fid, '#endif\n\n\n'); - - fid_fx = fopen(fullfile('.', fx_rom_file), 'at'); - fprintf(fid_fx, '#ifdef DEBUGGING\n'); - fprintf(fid_fx, '/* Generated on %s with Matlab version %s by %s on %s */\n', datetime("today"), version, username, computer); - fprintf(fid_fx, '#endif\n\n\n'); - end %% Generate C-code tables for RENDERER_BINAURAL_PARAMETRIC (SHD) disp('Processing HRIR for parametric renderer...'); -SHhrtf_float = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_file, performDiffuseFieldEq, normalize); +SHhrtf_float = generate_HRIR_in_SHD_CLDFB_PARAMETRIC(hrir_file, true); -%% compute scaling factor and set floating point precision to Word16 +%% compute scaling factor and set floating point precision to int16_t [SHhrtf, factorQ_SHhrtf] = make_be_with_fx(SHhrtf_float,15); SHhrtf_fx = SHhrtf .* (2.^double(factorQ_SHhrtf)); if writeRomFileOutput - fprintf(fid_fx, 'const Word16 hrtfShCoeffs_factorQ_fx = %d;\n', factorQ_SHhrtf); - writeData3L(fid_fx, 'const Word16 hrtfShCoeffsRe_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', real(SHhrtf_fx)); - writeData3L(fid_fx, 'const Word16 hrtfShCoeffsIm_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', imag(SHhrtf_fx)); - if makeFxFltBE - writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf)); - writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf)); + if writeRomFileFx + fprintf(fid, 'const int16_t hrtfShCoeffs_factorQ = %d;\n', factorQ_SHhrtf); + writeData3L(fid, 'const int16_t hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', real(SHhrtf_fx)); + writeData3L(fid, 'const int16_t hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%d', imag(SHhrtf_fx)); else - writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf_float)); - writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf_float)); + if makeFxFltBE + writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf)); + writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf)); + else + writeData3L(fid, 'const float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', real(SHhrtf_float)); + writeData3L(fid, 'const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]', '%a', imag(SHhrtf_float)); + end end end %% Generate C-code tables for RENDERER_BINAURAL_PARAMETRIC_ROOM (SHD) disp('Processing BRIR for parametric renderer...'); -[T60_float, lateEnes_float, earlyEnes_float] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_file, SHhrtf, normalize, makeBE); +[T60_float, lateEnes_float, earlyEnes_float] = generate_BRIR_in_SHD_CLDFB_PARAMETRIC(brir_file, SHhrtf); +if generateCustomBinaryFile == true + T60_float = T60_float * 2; + lateEnes_float = lateEnes_float * 2; + earlyEnes_float = earlyEnes_float * 2; +end -%% compute scaling factor and ste floating point precision to Word32 +%% compute scaling factor and ste floating point precision to int32_t [T60, factorQ_T60] = make_be_with_fx(T60_float,15); [lateEnes, factorQ_lateEnes] = make_be_with_fx(lateEnes_float,15); [earlyEnes, factorQ_earlyEnes] = make_be_with_fx(earlyEnes_float,15); @@ -144,26 +134,35 @@ earlyEnes_fx = earlyEnes .* (2.^double(factorQ_earlyEnes)); if writeRomFileOutput % Write BRIR parameters to file - fprintf(fid_fx, 'const Word16 parametricReverberationTimes_factorQ_fx = %d;\n', factorQ_T60); - fprintf(fid_fx, 'const Word16 parametricReverberationTimes_fx[CLDFB_NO_CHANNELS_MAX] = {\n'); - fprintf(fid, 'const float parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX] = {\n'); + if writeRomFileFx + fprintf(fid, 'const int16_t parametricReverberationTimes_factorQ = %d;\n', factorQ_T60); + fprintf(fid, 'const int16_t parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX] = {\n'); + else + fprintf(fid, 'const float parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX] = {\n'); + end for k = 1:60 if mod(k-1, 10)==0 fprintf(fid, ' '); end if k < 60 - fprintf(fid_fx, '%d,', T60_fx(k)); - if makeFxFltBE - fprintf(fid, '%s,', flt2hex(T60(k))); + if writeRomFileFx + fprintf(fid, '%d,', T60_fx(k)); else - fprintf(fid, '%s,', flt2hex(T60_float(k))); + if makeFxFltBE + fprintf(fid, '%s,', flt2hex(T60(k))); + else + fprintf(fid, '%s,', flt2hex(T60_float(k))); + end end else - fprintf(fid_fx, '%d\n};', T60_fx(k)); - if makeFxFltBE - fprintf(fid, '%s\n};', flt2hex(T60(k))); + if writeRomFileFx + fprintf(fid, '%d\n};', T60_fx(k)); else - fprintf(fid, '%s\n};', flt2hex(T60_float(k))); + if makeFxFltBE + fprintf(fid, '%s\n};', flt2hex(T60(k))); + else + fprintf(fid, '%s\n};', flt2hex(T60_float(k))); + end end end if k>1 && mod(k, 10)==0 @@ -173,26 +172,35 @@ if writeRomFileOutput end end - fprintf(fid_fx, '\n\nconst Word16 parametricReverberationEneCorrections_factorQ_fx = %d;\n', factorQ_lateEnes); - fprintf(fid_fx, 'const Word16 parametricReverberationEneCorrections_fx[CLDFB_NO_CHANNELS_MAX] = {\n'); - fprintf(fid, '\n\nconst float parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = {\n'); + if writeRomFileFx + fprintf(fid, '\n\nconst int16_t parametricReverberationEneCorrections_factorQ = %d;\n', factorQ_lateEnes); + fprintf(fid, 'const int16_t parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = {\n'); + else + fprintf(fid, '\n\nconst float parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = {\n'); + end for k = 1:60 if mod(k-1, 10)==0 fprintf(fid,' '); end if k < 60 - fprintf(fid_fx, '%d,', lateEnes_fx(k)); - if makeFxFltBE - fprintf(fid, '%s,', flt2hex(lateEnes(k))); + if writeRomFileFx + fprintf(fid, '%d,', lateEnes_fx(k)); else - fprintf(fid, '%s,', flt2hex(lateEnes_float(k))); + if makeFxFltBE + fprintf(fid, '%s,', flt2hex(lateEnes(k))); + else + fprintf(fid, '%s,', flt2hex(lateEnes_float(k))); + end end else - fprintf(fid_fx, '%d\n};', lateEnes_fx(k)); - if makeFxFltBE - fprintf(fid, '%s\n};', flt2hex(lateEnes(k))); + if writeRomFileFx + fprintf(fid, '%d\n};', lateEnes_fx(k)); else - fprintf(fid, '%s\n};', flt2hex(lateEnes_float(k))); + if makeFxFltBE + fprintf(fid, '%s\n};', flt2hex(lateEnes(k))); + else + fprintf(fid, '%s\n};', flt2hex(lateEnes_float(k))); + end end end if k>1 && mod(k, 10)==0 @@ -202,26 +210,35 @@ if writeRomFileOutput end end - fprintf(fid_fx, '\n\nconst Word16 parametricEarlyPartEneCorrection_factorQ_fx = %d;\n', factorQ_earlyEnes); - fprintf(fid_fx, 'const Word16 parametricEarlyPartEneCorrection_fx[CLDFB_NO_CHANNELS_MAX] = {\n'); - fprintf(fid, '\n\nconst float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX] = {\n'); + if writeRomFileFx + fprintf(fid, '\n\nconst int16_t parametricEarlyPartEneCorrection_factorQ = %d;\n', factorQ_earlyEnes); + fprintf(fid, 'const int16_t parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX] = {\n'); + else + fprintf(fid, '\n\nconst float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX] = {\n'); + end for k = 1:60 if mod(k-1, 10)==0 fprintf(fid, ' '); end if k < 60 - fprintf(fid_fx, '%d,', earlyEnes_fx(k)); - if makeFxFltBE - fprintf(fid, '%s,', flt2hex(earlyEnes(k))); + if writeRomFileFx + fprintf(fid, '%d,', earlyEnes_fx(k)); else - fprintf(fid, '%s,', flt2hex(earlyEnes_float(k))); + if makeFxFltBE + fprintf(fid, '%s,', flt2hex(earlyEnes(k))); + else + fprintf(fid, '%s,', flt2hex(earlyEnes_float(k))); + end end else - fprintf(fid_fx, '%d\n};', earlyEnes_fx(k)); - if makeFxFltBE - fprintf(fid, '%s\n};', flt2hex(earlyEnes(k))); + if writeRomFileFx + fprintf(fid, '%d\n};', earlyEnes_fx(k)); else - fprintf(fid, '%s\n};', flt2hex(earlyEnes_float(k))); + if makeFxFltBE + fprintf(fid, '%s\n};', flt2hex(earlyEnes(k))); + else + fprintf(fid, '%s\n};', flt2hex(earlyEnes_float(k))); + end end end if k>1 && mod(k, 10)==0 @@ -234,7 +251,6 @@ end if writeRomFileOutput fclose(fid); - fclose(fid_fx); end %% diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index e67a517f98..496a23e70f 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -626,17 +626,17 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_EXOF_OtrAvg.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FER at 5% -../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32n.wav bit +../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c_cut_.004.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32n.wav_SBA_24400_32-32_DTX_Binaural_FER5.tst +../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32c_cut.004.wav_SBA_24400_32-32_DTX_Binaural_FER5.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR -../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32n.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_24400_32-32_DTX_Binaural_Headrot.tst +../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c_cut_.004.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_24400_32-32_DTX_Binaural_Headrot.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR, exo -../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32n.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_24400_32-32_DTX_Binaural_Headrot_EXOF.tst +../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c_cut_.004.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_24400_32-32_DTX_Binaural_Headrot_EXOF.tst // SBA at 32 kbps, 32kHz in, 32kHz out, FOA out ../IVAS_cod -sba 1 32000 32 testv/stvFOA32c.wav bit @@ -652,8 +652,8 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL_ROOM_IR 32 bit testv/stvFOA32c.wav_SBA_32000_32-32_BINAURAL_ROOM.tst // SBA at 32 kbps, 48kHz in, 48kHz out, MONO out, DTX, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -dtx -sba 1 32000 48 testv/stvFOA48n.wav bit -../IVAS_dec MONO 48 bit testv/stvFOA48n.wav_SBA_32000_48-48_DTX_MONO.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -dtx -sba 1 32000 48 testv/stvFOA48c_cut_.004.wav bit +../IVAS_dec MONO 48 bit testv/stvFOA48c_cut_.004.wav_SBA_32000_48-48_DTX_MONO.tst // SBA at 48 kbps, 32kHz in, 32kHz out, MONO out, random FER at 5% ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.wav bit @@ -701,26 +701,26 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec -t ../scripts/trajectories/full-circle-with-up-and-down-4s.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -rvf ../scripts/trajectories/full-circle-with-up-and-down-4s-Vector3.csv -otr ref_vec_lev BINAURAL_ROOM_IR 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_EXOF_OtrRefPosLev.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FER at 5% -../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32n.wav bit +../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c_cut_.004.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32n.wav_SBA_48000_32-32_DTX_Binaural_FER5.tst +../IVAS_dec BINAURAL 32 bit_error testv/stv3OA32c_cut_.004.wav_SBA_48000_32-32_DTX_Binaural_FER5.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR -../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32n.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_48000_32-32_DTX_Binaural_Headrot.tst +../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c_cut_.004.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_48000_32-32_DTX_Binaural_Headrot.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, DTX on, HR, exo -../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32n.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32n.wav_SBA_48000_32-32_DTX_Binaural_Headrot_EXOF.tst +../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c_cut_.004.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 32 bit testv/stv3OA32c_cut_.004.wav_SBA_48000_32-32_DTX_Binaural_Headrot_EXOF.tst // SBA at 48 kbps, 48kHz in, 48kHz out, 5_1_2 out ../IVAS_cod -sba 3 48000 48 testv/stv3OA48c.wav bit ../IVAS_dec 5_1_2 48 bit testv/stv3OA48c.wav_SBA_48000_48-48_5_1_2.tst // SBA at 64 kbps, 32kHz in, 32kHz out, FOA out, DTX, random FER at 5% -../IVAS_cod -dtx -sba 1 64000 32 testv/stvFOA32n.wav bit +../IVAS_cod -dtx -sba 1 64000 32 testv/stvFOA32c_cut_.004.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec FOA 32 bit_error testv/stvFOA32n.wav_SBA_64000_32-32_DTX_FOA_FER5.tst +../IVAS_dec FOA 32 bit_error testv/stvFOA32c.wav_SBA_64000_32-32_DTX_FOA_FER5.tst // SBA at 64 kbps, 48kHz in, 48kHz out, 5_1_4 out ../IVAS_cod -sba 1 64000 48 testv/stvFOA48c.wav bit @@ -731,12 +731,12 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 7_1_4 48 bit testv/stvFOA48c.wav_SBA_64000_48-48_7_1_4.tst // SBA at 64 kpbs, 48kHz in, 48kHz out, BINAURAL out, DTX -../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48n.wav bit -../IVAS_dec BINAURAL 48 bit testv/stvFOA48n.wav_SBA_64000_48-48_DTX_BINAURAL.tst +../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48c_cut_.004.wav bit +../IVAS_dec BINAURAL 48 bit testv/stvFOA48c_cut_.004.wav_SBA_64000_48-48_DTX_BINAURAL.tst // SBA at 64 kpbs, 48kHz in, 48kHz out, BINAURAL_ROOM out, DTX -../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48n.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stvFOA48n.wav_SBA_64000_48-48_DTX_BINAURAL_ROOM.tst +../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48c_cut_.004.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stvFOA48c_cut_.004.wav_SBA_64000_48-48_DTX_BINAURAL_ROOM.tst // SBA at 80 kbps, 32kHz in, 32kHz out, HOA3 out ../IVAS_cod -sba 3 80000 32 testv/stv3OA32c.wav bit @@ -789,8 +789,8 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec HOA2 48 bit_error testv/stv3OA48c.wav_SBA_192000_48-48_HOA2_FER5.tst // SBA at 48 kbps, 48kHz in, 48kHz out, DTX on, 5_1 out -../IVAS_cod -sba 3 -dtx 48000 48 testv/stv3OA48n.wav bit -../IVAS_dec 5_1 48 bit testv/stv3OA48n.wav_SBA_48000_48-48_DTX_5_1.tst +../IVAS_cod -sba 3 -dtx 48000 48 testv/stv3OA48c_cut_.004.wav bit +../IVAS_dec 5_1 48 bit testv/stv3OA48c_cut_.004.wav_SBA_48000_48-48_DTX_5_1.tst // SBA at 160 kbps, 32kHz in, 32kHz out, FOA out ../IVAS_cod -sba 1 160000 32 testv/stvFOA32c.wav bit @@ -871,12 +871,12 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 7_1_4 48 bit testv/stv3OA48c.wav_sw_48-48_7_1_4.tst // SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out -../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32n.wav bit +../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c_cut_.004.wav bit ../IVAS_dec BINAURAL 32 bit testv/stvFOA32c.wav_sw_32-32_DTX_BINAURAL.tst // SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, HOA3 out -../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32n.wav bit -../IVAS_dec HOA3 32 bit testv/stv3OA32n.wav_sw_32-32_DTX_HOA3.tst +../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv3OA32c_cut_.004.wav bit +../IVAS_dec HOA3 32 bit testv/stv3OA32c.wav_sw_32-32_DTX_HOA3.tst // SBA FOA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, FOA out ../IVAS_cod -sba 1 -max_band fb ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvFOA48c.wav bit @@ -923,30 +923,30 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit testv/stvFOA48c.wav_SBA_PCA_256000_48-48_BINAURAL.tst // SBA FOA bitrate switching from 13.2 kbps to 192 kbps, 32kHz in, 32kHz out, DTX on, EXT out -../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32n.wav bit -../IVAS_dec EXT 32 bit testv/stvFOA32n.wav_sw_32-32_DTX_EXT.tst +../IVAS_cod -dtx -sba 1 ../scripts/switchPaths/sw_13k2_192k_50fr.bin 32 testv/stvFOA32c_cut_.004.wav bit +../IVAS_dec EXT 32 bit testv/stvFOA32c_cut_.004.wav_sw_32-32_DTX_EXT.tst // SBA planar 2OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, EXT out -../IVAS_cod -dtx -sba -2 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv2OA32n.wav bit -../IVAS_dec EXT 32 bit testv/stv2OA32n.wav_sw_32-32_DTX_EXT.tst +../IVAS_cod -dtx -sba -2 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv2OA32c_cut_.004.wav bit +../IVAS_dec EXT 32 bit testv/stv2OA32c_cut_.004.wav_sw_32-32_DTX_EXT.tst // SBA 3OA bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, DTX on, random FER at 5%, EXT out -../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv3OA48n.wav bit +../IVAS_cod -dtx -sba 3 ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv3OA48c_cut_.004.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec EXT 48 bit_error testv/stv3OA48n.wav_sw_48-48_DTX_EXT_FER5.tst +../IVAS_dec EXT 48 bit_error testv/stv3OA48c_cut_.004.wav_sw_48-48_DTX_EXT_FER5.tst // SBA planar FOA bitrate switching from 13.2 kbps to 512 kbps, 32kHz in, 32kHz out, EXT out ../IVAS_cod -sba -1 ../scripts/switchPaths/sw_13k2_512k.bin 32 testv/stvFOA32c.wav bit -../IVAS_dec EXT 32 bit testv/stvFOA32c.wav_sw_32-32_EXT.tst +../IVAS_dec EXT 32 bit testv/stvFOA32c.wav_sw_32-32_DTX_EXT.tst // SBA 2OA bitrate switching from 13.2 kbps to 512 kbps, 32kHz in, 32kHz out, EXT out ../IVAS_cod -sba 2 ../scripts/switchPaths/sw_13k2_512k.bin 32 testv/stv2OA32c.wav bit -../IVAS_dec EXT 32 bit testv/stv2OA32c.wav_sw_32-32_EXT.tst +../IVAS_dec EXT 32 bit testv/stv2OA32c.wav_sw_32-32_DTX_EXT.tst // SBA planar 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, random FER at 5%, EXT out ../IVAS_cod -sba -3 ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv3OA48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec EXT 48 bit_error testv/stv3OA48c.wav_sw_48-48_EXT_FER5.tst +../IVAS_dec EXT 48 bit_error testv/stv3OA48c.wav_sw_48-48_DTX_EXT_FER5.tst // SBA 3OA at 96 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out default configuration ../IVAS_cod -sba 3 512000 48 testv/stv3OA48c.wav bit @@ -958,204 +958,204 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -masa 1 testv/stv_20sec_MASA_varDir1TC.met 13200 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_13200_48-48_BINAURAL.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -masa 1 testv/stv1MASA1TC48c.met 13200 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv1MASA1TC48c.wav_13200_48-48_BINAURAL.tst // MASA 1dir 1TC at 16.4 kbps, 48kHz in, 48kHz out, HOA3 out, random FER at 5% -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 16400 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 16400 48 testv/stv1MASA1TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec HOA3 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_16400_48-48_HOA3_FER5.tst +../IVAS_dec HOA3 48 bit_error testv/stv1MASA1TC48c.wav_16400_48-48_HOA3_FER5.tst // MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-48_BinauralRoom.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 24400 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv1MASA1TC48c.wav_24400_48-48_BinauralRoom.tst // MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-48_BinauralRoom_Headrot.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 24400 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA1TC48c.wav_24400_48-48_BinauralRoom_Headrot.tst // MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, exo -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-48_BinauralRoom_Headrot_EXOF.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 24400 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA1TC48c.wav_24400_48-48_BinauralRoom_Headrot_EXOF.tst // MASA 1dir 1TC at 32 kbps, 48kHz in, 48kHz out, 7_1_4, random FER at 5% -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 32000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 32000 48 testv/stv1MASA1TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 7_1_4 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_32000_48-48_7_1_4_FER5.tst +../IVAS_dec 7_1_4 48 bit_error testv/stv1MASA1TC48c.wav_32000_48-48_7_1_4_FER5.tst // MASA 1dir 1TC at 48 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 48000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_MASA_varDir1TC.wav_48000_48-48_MONO.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 48000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec MONO 48 bit testv/stv1MASA1TC48c.wav_48000_48-48_MONO.tst // MASA 1dir 1TC at 64 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 64000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec STEREO 48 bit testv/stv_20sec_MASA_varDir1TC.wav_64000_48-48_STEREO.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 64000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec STEREO 48 bit testv/stv1MASA1TC48c.wav_64000_48-48_STEREO.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, random FER at 5% -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_FER5.tst +../IVAS_dec BINAURAL 48 bit_error testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_FER5.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_Subframe.tst +../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_Subframe.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, HR -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_Headrot.tst +../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_Headrot.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, HR, exo -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 128000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_128000_48-48_BINAURAL_Headrot_EXOF.tst +../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 128000 48 testv/stv2MASA1TC48c.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv2MASA1TC48c.wav_128000_48-48_BINAURAL_Headrot_EXOF.tst // MASA 1dir 2TC at 13.2 kbps, 48kHz in, 48kHz out, 5_1 out, random FER at 5%, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv_20sec_MASA_varDir2TC.met 13200 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv1MASA2TC48c.met 13200 48 testv/stv1MASA2TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 5_1 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_13200_48-48_5_1_FER5.tst +../IVAS_dec 5_1 48 bit_error testv/stv1MASA2TC48c.wav_13200_48-48_5_1_FER5.tst // MASA 1dir 2TC at 16.4 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 16400 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_16400_48-48_5_1.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 16400 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec 5_1 48 bit testv/stv1MASA2TC48c.wav_16400_48-48_5_1.tst // MASA 1dir 2TC at 24.4 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 24400 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec STEREO 48 bit testv/stv_20sec_MASA_varDir2TC.wav_24400_48-48_STEREO.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 24400 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec STEREO 48 bit testv/stv1MASA2TC48c.wav_24400_48-48_STEREO.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv1MASA2TC48c.wav_32000_48-48_BinauralRoom.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA2TC48c.wav_32000_48-48_BinauralRoom_Headrot.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, exo -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot_EXOF.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL_ROOM_IR 48 bit testv/stv1MASA2TC48c.wav_32000_48-48_BinauralRoom_Headrot_EXOF.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, OT -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM IR out, HR, OT, exo -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_BinauralRoom_Headrot_EXOF_OtrAvg.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv -otr avg BINAURAL_ROOM_IR 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_EXOF_OtrAvg.tst // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FER at 5% -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 48000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 48000 48 testv/stv1MASA2TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 7_1_4 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_48000_48-48_7_1_4_FER5.tst +../IVAS_dec 7_1_4 48 bit_error testv/stv1MASA2TC48c.wav_48000_48-48_7_1_4_FER5.tst // MASA 1dir 2TC at 80 kbps, 32kHz in, 16kHz out, STEREO out ../IVAS_cod -masa 2 testv/stv1MASA2TC32c.met 80000 32 testv/stv1MASA2TC32c.wav bit ../IVAS_dec STEREO 16 bit testv/stv1MASA2TC32c.wav_80000_32-16_STEREO.tst // MASA 1dir 2TC at 96 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 96000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_MASA_varDir2TC.wav_96000_48-48_MONO.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 96000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec MONO 48 bit testv/stv1MASA2TC48c.wav_96000_48-48_MONO.tst // MASA 1dir 2TC at 160 kbps, 48kHz in, 48kHz out, HOA3 out, random FER at 5% -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 160000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 160000 48 testv/stv1MASA2TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec HOA3 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_160000_48-48_HOA3_FER5.tst +../IVAS_dec HOA3 48 bit_error testv/stv1MASA2TC48c.wav_160000_48-48_HOA3_FER5.tst // MASA 1dir 2TC at 256 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 256000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_256000_48-48_5_1.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 256000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec 5_1 48 bit testv/stv1MASA2TC48c.wav_256000_48-48_5_1.tst // MASA 2dir 2TC at 48 kbps, 48kHz in, 48kHz out, 5_1 out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -masa 2 testv/stv_20sec_MASA_varDir2TC.met 48000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_48000_48-48_5_1.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_FB.txt -masa 2 testv/stv2MASA2TC48c.met 48000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec 5_1 48 bit testv/stv2MASA2TC48c.wav_48000_48-48_5_1.tst // MASA 2dir 2TC at 64 kbps, 48kHz in, 48kHz out, EXTERNAL out, random FER at 5% -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 64000 48 testv/stv2MASA2TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec EXT 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_external_FER5.tst +../IVAS_dec EXT 48 bit_error testv/stv2MASA2TC48c.wav_64000_48-48_external_FER5.tst // MASA 2dir 2TC at 64 kbps, 48kHz in, 48kHz out, BINAURAL out, HR -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_BINAURAL_Headrot.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 64000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL 48 bit testv/stv2MASA2TC48c.wav_64000_48-48_BINAURAL_Headrot.tst // MASA 2dir 2TC at 64 kbps, 48kHz in, 48kHz out, BINAURAL out, HR, exo -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_BINAURAL_Headrot_EXOF.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 64000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec -t testv/headrot.csv -exof testv/headrot_case00_3000_q_combinedRotationTest.csv BINAURAL 48 bit testv/stv2MASA2TC48c.wav_64000_48-48_BINAURAL_Headrot_EXOF.tst // MASA 2dir 2TC at 128 kbps, 48kHz in, 48kHz out, FOA out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 128000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec FOA 48 bit testv/stv_20sec_MASA_varDir2TC.wav_128000_48-48_FOA.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 128000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec FOA 48 bit testv/stv2MASA2TC48c.wav_128000_48-48_FOA.tst // MASA 2dir 2TC at 192 kbps, 48kHz in, 48kHz out, 5_1_4 out, random FER at 5% -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 192000 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 192000 48 testv/stv2MASA2TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec 5_1_4 48 bit_error testv/stv_20sec_MASA_varDir2TC.wav_192000_48-48_5_1_4_FER5.tst +../IVAS_dec 5_1_4 48 bit_error testv/stv2MASA2TC48c.wav_192000_48-48_5_1_4_FER5.tst // MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 384000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_384000_48-48_BinauralRoom.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 384000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv2MASA2TC48c.wav_384000_48-48_BinauralRoom.tst // MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM IR out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv_20sec_MASA_varDir2TC.met 384000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv_20sec_MASA_varDir2TC.wav_384000_48-48_BinauralRoom.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_WB.txt -masa 2 testv/stv2MASA2TC48c.met 384000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stv2MASA2TC48c.wav_384000_48-48_BinauralRoom.tst // MASA 2dir 2TC at 512 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 512000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_512000_48-48_5_1.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 512000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec 5_1 48 bit testv/stv2MASA2TC48c.wav_512000_48-48_5_1.tst // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 13200 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir1TC.wav_13200_48-48_EXT.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 13200 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv1MASA1TC48c.wav_13200_48-48_EXT.tst // MASA 1dir 2TC at 16.4 kbps, 16kHz in, 48kHz out, EXT out ../IVAS_cod -masa 2 testv/stv1MASA2TC16c.met 16400 16 testv/stv1MASA2TC16c.wav bit ../IVAS_dec EXT 48 bit testv/stv1MASA2TC16c.wav_16400_16-48_EXT.tst // MASA 2dir 1TC at 24.4 kbps, 48kHz in, 32kHz out, EXT out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 24400 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec EXT 32 bit testv/stv_20sec_MASA_varDir1TC.wav_24400_48-32_EXT.tst +../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 24400 48 testv/stv2MASA1TC48c.wav bit +../IVAS_dec EXT 32 bit testv/stv2MASA1TC48c.wav_24400_48-32_EXT.tst // MASA 2dir 2TC at 32 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 32000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_32000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 32000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_32000_48-48_EXT.tst // MASA 1dir 1TC at 48 kbps, 32kHz in, 48kHz out, EXT out ../IVAS_cod -masa 1 testv/stv1MASA1TC32c.met 48000 32 testv/stv1MASA1TC32c.wav bit ../IVAS_dec EXT 48 bit testv/stv1MASA1TC32c.wav_48000_32-48_EXT.tst // MASA 1dir 2TC at 64 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 64000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_64000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 64000 48 testv/stv1MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv1MASA2TC48c.wav_64000_48-48_EXT.tst // MASA 2dir 1TC at 80 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 80000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir1TC.wav_80000_48-48_EXT.tst +../IVAS_cod -masa 1 testv/stv2MASA1TC48c.met 80000 48 testv/stv2MASA1TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA1TC48c.wav_80000_48-48_EXT.tst // MASA 2dir 2TC at 96 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 96000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_96000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 96000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_96000_48-48_EXT.tst // MASA 1dir 2TC at 128 kbps, 48kHz in, 48kHz out, DTX on, EXT out ../IVAS_cod -dtx -masa 2 testv/stv1MASA2TC48n.met 128000 48 testv/stv1MASA2TC48n.wav bit ../IVAS_dec EXT 48 bit testv/stv1MASA2TC48n.wav_128000_48-48_DTX_EXT.tst // MASA 2dir 2TC at 160 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 160000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_160000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 160000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_160000_48-48_EXT.tst // MASA 2dir 2TC at 192 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 192000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_192000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 192000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_192000_48-48_EXT.tst // MASA 2dir 2TC at 256 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 256000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_256000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 256000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_256000_48-48_EXT.tst // MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 384000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_384000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 384000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_384000_48-48_EXT.tst // MASA 2dir 2TC at 512 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met 512000 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_MASA_varDir2TC.wav_512000_48-48_EXT.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met 512000 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stv2MASA2TC48c.wav_512000_48-48_EXT.tst // MASA 1dir 1TC at 13.2 kbps, 48kHz in, 48kHz out, DTX on, 7_1_4 out ../IVAS_cod -dtx -masa 1 testv/stv1MASA1TC48n.met 13200 48 testv/stv1MASA1TC48n.wav bit @@ -1174,40 +1174,40 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 5_1 48 bit testv/stv1MASA2TC48n.wav_32000_48-48_DTX_5_1.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, 5_1 out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec 5_1 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_5_1.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit +../IVAS_dec 5_1 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_5_1.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec STEREO 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_STEREO.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit +../IVAS_dec STEREO 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_STEREO.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_BINAURAL.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_BINAURAL.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, FOA out -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec FOA 48 bit testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_FOA.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit +../IVAS_dec FOA 48 bit testv/stv1MASA1TC48n.wav_sw_48-48_FOA.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out (Model from file) -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_BINAURAL.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin BINAURAL 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_BINAURAL.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_MONO.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit +../IVAS_dec MONO 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_MONO.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, 7_1 out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec 7_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_7_1.tst +../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit +../IVAS_dec 7_1 48 bit testv/stv1MASA2TC48n.wav_sw_48-48_7_1.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, 7_1 out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec 7_1 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_7_1.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec 7_1 48 bit testv/stv2MASA2TC48c.wav_sw_48-48_7_1.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_BINAURAL.tst +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv2MASA2TC48c.wav_sw_48-48_BINAURAL.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, DTX on, BINAURAL out, random FER at 5% ../IVAS_cod -dtx -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit @@ -1215,25 +1215,25 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec BINAURAL 48 bit_error testv/stv1MASA2TC48n.wav_sw_48-48_DTX_BINAURAL_FER5.tst // MASA 1dir 1TC at 256kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out default configuration -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48.tst // MASA 1dir 1TC at 256kbps, 48kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out custom configuration -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec -render_config testv/rend_config_combined.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48_custom_config.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48_custom_config.tst // MASA 1dir 1TC at 256kbps, 48kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out default configuration, random FER at 5% -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit_error testv/stv_20sec_MASA_varDir1TC.wav_256000_48-48_BINAURAL_ROOM_REVERB_FER5.tst +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit_error testv/stv1MASA1TC48c.wav_256000_48-48_BINAURAL_ROOM_REVERB_FER5.tst // MASA 1dir 1TC at 256 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out, HR deafult configuration -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot.tst // MASA 1dir 1TC at 256 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out, HR custom configuration -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met 256000 48 testv/stv_20sec_MASA_varDir1TC.wav bit -../IVAS_dec -render_config testv/rend_config_combined.cfg -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_MASA_varDir1TC.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot_custom_config.tst +../IVAS_cod -masa 1 testv/stv1MASA1TC48c.met 256000 48 testv/stv1MASA1TC48c.wav bit +../IVAS_dec -render_config testv/rend_config_combined.cfg -t testv/headrot.csv BINAURAL_ROOM_REVERB 48 bit testv/stv1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_256000_48-48_Headrot_custom_config.tst // Multi-channel 5_1 at 13.2 kbps, 48kHz in, 48kHz out @@ -1643,59 +1643,59 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 32kHz out, 5_1 out, JBM Prof 5 -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 5_1 32 netsimoutput testv/stv_20sec_MASA_varDir1TC.wav_sw_48-32_5_1_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 5_1 32 netsimoutput testv/stv1MASA1TC48n.wav_sw_48-32_5_1_JBM5.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, STEREO out, JBM Prof 5 -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 48 netsimoutput testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_STEREO_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 48 netsimoutput testv/stv1MASA1TC48n.wav_sw_48-48_STEREO_JBM5.tst // MASA 1dir 1TC bitrate switching from 13.2 kbps to 128 kbps, 48kHz in, 48kHz out, FOA out, JBM Prof 5 -../IVAS_cod -masa 1 testv/stv_20sec_MASA_varDir1TC.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv_20sec_MASA_varDir1TC.wav bit +../IVAS_cod -masa 1 testv/stv1MASA1TC48n.met ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 48 testv/stv1MASA1TC48n.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv_20sec_MASA_varDir1TC.wav_sw_48-48_FOA_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv1MASA1TC48n.wav_sw_48-48_FOA_JBM5.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 16kHz out, BINAURAL out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-16_BINAURAL_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv1MASA2TC48n.wav_sw_48-16_BINAURAL_JBM5.tst // MASA 1dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 32kHz out, MONO out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv1MASA2TC48n.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv1MASA2TC48n.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 32 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-32_MONO_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 32 netsimoutput testv/stv1MASA2TC48n.wav_sw_48-32_MONO_JBM5.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, EXT out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-48_EXT_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stv2MASA2TC48c.wav_sw_48-48_EXT_JBM5.tst // MASA 2dir 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 16kHz out, BINAURAL out, JBM Prof 5 -../IVAS_cod -masa 2 testv/stv_20sec_MASA_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv_20sec_MASA_varDir2TC.wav bit +../IVAS_cod -masa 2 testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stv2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv_20sec_MASA_varDir2TC.wav_sw_48-16_BINAURAL_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 16 netsimoutput testv/stv2MASA2TC48c.wav_sw_48-16_BINAURAL_JBM5.tst // OMASA 2Dir2TC 1ISM at br sw techs 13.2 to 512 kbps start 24.4 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_IR out, JBM Prof 5 -../IVAS_cod -ism_masa 1 2 testv/stv_20sec_oMASA_1ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_1ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_1ism.bin 48 testv/stv_20sec_oMASA_1ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 1 2 testv/stvISM1.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_1ism.bin 48 testv/stvOMASA_1ISM_2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL_ROOM_IR 48 netsimoutput testv/stv_20sec_oMASA_1ISM_varDir2TC.wav_BINAURAL_ROOM_IR_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL_ROOM_IR 48 netsimoutput testv/stvOMASA_1ISM_2MASA2TC48c.wav_BINAURAL_ROOM_IR_sw_48-48_JBM5.tst // OMASA 2Dir2TC 2ISM at br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 48kHz out, 7.1 out, JBM Prof 5 -../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv NULL testv/stv_20sec_oMASA_2ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv NULL testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 7_1 48 netsimoutput testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_7_1_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 7_1 48 netsimoutput testv/stvOMASA_2ISM_2MASA2TC48c.wav_7_1_sw_48-48_JBM5.tst // OMASA 2Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 160 kbps, 48kHz in, 48kHz out, MONO out, JBM Prof 5 -../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 48 netsimoutput testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_MONO_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP MONO 48 netsimoutput testv/stvOMASA_3ISM_2MASA2TC48c.wav_MONO_sw_48-48_JBM5.tst // OMASA 2Dir1TC 3ISM at br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 32kHz out, STEREO out, JBM Prof 5 -../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit +../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 32 netsimoutput testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_STEREO_sw_48-32_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP STEREO 32 netsimoutput testv/stvOMASA_3ISM_2MASA1TC48c.wav_STEREO_sw_48-32_JBM5.tst // OMASA 1Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 24.4 kbps, 32kHz in, 48kHz out, 5.1.2 out, JBM Prof 5 ../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin 32 testv/stvOMASA_3ISM_1MASA2TC32c.wav bit @@ -1703,35 +1703,35 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit ../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP 5_1_2 48 netsimoutput testv/stvOMASA_3ISM_1MASA2TC32c.wav_5_1_2_sw_32-48_JBM5.tst // OMASA 1Dir1TC 4ISM at br sw techs 13.2 to 512 kbps start 32 kbps, 48kHz in, 48kHz out, BINAURAL out, JBM Prof 5 -../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit +../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_sw_48-48_JBM5.tst // OMASA 1Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, FOA out, JBM Prof 5 -../IVAS_cod -ism_masa 4 2 NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 4 2 NULL testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_FOA_sw_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stvOMASA_4ISM_1MASA2TC48c.wav_FOA_sw_48-48_JBM5.tst // OMASA 2Dir2TC 4ISM at 256 kbps, 48kHz in, 48kHz out, EXT out, JBM Prof 5 -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 256000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv NULL testv/stvISM4.csv testv/stv2MASA2TC48c.met 256000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_EXT_256000_48-48_JBM5.tst +../IVAS_dec -no_delay_cmp -Tracefile tracefile_dec -VOIP EXT 48 netsimoutput testv/stvOMASA_4ISM_2MASA2TC48c.wav_EXT_256000_48-48_JBM5.tst // OMASA 1Dir1TC 4ISM 48 kbps 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out custom configuration -../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met 48000 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit -../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst +../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met 48000 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit +../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst // OMASA 2Dir2TC 4ISM 48 kbps 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out custom configuration -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 48000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 48000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec -render_config testv/rend_config_hospital_patientroom.cfg BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_ROOM_REVERB_48000_48-48_custom_configuration.tst // OMASA 2Dir2TC 1ISM at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out -../IVAS_cod -ism_masa 1 2 NULL testv/stv_20sec_oMASA_1ISM_varDir2TC.met 13200 48 testv/stv_20sec_oMASA_1ISM_varDir2TC.wav bit -../IVAS_dec BINAURAL 48 bit testv/stv_20sec_oMASA_1ISM_varDir2TC.wav_BINAURAL_13200_48-48.tst +../IVAS_cod -ism_masa 1 2 NULL testv/stv2MASA2TC48c.met 13200 48 testv/stvOMASA_1ISM_2MASA2TC48c.wav bit +../IVAS_dec BINAURAL 48 bit testv/stvOMASA_1ISM_2MASA2TC48c.wav_BINAURAL_13200_48-48.tst // OMASA 1Dir2TC 1ISM at 128 kbps, 48kHz in, 48kHz out, EXT out, bandwidth switching -../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -ism_masa 1 2 testv/stv_20sec_oMASA_1ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_1ISM_varDir2TC.met 128000 48 testv/stv_20sec_oMASA_1ISM_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_oMASA_1ISM_varDir2TC.wav_EXT_128000_48-48.tst +../IVAS_cod -max_band testv/ivas_bws_20fr_start_SWB.txt -ism_masa 1 2 testv/stvISM1.csv testv/stv1MASA2TC48c.met 128000 48 testv/stvOMASA_1ISM_1MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stvOMASA_1ISM_1MASA2TC48c.wav_EXT_128000_48-48.tst // OMASA 2Dir1TC 1ISM at 512 kbps, 32kHz in, 48kHz out, 7.1.4 out, FER at 5% ../IVAS_cod -ism_masa 1 1 testv/stvISM1.csv testv/stv2MASA1TC48c.met 512000 32 testv/stvOMASA_1ISM_2MASA1TC32c.wav bit @@ -1743,30 +1743,30 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_dec 5_1 48 bit testv/stvOMASA_2ISM_1MASA1TC16c.wav_5_1_16400_16-48.tst // OMASA 2Dir2TC 2ISM at 32 kbps, 48kHz in, 48kHz out, STEREO out, FER at 5% -../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_2ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met 32000 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec STEREO 48 bit_error testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_STEREO_32000_48-48_FER5.tst +../IVAS_dec STEREO 48 bit_error testv/stvOMASA_2ISM_2MASA2TC48c.wav_STEREO_32000_48-48_FER5.tst // OMASA 1Dir2TC 2ISM at 256 kbps, 48kHz in, 32kHz out, BINAURAL_ROOM_IR out -../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv NULL testv/stv_20sec_oMASA_2ISM_varDir2TC.met 256000 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit -../IVAS_dec BINAURAL_ROOM_IR 32 bit testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_BINAURAL_ROOM_IR_256000_48-32.tst +../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv NULL testv/stv1MASA2TC48c.met 256000 48 testv/stvOMASA_2ISM_1MASA2TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_IR 32 bit testv/stvOMASA_2ISM_1MASA2TC48c.wav_BINAURAL_ROOM_IR_256000_48-32.tst // OMASA 2Dir1TC 3ISM at 24.4 kbps, 48kHz in, 16kHz out, FOA out, FER at 10% -../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met 24400 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit +../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met 24400 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g192 bit_error -../IVAS_dec FOA 16 bit_error testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_FOA_24400_48-16_FER10.tst +../IVAS_dec FOA 16 bit_error testv/stvOMASA_3ISM_2MASA1TC48c.wav_FOA_24400_48-16_FER10.tst // OMASA 1Dir2TC 3ISM at 32 kbps, 48kHz in, 16kHz out, STEREO out -../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit -../IVAS_dec STEREO 16 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_STEREO_32000_48-16.tst +../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met 32000 48 testv/stvOMASA_3ISM_1MASA2TC48c.wav bit +../IVAS_dec STEREO 16 bit testv/stvOMASA_3ISM_1MASA2TC48c.wav_STEREO_32000_48-16.tst // OMASA 2Dir2TC 3ISM at 32 kbps, 48kHz in, 48kHz out, 5.1.2 out -../IVAS_cod -ism_masa 3 2 NULL NULL NULL testv/stv_20sec_oMASA_3ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit -../IVAS_dec 5_1_2 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_5_1_2_32000_48-48.tst +../IVAS_cod -ism_masa 3 2 NULL NULL NULL testv/stv2MASA2TC48c.met 32000 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit +../IVAS_dec 5_1_2 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_5_1_2_32000_48-48.tst // OMASA 2Dir2TC 3ISM at 48 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met 48000 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_MONO_48000_48-48.tst +../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met 48000 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit +../IVAS_dec MONO 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_MONO_48000_48-48.tst // OMASA 1Dir1TC 3ISM at 64 kbps, 32kHz in, 32kHz out, BINAURAL out ../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA1TC48c.met 64000 32 testv/stvOMASA_3ISM_1MASA1TC32c.wav bit @@ -1777,79 +1777,79 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g ../IVAS_dec 5_1_4 16 bit testv/stvOMASA_3ISM_2MASA2TC32c.wav_5_1_4_80000_32-16.tst // OMASA 2Dir1TC 3ISM at 96 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met 96000 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_MONO_96000_48-48.tst +../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met 96000 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit +../IVAS_dec MONO 48 bit testv/stvOMASA_3ISM_2MASA1TC48c.wav_MONO_96000_48-48.tst // OMASA 1Dir2TC 3ISM at 160 kbps, 16kHz in, 32kHz out, HOA3 out ../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met 160000 16 testv/stvOMASA_3ISM_1MASA2TC16c.wav bit ../IVAS_dec HOA3 32 bit testv/stvOMASA_3ISM_1MASA2TC16c.wav_HOA3_160000_16-32.tst // OMASA 2Dir2TC 4ISM at 13.2 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 13200 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_MONO_13200_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 13200 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec MONO 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_MONO_13200_48-48.tst // OMASA 2Dir1TC 4ISM at 24.4 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met 24400 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit -../IVAS_dec STEREO 48 bit testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_STEREO_24400_48-48.tst +../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA1TC48c.met 24400 48 testv/stvOMASA_4ISM_2MASA1TC48c.wav bit +../IVAS_dec STEREO 48 bit testv/stvOMASA_4ISM_2MASA1TC48c.wav_STEREO_24400_48-48.tst // OMASA 1Dir2TC 4ISM at 32 kbps, 48kHz in, 48kHz out, FOA out, FER at 5% -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 32000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met 32000 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec FOA 48 bit_error testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_FOA_32000_48-48_FER5.tst +../IVAS_dec FOA 48 bit_error testv/stvOMASA_4ISM_1MASA2TC48c.wav_FOA_32000_48-48_FER5.tst // OMASA 1Dir1TC 4ISM at 48 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out -../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met 48000 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_ROOM_REVERB_48000_48-48.tst +../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met 48000 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_ROOM_REVERB_48000_48-48.tst // OMASA 2Dir2TC 4ISM at 64 kbps, 48kHz in, 48kHz out, HOA2 out -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv NULL NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 64000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec HOA2 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_HOA2_64000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv NULL NULL testv/stvISM4.csv testv/stv2MASA2TC48c.met 64000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec HOA2 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_HOA2_64000_48-48.tst // OMASA 1Dir2TC 4ISM at 80 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 80000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_MONO_80000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met 80000 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit +../IVAS_dec MONO 48 bit testv/stvOMASA_4ISM_1MASA2TC48c.wav_MONO_80000_48-48.tst // OMASA 2Dir2TC 4ISM at 192 kbps, 48kHz in, 48kHz out, STEREO out -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 192000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec STEREO 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_STEREO_192000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 192000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec STEREO 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_STEREO_192000_48-48.tst // OMASA 2Dir2TC 4ISM at 384 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 384000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_EXT_384000_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 384000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_EXT_384000_48-48.tst // OMASA 2Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 160 kbps, 48kHz in, 48kHz out, MONO out -../IVAS_cod -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit -../IVAS_dec MONO 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_MONO_sw_48-48.tst +../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit +../IVAS_dec MONO 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_MONO_sw_48-48.tst // OMASA 2Dir1TC 3ISM at br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 32kHz out, STEREO out, FER at 10% -../IVAS_cod -ism_masa 3 1 testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir1TC.wav bit +../IVAS_cod -ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA1TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_10pct.g192 bit_error -../IVAS_dec STEREO 32 bit_error testv/stv_20sec_oMASA_3ISM_varDir1TC.wav_STEREO_sw_48-32_FER10.tst +../IVAS_dec STEREO 32 bit_error testv/stvOMASA_3ISM_2MASA1TC48c.wav_STEREO_sw_48-32_FER10.tst // OMASA 1Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 24.4 kbps, 32kHz in, 48kHz out, 5.1.4 out ../IVAS_cod -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_24k4_omasatechs_3ism.bin 32 testv/stvOMASA_3ISM_1MASA2TC32c.wav bit ../IVAS_dec 5_1_4 48 bit testv/stvOMASA_3ISM_1MASA2TC32c.wav_5_1_4_sw_32-48.tst // OMASA 1Dir1TC 4ISM at br sw techs 13.2 to 512 kbps start 32 kbps, 48kHz in, 48kHz out, BINAURAL out, FER at 5% -../IVAS_cod -ism_masa 4 1 testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir1TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir1TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir1TC.wav bit +../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error -../IVAS_dec BINAURAL 48 bit_error testv/stv_20sec_oMASA_4ISM_varDir1TC.wav_BINAURAL_sw_48-48_FER5.tst +../IVAS_dec BINAURAL 48 bit_error testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_sw_48-48_FER5.tst // OMASA 1Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, HOA3 out -../IVAS_cod -ism_masa 4 2 NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec HOA3 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_HOA3_sw_48-48.tst +../IVAS_cod -ism_masa 4 2 NULL testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA2TC48c.wav bit +../IVAS_dec HOA3 48 bit testv/stvOMASA_4ISM_1MASA2TC48c.wav_HOA3_sw_48-48.tst // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_ROOM_REVERB_sw_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec BINAURAL_ROOM_REVERB 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_ROOM_REVERB_sw_48-48.tst // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 384 kbps, 48kHz in, 16kHz out, BINAURAL out (Model from file) -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_sw_48-16.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec -hrtf ../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin BINAURAL 16 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_sw_48-16.tst // OMASA 2Dir2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv NULL testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec EXT 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_EXT_sw_48-48.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv NULL testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_80k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec EXT 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_EXT_sw_48-48.tst // OSBA FOA 1ISM at 32 kbps, 48kHz in, 48kHz out, BINAURAL out @@ -1993,22 +1993,22 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit // OMASA 2Dir2TC 4ISM at 80 kbps, 48kHz in, 48kHz out, BINAURAL out, default object editing, 1SEP-PARAM -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 80000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit -../IVAS_dec -obj_edit NULL BINAURAL 48 bit testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_80000_48-48_OE.tst +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 80000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit +../IVAS_dec -obj_edit NULL BINAURAL 48 bit testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_80000_48-48_OE.tst // OMASA 2Dir2TC 4ISM at 256 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing, JBM Prof 5, DISC -../IVAS_cod -ism_masa 4 2 testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_4ISM_varDir2TC_ISM4.csv testv/stv_20sec_oMASA_4ISM_varDir2TC.met 256000 48 testv/stv_20sec_oMASA_4ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met 256000 48 testv/stvOMASA_4ISM_2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stv_20sec_oMASA_4ISM_varDir2TC.wav_BINAURAL_256000_48-48_OE_JBM5.tst +../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvOMASA_4ISM_2MASA2TC48c.wav_BINAURAL_256000_48-48_OE_JBM5.tst // OMASA 2Dir2TC 2ISM at 96 kbps, 48kHz in, 48kHz out, FOA out, object editing, JBM Prof 5, DISC -../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_2ISM_varDir2TC.met 96000 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit +../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met 96000 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_FOA_96000_48-48_OE_JBM5.tst +../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 netsimoutput testv/stvOMASA_2ISM_2MASA2TC48c.wav_FOA_96000_48-48_OE_JBM5.tst // OMASA 2Dir2TC 2ISM br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing -../IVAS_cod -ism_masa 2 2 testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_2ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_2ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stv_20sec_oMASA_2ISM_varDir2TC.wav bit -../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt BINAURAL 48 bit testv/stv_20sec_oMASA_2ISM_varDir2TC.wav_BINAURAL_sw_48-48_OE.tst +../IVAS_cod -ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_48k_omasatechs_2ism.bin 48 testv/stvOMASA_2ISM_2MASA2TC48c.wav bit +../IVAS_dec -obj_edit ../scripts/object_edit/combined_edit.txt BINAURAL 48 bit testv/stvOMASA_2ISM_2MASA2TC48c.wav_BINAURAL_sw_48-48_OE.tst // OSBA 3OA 4ISM at 256 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_IR out, object editing, DISC ../IVAS_cod -ism_sba 4 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stvOSBA_4ISM_3OA48c.wav bit @@ -2081,8 +2081,8 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit ../IVAS_dec -VOIP_hf_only=1 48 bit testv/stv48c.pcm_EVS_13200_48-48_STEREO_rtpdump.tst // OMASA 2Dir2TC 3ISM at br sw techs 13.2 to 512 kbps start 160 kbps, 48kHz in, 48kHz out, BINAURAL out, rtpdump, PI data -../IVAS_cod -rtpdump 3 -scene_orientation testv/headrot_case01_3000_q.csv -device_orientation testv/headrot_case00_3000_q.csv -ism_masa 3 2 testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM1.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM2.csv testv/stv_20sec_oMASA_3ISM_varDir2TC_ISM3.csv testv/stv_20sec_oMASA_3ISM_varDir2TC.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stv_20sec_oMASA_3ISM_varDir2TC.wav bit -../IVAS_dec -VOIP_hf_only=1 BINAURAL 48 bit testv/stv_20sec_oMASA_3ISM_varDir2TC.wav_BINAURAL_sw_48-48_rtpdump_PIdata.tst +../IVAS_cod -rtpdump 3 -scene_orientation testv/headrot_case01_3000_q.csv -device_orientation testv/headrot_case00_3000_q.csv -ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 testv/stvOMASA_3ISM_2MASA2TC48c.wav bit +../IVAS_dec -VOIP_hf_only=1 BINAURAL 48 bit testv/stvOMASA_3ISM_2MASA2TC48c.wav_BINAURAL_sw_48-48_rtpdump_PIdata.tst // OSBA 2ISM 2OA at bitrate switching 13.2 to 512 kbps, 48kHz in, 48kHz out, BINAURAL out, rtpdump, PI data ../IVAS_cod -rtpdump 3 -scene_orientation testv/headrot_case00_3000_q.csv -device_orientation testv/headrot_case03_3000_q.csv -ism_sba 2 2 testv/stvISM1.csv testv/stvISM2.csv ../scripts/switchPaths/sw_13k2_512k.bin 48 testv/stvOSBA_2ISM_2OA48c.wav bit diff --git a/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m b/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m index 00be0d04bc..5b746c6fdb 100644 --- a/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m +++ b/scripts/td_object_renderer/modeling_tool/Gen_Hrf_IVAS_Binary.m @@ -737,19 +737,6 @@ for fs = [48000 32000 16000] [float_EL, integer_EL, Q_EL, diff] = toInt32(EL); [float_ER, integer_ER, Q_ER, diff] = toInt32(ER); - if (Q_EL ~= Q_ER) - if Q_EL < Q_ER - Q_ER = Q_EL; - else - Q_EL = Q_ER; - end - integer_EL = int32(round(EL * 2.^double(Q_EL))); - float_EL = double(integer_EL) * 2.^single(-Q_EL); - diff = max(max(abs(EL-float_EL))); - integer_ER = int32(round(ER * 2.^double(Q_ER))); - float_ER = double(integer_ER) * 2.^single(-Q_ER); - diff = max(max(abs(ER-float_ER))); - end assert(Q_EL == Q_ER, 'hrir strongly asysmetric, cannot be used'); if dataSpec.genBinaryFile fwrite(fileID, Q_EL, "int16"); diff --git a/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m b/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m index eeb96ba854..cb49e3e341 100644 --- a/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m +++ b/scripts/td_object_renderer/modeling_tool/Mod_Hrf_Itd_Main.m @@ -42,11 +42,9 @@ clc dataSpec.hrfInDir = fullfile(pwd, '..','..','binauralRenderer_interface','HRIRs_sofa'); dataSpec.hrfOutDir = fullfile(pwd, '..', 'hrtf_data'); dataSpec.genRomFile = true; - dataSpec.genRomFileFx = false; dataSpec.makeFxFltBE = true; dataSpec.genBinaryFile = true; dataSpec.romOutDir = fullfile(pwd, '..','..','..','lib_rend'); - dataSpec.romOutDir_fx = fullfile(pwd, '..','binauralRenderer_interface'); elseif nargin == 1 % dataSpec.dataBase = varargin{1}.dataBase; % dataSpec.subjId = varargin{1}.subjId; @@ -66,7 +64,4 @@ clc %% load model and generate parameters for IVAS Gen_Hrf_IVAS_Binary(dataSpec, modSpec, info); - if dataSpec.genRomFileFx - Gen_Hrf_IVAS_Binary_fx(dataSpec, modSpec, info); - end end diff --git a/tests/requirements.txt b/tests/requirements.txt index dc8e76baa8..00100fae88 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,5 @@ pytest>=5.3.5 pytest-xdist>=1.31.0 -pytest-html>=4.0.0 scipy>=1.5.2 numpy>=1.19.2 bitstring>=4.3.1 diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index ca7a5143c5..f2125bcc90 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -260,7 +260,7 @@ def run_full_chain_split_rendering( run_ivas_isar_enc_cmd(enc_cmd) if delay_profile: - rtp_bitstream = ivas_bitstream.with_suffix(".netsimout") + rtp_bitstream = ivas_bitstream.with_suffix(".rtpg192") netsim_cmd = [ str(TOOLS_DIR / f"networkSimulator_g192{EXE_SUFFIX}"), str(delay_profile), -- GitLab