Commit 62bb98e3 authored by norvell's avatar norvell
Browse files

Removed frame- and subframe indices from ISm metadata and headtracking files

parent 34c6b03f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@
#define FIX_155_HP20_ISSUE                              /* Issue 155: apply hp20 on all input channels instead of just 2 channels */
#define EFAP_FIX_POLY                                   /* Issue 167: fix bug in EFAP polygon selection */
#define SBA_HOA_HBR_IMPROV                              /* issue 91: Improvements to SBA high bitrate HOA3 coding */

#define FIX_I173_I174                                   /* Issues 173 and 174: Remove frame and subframe index from ISm metadata and headtracking respectively. */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+12 −5
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ struct HeadRotFileReader
    bool fileRewind;
};


#ifndef FIX_I173_I174
/*-----------------------------------------------------------------------*
 * HeadRotationFrameCheck()
 *
@@ -66,7 +66,7 @@ static ivas_error HeadRotationFrameCheck(

    return IVAS_ERR_OK;
}

#endif

/*-----------------------------------------------------------------------*
 * HeadRotationFileReader_open()
@@ -121,12 +121,18 @@ ivas_error HeadRotationFileReading(
)
{
    uint16_t i;
#ifndef FIX_I173_I174
    int32_t time_stamp = 0;
#endif
    float w, x, y, z;

    for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ )
    {
#ifdef FIX_I173_I174
        if ( 4 != fscanf( headRotReader->trajFile, "%f,%f,%f,%f", &w, &x, &y, &z ) )
#else
        if ( 5 != fscanf( headRotReader->trajFile, "%d,%f,%f,%f,%f", &time_stamp, &w, &x, &y, &z ) )
#endif
        {
            if ( feof( headRotReader->trajFile ) )
            {
@@ -137,12 +143,12 @@ ivas_error HeadRotationFileReading(
            return IVAS_ERR_FAILED_FILE_PARSE;
        }


#ifndef FIX_I173_I174
        if ( headRotReader->fileRewind == false && headRotReader->frameCounter != time_stamp )
        {
            return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH;
        }

#endif

        ( headRotReader->frameCounter )++;

@@ -151,7 +157,7 @@ ivas_error HeadRotationFileReading(
        Quaternions[i].y = y;
        Quaternions[i].z = z;
    }

#ifndef FIX_I173_I174
    if ( headRotReader->fileRewind == false )
    {
        if ( ( time_stamp + 1 ) % IVAS_MAX_PARAM_SPATIAL_SUBFRAMES != 0 )
@@ -164,6 +170,7 @@ ivas_error HeadRotationFileReading(
    {
        return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH;
    }
#endif

    return IVAS_ERR_OK;
}
+2 −2
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ ivas_error IsmFileReader_readNextFrame(
    {
        return IVAS_ERR_FAILED_FILE_READ;
    }

#ifndef FIX_I173_I174
    char_ptr = strtok( char_buff, "," );
    time_stamp = (int32_t) atoi( char_ptr );

@@ -120,7 +120,7 @@ ivas_error IsmFileReader_readNextFrame(
    {
        return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH;
    }

#endif
    i = 0;
    while ( ( char_ptr = strtok( NULL, "," ) ) != NULL && i < NUM_ISM_METADATA_PER_LINE )
    {
+0 −8100

File changed.

Preview size limit exceeded, changes collapsed.

+0 −3000

File changed.

Preview size limit exceeded, changes collapsed.

Loading