Commit 5aa65957 authored by Ripinder Singh's avatar Ripinder Singh
Browse files

First draft of the RTP Pack API



 * Introduce RTP Packet and Payload API implementation for Pack and Unpack
 * Introduce general handling of PI data and data type structures
 * Introduce the mutex encapsulation
 * Introduce a buffer pool manager
 * Example pack implementation in Encoder wrapper
 * Code Review comments

Signed-off-by: default avatarSingh, Ripinder <ripinder.singh@dolby.com>
parent 1d0f51e9
Loading
Loading
Loading
Loading
Loading
+190 −69
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@
#include "evs_rtp_payload.h"
#include "ism_file_writer.h"
#ifdef IVAS_RTPDUMP
#include "ivas_rtp_payload.h"
#include "ivas_rtp_api.h"
#include "ivas_rtp_pi_data.h"
#endif
#include "jbm_file_writer.h"
#include "hrtf_file_reader.h"
@@ -166,6 +167,170 @@ typedef struct

} IVAS_DEC_HRTF_BINARY_WRAPPER;

#ifdef IVAS_RTPDUMP

typedef struct
{
    PIDATA data;
    uint32_t timestamp;
} PIDATA_TS;

typedef struct
{
    uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * MAX_FRAMES_PER_RTP_PACKET];
    PIDATA_TS piData[IVAS_PI_MAX_ID * MAX_FRAMES_PER_RTP_PACKET];

    FILE *f_rtpstream;
    IVAS_RTP_CODEC codecId;
    uint32_t nReadPiData;
    uint32_t nProcPiData;
    uint32_t numFramesInPacket;
    uint32_t numPiDataInPacket;
    uint32_t remoteRequestBitmap;

    IVAS_DATA_BUFFER rtpPacket;
    IVAS_RTP_UNPACK_HANDLE hUnpack;
    IVAS_RTP_UNPACK_CONFIG unpackCfg;
    PI_DATA_DEPACKER_STATE piDataDepackerState;
} IVAS_RTP;

static void IVAS_RTP_Term( IVAS_RTP *rtp )
{
    if ( rtp->f_rtpstream )
    {
        fclose( rtp->f_rtpstream );
        rtp->f_rtpstream = NULL;
    }
    IVAS_RTP_UNPACK_Close( &rtp->hUnpack );
}

static ivas_error IVAS_RTP_Init( IVAS_RTP *rtp, FILE *f_rtpstream )
{
    ivas_error error = IVAS_ERR_OK;

    memset( rtp, 0, sizeof( IVAS_RTP ) );

    error = IVAS_RTP_UNPACK_Open( &rtp->hUnpack, &rtp->unpackCfg );

    rtp->f_rtpstream = f_rtpstream;
    rtp->rtpPacket.buffer = rtp->packet;
    rtp->rtpPacket.capacity = sizeof( rtp->packet );

    return error;
}

