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\rtpdump.c" /> <ClCompile Include="..\lib_util\split_render_file_read_write.c" /> <ClCompile Include="..\lib_util\split_rend_bfi_file_reader.c" /> Loading Loading @@ -164,6 +165,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\rtpdump.h" /> <ClInclude Include="..\lib_util\tinywavein_c.h" /> <ClInclude Include="..\lib_util\tinywaveout_c.h" /> Loading apps/encoder.c +62 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,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 #include "wmc_auto.h" Loading Loading @@ -165,6 +168,9 @@ typedef struct char *sceneOrientationTrajFileName; char *deviceOrientationTrajFileName; #ifdef FIX_1527_CMR_BITRATE_IDX char *requestsFileName; #endif } EncArguments; Loading Loading @@ -221,6 +227,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 @@ -658,6 +667,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 @@ -867,6 +890,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 @@ -962,6 +996,13 @@ cleanup: fclose( f_bitrateProfile ); } #ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { RequestsFileReader_close( &requestsFileReader ); } #endif if ( sceneOrientationFileReader ) { RotationFileReader_close( &sceneOrientationFileReader ); Loading Loading @@ -1008,6 +1049,9 @@ static bool parseCmdlIVAS_enc( /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ #ifdef FIX_1527_CMR_BITRATE_IDX memset( arg, 0, sizeof( *arg ) ); #endif arg->inputWavFilename = NULL; arg->outputBitstreamFilename = NULL; Loading Loading @@ -1874,6 +1918,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 @@ -2093,6 +2151,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_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ #define HARMONIZE_DCT /* VA: removal of duplicated DCT functions */ #define FIX_2489_HARMONIZE_FdCng_encodeSID /* FhG: harmonize FdCng_encodeSID_fx() and FdCng_encodeSID_ivas_fx() */ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ /* #################### End BE switches ################################## */ Loading lib_com/prot_fx.h +7 −0 Original line number Diff line number Diff line Loading @@ -6651,9 +6651,14 @@ void perform_noise_estimation_dec_ivas_fx( ); /* Decode the CLDFB-CNG bitstream */ #ifdef HARMONIZE_2494_FdCng_decodeSID_fx void FdCng_decodeSID_fx( Decoder_State *st ); /* i/o: decoder state structure */ #else void FdCng_decodeSID_fx( HANDLE_FD_CNG_COM st, /* i/o: FD_CNG structure containing all buffers and variables */ Decoder_State *corest ); /* i/o: decoder state structure */ #endif void noisy_speech_detection_fx( HANDLE_FD_CNG_DEC hFdCngDec, /* i/o: FD_CNG structure */ Loading Loading @@ -9595,9 +9600,11 @@ void SynthesisSTFT_fx( const Word16 nchan_out /* i : number of output channels */ ); #ifndef HARMONIZE_2494_FdCng_decodeSID_fx void FdCng_decodeSID_ivas_fx( Decoder_State *st /* i/o: decoder state structure */ ); #endif void cldfb_restore_memory_ivas_fx( HANDLE_CLDFB_FILTER_BANK hs /* i/o: filter bank handle */ Loading lib_dec/acelp_core_dec_fx.c +12 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,11 @@ ivas_error acelp_core_dec_fx( /* Only run parameter decoding in SID frames */ IF( EQ_32( st->core_brate, SID_2k40 ) ) { #ifndef HARMONIZE_2494_FdCng_decodeSID_fx FdCng_decodeSID_ivas_fx( st ); #else FdCng_decodeSID_fx( st ); #endif Word16 n1, n2; n1 = L_norm_arr( st->hFdCngDec->hFdCngCom->sidNoiseEst, NPART ); Loading Loading @@ -663,14 +667,21 @@ ivas_error acelp_core_dec_fx( { IF( EQ_16( st->element_mode, EVS_MONO ) ) { #ifndef HARMONIZE_2494_FdCng_decodeSID_fx FdCng_decodeSID_fx( st->hFdCngDec->hFdCngCom, st ); #else FdCng_decodeSID_fx( st ); #endif } ELSE { Word16 old_NoiseEstExp = st->hFdCngDec->hFdCngCom->sidNoiseEstExp; move16(); #ifndef HARMONIZE_2494_FdCng_decodeSID_fx FdCng_decodeSID_ivas_fx( st ); #else FdCng_decodeSID_fx( st ); #endif Scale_sig32( st->hFdCngDec->hFdCngCom->sidNoiseEstLp, NPART, sub( old_NoiseEstExp, st->hFdCngDec->hFdCngCom->sidNoiseEstExp ) ); Scale_sig( st->hFdCngDec->hFdCngCom->A_cng, M + 1, sub( norm_s( st->hFdCngDec->hFdCngCom->A_cng[0] ), Q2 ) ); // Qx 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\rtpdump.c" /> <ClCompile Include="..\lib_util\split_render_file_read_write.c" /> <ClCompile Include="..\lib_util\split_rend_bfi_file_reader.c" /> Loading Loading @@ -164,6 +165,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\rtpdump.h" /> <ClInclude Include="..\lib_util\tinywavein_c.h" /> <ClInclude Include="..\lib_util\tinywaveout_c.h" /> Loading
apps/encoder.c +62 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,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 #include "wmc_auto.h" Loading Loading @@ -165,6 +168,9 @@ typedef struct char *sceneOrientationTrajFileName; char *deviceOrientationTrajFileName; #ifdef FIX_1527_CMR_BITRATE_IDX char *requestsFileName; #endif } EncArguments; Loading Loading @@ -221,6 +227,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 @@ -658,6 +667,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 @@ -867,6 +890,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 @@ -962,6 +996,13 @@ cleanup: fclose( f_bitrateProfile ); } #ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { RequestsFileReader_close( &requestsFileReader ); } #endif if ( sceneOrientationFileReader ) { RotationFileReader_close( &sceneOrientationFileReader ); Loading Loading @@ -1008,6 +1049,9 @@ static bool parseCmdlIVAS_enc( /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ #ifdef FIX_1527_CMR_BITRATE_IDX memset( arg, 0, sizeof( *arg ) ); #endif arg->inputWavFilename = NULL; arg->outputBitstreamFilename = NULL; Loading Loading @@ -1874,6 +1918,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 @@ -2093,6 +2151,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_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ #define HARMONIZE_DCT /* VA: removal of duplicated DCT functions */ #define FIX_2489_HARMONIZE_FdCng_encodeSID /* FhG: harmonize FdCng_encodeSID_fx() and FdCng_encodeSID_ivas_fx() */ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ /* #################### End BE switches ################################## */ Loading
lib_com/prot_fx.h +7 −0 Original line number Diff line number Diff line Loading @@ -6651,9 +6651,14 @@ void perform_noise_estimation_dec_ivas_fx( ); /* Decode the CLDFB-CNG bitstream */ #ifdef HARMONIZE_2494_FdCng_decodeSID_fx void FdCng_decodeSID_fx( Decoder_State *st ); /* i/o: decoder state structure */ #else void FdCng_decodeSID_fx( HANDLE_FD_CNG_COM st, /* i/o: FD_CNG structure containing all buffers and variables */ Decoder_State *corest ); /* i/o: decoder state structure */ #endif void noisy_speech_detection_fx( HANDLE_FD_CNG_DEC hFdCngDec, /* i/o: FD_CNG structure */ Loading Loading @@ -9595,9 +9600,11 @@ void SynthesisSTFT_fx( const Word16 nchan_out /* i : number of output channels */ ); #ifndef HARMONIZE_2494_FdCng_decodeSID_fx void FdCng_decodeSID_ivas_fx( Decoder_State *st /* i/o: decoder state structure */ ); #endif void cldfb_restore_memory_ivas_fx( HANDLE_CLDFB_FILTER_BANK hs /* i/o: filter bank handle */ Loading
lib_dec/acelp_core_dec_fx.c +12 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,11 @@ ivas_error acelp_core_dec_fx( /* Only run parameter decoding in SID frames */ IF( EQ_32( st->core_brate, SID_2k40 ) ) { #ifndef HARMONIZE_2494_FdCng_decodeSID_fx FdCng_decodeSID_ivas_fx( st ); #else FdCng_decodeSID_fx( st ); #endif Word16 n1, n2; n1 = L_norm_arr( st->hFdCngDec->hFdCngCom->sidNoiseEst, NPART ); Loading Loading @@ -663,14 +667,21 @@ ivas_error acelp_core_dec_fx( { IF( EQ_16( st->element_mode, EVS_MONO ) ) { #ifndef HARMONIZE_2494_FdCng_decodeSID_fx FdCng_decodeSID_fx( st->hFdCngDec->hFdCngCom, st ); #else FdCng_decodeSID_fx( st ); #endif } ELSE { Word16 old_NoiseEstExp = st->hFdCngDec->hFdCngCom->sidNoiseEstExp; move16(); #ifndef HARMONIZE_2494_FdCng_decodeSID_fx FdCng_decodeSID_ivas_fx( st ); #else FdCng_decodeSID_fx( st ); #endif Scale_sig32( st->hFdCngDec->hFdCngCom->sidNoiseEstLp, NPART, sub( old_NoiseEstExp, st->hFdCngDec->hFdCngCom->sidNoiseEstExp ) ); Scale_sig( st->hFdCngDec->hFdCngCom->A_cng, M + 1, sub( norm_s( st->hFdCngDec->hFdCngCom->A_cng[0] ), Q2 ) ); // Qx Loading