Commit d36423f0 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept NONBE_1217_INIT_OBJ_EDIT

parent 2d9584e5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -199,7 +199,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 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 */
#define NONBE_1217_OBJ_EDIT_FOA                         /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */
#define NONBE_FIX_1255_OBJ_EDIT_JBM                     /* VA: issue 1255: restore object editing in JBM */
+0 −23
Original line number Diff line number Diff line
@@ -1468,16 +1468,10 @@ ivas_error IVAS_DEC_GetEditableParameters(
    st_ivas = hIvasDec->st_ivas;
    ism_mode = st_ivas->ism_mode;

#ifdef NONBE_1217_INIT_OBJ_EDIT
    if ( !( st_ivas->ivas_format == ISM_FORMAT ||
            st_ivas->ivas_format == SBA_ISM_FORMAT ||
            st_ivas->ivas_format == MASA_ISM_FORMAT ||
            ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 ) ) )
#else
    if ( !( st_ivas->ivas_format == ISM_FORMAT ||
            ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ||
            ( st_ivas->ivas_format == MASA_ISM_FORMAT && ( ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ || hIvasDec->st_ivas->ism_mode == ISM_MASA_MODE_DISC ) ) ) )
#endif
    {
        return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Object editing is not supported in this operation mode." );
    }
@@ -1527,11 +1521,7 @@ ivas_error IVAS_DEC_GetEditableParameters(
        }
#endif
    }
#ifdef NONBE_1217_INIT_OBJ_EDIT
    else if ( st_ivas->ivas_format == MASA_ISM_FORMAT || ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 ) )
#else
    else if ( st_ivas->ivas_format == MASA_ISM_FORMAT && ( st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_DISC ) )
#endif
    {
        /* object editing possible only in two highest OMASA modes */
        if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC )
@@ -1550,11 +1540,7 @@ ivas_error IVAS_DEC_GetEditableParameters(
                hIvasEditableParameters->ism_metadata[obj].non_diegetic_flag = st_ivas->hIsmMetaData[obj]->non_diegetic_flag;
            }
        }
#ifdef NONBE_1217_INIT_OBJ_EDIT
        else if ( ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ )
#else
        else
#endif
        {
            /* Handle MONO output */
            if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX )
@@ -1581,7 +1567,6 @@ ivas_error IVAS_DEC_GetEditableParameters(
                hIvasEditableParameters->ism_metadata[obj].non_diegetic_flag = st_ivas->hIsmMetaData[obj]->non_diegetic_flag;
            }
        }
#ifdef NONBE_1217_INIT_OBJ_EDIT
        else if ( ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || ism_mode == ISM_MODE_NONE )
        {
            hIvasEditableParameters->num_obj = 0;
@@ -1591,7 +1576,6 @@ ivas_error IVAS_DEC_GetEditableParameters(
        {
            assert( 0 && "This should never happen!" );
        }
#endif
#endif
    }

@@ -1630,17 +1614,10 @@ ivas_error IVAS_DEC_SetEditableParameters(
    st_ivas = hIvasDec->st_ivas;
    ism_mode = st_ivas->ism_mode;

#ifdef NONBE_1217_INIT_OBJ_EDIT
    if ( !( st_ivas->ivas_format == ISM_FORMAT ||
            st_ivas->ivas_format == SBA_ISM_FORMAT ||
            st_ivas->ivas_format == MASA_ISM_FORMAT ||
            ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 ) ) )
#else
    if ( !( hIvasDec->st_ivas->ivas_format == ISM_FORMAT ||
            ( hIvasDec->st_ivas->ivas_format == SBA_ISM_FORMAT && hIvasDec->st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ||
            ( hIvasDec->st_ivas->ivas_format == MASA_ISM_FORMAT && ( hIvasDec->st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ || hIvasDec->st_ivas->ism_mode == ISM_MASA_MODE_DISC ) ) ) ||
         hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
#endif
    {
        return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Object editing no supported in this operation mode." );
    }