Commit 84cc8b59 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept OBJ_EDITING_COMMANDLINE

parent a63e9caa
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -147,9 +147,7 @@ typedef struct
    AcousticEnvironmentSequence aeSequence;
    bool dpidEnabled;
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];
#ifdef OBJ_EDITING_COMMANDLINE
    bool objEditEnabled;
#endif
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    char *objEditFileName;
#endif
@@ -460,13 +458,8 @@ int main(
    uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535;

#ifdef LIB_DEC_REVISION
#ifdef OBJ_EDITING_COMMANDLINE
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain,
                                       arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain,
                                       arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#endif
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain,
                                       arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
@@ -1068,9 +1061,7 @@ static bool parseCmdlIVAS_dec(
        arg->directivityPatternId[i] = 65535;
    }

#ifdef OBJ_EDITING_COMMANDLINE
    arg->objEditEnabled = false;
#endif
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    arg->objEditFileName = NULL;
#endif
@@ -1603,7 +1594,6 @@ static bool parseCmdlIVAS_dec(

            i += tmp;
        }
#ifdef OBJ_EDITING_COMMANDLINE
        else if ( strcmp( argv_to_upper, "-OBJ_EDIT" ) == 0 )
        {
            arg->objEditEnabled = true;
@@ -1627,7 +1617,6 @@ static bool parseCmdlIVAS_dec(
            i++;
#endif
        }
#endif

        /*-----------------------------------------------------------------*
         * Option not recognized
@@ -1835,12 +1824,10 @@ static void usage_dec( void )
    fprintf( stdout, "                      ID and duration pairs, where duration is specified in frames\n" );
#endif
    fprintf( stdout, "                      for BINAURAL_ROOM_REVERB output configuration.\n" );
#ifdef OBJ_EDITING_COMMANDLINE
#ifndef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    fprintf( stdout, "-obj_edit           : Enable objects editing\n" );
#else
    fprintf( stdout, "-obj_edit File      : Object editing instructions file or NULL for built-in example\n" );
#endif
#endif
    fprintf( stdout, "-level level        : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" );
    fprintf( stdout, "                      Currently, all values default to level 3 (full functionality).\n" );
+0 −1
Original line number Diff line number Diff line
@@ -200,7 +200,6 @@
#define FIX_HRTF_LOAD_API                               // solves API conflicts between HRTF and object-editing features
#define TMP_FIX_SPLIT_REND                              // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions)
#define TMP_FIX_OMASA_SR_BE                             // temporary fix to keep OMASA split-rendering BE
#define OBJ_EDITING_COMMANDLINE                         /* obj editing command-line option */
#define FIX_BRATE_SWITCHING                             /* VA: fix bitrate switching cases in OMASA and OSBA */
#define NONBE_1217_INIT_OBJ_EDIT                        /* VA: issue 1217: do object editing only when objects metadata is available */
#define FIX_1217_OBJECT_EDIT_FILE_INTERFACE             /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */
+0 −2
Original line number Diff line number Diff line
@@ -3230,7 +3230,6 @@ static ivas_error doSanityChecks_IVAS(
        }
    }

#ifdef OBJ_EDITING_COMMANDLINE
    if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on )
    {
#ifdef FIX_BRATE_SWITCHING
@@ -3242,7 +3241,6 @@ static ivas_error doSanityChecks_IVAS(
            return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Wrong set-up: Object editing is not supported in this IVAS format." );
        }
    }
#endif

#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on && st_ivas->hDecoderConfig->Opt_non_diegetic_pan )
+0 −2
Original line number Diff line number Diff line
@@ -1007,9 +1007,7 @@ typedef struct decoder_config_structure
    int16_t Opt_ExternalOrientation;             /* indicates whether external orientations are used */
    int16_t Opt_dpid_on;                         /* indicates whether Directivity pattern option is used */
    int16_t Opt_aeid_on;                         /* indicates whether Acoustic environment option is used */
#ifdef OBJ_EDITING_COMMANDLINE
    int16_t Opt_ObjEdit_on; /* indicates whether object editing option is used */
#endif
#ifdef DEBUGGING
    /* temp. development parameters */
    int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */
+0 −8
Original line number Diff line number Diff line
@@ -341,9 +341,7 @@ static void init_decoder_config(
    hDecoderConfig->Opt_ExternalOrientation = 0;
    hDecoderConfig->Opt_dpid_on = 0;
    hDecoderConfig->Opt_aeid_on = 0;
#ifdef OBJ_EDITING_COMMANDLINE
    hDecoderConfig->Opt_ObjEdit_on = 0;
#endif

    return;
}
@@ -489,9 +487,7 @@ ivas_error IVAS_DEC_Configure(
    const float non_diegetic_pan_gain,                 /* i  : non diegetic panning gain                           */
    const bool dpidEnabled,                            /* i  : enable directivity pattern option                   */
    const uint16_t acousticEnvironmentId,              /* i  : Acoustic environment ID                             */
#ifdef OBJ_EDITING_COMMANDLINE
    const bool objEditEnabled, /* i  : enable object editing                               */
#endif
    const bool delayCompensationEnabled /* i  : enable delay compensation                           */
)
{
@@ -552,9 +548,7 @@ ivas_error IVAS_DEC_Configure(
    hDecoderConfig->Opt_ExternalOrientation = enableExternalOrientation;
    hDecoderConfig->Opt_dpid_on = (int16_t) dpidEnabled;
    hDecoderConfig->Opt_aeid_on = acousticEnvironmentId != 65535 ? TRUE : FALSE;
#ifdef OBJ_EDITING_COMMANDLINE
    hDecoderConfig->Opt_ObjEdit_on = (int16_t) objEditEnabled;
#endif

    if ( renderFramesize == IVAS_RENDER_FRAMESIZE_UNKNOWN )
    {
@@ -4570,13 +4564,11 @@ static ivas_error printConfigInfo_dec(
        {
            fprintf( stdout, "Acoustic environment ID:ON\n" );
        }
#ifdef OBJ_EDITING_COMMANDLINE

        if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on )
        {
            fprintf( stdout, "Objects editing :       ON\n" );
        }
#endif
    }

    /*-----------------------------------------------------------------*
Loading