Loading apps/decoder.c +44 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,10 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_319_ADD_OTR_EXPORT HeadRotFileWriter *mainOrientFileWriter, HeadRotFileWriter *trkRotFileWriter, #endif #ifdef SPLIT_REND_WITH_HEAD_ROT uint8_t *splitRendBitsBuf, #endif Loading Loading @@ -745,6 +749,10 @@ int main( error = decodeG192( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, #ifdef FIX_319_ADD_OTR_EXPORT mainOrientWriter, trkRotWriter, #endif /* FIX_319_ADD_OTR_EXPORT */ #ifdef SPLIT_REND_WITH_HEAD_ROT splitRendBitsBuf, #endif Loading Loading @@ -1860,6 +1868,10 @@ static ivas_error decodeG192( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_319_ADD_OTR_EXPORT HeadRotFileWriter *mainOrientFileWriter, HeadRotFileWriter *trkRotFileWriter, #endif #ifdef SPLIT_REND_WITH_HEAD_ROT uint8_t *splitRendBitsBuf, #endif Loading Loading @@ -2070,6 +2082,38 @@ static ivas_error decodeG192( } } #ifdef FIX_319_ADD_OTR_EXPORT if ( arg.enableMainOrientationOutput ) { IVAS_QUATERNION quatBuffer[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_DEC_GetMainOrientation( hIvasDec, quatBuffer ); for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( ( error = HeadRotationFileWriting( mainOrientFileWriter, quatBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Main Orientation File Writing: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } if ( arg.enableTrackedRotationOutput ) { IVAS_QUATERNION quatBuffer[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_DEC_GetTrackedRotation( hIvasDec, quatBuffer ); for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( ( error = HeadRotationFileWriting( trkRotFileWriter, quatBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Tracked Rotation File Writing: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } #endif /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT Loading Loading
apps/decoder.c +44 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,10 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_319_ADD_OTR_EXPORT HeadRotFileWriter *mainOrientFileWriter, HeadRotFileWriter *trkRotFileWriter, #endif #ifdef SPLIT_REND_WITH_HEAD_ROT uint8_t *splitRendBitsBuf, #endif Loading Loading @@ -745,6 +749,10 @@ int main( error = decodeG192( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, #ifdef FIX_319_ADD_OTR_EXPORT mainOrientWriter, trkRotWriter, #endif /* FIX_319_ADD_OTR_EXPORT */ #ifdef SPLIT_REND_WITH_HEAD_ROT splitRendBitsBuf, #endif Loading Loading @@ -1860,6 +1868,10 @@ static ivas_error decodeG192( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_319_ADD_OTR_EXPORT HeadRotFileWriter *mainOrientFileWriter, HeadRotFileWriter *trkRotFileWriter, #endif #ifdef SPLIT_REND_WITH_HEAD_ROT uint8_t *splitRendBitsBuf, #endif Loading Loading @@ -2070,6 +2082,38 @@ static ivas_error decodeG192( } } #ifdef FIX_319_ADD_OTR_EXPORT if ( arg.enableMainOrientationOutput ) { IVAS_QUATERNION quatBuffer[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_DEC_GetMainOrientation( hIvasDec, quatBuffer ); for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( ( error = HeadRotationFileWriting( mainOrientFileWriter, quatBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Main Orientation File Writing: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } if ( arg.enableTrackedRotationOutput ) { IVAS_QUATERNION quatBuffer[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_DEC_GetTrackedRotation( hIvasDec, quatBuffer ); for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( ( error = HeadRotationFileWriting( trkRotFileWriter, quatBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Tracked Rotation File Writing: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } } #endif /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT Loading