Commit 44627aea authored by Malenovsky, Vladimir's avatar Malenovsky, Vladimir
Browse files

remove complexity level from ISAR post-renderer

modifications to cmd-line parameters
parent 76bb3354
Loading
Loading
Loading
Loading
Loading
+4 −36
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ typedef struct
    char inMetadataFilePath[POST_REND_MAX_CLI_ARG_LENGTH];
    char headRotationFilePath[POST_REND_MAX_CLI_ARG_LENGTH];
    char splitRendBFIFilePath[POST_REND_MAX_CLI_ARG_LENGTH];
    ISAR_POST_REND_COMPLEXITY_LEVEL complexityLevel;
    bool delayCompensationEnabled;
    bool quietModeEnabled;
    IVAS_RENDER_NUM_SUBFR render_num_subframes;
@@ -119,7 +118,6 @@ typedef enum
    CmdLnOptionId_outputFile,
    CmdLnOptionId_sampleRate,
    CmdLnOptionId_trajFile,
    CmdLnOptionId_complexityLevel,
    CmdLnOptionId_noDelayCmp,
    CmdLnOptionId_quietModeEnabled,
    CmdLnOptionId_inputMetadata,
@@ -144,7 +142,7 @@ static const CmdLnParser_Option cliOptions[] = {
        .match = "input_format",
        .matchShort = "if",
        .placeholder = "<format>",
        .description = "Audio format of input file (e.g. BINAURAL_SPLIT_CODED, BINAURAL_SPLIT_PCM, ... Use -l for a list)",
        .description = "Audio format of input file (BINAURAL_SPLIT_CODED, BINAURAL_SPLIT_PCM or RTPDUMP)",
        .isMandatory = true,
    },
    {
@@ -160,14 +158,14 @@ static const CmdLnParser_Option cliOptions[] = {
        .match = "input_metadata",
        .matchShort = "im",
        .placeholder = "<path>",
        .description = "Path to the input metadata file for BINAURAL_SPLIT_PCM input format",
        .description = "Path to the input metadata file (mandatory for BINAURAL_SPLIT_PCM input format)",
    },
    {
        .id = CmdLnOptionId_sampleRate,
        .match = "sample_rate",
        .matchShort = "fs",
        .placeholder = "<fs>",
        .description = "Input sampling rate in kHz (16, 32, 48) - required only with raw PCM input files",
        .description = "Input sampling rate in kHz (16, 32, 48) (mandatory for raw PCM input files)",
    },
    {
        .id = CmdLnOptionId_trajFile,
@@ -189,13 +187,6 @@ static const CmdLnParser_Option cliOptions[] = {
        .matchShort = "no_delay_cmp",
        .description = "Turn off delay compensation",
    },
    {
        .id = CmdLnOptionId_complexityLevel,
        .match = "complexity_level",
        .matchShort = "level",
        .placeholder = "<level>",
        .description = "Complexity level (1, 2, 3) - will be defined after characterisation",
    },
    {
        .id = CmdLnOptionId_quietModeEnabled,
        .match = "quiet",
@@ -220,7 +211,7 @@ static const CmdLnParser_Option cliOptions[] = {
        .match = "sr_params",
        .matchShort = "s",
        .placeholder = "<path>",
        .description = "Path to the split rendering init params file",
        .description = "Path to the split rendering SDP init params file (mandatory for RTPDUMP input format)",
    },
    {
        .id = CmdLnOptionId_help,
@@ -429,7 +420,6 @@ static CmdlnArgs defaultArgs(
    clearString( args.headRotationFilePath );
    clearString( args.splitRendBFIFilePath );

    args.complexityLevel = ISAR_POST_REND_COMPLEXITY_LEVEL_THREE;
    args.delayCompensationEnabled = true;
    args.quietModeEnabled = false;

@@ -548,28 +538,6 @@ static int16_t parseOption(
            }
            strncpy( args->splitRendBFIFilePath, optionValues[0], POST_REND_MAX_CLI_ARG_LENGTH - 1 );
            break;
        case CmdLnOptionId_complexityLevel:
            if ( numOptionValues == 0 )
            {
                fprintf( stderr, "Error: No complexity level has been provided!\n" );
                return -1;
            }
            else if ( numOptionValues > 1 )
            {
                fprintf( stderr, "Error: The program expects a single complexity level, but %d have been provided!\n", numOptionValues );
                return -1;
            }
            args->complexityLevel = (int32_t) ( strtol( optionValues[0], NULL, 10 ) );
            if ( args->complexityLevel < ISAR_POST_REND_COMPLEXITY_LEVEL_ONE || args->complexityLevel > ISAR_POST_REND_COMPLEXITY_LEVEL_THREE )
            {
                fprintf( stderr, "Error: Invalid complexity level specified.\n" );
                return -1;
            }
            else if ( args->complexityLevel == ISAR_POST_REND_COMPLEXITY_LEVEL_ONE || args->complexityLevel == ISAR_POST_REND_COMPLEXITY_LEVEL_TWO )
            {
                fprintf( stderr, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" );
            }
            break;
        case CmdLnOptionId_noDelayCmp:
            if ( numOptionValues != 0 )
            {
+0 −8
Original line number Diff line number Diff line
@@ -82,14 +82,6 @@ typedef struct ISAR_POST_REND const *ISAR_POST_REND_CONST_HANDLE;

typedef uint16_t ISAR_POST_REND_InputId;

typedef enum _ISAR_POST_REND_COMPLEXITY_LEVEL
{
    ISAR_POST_REND_COMPLEXITY_LEVEL_ONE = 1,
    ISAR_POST_REND_COMPLEXITY_LEVEL_TWO = 2,
    ISAR_POST_REND_COMPLEXITY_LEVEL_THREE = 3
} ISAR_POST_REND_COMPLEXITY_LEVEL;


/* clang-format off */
/*----------------------------------------------------------------------------------*
 * ISAR post-renderer function prototypes
+2 −2
Original line number Diff line number Diff line
@@ -552,11 +552,11 @@ ivas_error get_channel_config(
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
    {
        strcpy( str, "Binaural: split-rendering mode using encoded data" );
        strcpy( str, "Binaural: split-rendering mode outputting encoded bitstream" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        strcpy( str, "Binaural: split-rendering mode using PCM data" );
        strcpy( str, "Binaural: split-rendering mode outputting PCM binaural data and MD bitstream" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
+4 −5
Original line number Diff line number Diff line
@@ -389,21 +389,20 @@ Usage: ISAR_post_rend [options] -i <path> -if <format> -o <path>
Mandatory parameters: 
--------------------- 
-i File             : Path to the input file (WAV or raw PCM file with BINAURAL_SPLIT_PCM input format or ISAR bitstream file with BINAURAL_SPLIT_CODED input format) 
-if Format          : Audio format of input file (e.g. BINAURAL_SPLIT_CODED, BINAURAL_SPLIT_PCM, ... Use -l for a list) 
-if Format          : Audio format of input file (BINAURAL_SPLIT_CODED, BINAURAL_SPLIT_PCM or RTPDUMP)
-o File             : Path to the output file 

Options :
------- -
-im File            : Path to the input metadata file for BINAURAL_SPLIT_PCM input format
-fs                 : Input sampling rate in kHz (16, 32, 48) - required only with raw PCM input files
-im File            : Path to the input metadata file (mandatory for BINAURAL_SPLIT_PCM input format)
-fs                 : Input sampling rate in kHz (16, 32, 48) (mandatory for raw PCM input files)
-T File             : Head rotation trajectory file for simulation of head tracking
-prbfi File         : Split rendering BFI (Bad Frame Indicator) file
-no_delay_cmp  		: Turn off delay compensation
-level level        : Complexity level (1, 2, 3) - will be defined after characterisation
-q                  : Quiet mode - limit printouts to terminal
-l                  : List supported audio formats of input file
-fr L               : Render frame size in ms L=(5, 10, 20), default is 20 
-s File             : Path to the split rendering init params file
-s File             : Path to the split rendering SDP init params file (mandatory for RTPDUMP input format)
-h                  : Show this help message and exit