Loading Workspace_msvc/lib_util.vcxproj +2 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ <ClCompile Include="..\lib_util\obj_edit_file_reader.c" /> <ClCompile Include="..\lib_util\render_config_reader.c" /> <ClCompile Include="..\lib_util\rotation_file_reader.c" /> <ClCompile Include="..\lib_util\requests_file_reader.c" /> <ClCompile Include="..\lib_util\split_render_file_read_write.c" /> <ClCompile Include="..\lib_util\split_rend_bfi_file_reader.c" /> <ClCompile Include="..\lib_util\tsm_scale_file_reader.c" /> Loading Loading @@ -165,6 +166,7 @@ <ClInclude Include="..\lib_util\masa_file_writer.h" /> <ClInclude Include="..\lib_util\render_config_reader.h" /> <ClInclude Include="..\lib_util\rotation_file_reader.h" /> <ClInclude Include="..\lib_util\requests_file_reader.h" /> <ClInclude Include="..\lib_util\split_render_file_read_write.h" /> <ClInclude Include="..\lib_util\tinywavein_c.h" /> <ClInclude Include="..\lib_util\tinywaveout_c.h" /> Loading Workspace_msvc/lib_util.vcxproj.filters +6 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ <ClCompile Include="..\lib_util\rotation_file_reader.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\requests_file_reader.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\split_rend_bfi_file_reader.c"> <Filter>util_c</Filter> </ClCompile> Loading Loading @@ -165,6 +168,9 @@ <ClInclude Include="..\lib_util\rotation_file_reader.h"> <Filter>util_h</Filter> </ClInclude> <ClInclude Include="..\lib_util\requests_file_reader.h"> <Filter>util_h</Filter> </ClInclude> <ClInclude Include="..\lib_util\split_rend_bfi_file_reader.h"> <Filter>util_h</Filter> </ClInclude> Loading apps/encoder.c +63 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,9 @@ #include "masa_file_reader.h" #include "rotation_file_reader.h" #include "ivas_rtp_file.h" #ifdef FIX_1527_CMR_BITRATE_IDX #include "requests_file_reader.h" #endif #ifdef DEBUGGING #include "debug.h" #endif Loading Loading @@ -157,6 +160,9 @@ typedef struct char *sceneOrientationTrajFileName; char *deviceOrientationTrajFileName; #ifdef FIX_1527_CMR_BITRATE_IDX char *requestsFileName; #endif } EncArguments; Loading Loading @@ -224,6 +230,9 @@ int main( uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; IVAS_RTP ivasRtp = { 0 }; #ifdef FIX_1527_CMR_BITRATE_IDX ReqFileReader *requestsFileReader = NULL; #endif /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ Loading Loading @@ -663,6 +672,20 @@ int main( } } #ifdef FIX_1527_CMR_BITRATE_IDX /*------------------------------------------------------------------------------------------* * Open remote requests file for rtp packing (E-bytes) *------------------------------------------------------------------------------------------*/ if ( arg.requestsFileName != NULL ) { if ( ( error = RequestsFileReader_open( arg.requestsFileName, &requestsFileReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open requests file %s \n\n", arg.requestsFileName ); goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Run the encoder *------------------------------------------------------------------------------------------*/ Loading Loading @@ -872,6 +895,17 @@ int main( } } #ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { if ( ( error = ReadNextRequests( requestsFileReader, ivasRtp.remoteRequests, &ivasRtp.remoteRequestBitmap ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading requests from %s\n", IVAS_ENC_GetErrorMessage( error ), RequestsFileReader_getFilePath( requestsFileReader ) ); goto cleanup; } } #endif if ( ( error = IVAS_ENC_EncodeFrameToCompact( hIvasEnc, pcmBuf, pcmBufSize, au, &numBits ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); Loading Loading @@ -976,6 +1010,13 @@ cleanup: fclose( f_bitrateProfile ); } #ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { RequestsFileReader_close( &requestsFileReader ); } #endif if ( sceneOrientationFileReader ) { RotationFileReader_close( &sceneOrientationFileReader ); Loading Loading @@ -1037,6 +1078,10 @@ static bool parseCmdlIVAS_enc( /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ #ifdef FIX_1527_CMR_BITRATE_IDX // Need less usan/msan or new arg addition memset( arg, 0, sizeof( *arg ) ); #endif arg->inputWavFilename = NULL; arg->outputBitstreamFilename = NULL; Loading Loading @@ -1917,6 +1962,20 @@ static bool parseCmdlIVAS_enc( arg->deviceOrientationTrajFileName = argv[i]; i++; } #ifdef FIX_1527_CMR_BITRATE_IDX else if ( strcmp( argv_to_upper, "-REQUESTS" ) == 0 ) { i++; if ( argc - i <= 4 || argv[i][0] == '-' ) { fprintf( stderr, "Error: Remote requests file name not specified!\n\n" ); usage_enc(); return false; } arg->requestsFileName = argv[i]; i++; } #endif /*-----------------------------------------------------------------* * Option not recognized Loading Loading @@ -2155,6 +2214,10 @@ static void usage_enc( void ) fprintf( stdout, " EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet\n" ); fprintf( stdout, "-scene_orientation : Scene orientation trajectory file. Only used with rtpdump output.\n" ); fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" ); #ifdef FIX_1527_CMR_BITRATE_IDX fprintf( stdout, "-requests : Remote requests file, Only used with rtpdump output.\n" ); #endif fprintf( stdout, "\n" ); return; Loading lib_util/ivas_rtp_file.c +14 −0 Original line number Diff line number Diff line Loading @@ -967,6 +967,20 @@ ivas_error IVAS_RTP_WriteNextFrame( rtp->nWrittenPiData--; } #ifdef FIX_1527_CMR_BITRATE_IDX for ( IVAS_RTP_REQUEST_TYPE req = 0; req < IVAS_REQUEST_MAX; req++ ) { if ( rtp->remoteRequestBitmap & ( 1u << req ) ) { if ( ( error = IVAS_RTP_PACK_PushRemoteRequest( rtp->hPack, req, rtp->remoteRequests[req] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while pushing requests\n", ivas_error_to_string( error ) ); return error; } } } #endif if ( forcePacket || IVAS_RTP_PACK_GetNumFrames( rtp->hPack ) == rtp->packCfg.maxFramesPerPacket ) { uint32_t numFramesInPayload = 0; Loading lib_util/ivas_rtp_file.h +3 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,9 @@ typedef struct uint8_t packet[NOMINAL_BUFFER_SIZE( IVAS_MAX_FRAMES_PER_RTP_PACKET )]; IVAS_PIDATA_TS piData[IVAS_PI_MAX_ID * IVAS_MAX_FRAMES_PER_RTP_PACKET]; #ifdef FIX_1527_CMR_BITRATE_IDX IVAS_RTP_REQUEST_VALUE remoteRequests[IVAS_REQUEST_MAX]; #endif IVAS_RTP_FILE_HANDLE hRtpFile; FILE *f_piDataOut; FILE *f_piExtOut; Loading Loading
Workspace_msvc/lib_util.vcxproj +2 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ <ClCompile Include="..\lib_util\obj_edit_file_reader.c" /> <ClCompile Include="..\lib_util\render_config_reader.c" /> <ClCompile Include="..\lib_util\rotation_file_reader.c" /> <ClCompile Include="..\lib_util\requests_file_reader.c" /> <ClCompile Include="..\lib_util\split_render_file_read_write.c" /> <ClCompile Include="..\lib_util\split_rend_bfi_file_reader.c" /> <ClCompile Include="..\lib_util\tsm_scale_file_reader.c" /> Loading Loading @@ -165,6 +166,7 @@ <ClInclude Include="..\lib_util\masa_file_writer.h" /> <ClInclude Include="..\lib_util\render_config_reader.h" /> <ClInclude Include="..\lib_util\rotation_file_reader.h" /> <ClInclude Include="..\lib_util\requests_file_reader.h" /> <ClInclude Include="..\lib_util\split_render_file_read_write.h" /> <ClInclude Include="..\lib_util\tinywavein_c.h" /> <ClInclude Include="..\lib_util\tinywaveout_c.h" /> Loading
Workspace_msvc/lib_util.vcxproj.filters +6 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ <ClCompile Include="..\lib_util\rotation_file_reader.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\requests_file_reader.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\split_rend_bfi_file_reader.c"> <Filter>util_c</Filter> </ClCompile> Loading Loading @@ -165,6 +168,9 @@ <ClInclude Include="..\lib_util\rotation_file_reader.h"> <Filter>util_h</Filter> </ClInclude> <ClInclude Include="..\lib_util\requests_file_reader.h"> <Filter>util_h</Filter> </ClInclude> <ClInclude Include="..\lib_util\split_rend_bfi_file_reader.h"> <Filter>util_h</Filter> </ClInclude> Loading
apps/encoder.c +63 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,9 @@ #include "masa_file_reader.h" #include "rotation_file_reader.h" #include "ivas_rtp_file.h" #ifdef FIX_1527_CMR_BITRATE_IDX #include "requests_file_reader.h" #endif #ifdef DEBUGGING #include "debug.h" #endif Loading Loading @@ -157,6 +160,9 @@ typedef struct char *sceneOrientationTrajFileName; char *deviceOrientationTrajFileName; #ifdef FIX_1527_CMR_BITRATE_IDX char *requestsFileName; #endif } EncArguments; Loading Loading @@ -224,6 +230,9 @@ int main( uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; IVAS_RTP ivasRtp = { 0 }; #ifdef FIX_1527_CMR_BITRATE_IDX ReqFileReader *requestsFileReader = NULL; #endif /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ Loading Loading @@ -663,6 +672,20 @@ int main( } } #ifdef FIX_1527_CMR_BITRATE_IDX /*------------------------------------------------------------------------------------------* * Open remote requests file for rtp packing (E-bytes) *------------------------------------------------------------------------------------------*/ if ( arg.requestsFileName != NULL ) { if ( ( error = RequestsFileReader_open( arg.requestsFileName, &requestsFileReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open requests file %s \n\n", arg.requestsFileName ); goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Run the encoder *------------------------------------------------------------------------------------------*/ Loading Loading @@ -872,6 +895,17 @@ int main( } } #ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { if ( ( error = ReadNextRequests( requestsFileReader, ivasRtp.remoteRequests, &ivasRtp.remoteRequestBitmap ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading requests from %s\n", IVAS_ENC_GetErrorMessage( error ), RequestsFileReader_getFilePath( requestsFileReader ) ); goto cleanup; } } #endif if ( ( error = IVAS_ENC_EncodeFrameToCompact( hIvasEnc, pcmBuf, pcmBufSize, au, &numBits ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); Loading Loading @@ -976,6 +1010,13 @@ cleanup: fclose( f_bitrateProfile ); } #ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { RequestsFileReader_close( &requestsFileReader ); } #endif if ( sceneOrientationFileReader ) { RotationFileReader_close( &sceneOrientationFileReader ); Loading Loading @@ -1037,6 +1078,10 @@ static bool parseCmdlIVAS_enc( /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ #ifdef FIX_1527_CMR_BITRATE_IDX // Need less usan/msan or new arg addition memset( arg, 0, sizeof( *arg ) ); #endif arg->inputWavFilename = NULL; arg->outputBitstreamFilename = NULL; Loading Loading @@ -1917,6 +1962,20 @@ static bool parseCmdlIVAS_enc( arg->deviceOrientationTrajFileName = argv[i]; i++; } #ifdef FIX_1527_CMR_BITRATE_IDX else if ( strcmp( argv_to_upper, "-REQUESTS" ) == 0 ) { i++; if ( argc - i <= 4 || argv[i][0] == '-' ) { fprintf( stderr, "Error: Remote requests file name not specified!\n\n" ); usage_enc(); return false; } arg->requestsFileName = argv[i]; i++; } #endif /*-----------------------------------------------------------------* * Option not recognized Loading Loading @@ -2155,6 +2214,10 @@ static void usage_enc( void ) fprintf( stdout, " EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet\n" ); fprintf( stdout, "-scene_orientation : Scene orientation trajectory file. Only used with rtpdump output.\n" ); fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" ); #ifdef FIX_1527_CMR_BITRATE_IDX fprintf( stdout, "-requests : Remote requests file, Only used with rtpdump output.\n" ); #endif fprintf( stdout, "\n" ); return; Loading
lib_util/ivas_rtp_file.c +14 −0 Original line number Diff line number Diff line Loading @@ -967,6 +967,20 @@ ivas_error IVAS_RTP_WriteNextFrame( rtp->nWrittenPiData--; } #ifdef FIX_1527_CMR_BITRATE_IDX for ( IVAS_RTP_REQUEST_TYPE req = 0; req < IVAS_REQUEST_MAX; req++ ) { if ( rtp->remoteRequestBitmap & ( 1u << req ) ) { if ( ( error = IVAS_RTP_PACK_PushRemoteRequest( rtp->hPack, req, rtp->remoteRequests[req] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while pushing requests\n", ivas_error_to_string( error ) ); return error; } } } #endif if ( forcePacket || IVAS_RTP_PACK_GetNumFrames( rtp->hPack ) == rtp->packCfg.maxFramesPerPacket ) { uint32_t numFramesInPayload = 0; Loading
lib_util/ivas_rtp_file.h +3 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,9 @@ typedef struct uint8_t packet[NOMINAL_BUFFER_SIZE( IVAS_MAX_FRAMES_PER_RTP_PACKET )]; IVAS_PIDATA_TS piData[IVAS_PI_MAX_ID * IVAS_MAX_FRAMES_PER_RTP_PACKET]; #ifdef FIX_1527_CMR_BITRATE_IDX IVAS_RTP_REQUEST_VALUE remoteRequests[IVAS_REQUEST_MAX]; #endif IVAS_RTP_FILE_HANDLE hRtpFile; FILE *f_piDataOut; FILE *f_piExtOut; Loading