Commit 5bc2438a authored by multrus's avatar multrus
Browse files

[cleanup] accept OBJ_EDITING_COMMANDLINE

parent 5609487f
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -150,9 +150,7 @@ typedef struct
    AcousticEnvironmentSequence aeSequence;
    bool dpidEnabled;
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];
#ifdef OBJ_EDITING_COMMANDLINE
    bool objEditEnabled;
#endif

} DecArguments;

@@ -434,13 +432,8 @@ int main(
    asked_frame_size = arg.renderFramesize;
    uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535;

#ifdef OBJ_EDITING_COMMANDLINE
    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.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#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 )
#endif
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -1017,10 +1010,8 @@ static bool parseCmdlIVAS_dec(
        arg->directivityPatternId[i] = 65535;
    }

#ifdef OBJ_EDITING_COMMANDLINE
    arg->objEditEnabled = false;

#endif
    /*-----------------------------------------------------------------*
     * Initialization
     *-----------------------------------------------------------------*/
@@ -1473,13 +1464,11 @@ static bool parseCmdlIVAS_dec(

            i += tmp;
        }
#ifdef OBJ_EDITING_COMMANDLINE
        else if ( strcmp( argv_to_upper, "-OBJ_EDIT" ) == 0 )
        {
            arg->objEditEnabled = true;
            i++;
        }
#endif

        /*-----------------------------------------------------------------*
         * Option not recognized
@@ -1681,9 +1670,7 @@ static void usage_dec( void )
    fprintf( stdout, "-aeid ID | File     : Acoustic environment ID (number > 0)\n" );
    fprintf( stdout, "                      alternatively, it can be a text file where each line contains \"ID duration\"\n" );
    fprintf( stdout, "                      for BINAURAL_ROOM_REVERB output configuration.\n" );
#ifdef OBJ_EDITING_COMMANDLINE
    fprintf( stdout, "-obj_edit           : Enable objects editing\n" );
#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" );
    fprintf( stdout, "-q                  : Quiet mode, no frame counter\n" );
+0 −1
Original line number Diff line number Diff line
@@ -154,7 +154,6 @@

/* ################## Start DEVELOPMENT switches ######################### */

#define OBJ_EDITING_COMMANDLINE                        /* obj editing command-line option */
#define FIX_BRATE_SWITCHING                            /* VA: fix bitrate switching cases in OMASA and OSBA */

/* ################### Start BE switches ################################# */
+0 −2
Original line number Diff line number Diff line
@@ -3253,7 +3253,6 @@ static ivas_error doSanityChecks_IVAS(
        }
    }

#ifdef OBJ_EDITING_COMMANDLINE
    if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on )
    {
#ifdef FIX_BRATE_SWITCHING
@@ -3265,7 +3264,6 @@ static ivas_error doSanityChecks_IVAS(
            return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Wrong set-up: Obect editing is not supported in this IVAS format." );
        }
    }
#endif
#ifdef DEBUGGING
    if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || ( output_config != IVAS_AUDIO_CONFIG_BINAURAL && output_config != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) )
    {
+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
@@ -313,9 +313,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;
}
@@ -430,9 +428,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                        */
)
{
@@ -491,9 +487,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 )
    {
@@ -4127,13 +4121,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