diff --git a/lib_util/ism_file_reader.c b/lib_util/ism_file_reader.c index c1f08a4c35d33ddf3f348eb6e26bec9d7a002035..665c7ea1349dadaa9116755996540b596744074e 100644 --- a/lib_util/ism_file_reader.c +++ b/lib_util/ism_file_reader.c @@ -43,7 +43,9 @@ struct IsmFileReader { FILE *file; +#ifndef FIX_I173_I174 int32_t frameCounter; +#endif char *file_path; }; @@ -75,7 +77,9 @@ IsmFileReader *IsmFileReader_open( self = calloc( sizeof( IsmFileReader ), 1 ); self->file = file; +#ifndef FIX_I173_I174 self->frameCounter = 0; +#endif self->file_path = calloc( sizeof( char ), strlen( filePath ) + 1 ); strcpy( self->file_path, filePath ); @@ -145,7 +149,9 @@ ivas_error IsmFileReader_readNextFrame( ismMetadata->spread = meta_prm[3]; ismMetadata->gainFactor = meta_prm[4]; +#ifndef FIX_I173_I174 ++self->frameCounter; +#endif return IVAS_ERR_OK; } diff --git a/lib_util/ism_file_writer.c b/lib_util/ism_file_writer.c index 64f04f7b02d0d0052f47a446c7ba3a7260fe6099..65bd72a9444eb7b7527ce24a7b1d0e0e5cfea0ed 100644 --- a/lib_util/ism_file_writer.c +++ b/lib_util/ism_file_writer.c @@ -43,7 +43,9 @@ struct IsmFileWriter { FILE *file; +#ifndef FIX_I173_I174 int32_t frameCounter; +#endif char *file_path; }; @@ -86,7 +88,9 @@ ivas_error IsmFileWriter_open( self = calloc( sizeof( IsmFileWriter ), 1 ); self->file = file; +#ifndef FIX_I173_I174 self->frameCounter = 0; +#endif self->file_path = calloc( sizeof( char ), strlen( filePath ) + 1 ); strcpy( self->file_path, filePath ); @@ -118,7 +122,11 @@ ivas_error IsmFileWriter_writeFrame( file = ismWriter->file; /* IVAS_fmToDo: work in progress; currently position_azimuth, position_elevation, position_radius, spread, gain_factor */ +#ifdef FIX_I173_I174 + sprintf( char_buff, "%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f\n", ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor ); +#else sprintf( char_buff, "%04d,%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f\n", ismWriter->frameCounter, ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor ); +#endif if ( file ) { @@ -128,8 +136,9 @@ ivas_error IsmFileWriter_writeFrame( { return IVAS_ERR_FAILED_FILE_WRITE; } - +#ifndef FIX_I173_I174 ++ismWriter->frameCounter; +#endif return IVAS_ERR_OK; } diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index 8afcd7360342855a037236baf5bd8b3dfc4c97d0..494b596b10e6a0e8887a98627a06603f7356663e 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -160,6 +160,9 @@ int main( int argc, char *argv[] ) { return IVAS_ERR_FAILED_ALLOC; } +#ifdef FIX_I173_I174 + st_ivas->hDecoderConfig->Opt_Headrotation = FALSE; +#endif /* ISm metadata handles */ for ( n = 0; n < MAX_NUM_OBJECTS; n++ ) @@ -315,6 +318,9 @@ int main( int argc, char *argv[] ) fprintf( stderr, "Can not allocate memory for head-tracking\n" ); exit( -1 ); } +#ifdef FIX_I173_I174 + st_ivas->hDecoderConfig->Opt_Headrotation = TRUE; +#endif } /* Init limiter */ @@ -538,7 +544,9 @@ static void readMetadata( float meta_prm[NUM_ISM_METADATA_PER_LINE]; char *char_ptr; int16_t j; +#ifndef FIX_I173_I174 int32_t time_stamp; +#endif if ( fgets( char_buff, META_LINE_LENGTH, file ) == NULL ) { @@ -546,6 +554,11 @@ static void readMetadata( exit( -1 ); } +#ifdef FIX_I173_I174 + j = 0; + char_ptr = strtok( char_buff, "," ); + meta_prm[j++] = (float) atof( char_ptr ); +#else char_ptr = strtok( char_buff, "," ); time_stamp = (int32_t) atoi( char_ptr ); @@ -556,6 +569,7 @@ static void readMetadata( } j = 0; +#endif while ( char_ptr != NULL && j < NUM_ISM_METADATA_PER_LINE ) { char_ptr = strtok( NULL, "," );