Commit 57c989bf authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept OBJ_EDITING_API

parent 37c7cfcc
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -2599,7 +2599,6 @@ static ivas_error decodeG192(
                    return error;
                }

#ifdef OBJ_EDITING_API
                /* Object metadata editing */
                if ( arg.objEditEnabled )
                {
@@ -2639,7 +2638,6 @@ static ivas_error decodeG192(
                        return error;
                    }
                }
#endif
                /* Do the final preparations needed for rendering */
                if ( ( error = IVAS_DEC_PrepareRenderer( hIvasDec ) ) != IVAS_ERR_OK )
                {
@@ -3206,9 +3204,7 @@ static ivas_error decodeVoIP(
    int16_t vec_pos_update, vec_pos_len;
    int16_t nOutSamples = 0;
    bool bitstreamReadDone = false;
#ifdef OBJ_EDITING_API
    bool parametersAvailableForEditing = false;
#endif
    uint16_t nSamplesRendered;

    vec_pos_update = 0;
@@ -3509,17 +3505,9 @@ static ivas_error decodeVoIP(
        while ( nSamplesRendered < nOutSamples )
        {
#ifdef SUPPORT_JBM_TRACEFILE
#ifdef OBJ_EDITING_API
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, systemTime_ms ) ) != IVAS_ERR_OK )
#endif
#else
#ifdef OBJ_EDITING_API
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, systemTime_ms ) ) != IVAS_ERR_OK )
#endif
#endif
            {
                fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -3550,7 +3538,6 @@ static ivas_error decodeVoIP(
                }
            }

#ifdef OBJ_EDITING_API
            /* Object metadata editing */
            if ( arg.objEditEnabled && parametersAvailableForEditing == true )
            {
@@ -3579,7 +3566,6 @@ static ivas_error decodeVoIP(
                    return error;
                }
            }
#endif
        } /* while ( nSamplesRendered < nOutSamples ) */

        /* write JBM Offset file entry */
+0 −4
Original line number Diff line number Diff line
@@ -131,13 +131,10 @@ typedef struct _IVAS_ISM_METADATA
    float yaw;
    float pitch;
    int16_t non_diegetic_flag;
#ifdef OBJ_EDITING_API
    float gain;
#endif

} IVAS_ISM_METADATA;

#ifdef OBJ_EDITING_API
typedef struct _IVAS_EDITABLE_PARAMETERS
{
    int16_t num_obj;
@@ -145,7 +142,6 @@ typedef struct _IVAS_EDITABLE_PARAMETERS
    float gain_bed;

} IVAS_EDITABLE_PARAMETERS;
#endif

typedef struct
{
+0 −4
Original line number Diff line number Diff line
@@ -77,9 +77,7 @@ typedef enum
    IVAS_ERR_EXT_ORIENTATION_NOT_SUPPORTED,
    IVAS_ERR_DIRECTIVITY_NOT_SUPPORTED,
    IVAS_ERR_ACOUSTIC_ENVIRONMENT_NOT_SUPPORTED,
#ifdef OBJ_EDITING_API
    IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED,
#endif
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED,
#endif
@@ -261,10 +259,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Directivity not supported";
        case IVAS_ERR_ACOUSTIC_ENVIRONMENT_NOT_SUPPORTED:
            return "Acoustic environment not supported";
#ifdef OBJ_EDITING_API
        case IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED:
            return "Objects editing not supported";
#endif
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        case IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED:
            return "Wrong use of both Object editing and Non-diegetic panning";
+0 −2
Original line number Diff line number Diff line
@@ -418,7 +418,6 @@ void ivas_ism_reset_metadata(
    hIsmMeta->ism_metadata_flag = 0;
    hIsmMeta->non_diegetic_flag = 0;

#ifdef OBJ_EDITING_API
    hIsmMeta->edited_gain = 1.0f;
    hIsmMeta->edited_azimuth = 0.0f;
    hIsmMeta->edited_elevation = 0.0f;
@@ -427,7 +426,6 @@ void ivas_ism_reset_metadata(
    hIsmMeta->edited_radius = 1.0f;
    hIsmMeta->gain = 1.0f;
    hIsmMeta->non_diegetic_flag = 0;
#endif

    return;
}
+0 −17
Original line number Diff line number Diff line
@@ -853,11 +853,9 @@ void ivas_jbm_dec_feed_tc_to_renderer(
    float *data                                                 /* i/o: transport channels/output synthesis signal                  */
);

#ifdef OBJ_EDITING_API
void ivas_dec_prepare_renderer(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);
#endif

ivas_error ivas_jbm_dec_set_discard_samples(
    Decoder_Struct *st_ivas                                     /* i/o: main IVAS decoder structre                                  */
@@ -1145,7 +1143,6 @@ void ivas_param_ism_dec_digest_tc(
    float *transport_channels_f[]                               /* i  : synthesized core-coder transport channels/DirAC output  */
);

#ifdef OBJ_EDITING_API
void ivas_param_ism_dec_dequant_md(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder handle                         */
);
@@ -1154,7 +1151,6 @@ void ivas_param_ism_dec_prepare_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                         */
    const uint16_t nCldfbSlots                                  /* i  : number of CLDFB slots in transport channels */
);
#endif

void ivas_ism_param_dec_tc_gain_ajust(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                         */
@@ -3911,12 +3907,10 @@ void ivas_param_mc_dec_digest_tc(
    float *p_data_f[]                                           /* i/o: synthesized core-coder transport channels/DirAC output*/
);

#ifdef OBJ_EDITING_API
void ivas_param_mc_dec_prepare_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                                 */
    const uint8_t nCldfbSlots                                   /* i  : number of CLDFB slots in transport channels         */
);
#endif

void ivas_param_mc_dec_render(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                                 */
@@ -5633,7 +5627,6 @@ ivas_error ivas_osba_render_sf(
    float *output_f[]                                           /* o  : rendered time signal                    */
);

#ifdef OBJ_EDITING_API
void ivas_osba_stereo_add_channels(
    float *tc_f[],                                              /* i  : transport channels                      */
    float *output_f[],                                          /* i/o: output channels                         */
@@ -5643,16 +5636,6 @@ void ivas_osba_stereo_add_channels(
    const int16_t ism_mode,                                     /* i  : ISM mode                                */
    const int16_t n_samples_to_render                           /* i  : output frame length per channel         */
);
#else
void ivas_osba_stereo_add_channels(
    float *tc_f[],                                              /* i  : transport channels                      */
    float *output_f[],                                          /* i/o: output channels                         */
    const float gain,                                           /* i  : gain bed value                          */
    const int16_t nchan_out,                                    /* i  : number of output channels               */
    const int16_t nchan_ism,                                    /* i  : number of ISM channels                  */
    const int16_t n_samples_to_render                           /* i  : output frame length per channel         */
);
#endif

void ivas_osba_data_close(
    SBA_ISM_DATA_HANDLE *hSbaIsmData                            /* i/o: OSBA rendering handle                   */
Loading