Commit 990251f6 authored by vaclav's avatar vaclav
Browse files

address reviewer's comments

parent 2971f9d1
Loading
Loading
Loading
Loading
Loading
+37 −15
Original line number Diff line number Diff line
@@ -6055,7 +6055,7 @@ static ivas_error feedSinglePIorientation(
    {
        if ( !st_ivas->hExtOrientationData )
        {
            if ( ( error = ivas_external_orientation_open( &( st_ivas->hExtOrientationData ), hIvasDec->st_ivas->hDecoderConfig->render_framesize ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_external_orientation_open( &( st_ivas->hExtOrientationData ), st_ivas->hDecoderConfig->render_framesize ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -6063,7 +6063,7 @@ static ivas_error feedSinglePIorientation(

        if ( !st_ivas->hCombinedOrientationData )
        {
            if ( ( error = ivas_combined_orientation_open( &( st_ivas->hCombinedOrientationData ), hIvasDec->st_ivas->hDecoderConfig->output_Fs, hIvasDec->st_ivas->hDecoderConfig->render_framesize ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_combined_orientation_open( &( st_ivas->hCombinedOrientationData ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hDecoderConfig->render_framesize ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -6076,7 +6076,7 @@ static ivas_error feedSinglePIorientation(
        {
            QuaternionProduct( st_ivas->hExtOrientationData->Quaternions[i], savedInvOrientation,
                               &st_ivas->hExtOrientationData->Quaternions[i] );
            hIvasDec->st_ivas->hExtOrientationData->enableExternalOrientation[i] = true;
            st_ivas->hExtOrientationData->enableExternalOrientation[i] = true;
        }

        hIvasDec->updateOrientation = true;
@@ -6086,6 +6086,35 @@ static ivas_error feedSinglePIorientation(
}


#ifdef RTP_S4_251135_CR26253_0016_REV1
/*---------------------------------------------------------------------*
 * setDiegeticInput( )
 *
 * Set isDiegeticInput flag for combined orientation handle based on PI data.
 *---------------------------------------------------------------------*/

static void setDiegeticInputPI(
    Decoder_Struct *st_ivas,     /* i/o: IVAS decoder handle                    */
    const bool *diegeticPIValues /* i  : diegetic values for the input stream   */
)
{
    int16_t i;

    if ( st_ivas->hCombinedOrientationData != NULL )
    {        
        for ( i = 0; i < ( 1 + IVAS_MAX_NUM_OBJECTS ); i++ )
        {
            st_ivas->hCombinedOrientationData->isDiegeticInputPI[i] = diegeticPIValues[i];
        }

        st_ivas->hCombinedOrientationData->isDiegeticInputPISet = true;
    }

    return;
}
#endif


#ifdef IVAS_RTPDUMP
/*---------------------------------------------------------------------*
 * IVAS_DEC_FeedPiDataToDecoder( )
@@ -6096,10 +6125,10 @@ static ivas_error feedSinglePIorientation(
ivas_error IVAS_DEC_FeedPiDataToDecoder(
    IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle                       */
    hPiDataTs piData,         /* i  : PI data received in rtp packet            */
    uint32_t numPiData        /* i  : number of PI data received in rtp packet  */
    const uint32_t numPiData  /* i  : number of PI data received in rtp packet  */
)
{
    int16_t i;
    uint16_t i;
    Decoder_Struct *st_ivas;
    ivas_error error = IVAS_ERR_OK;

@@ -6110,7 +6139,7 @@ ivas_error IVAS_DEC_FeedPiDataToDecoder(

    st_ivas = hIvasDec->st_ivas;

    while ( numPiData-- )
    for( i = 0; i < numPiData; i++ )
    {
        uint32_t piDataType = piData->data.noPiData.piDataType;

@@ -6158,15 +6187,7 @@ ivas_error IVAS_DEC_FeedPiDataToDecoder(
#ifdef DEBUGGING
                fprintf( stdout, "PI_DIEGETIC_TYPE : %d, %d, %d, %d, %d\n", piData->data.digeticIndicator.isDiegetic[0], piData->data.digeticIndicator.isDiegetic[1], piData->data.digeticIndicator.isDiegetic[2], piData->data.digeticIndicator.isDiegetic[3], piData->data.digeticIndicator.isDiegetic[4] );
#endif
                if ( st_ivas->hCombinedOrientationData != NULL )
                {
                    for ( i = 0; i < ( 1 + IVAS_MAX_NUM_OBJECTS ); i++ )
                    {
                        st_ivas->hCombinedOrientationData->isDiegeticInputPI[i] = piData->data.digeticIndicator.isDiegetic[i];
                    }

                    st_ivas->hCombinedOrientationData->isDiegeticInputPISet = true;
                }
                setDiegeticInputPI( st_ivas, piData->data.digeticIndicator.isDiegetic );
            }
            break;
#endif
@@ -6182,6 +6203,7 @@ ivas_error IVAS_DEC_FeedPiDataToDecoder(
        {
            return error;
        }

        piData++;
    }

+18 −18
Original line number Diff line number Diff line
@@ -552,7 +552,7 @@ ivas_error IVAS_DEC_GetJbmData(
ivas_error IVAS_DEC_FeedPiDataToDecoder( 
    IVAS_DEC_HANDLE hIvasDec,                   /* i/o: IVAS decoder handle                                                     */
    hPiDataTs piData,                           /* i  : PI data received in rtp packet                                          */
    uint32_t numPiData                          /* i  : number of PI data received in rtp packet                                */
    const uint32_t numPiData                    /* i  : number of PI data received in rtp packet                                */
);
#endif