Commit 2ad7a310 authored by malenovsky's avatar malenovsky
Browse files

Merge branch '247-external-renderer-command-line' into 'main'

[Ref using main] Resolve "External renderer command-line"

See merge request !1189
parents d3ba2156 ee36a663
Loading
Loading
Loading
Loading
Loading
+26 −7
Original line number Diff line number Diff line
@@ -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
@@ -276,7 +277,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 +312,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 +351,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",
    },
    {
@@ -382,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",
@@ -2873,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 )
+1 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@
#define FIX_889_MASA_FILE_WRITER_OPEN                   /* Nokia: issue #889: mismatch in function definition and use */
#define FIX_890_ARRAY_SIZE                              /* Nokia: issue #890: mismatch in 2D array size declaration and use */
#define BE_FIX_887_GCC_WARNING_ARRAY_SIZE               /* VoiceAge: Issue 887: change array size definition to avoid warning with gcc 11.4.0 */
#define FIX_247_EXTERNAL_RENDERER_COMMAND_LINE          /* VA: issue 247: harmonize command-line options names of external renderer with the decoder */

/* #################### End BE switches ################################## */

+13 −14
Original line number Diff line number Diff line
@@ -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'
@@ -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,28 @@ 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)
-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)
-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).
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ RENDERER_CMD = [
    "",  # 8 -> output format
    "-fs",
    "48",  # 10 -> input fs
    "--no_delay_cmp",
    "-no_delay_cmp",
    # "-ndl",
    "-q",
]
+3 −3
Original line number Diff line number Diff line
@@ -184,7 +184,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)])
@@ -201,10 +201,10 @@ 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"])
        cmd.extend(["-fr", "5"])

    # Set env variables for UBSAN
    env = os.environ.copy()
Loading