static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_t *au, int16_t *auSizeBits, uint32_t *rtpTimeStamp, uint16_t *rtpSequenceNumber, uint32_t *nextPacketRcvTime_ms, bool *qBit )
{
    ivas_error error = IVAS_ERR_OK;
    IVAS_DATA_BUFFER packedFrame = { 0, 0, NULL };
    uint32_t packetLen = 0u;
    bool speechLostIndicated = false;
#ifdef RTP_S4_251135_CR26253_0016_REV1
    IVAS_RTP_SR_INFO srInfo;
#endif

    packedFrame.buffer = au;
    packedFrame.capacity = ( IVAS_MAX_BITS_PER_FRAME / 8 );
    if ( rtp->numFramesInPacket == 0 )
    {
        size_t nread = fread( &packetLen, sizeof( uint32_t ), 1, rtp->f_rtpstream ); /* Read Packet Length */
        if ( nread == 0 )
        {
            return IVAS_ERR_END_OF_FILE;
        }
        if ( packetLen > sizeof( rtp->packet ) )
        {
            fprintf( stderr, "RTP packet > buffer capacity %lu bytes\n", sizeof( rtp->packet ) );
            return IVAS_ERR_INVALID_OUTPUT_BUFFER_SIZE;
        }

        nread = fread( rtp->packet, sizeof( uint8_t ), packetLen, rtp->f_rtpstream ); /* Read Packet */
        if ( nread == 0 )
        {
            return IVAS_ERR_END_OF_FILE;
        }

        rtp->rtpPacket.buffer = rtp->packet;
        rtp->rtpPacket.length = packetLen;

        if ( ( error = IVAS_RTP_UNPACK_PushPacket( rtp->hUnpack, &rtp->rtpPacket,
                                                   &rtp->numFramesInPacket, &rtp->numPiDataInPacket,
                                                   &rtp->remoteRequestBitmap ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "failed to unpack RTP packet\n" );
            return error;
        }

        rtp->nReadPiData = 0;
        rtp->nProcPiData = 0;

        /* Pre-read all PI data */
        while ( rtp->numPiDataInPacket != 0 )
        {
            PIDATA_TS *piData = &rtp->piData[rtp->nReadPiData];
            if ( ( error = IVAS_RTP_UNPACK_PullNextPiData( rtp->hUnpack, (IVAS_PIDATA_GENERIC *) &piData->data, sizeof( piData->data ), &piData->timestamp ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "failed to pull PI Data, error = %s\n", ivas_error_to_string( error ) );
                return error;
            }
            rtp->nReadPiData++;
            rtp->numPiDataInPacket--;
        }
    }

#ifdef RTP_S4_251135_CR26253_0016_REV1
    error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &rtp->codecId, &srInfo, &packedFrame, rtpTimeStamp, rtpSequenceNumber, &speechLostIndicated );
#else
    error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &rtp->codecId, &packedFrame, rtpTimeStamp, rtpSequenceNumber, &speechLostIndicated );
#endif
    if ( error != IVAS_ERR_OK )
    {
        fprintf( stderr, "failed to pull frame after unpack\n" );
        return error;
    }

    *auSizeBits = (int16_t) ( packedFrame.length * 8 );
    *qBit = !speechLostIndicated;
    rtp->numFramesInPacket--;
    *nextPacketRcvTime_ms += 20;

    while ( rtp->nProcPiData < rtp->nReadPiData &&
            rtp->piData[rtp->nProcPiData].timestamp <= *rtpTimeStamp )
    {
        PIDATA_TS *piData = &rtp->piData[rtp->nProcPiData++];
        if ( hIvasDec )
        {
            uint32_t piDataType = ( (IVAS_PIDATA_GENERIC *) &piData->data )->piDataType;
            switch ( piDataType )
            {
                case IVAS_PI_SCENE_ORIENTATION:
                {
                    error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, &piData->data.scene.orientation );
                }
                break;

                case IVAS_PI_DEVICE_ORIENTATION_COMPENSATED:
                {
                    error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, &piData->data.deviceCompensated.orientation );
                }
                break;

                default:
                {
                    fprintf( stderr, "Unhandled PI data of type : %d\n", piDataType );
                }
                break;
            }
            if ( error != IVAS_ERR_OK )
            {
                return error;
            }
        }
    }

    return IVAS_ERR_OK;
}
#endif /* IVAS_RTPDUMP */

/*------------------------------------------------------------------------------------------*
 * Local functions prototypes
@@ -2883,8 +3048,7 @@ static ivas_error printBitstreamInfoVoip(
    ivas_error error = IVAS_ERR_OK;
    FILE *f_rtpstream = NULL;
#ifdef IVAS_RTPDUMP
    IVAS_RTPDUMP_DEPACKER rtpdumpDepacker;
    IVAS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = IVAS_RTPDUMP_DEPACKER_NO_ERROR;
    IVAS_RTP ivasRtp;
#else
    EVS_RTPDUMP_DEPACKER rtpdumpDepacker;
    EVS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_NO_ERROR;
@@ -2892,21 +3056,16 @@ static ivas_error printBitstreamInfoVoip(
    uint8_t au[( IVAS_MAX_BITS_PER_FRAME + 7 ) >> 3];
    int16_t auSizeBits;
    uint8_t *auPtr = NULL;
#ifdef IVAS_RTPDUMP
    bool evsIvasModeBit;
    uint16_t bitrateIndex;
    bool ivasIndicatorBit;
    bool isGoodFrame;
#else
    bool isAMRWB_IOmode;
    uint16_t frameTypeIndex;
    bool qBit;
#endif
    uint32_t nextPacketRcvTime_ms = 0;
    uint16_t rtpSequenceNumber;
    uint32_t rtpTimeStamp;

#ifndef IVAS_RTPDUMP
    rtpdumpDepacker.rtpdump = NULL;
#endif
    switch ( arg.inputFormat )
    {
        case IVAS_DEC_INPUT_FORMAT_RTPDUMP:
@@ -2920,15 +3079,19 @@ static ivas_error printBitstreamInfoVoip(
            }

#ifdef IVAS_RTPDUMP
            rtpdumpDepackerError = IVAS_RTPDUMP_DEPACKER_open( &rtpdumpDepacker, f_rtpstream );
            if ( ( error = IVAS_RTP_Init( &ivasRtp, f_rtpstream ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "error in IVAS_RTP_Init(): %d\n", error );
                goto cleanup;
            }
#else
            rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_open( &rtpdumpDepacker, f_rtpstream, arg.inputFormat == IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF );
#endif
            if ( rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR )
            {
                fprintf( stderr, "error in EVS_RTPDUMP_DEPACKER_open(): %d\n", rtpdumpDepackerError );
                goto cleanup;
            }
#endif
            break;
        case IVAS_DEC_INPUT_FORMAT_G192:
            auPtr = au;
@@ -2944,17 +3107,13 @@ static ivas_error printBitstreamInfoVoip(
        if ( arg.inputFormat == IVAS_DEC_INPUT_FORMAT_G192 )
        {
            error = BS_Reader_ReadVoipFrame_compact( hBsReader, au, &auSizeBits, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms );
#ifdef IVAS_RTPDUMP
            isGoodFrame = 1; /* good frame for INPUT_FORMAT_G192 */
