Commit be36c110 authored by bayers's avatar bayers
Browse files

object editing interface, created two sub-defines to OBJECT_EDITING_INTERFACE:...

object editing interface, created two sub-defines to OBJECT_EDITING_INTERFACE: OBJECT_EDITING_API and OBJECT_EDITING_DECODER to better distinguish between changes needed for the API adaption and changes needed in the decoder itself
parent c4ad6925
Loading
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
#include "debug.h"
#endif
#include "wmc_auto.h"
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
#ifdef DEBUGGING
#include <math.h>
#endif
@@ -149,7 +149,7 @@ typedef struct
    uint16_t acousticEnvironmentId;
    int16_t Opt_dpid_on;
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
#ifdef DEBUGGING
    bool objEditEnabled;
#endif
@@ -1105,7 +1105,7 @@ static bool parseCmdlIVAS_dec(
        arg->directivityPatternId[i] = 65535;
    }

#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
#ifdef DEBUGGING
    arg->objEditEnabled = false;
#endif
@@ -1537,7 +1537,7 @@ static bool parseCmdlIVAS_dec(

            i += tmp;
        }
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
#ifdef DEBUGGING
        else if ( strcmp( argv_to_upper, "-OBJ_EDIT" ) == 0 )
        {
@@ -2106,7 +2106,7 @@ static ivas_error decodeG192(
#ifdef SPLIT_REND_WITH_HEAD_ROT
    SplitFileReadWrite *splitRendWriter = NULL;
#endif
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
    IVAS_EDITABLE_PARAMETERS editableParameters;
#endif

@@ -2370,7 +2370,7 @@ static ivas_error decodeG192(
                    fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
#ifdef DEBUGGING
                if ( arg.objEditEnabled )
                {
@@ -3028,7 +3028,7 @@ static ivas_error decodeVoIP(
    int16_t vec_pos_update, vec_pos_len;
    int16_t nOutSamples = 0;

#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
    bool parameterAvailableForEditing = false;
    uint16_t nSamplesRendered = 0;
#endif
@@ -3149,7 +3149,7 @@ static ivas_error decodeVoIP(

    while ( 1 )
    {
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
        nSamplesRendered = 0;
#endif
        /* reference vector */
@@ -3322,11 +3322,11 @@ static ivas_error decodeVoIP(


        /* decode and get samples */
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
        while ( nSamplesRendered < nOutSamples )
        {
#endif
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifdef SUPPORT_JBM_TRACEFILE
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &nSamplesRendered, &parameterAvailableForEditing ) ) != IVAS_ERR_OK )
@@ -3359,7 +3359,7 @@ static ivas_error decodeVoIP(
                fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
            if ( parameterAvailableForEditing == true )
            {
                /* do the object editing here */
+2 −2
Original line number Diff line number Diff line
@@ -122,13 +122,13 @@ typedef struct _IVAS_ISM_METADATA
    float yaw;
    float pitch;
    int16_t non_diegetic_flag;
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
    float gain;
#endif

} IVAS_ISM_METADATA;

#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
typedef struct _IVAS_EDITABLE_PARAMETERS
{
    int16_t num_obj;
+1 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ void ivas_ism_reset_metadata(
    hIsmMeta->radius = 1.0f;
    hIsmMeta->ism_metadata_flag = 0;
    hIsmMeta->non_diegetic_flag = 0;
#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_DECODER
    hIsmMeta->gain = 1.0f;
#endif

+4 −4
Original line number Diff line number Diff line
@@ -822,7 +822,7 @@ void ivas_jbm_dec_feed_tc_to_renderer(
    float *data                                                 /* i/o: transport channels/output synthesis signal                  */
);

#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
void ivas_jbm_dec_prepare_renderer(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);
@@ -1033,7 +1033,7 @@ ivas_error ivas_ism_metadata_dec(
    DEC_CORE_HANDLE st0                                         /* i  : core-coder handle                           */
);

#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_DECODER
void ivas_ism_renderer_update_md(
	Decoder_Struct *st_ivas                                     /* i/o:  main IVAS decoder handle                   */
);
@@ -1116,7 +1116,7 @@ void ivas_param_ism_dec_digest_tc(
    float *transport_channels_f[]                               /* i  : synthesized core-coder transport channels/DirAC output  */
);

#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_API
void ivas_param_ism_dec_prepare_renderer(
    Decoder_Struct *st_ivas,   /* i/o: IVAS decoder handle                                     */
    const uint16_t nCldfbSlots /* i  : number of CLFBS slots in the transport channels         */
@@ -3872,7 +3872,7 @@ void ivas_param_mc_dec_digest_tc(
    float *transport_channels_f[]                               /* i  : synthesized core-coder transport channels/DirAC output*/
);

#ifdef OBJ_EDITING_INTERFACE
#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 CLFBS slots in the transport channels           */
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ typedef struct
    float q_azimuth_old;
    float q_elevation_old;

#ifdef OBJ_EDITING_INTERFACE
#ifdef OBJ_EDITING_DECODER
    float gain;
#endif

Loading