Commit 7a0d6a46 authored by vaclav's avatar vaclav
Browse files

update with main wrt. IVAS_ISM_METADATA struct

parent a9f0c978
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ typedef struct
    uint16_t numObjects;
    IsmFileReader *ismReaders[RENDERER_MAX_ISM_INPUTS];
    uint32_t numPositions[RENDERER_MAX_ISM_INPUTS];
    IVAS_REND_AudioObjectPosition *positions[RENDERER_MAX_ISM_INPUTS]; /* size: [RENDERER_MAX_ISM_INPUTS][numPositions[object_index]] */
    IVAS_ISM_METADATA *positions[RENDERER_MAX_ISM_INPUTS]; /* size: [RENDERER_MAX_ISM_INPUTS][numPositions[object_index]] */
    uint16_t *positionDurations[RENDERER_MAX_ISM_INPUTS];  /* size: [RENDERER_MAX_ISM_INPUTS][numPositions[object_index]] */
    uint32_t currentPositionIdxs[RENDERER_MAX_ISM_INPUTS]; /* Index of current position as listed in the metadata file */
    uint16_t durationCounters[RENDERER_MAX_ISM_INPUTS];    /* Number of frames spent at current position */
@@ -123,7 +123,7 @@ typedef struct

typedef struct
{
    IVAS_REND_AudioObjectPosition positions[RENDERER_MAX_ISM_INPUTS];
    IVAS_ISM_METADATA positions[RENDERER_MAX_ISM_INPUTS];
    int16_t numObjects;
} ObjectPositionBuffer;

@@ -433,7 +433,7 @@ static int8_t parseUint32( const char *line, uint32_t *ret );

static int8_t parseInt32( const char *line, int32_t *ret );

static void parseObjectPosition( char *line, IVAS_REND_AudioObjectPosition *position, uint16_t *positionDuration );
static void parseObjectPosition( char *line, IVAS_ISM_METADATA *position, uint16_t *positionDuration );

static void parseMetadata( char *metadataString, char *inDir, InputConfig *inConfig, IsmPositionProvider *positionProvider, MasaFileReader **masaReaders, LfeRoutingConfig **lfeRoutingConfigs );