#else
            qBit = 1; /* good q_bit for INPUT_FORMAT_G192 */
#endif
        }
        else
        {
            auPtr = au; /* might have been set to RTP packet in prev call */
#ifdef IVAS_RTPDUMP
            rtpdumpDepackerError = IVAS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &evsIvasModeBit, &bitrateIndex, &ivasIndicatorBit, &isGoodFrame, &auPtr, (uint16_t *) &auSizeBits );
            error = readNextFrame( &ivasRtp, NULL, auPtr, &auSizeBits, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit );
#else
            rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSizeBits );
#endif
@@ -2967,11 +3126,7 @@ static ivas_error printBitstreamInfoVoip(
            fprintf( stderr, "failed to read first RTP packet\n" );
            goto cleanup;
        }
#ifdef IVAS_RTPDUMP
    } while ( !isGoodFrame || auSizeBits < MIN_NUM_BITS_ACTIVE_FRAME || auSizeBits == NUM_BITS_SID_IVAS_5K2 );
#else
    } while ( !qBit || auSizeBits < MIN_NUM_BITS_ACTIVE_FRAME || auSizeBits == NUM_BITS_SID_IVAS_5K2 );
#endif

    BS_Reader_Rewind( hBsReader );

@@ -2986,7 +3141,7 @@ static ivas_error printBitstreamInfoVoip(
cleanup:

#ifdef IVAS_RTPDUMP
    IVAS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker );
    IVAS_RTP_Term( &ivasRtp );
#else
    EVS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker );
#endif
@@ -3057,23 +3212,17 @@ static ivas_error decodeVoIP(
    int16_t i;
    FILE *f_rtpstream = NULL;
#ifdef IVAS_RTPDUMP
    IVAS_RTPDUMP_DEPACKER rtpdumpDepacker;
    IVAS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = IVAS_RTPDUMP_DEPACKER_NO_ERROR;
    IVAS_RTP ivasRtp;
#else
    EVS_RTPDUMP_DEPACKER rtpdumpDepacker;
    EVS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_NO_ERROR;
#endif
    uint8_t *auPtr = NULL;
#ifdef IVAS_RTPDUMP
    bool evsIvasModeBit;
    uint16_t bitrateIndex;
    bool ivasIndicatorBit;
    bool isGoodFrame;
#else
#ifndef IVAS_RTPDUMP
    bool isAMRWB_IOmode;
    uint16_t frameTypeIndex;
    bool qBit;
#endif
    bool qBit;

    IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN;
    IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS];
