Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ #define FIX_I173_I174 /* Issues 173 and 174: Remove frame and subframe index from ISm metadata and headtracking respectively. */ #define FIX_TCX_DEC_RECONF_BFI #define FIX_SBA_DTX_DECODE_ERROR /* Issue 176: SBA decoder error with DTX at 80kbps SWB, Issue 21: SBA front-VAD threshold (203) */ #define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */ Loading lib_util/head_rotation_file_reader.c +0 −49 Original line number Diff line number Diff line Loading @@ -45,28 +45,6 @@ struct HeadRotFileReader bool fileRewind; }; #ifndef FIX_I173_I174 /*-----------------------------------------------------------------------* * HeadRotationFrameCheck() * * Check if the read frame number corresponds to the decoder frame *-----------------------------------------------------------------------*/ static ivas_error HeadRotationFrameCheck( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ const int32_t frame_dec ) { if ( headRotReader->fileRewind == false ) { if ( headRotReader->frameCounter / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES != frame_dec + 1 ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } } return IVAS_ERR_OK; } #endif /*-----------------------------------------------------------------------* * HeadRotationFileReader_open() Loading Loading @@ -121,18 +99,11 @@ 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 ) ) { Loading @@ -143,12 +114,6 @@ 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 )++; Loading @@ -157,20 +122,6 @@ 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 ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } } if ( HeadRotationFrameCheck( headRotReader, frame_dec ) != IVAS_ERR_OK ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } #endif return IVAS_ERR_OK; } Loading lib_util/ism_file_reader.c +0 −22 Original line number Diff line number Diff line Loading @@ -43,9 +43,6 @@ struct IsmFileReader { FILE *file; #ifndef FIX_I173_I174 int32_t frameCounter; #endif char *file_path; }; Loading Loading @@ -77,9 +74,6 @@ 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 ); Loading @@ -102,9 +96,6 @@ ivas_error IsmFileReader_readNextFrame( float meta_prm[NUM_ISM_METADATA_PER_LINE]; char *char_ptr; int16_t i; #ifndef FIX_I173_I174 int32_t time_stamp; #endif FILE *file; if ( ismMetadata == NULL || self->file == NULL ) Loading @@ -120,18 +111,8 @@ ivas_error IsmFileReader_readNextFrame( } char_ptr = strtok( char_buff, "," ); #ifndef FIX_I173_I174 time_stamp = (int32_t) atoi( char_ptr ); if ( time_stamp != self->frameCounter ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } #endif i = 0; #ifdef FIX_I173_I174 meta_prm[i++] = (float) atof( char_ptr ); #endif while ( ( char_ptr = strtok( NULL, "," ) ) != NULL && i < NUM_ISM_METADATA_PER_LINE ) { meta_prm[i++] = (float) atof( char_ptr ); Loading @@ -149,9 +130,6 @@ 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; } Loading lib_util/ism_file_writer.c +0 −13 Original line number Diff line number Diff line Loading @@ -43,9 +43,6 @@ struct IsmFileWriter { FILE *file; #ifndef FIX_I173_I174 int32_t frameCounter; #endif char *file_path; }; Loading Loading @@ -88,9 +85,6 @@ 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 ); Loading Loading @@ -122,11 +116,7 @@ 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 ) { Loading @@ -136,9 +126,6 @@ ivas_error IsmFileWriter_writeFrame( { return IVAS_ERR_FAILED_FILE_WRITE; } #ifndef FIX_I173_I174 ++ismWriter->frameCounter; #endif return IVAS_ERR_OK; } Loading Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ #define FIX_I173_I174 /* Issues 173 and 174: Remove frame and subframe index from ISm metadata and headtracking respectively. */ #define FIX_TCX_DEC_RECONF_BFI #define FIX_SBA_DTX_DECODE_ERROR /* Issue 176: SBA decoder error with DTX at 80kbps SWB, Issue 21: SBA front-VAD threshold (203) */ #define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */ Loading
lib_util/head_rotation_file_reader.c +0 −49 Original line number Diff line number Diff line Loading @@ -45,28 +45,6 @@ struct HeadRotFileReader bool fileRewind; }; #ifndef FIX_I173_I174 /*-----------------------------------------------------------------------* * HeadRotationFrameCheck() * * Check if the read frame number corresponds to the decoder frame *-----------------------------------------------------------------------*/ static ivas_error HeadRotationFrameCheck( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ const int32_t frame_dec ) { if ( headRotReader->fileRewind == false ) { if ( headRotReader->frameCounter / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES != frame_dec + 1 ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } } return IVAS_ERR_OK; } #endif /*-----------------------------------------------------------------------* * HeadRotationFileReader_open() Loading Loading @@ -121,18 +99,11 @@ 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 ) ) { Loading @@ -143,12 +114,6 @@ 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 )++; Loading @@ -157,20 +122,6 @@ 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 ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } } if ( HeadRotationFrameCheck( headRotReader, frame_dec ) != IVAS_ERR_OK ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } #endif return IVAS_ERR_OK; } Loading
lib_util/ism_file_reader.c +0 −22 Original line number Diff line number Diff line Loading @@ -43,9 +43,6 @@ struct IsmFileReader { FILE *file; #ifndef FIX_I173_I174 int32_t frameCounter; #endif char *file_path; }; Loading Loading @@ -77,9 +74,6 @@ 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 ); Loading @@ -102,9 +96,6 @@ ivas_error IsmFileReader_readNextFrame( float meta_prm[NUM_ISM_METADATA_PER_LINE]; char *char_ptr; int16_t i; #ifndef FIX_I173_I174 int32_t time_stamp; #endif FILE *file; if ( ismMetadata == NULL || self->file == NULL ) Loading @@ -120,18 +111,8 @@ ivas_error IsmFileReader_readNextFrame( } char_ptr = strtok( char_buff, "," ); #ifndef FIX_I173_I174 time_stamp = (int32_t) atoi( char_ptr ); if ( time_stamp != self->frameCounter ) { return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH; } #endif i = 0; #ifdef FIX_I173_I174 meta_prm[i++] = (float) atof( char_ptr ); #endif while ( ( char_ptr = strtok( NULL, "," ) ) != NULL && i < NUM_ISM_METADATA_PER_LINE ) { meta_prm[i++] = (float) atof( char_ptr ); Loading @@ -149,9 +130,6 @@ 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; } Loading
lib_util/ism_file_writer.c +0 −13 Original line number Diff line number Diff line Loading @@ -43,9 +43,6 @@ struct IsmFileWriter { FILE *file; #ifndef FIX_I173_I174 int32_t frameCounter; #endif char *file_path; }; Loading Loading @@ -88,9 +85,6 @@ 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 ); Loading Loading @@ -122,11 +116,7 @@ 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 ) { Loading @@ -136,9 +126,6 @@ ivas_error IsmFileWriter_writeFrame( { return IVAS_ERR_FAILED_FILE_WRITE; } #ifndef FIX_I173_I174 ++ismWriter->frameCounter; #endif return IVAS_ERR_OK; } Loading