@@ -3283,7 +3283,7 @@ static void parseOptionalInputValues(

static void parseObjectPosition(
    char *line,
    IVAS_REND_AudioObjectPosition *position,
    IVAS_ISM_METADATA *position,
    uint16_t *positionDuration )
{
    char *endptr;
@@ -3333,7 +3333,7 @@ static void parseIsm(
    if ( parseUint32( line, &numberOfObjectPositionsToRead ) == 0 )
    {
        positionProvider->numPositions[idx] = numberOfObjectPositionsToRead;
        positionProvider->positions[idx] = malloc( numberOfObjectPositionsToRead * sizeof( IVAS_REND_AudioObjectPosition ) );
        positionProvider->positions[idx] = malloc( numberOfObjectPositionsToRead * sizeof( IVAS_ISM_METADATA ) );
        positionProvider->positionDurations[idx] = malloc( numberOfObjectPositionsToRead * sizeof( uint16_t ) );

        for ( i = 0; i < numberOfObjectPositionsToRead; ++i )
+0 −11
Original line number Diff line number Diff line
@@ -217,17 +217,6 @@ typedef enum
} IVAS_RENDER_TYPE_OVERRIDE;
#endif

typedef struct
{
    float azimuth;
    float elevation;
    float radius;
    float yaw;
    float pitch;
    int16_t non_diegetic_flag;

} IVAS_REND_AudioObjectPosition;

typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG
{
    int16_t override;
+1 −1
Original line number Diff line number Diff line
@@ -674,7 +674,7 @@ ivas_error ivas_td_binaural_renderer_ext(
    const AUDIO_CONFIG inConfig,                                 /* i  : Input audio configuration               */
    const LSSETUP_CUSTOM_STRUCT *customLsInput,                  /* i  : Input custom loudspeaker layout         */
    const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData, /* i  : Combined head and external orientations */
    const IVAS_REND_AudioObjectPosition *currentPos,             /* i  : Object position                         */
    const IVAS_ISM_METADATA *currentPos,                         /* i  : Object position                         */
    const REVERB_HANDLE hReverb,                                 /* i  : Reverberator handle                     */
    const int16_t ism_md_subframe_update_ext,                    /* i  : Metadata Delay in subframes to sync with audio delay */
    const int32_t output_Fs,                                     /* i  : output sampling rate                                    */
+1 −1
Original line number Diff line number Diff line
@@ -571,7 +571,7 @@ ivas_error ivas_td_binaural_renderer_ext(
    const AUDIO_CONFIG inConfig,                                /* i  : Input audio configuration               */
    const LSSETUP_CUSTOM_STRUCT *customLsInput,                 /* i  : Input custom loudspeaker layout         */
    const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData,/* i  : Combined head and external orientations */
    const IVAS_REND_AudioObjectPosition *currentPos,            /* i  : Object position                         */
    const IVAS_ISM_METADATA *currentPos,                        /* i  : Object position                         */
    const REVERB_HANDLE hReverb,                                /* i  : Reverberator handle                     */
    const int16_t ism_md_subframe_update_ext,                   /* i  : Metadata Delay in subframes to sync with audio delay */
    const int32_t output_Fs,                                    /* i  : output sampling rate                    */
+72 −72
Original line number Diff line number Diff line
@@ -125,8 +125,8 @@ typedef struct
typedef struct
{
    input_base base;
    IVAS_REND_AudioObjectPosition currentPos;
    IVAS_REND_AudioObjectPosition previousPos;
    IVAS_ISM_METADATA currentPos;
    IVAS_ISM_METADATA previousPos;
    TDREND_WRAPPER tdRendWrapper;
    CREND_WRAPPER_HANDLE crendWrapper;
    REVERB_HANDLE hReverb;
@@ -1215,10 +1215,10 @@ static void initRendInputBase(
}


static IVAS_REND_AudioObjectPosition defaultObjectPosition(
static IVAS_ISM_METADATA defaultObjectPosition(
    void )
{
    IVAS_REND_AudioObjectPosition pos;
    IVAS_ISM_METADATA pos;

    pos.azimuth = 0.0f;
    pos.elevation = 0.0f;
@@ -1234,8 +1234,8 @@ static IVAS_REND_AudioObjectPosition defaultObjectPosition(


static int8_t checkObjectPositionChanged(
    IVAS_REND_AudioObjectPosition *currentPos,
    IVAS_REND_AudioObjectPosition *previousPos )
    IVAS_ISM_METADATA *currentPos,
    IVAS_ISM_METADATA *previousPos )
{
    return !( fabs( currentPos->azimuth - previousPos->azimuth ) < EPSILON &&
              fabs( currentPos->elevation - previousPos->elevation ) < EPSILON );
@@ -4844,7 +4844,7 @@ ivas_error IVAS_REND_FeedInputAudio(
ivas_error IVAS_REND_FeedInputObjectMetadata(
    IVAS_REND_HANDLE hIvasRend,            /* i/o: Renderer handle          */
    const IVAS_REND_InputId inputId,       /* i  : ID of the input          */
    const IVAS_REND_AudioObjectPosition objectPosition /* i  : object position struct   */
    const IVAS_ISM_METADATA objectPosition /* i  : object position struct   */
)
{
    input_base *inputBase;
@@ -4885,7 +4885,7 @@ ivas_error IVAS_REND_FeedInputObjectMetadata(
ivas_error IVAS_REND_FeedInputObjectMetadataToOMasa(
    IVAS_REND_HANDLE hIvasRend,            /* i/o: Renderer handle          */
    const int16_t inputIndex,              /* i  : Index of the input       */
    const IVAS_REND_AudioObjectPosition objectPosition /* i  : object position struct   */
    const IVAS_ISM_METADATA objectPosition /* i  : object position struct   */
)
{
    /* Validate function arguments */
Loading