@@ -3110,7 +3259,9 @@ static ivas_error decodeVoIP(

    delayNumSamples_orig[0] = -1;

#ifndef IVAS_RTPDUMP
    rtpdumpDepacker.rtpdump = NULL;
#endif
    switch ( arg.inputFormat )
    {
        case IVAS_DEC_INPUT_FORMAT_RTPDUMP:
@@ -3128,10 +3279,9 @@ static ivas_error decodeVoIP(
            }

#ifdef IVAS_RTPDUMP
            rtpdumpDepackerError = IVAS_RTPDUMP_DEPACKER_open( &rtpdumpDepacker, f_rtpstream );
            if ( rtpdumpDepackerError != IVAS_RTPDUMP_DEPACKER_NO_ERROR )
            if ( ( error = IVAS_RTP_Init( &ivasRtp, f_rtpstream ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "error in IVAS_RTPDUMP_DEPACKER_open(): %d\n", rtpdumpDepackerError );
                fprintf( stderr, "error in IVAS_RTP_Init(): %d\n", error );
                goto cleanup;
            }
#else
@@ -3178,17 +3328,13 @@ static ivas_error decodeVoIP(
    if ( arg.inputFormat == IVAS_DEC_INPUT_FORMAT_G192 )
    {
        error = BS_Reader_ReadVoipFrame_compact( hBsReader, au, &auSize, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms );
#ifdef IVAS_RTPDUMP
        isGoodFrame = 1; /* good frame for INPUT_FORMAT_G192 */
#else
        qBit = 1; /* good q_bit for INPUT_FORMAT_G192 */
#endif
    }
    else
    {
        auPtr = au; /* might have been set to RTP packet in prev call */
#ifdef IVAS_RTPDUMP
        rtpdumpDepackerError = IVAS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &evsIvasModeBit, &bitrateIndex, &ivasIndicatorBit, &isGoodFrame, &auPtr, (uint16_t *) &auSize );
        error = readNextFrame( &ivasRtp, hIvasDec, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit );
#else
        rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSize );
#endif
@@ -3197,7 +3343,7 @@ static ivas_error decodeVoIP(
        rtpTimeStamp = rtpTimeStamp / 16;
    }
#ifdef IVAS_RTPDUMP
    if ( error != IVAS_ERR_OK || rtpdumpDepackerError != IVAS_RTPDUMP_DEPACKER_NO_ERROR )
    if ( error != IVAS_ERR_OK )
#else
    if ( error != IVAS_ERR_OK || rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR )
#endif
@@ -3352,11 +3498,7 @@ static ivas_error decodeVoIP(
        while ( nextPacketRcvTime_ms <= systemTime_ms )
        {
            /* feed the previous read packet into the receiver now */
#ifdef IVAS_RTPDUMP
            error = IVAS_DEC_VoIP_FeedFrame( hIvasDec, auPtr, auSize, rtpSequenceNumber, rtpTimeStamp, nextPacketRcvTime_ms, isGoodFrame );
#else
            error = IVAS_DEC_VoIP_FeedFrame( hIvasDec, auPtr, auSize, rtpSequenceNumber, rtpTimeStamp, nextPacketRcvTime_ms, qBit );
#endif
            if ( error != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in IVAS_DEC_VoIP_FeedFrame: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -3369,30 +3511,16 @@ static ivas_error decodeVoIP(
            {
                error = BS_Reader_ReadVoipFrame_compact( hBsReader, au, &auSize, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms );

#ifdef IVAS_RTPDUMP
                isGoodFrame = 1; /* good frame for VOIP_G192_RTP */
#else
                qBit = 1; /* good q_bit for VOIP_G192_RTP */
#endif
            }
            else
            {
                auPtr = au; /* might have been set to RTP packet in prev call */
#ifdef IVAS_RTPDUMP
                rtpdumpDepackerError = IVAS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp,
                                                                            &nextPacketRcvTime_ms,
                                                                            &evsIvasModeBit, &bitrateIndex, &ivasIndicatorBit,
                                                                            &isGoodFrame, &auPtr, (uint16_t *) &auSize );
                error = readNextFrame( &ivasRtp, hIvasDec, au, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit );

                /* IVAS RTP payload format has timescale 16000, JBM uses 1000 internally */
                rtpTimeStamp = rtpTimeStamp / 16;

                /* feed PI data to decoder handle */
                error = IVAS_DEC_feedPIdata( hIvasDec, &rtpdumpDepacker.PIdataDepackerState );
                if ( error != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in IVAS_DEC_feedPIdata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }
#else
                rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp,
                                                                           &nextPacketRcvTime_ms,
@@ -3403,7 +3531,7 @@ static ivas_error decodeVoIP(
#endif
            }
#ifdef IVAS_RTPDUMP
            if ( error == IVAS_ERR_END_OF_FILE || rtpdumpDepackerError == IVAS_RTPDUMP_DEPACKER_EOF )
            if ( error == IVAS_ERR_END_OF_FILE )
#else
            if ( error == IVAS_ERR_END_OF_FILE || rtpdumpDepackerError == EVS_RTPDUMP_DEPACKER_EOF )
#endif
@@ -3420,13 +3548,6 @@ static ivas_error decodeVoIP(
                fprintf( stderr, "\nError in BS_Reader_ReadVoipFrame_compact, error code: %d\n", error );
                goto cleanup;
            }
#ifdef IVAS_RTPDUMP
            else if ( rtpdumpDepackerError != IVAS_RTPDUMP_DEPACKER_NO_ERROR )
            {
                fprintf( stderr, "\nError in IVAS_RTPDUMP_DEPACKER_readNextFrame, error code: %d\n", error );
                goto cleanup;
            }
#endif
        }

        /* we are finished when all packets have been received and jitter buffer is empty */
@@ -3770,7 +3891,7 @@ static ivas_error decodeVoIP(
cleanup:

#ifdef IVAS_RTPDUMP
    IVAS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker );
    IVAS_RTP_Term( &ivasRtp );
#else
    EVS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker );
#endif
+143 −31

File changed.

Preview size limit exceeded, changes collapsed.

+9 −0
Original line number Diff line number Diff line
@@ -150,6 +150,15 @@ typedef enum
    IVAS_ERR_LC3PLUS_INVALID_BITRATE,
    IVAS_ERR_INVALID_SPLIT_REND_CONFIG,

    /*----------------------------------------*
     *               rtp errors               *
     *----------------------------------------*/
    IVAS_ERR_UNDERFLOW = 0x7000,
    IVAS_ERR_PI_DATA_WITH_NO_INPUT_FRAME,
    IVAS_ERR_INSUFFICIENT_OUTPUT_SIZE,
    IVAS_ERR_UNPACK_PI_DATA,
    IVAS_ERR_RTP_UNSUPPORTED_FRAME,

    /*----------------------------------------*
     *              unknown error             *
     *----------------------------------------*/
+4 −4
Original line number Diff line number Diff line
@@ -3742,7 +3742,7 @@ ivas_error IVAS_DEC_Flush(

ivas_error IVAS_DEC_feedSinglePIorientation(
    IVAS_DEC_HANDLE hIvasDec,         /* i/o: IVAS decoder handle                                                     */
    const bool *isOrientationSaved,   /* i  : flag to indicate if an orientation for this PI type was previously saved  */
    bool isOrientationSaved,          /* i  : flag to indicate if an orientation for this PI type was previously saved */
    IVAS_QUATERNION *savedOrientation /* i  : previously saved orientation for this PI type                           */
)
{
@@ -3750,7 +3750,7 @@ ivas_error IVAS_DEC_feedSinglePIorientation(
    ivas_error error = IVAS_ERR_OK;
    IVAS_QUATERNION savedInvOrientation;

    if ( *isOrientationSaved )
    if ( isOrientationSaved )
    {
        if ( !hIvasDec->st_ivas->hExtOrientationData )
        {
@@ -3797,13 +3797,13 @@ ivas_error IVAS_DEC_feedPIdata(
    ivas_error error = IVAS_ERR_OK;

    /* scene orientation */
    if ( ( error = IVAS_DEC_feedSinglePIorientation( hIvasDec, &PIdataDepackerState->sceneOrientationSaved, &PIdataDepackerState->sceneOrientationQuat ) ) != IVAS_ERR_OK )
    if ( ( error = IVAS_DEC_feedSinglePIorientation( hIvasDec, PIdataDepackerState->sceneOrientationSaved, &PIdataDepackerState->sceneOrientationQuat ) ) != IVAS_ERR_OK )
    {
        return error;
    }

    /* device orientation */
    if ( ( error = IVAS_DEC_feedSinglePIorientation( hIvasDec, &PIdataDepackerState->deviceOrientationSaved, &PIdataDepackerState->deviceOrientationQuat ) ) != IVAS_ERR_OK )
    if ( ( error = IVAS_DEC_feedSinglePIorientation( hIvasDec, PIdataDepackerState->deviceOrientationSaved, &PIdataDepackerState->deviceOrientationQuat ) ) != IVAS_ERR_OK )
    {
        return error;
    }
+3 −3
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ ivas_error IVAS_DEC_Flush(
#ifdef IVAS_RTPDUMP
ivas_error IVAS_DEC_feedSinglePIorientation(
    IVAS_DEC_HANDLE hIvasDec,                   /* i/o: IVAS decoder handle                                                      */
    const bool *isOrientationSaved,             /* i  : flag to indicate if an orientation for this PI type was previously saved  */
    bool isOrientationSaved,                    /* i  : flag to indicate if an orientation for this PI type was previously saved */
    IVAS_QUATERNION *savedOrientation           /* i  : previously saved orientation for this PI type                            */
);

Loading