From 6cdea34c2e804089252b77c98aa28e5203dd69cc Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 24 Oct 2023 07:51:55 +0200 Subject: [PATCH 1/4] issue 247: harmonize command-line options names of external renderer with the decoder; under FIX_247_EXTERNAL_RENDERER_COMMAND_LINE --- apps/renderer.c | 20 ++++++++++++++++++++ lib_com/options.h | 1 + readme.txt | 24 +++++++++++------------- tests/renderer/utils.py | 4 ++-- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 7f5af747d5..f5017bc2e2 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -276,7 +276,11 @@ static const CmdLnParser_Option cliOptions[] = { { .id = CmdLnOptionId_trajFile, .match = "trajectory_file", +#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE + .matchShort = "T", +#else .matchShort = "tf", +#endif .description = "Head rotation trajectory file for simulation of head tracking (only for binaural outputs)", }, #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -307,14 +311,25 @@ static const CmdLnParser_Option cliOptions[] = { }, { .id = CmdLnOptionId_renderConfigFile, +#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE + .match = "render_config_parameters", + .matchShort = "render_config", + .description = "Binaural renderer configuration parameters in file (only for binaural outputs)", +#else .match = "render_config", .matchShort = "rc", .description = "Binaural renderer configuration file (only for binaural outputs)", +#endif }, { .id = CmdLnOptionId_nonDiegeticPan, +#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE + .match = "non_diegetic_panning", + .matchShort = "non_diegetic_pan", +#else .match = "non_diegetic_pan", .matchShort = "ndp", +#endif .description = "Panning mono non diegetic sound to stereo -90<= pan <= 90\nleft or l or 90->left, right or r or -90->right, center or c or 0 ->middle\n", }, { @@ -335,8 +350,13 @@ static const CmdLnParser_Option cliOptions[] = { .description = "LFE panning matrix. File (CSV table) containing a matrix of dimensions [ num_input_lfe x num_output_channels ] with elements specifying linear routing gain (like --gain, -g). \nIf specified, overrides the output LFE position option and the default behavior which attempts to map input to output LFE channel(s)" }, { .id = CmdLnOptionId_noDelayCmp, +#ifdef FIX_247_EXTERNAL_RENDERER_COMMAND_LINE + .match = "no_delay_comparison", + .matchShort = "no_delay_cmp", +#else .match = "no_delay_cmp", .matchShort = "ndc", +#endif .description = "[flag] Turn off delay compensation", }, { diff --git a/lib_com/options.h b/lib_com/options.h index 9de0874dbb..e001951537 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -154,6 +154,7 @@ #define FIX_814_DOUBLE_PREC_IN_REVERB /* Philips: Issue 814: Replace double precision arithmetic in reverb */ #define FIX_866_MOVE_VBAP /* Nokia: Issue 866: Move VBAP to lib_rend */ #define FIX_863_REMOVE_REDUNDANCIES_OMASA /* Nokia/VA: Issue 863: Remove redundancies in stereo_classifier for OMASA */ +#define FIX_247_EXTERNAL_RENDERER_COMMAND_LINE /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */ /* #################### End BE switches ################################## */ diff --git a/readme.txt b/readme.txt index 58efed4bb6..2b436dfb9f 100644 --- a/readme.txt +++ b/readme.txt @@ -276,8 +276,7 @@ Options: works only in combination with '-otr ref' mode -rvf File : Reference vector specified by external trajectory File works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes --render_config File : Renderer configuration option with parameters specified in File --om File : Metadata output File for BINAURAL_SPLIT_PCM OutputConf +-render_config File : Binaural renderer configuration parameters in File (only for binaural outputs) -non_diegetic_pan P : panning mono non-diegetic sound to stereo -90<= P <=90, left or l or 90->left, right or r or -90->right, center or c or 0->middle -exof File : External orientation trajectory File for simulation of external orientations @@ -303,28 +302,27 @@ Options: -of Format : Audio Format of output file Alternatively, it can be a custom loudspeaker layout File -fs : Input sampling rate in kHz (16, 32, 48) - required only with raw PCM inputs --tf File : Head rotation trajectory File for simulation of head tracking (only for binaural outputs) +-hrtf File : Custom HRTF File for binaural rendering (only for binaural outputs) +-T File : Head rotation trajectory File for simulation of head tracking (only for binaural outputs) +-otr tracking_type : Head orientation tracking type: 'none', 'ref', 'avg' or `ref_vec` or `ref_vec_lev` (only for binaural outputs) -rf File : Reference rotation trajectory File for simulation of head tracking (only for binaural outputs) -rvf File : Reference vector trajectory File for simulation of head tracking (only for binaural outputs) --hrtf File : Custom HRTF File for binaural rendering (only for binaural outputs) --rc File : Binaural renderer configuration File (only for binaural outputs) --ndp P : Panning mono non-diegetic sound to stereo -90<= P <= 90 +-render_config File : Binaural renderer configuration parameters in File (only for binaural outputs) +-non_diegetic_pan P : Panning mono non-diegetic sound to stereo -90<= P <= 90 left or l or 90->left, right or r or -90->right, center or c or 0 ->middle --otr tracking_type : Head orientation tracking type: 'none', 'ref', 'avg' or `ref_vec` or `ref_vec_lev` (only for binaural outputs) +-exof File : External orientation trajectory File for simulation of external orientations +-dpid ID : Directivity pattern ID(s) (space-separated list of up to 4 numbers can be + specified) for binaural output configuration +-aeid ID : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output config. -lp Position : Output LFE position. Comma-delimited triplet of [gain, azimuth, elevation] where gain is linear (like --gain, -g) and azimuth, elevation are in degrees. If specified, overrides the default behavior which attempts to map input to output LFE channel(s) -lm File : LFE panning matrix File (CSV table) containing a matrix of dimensions [ num_input_lfe x num_output_channels ] with elements specifying linear routing gain (like --gain, -g). If specified, overrides the output LFE position option and the default behavior which attempts to map input to output LFE channel(s) --ndc : Turn off delay compensation +-no_delay_cmp : Turn off delay compensation -g : Input gain (linear, not in dB) to be applied to input audio file -l : List supported audio formats --exof File : External orientation trajectory File for simulation of external orientations --dpid ID : Directivity pattern ID(s) (space-separated list of up to 4 numbers can be - specified) for binaural output configuration --aeid ID : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output config. --fr5 : render audio with 5 ms framing -smd : Metadata Synchronization Delay in ms, Default is 0. Quantized by 5ms subframes. -level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. Currently, all values default to level 3 (full functionality). diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 8fdc7ead3a..bdbd75ca07 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -181,7 +181,7 @@ def run_renderer( cmd[5:5] = ["-im", *in_meta_files] if trj_file is not None: - cmd.extend(["-tf", str(trj_file)]) + cmd.extend(["-T", str(trj_file)]) if non_diegetic_pan is not None: cmd.extend(["-non_diegetic_pan", str(non_diegetic_pan)]) @@ -198,7 +198,7 @@ def run_renderer( cmd.extend(["-otr", "ref_vec_lev"]) if config_file is not None: - cmd.extend(["-rc", str(config_file)]) + cmd.extend(["-render_config", str(config_file)]) if framing_5ms: cmd.extend(["-fr5"]) -- GitLab From 68a10af68a43782bb0464a5503d3a7b8979d6762 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 24 Oct 2023 07:55:23 +0200 Subject: [PATCH 2/4] update readme.txt wrt "-fr" option --- readme.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 2b436dfb9f..917da70591 100644 --- a/readme.txt +++ b/readme.txt @@ -257,7 +257,6 @@ Options: EVS RTP Payload Format. The SDP parameter hf_only is required. Reading RFC4867 AMR/AMR-WB RTP payload format is not supported. -Tracefile TF : VoIP mode: Generate trace file named TF --fr5 : option to perform rendering + head-tracking with 5ms frame size -fec_cfg_file : Optimal channel aware configuration computed by the JBM as described in Section 6.3.1 of TS26.448. The output is written into a .txt file. Each line contains the FER indicator @@ -268,6 +267,7 @@ Options: Format files, the magic word in the mime file is used to determine which of the two supported formats is in use. default bitstream file format is G.192 +-fr L : render frame size in ms L=(5,10,20), default is 20 -hrtf File : HRTF filter File used in BINAURAL rendering -T File : Head rotation specified by external trajectory File -otr tracking_type : Head orientation tracking type: 'none', 'ref', 'avg', 'ref_vec' @@ -302,6 +302,7 @@ Options: -of Format : Audio Format of output file Alternatively, it can be a custom loudspeaker layout File -fs : Input sampling rate in kHz (16, 32, 48) - required only with raw PCM inputs +-fr L : render frame size in ms L=(5,10,20), default is 20 -hrtf File : Custom HRTF File for binaural rendering (only for binaural outputs) -T File : Head rotation trajectory File for simulation of head tracking (only for binaural outputs) -otr tracking_type : Head orientation tracking type: 'none', 'ref', 'avg' or `ref_vec` or `ref_vec_lev` (only for binaural outputs) -- GitLab From ffc19a085ee9a18602c0b50078ffcbec55aa2396 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 24 Oct 2023 08:14:35 +0200 Subject: [PATCH 3/4] update scripts --- tests/renderer/constants.py | 2 +- tests/split_rendering/constants.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/renderer/constants.py b/tests/renderer/constants.py index 1de55fc7c1..2c52055911 100644 --- a/tests/renderer/constants.py +++ b/tests/renderer/constants.py @@ -60,7 +60,7 @@ RENDERER_CMD = [ "", # 8 -> output format "-fs", "48", # 10 -> input fs - "--no_delay_cmp", + "-no_delay_cmp", # "-ndl", "-q", ] diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index 2c0af34ade..24190de123 100644 --- a/tests/split_rendering/constants.py +++ b/tests/split_rendering/constants.py @@ -190,7 +190,7 @@ SPLIT_PRE_REND_CMD = [ "", # 10 -> split rendering bitstream "-of", "", # 12 -> renderer format - "-tf", + "-T", "", # 14 -> post-trajectory file ] @@ -207,6 +207,6 @@ SPLIT_POST_REND_CMD = [ "", # 8 -> output file "-of", "BINAURAL", - "-tf", + "-T", "", # 12 -> post-trajectory file ] -- GitLab From 9b3105432b0e7916f24298b74143e6bfe5a84cfa Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Oct 2023 10:44:26 +0200 Subject: [PATCH 4/4] remove -fr5 on since it is superseded by -fr X for the renderer commandline --- apps/renderer.c | 13 ++++++------- tests/renderer/utils.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index f5017bc2e2..07c0c90166 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -225,8 +225,9 @@ typedef enum CmdLnOptionId_exteriorOrientationFile, #ifdef NONBE_UNIFIED_DECODING_PATHS CmdLnOptionId_framing, -#endif +#else CmdLnOptionId_framing5ms, +#endif CmdLnOptionId_syncMdDelay, CmdLnOptionId_directivityPatternId, CmdLnOptionId_acousticEnvironmentId @@ -402,13 +403,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "fr", .description = "Set Render audio framing.", }, -#endif +#else { .id = CmdLnOptionId_framing5ms, .match = "framing_5ms", .matchShort = "fr5", .description = "Render audio with 5 ms framing.", }, +#endif { .id = CmdLnOptionId_syncMdDelay, .match = "sync_md_delay", @@ -2893,16 +2895,13 @@ static void parseOption( } break; -#endif +#else case CmdLnOptionId_framing5ms: assert( numOptionValues == 0 ); -#ifdef NONBE_UNIFIED_DECODING_PATHS - args->render_framesize = IVAS_RENDER_FRAMESIZE_5MS; -#else args->framing_5ms = true; -#endif fprintf( stderr, "Warning: this is a placeholder for 5ms framing.\n" ); break; +#endif case CmdLnOptionId_directivityPatternId: assert( numOptionValues <= RENDERER_MAX_ISM_INPUTS ); for ( int16_t i = 0; i < numOptionValues; ++i ) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index bdbd75ca07..1cc3bd376f 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -201,7 +201,7 @@ def run_renderer( cmd.extend(["-render_config", str(config_file)]) if framing_5ms: - cmd.extend(["-fr5"]) + cmd.extend(["-fr", "5"]) # Set env variables for UBSAN env = os.environ.copy() -- GitLab