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 +6 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ #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 */ #define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ #define HARMONIZE_2508_InitTransientDetection /* FhG: harmonize GetAttackForTCXDecision derivates for evs/ivas */ /* #################### End BE switches ################################## */ Loading @@ -124,6 +125,11 @@ #define FIX_BASOP_2497_MCMASA_LFE_WRONG_SF_INDEX /* Nokia: BASOP 2497: Fix wrong subframe index in McMASA LFE synth. */ #define FIX_BASOP_2496_OMASA_OBJ_EDIT_WRONG_ASSIGN /* Nokia: BASOP 2496: Fix wrong assignment in OMASA object edit code */ #define FIX_2495_Q_ALIGN_OSBA_RENDERER /* FhG: Basop issue #2495: Corrected exponent scaling of outAudio.data_fx before buffer accumulation in renderSbaToBinaural(). */ #define FIX_BASOP_2511_PROTO_REF_POWER_FIX /* FhG: BASOP 2511; Fix reference power computation in protoSignalComputation_shd_fx() */ #define FIX_BASOP_2512_WRONG_SHIFT_IN_DIRAC_CONFIG /* Nokia: BASOP 2512: Fix wrong division by shift */ #define FIX_BASOP_2513_EXTRA_RETURN_REND_OPEN /* Nokia: BASOP issue 2513: Removes extra return block */ #define FIX_BASOP_2514_EFAP_PORTING_ERROR /* Nokia: BASOP issue 2514: Fix wrongly ported line */ #define FIX_BASOP_2516_REND_CUSTOM_LAYOUT_PORT_BUG /* Nokia: BASOP issue 2516: Fix porting bug in setting planar state for custom layout in renderer */ /* ##################### End NON-BE switches ########################### */ Loading lib_com/prot_fx.h +6 −1 Original line number Diff line number Diff line Loading @@ -7295,7 +7295,12 @@ ivas_error ppp_quarter_decoder_fx( void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ #ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM const Word16 bwidth /* Q0 */ #else const Word16 bwidth, /* Q0 */ const Word16 is_init /* i : indicate call during initialization */ #endif ); void open_decoder_LPD_ivas_fx( Loading lib_dec/core_dec_init_fx.c +30 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,12 @@ void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ #ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM const Word16 bwidth /* Q0 */ #else const Word16 bwidth, /* Q0 */ const Word16 is_init /* i : indicate call during initialization */ #endif ) { Word16 i; Loading Loading @@ -206,6 +211,29 @@ void open_decoder_LPD_fx( set16_fx( hBWE_TD->cur_sub_Aq_fx, 0, M + 1 ); /* Q12 */ } #ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM IF( st->hIGFDec != NULL ) { test(); IF( !is_init || NE_16( st->element_mode, IVAS_CPE_MDCT ) ) { init_tcx_cfg_fx( st->hTcxCfg, total_brate, st->sr_core, st->output_Fs, st->L_frame, st->bwidth, st->hTcxDec->L_frameTCX, st->fscale, st->preemph_fac, st->tcxonly, st->rf_flag, st->igf, st->hIGFDec->infoIGFStopFreq, st->element_mode, st->ini_frame, MCT_flag, fscaleFB ); } ELSE { st->hTcxCfg->tcx_curr_overlap_mode = st->hTcxCfg->tcx_last_overlap_mode = ALDO_WINDOW; move16(); move16(); st->hTcxCfg->last_aldo = 1; move16(); } } IF( st->hTECDec != NULL ) { resetTecDec_Fx( st->hTECDec ); } #else /*TCX config*/ st->hTcxCfg->preemph_fac = st->preemph_fac; move16(); Loading Loading @@ -269,6 +297,7 @@ void open_decoder_LPD_fx( /* Initialize decoder delay */ #endif if ( NE_16( st->element_mode, IVAS_SCE ) ) { 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 +6 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ #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 */ #define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ #define HARMONIZE_2508_InitTransientDetection /* FhG: harmonize GetAttackForTCXDecision derivates for evs/ivas */ /* #################### End BE switches ################################## */ Loading @@ -124,6 +125,11 @@ #define FIX_BASOP_2497_MCMASA_LFE_WRONG_SF_INDEX /* Nokia: BASOP 2497: Fix wrong subframe index in McMASA LFE synth. */ #define FIX_BASOP_2496_OMASA_OBJ_EDIT_WRONG_ASSIGN /* Nokia: BASOP 2496: Fix wrong assignment in OMASA object edit code */ #define FIX_2495_Q_ALIGN_OSBA_RENDERER /* FhG: Basop issue #2495: Corrected exponent scaling of outAudio.data_fx before buffer accumulation in renderSbaToBinaural(). */ #define FIX_BASOP_2511_PROTO_REF_POWER_FIX /* FhG: BASOP 2511; Fix reference power computation in protoSignalComputation_shd_fx() */ #define FIX_BASOP_2512_WRONG_SHIFT_IN_DIRAC_CONFIG /* Nokia: BASOP 2512: Fix wrong division by shift */ #define FIX_BASOP_2513_EXTRA_RETURN_REND_OPEN /* Nokia: BASOP issue 2513: Removes extra return block */ #define FIX_BASOP_2514_EFAP_PORTING_ERROR /* Nokia: BASOP issue 2514: Fix wrongly ported line */ #define FIX_BASOP_2516_REND_CUSTOM_LAYOUT_PORT_BUG /* Nokia: BASOP issue 2516: Fix porting bug in setting planar state for custom layout in renderer */ /* ##################### End NON-BE switches ########################### */ Loading
lib_com/prot_fx.h +6 −1 Original line number Diff line number Diff line Loading @@ -7295,7 +7295,12 @@ ivas_error ppp_quarter_decoder_fx( void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ #ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM const Word16 bwidth /* Q0 */ #else const Word16 bwidth, /* Q0 */ const Word16 is_init /* i : indicate call during initialization */ #endif ); void open_decoder_LPD_ivas_fx( Loading
lib_dec/core_dec_init_fx.c +30 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,12 @@ void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ #ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM const Word16 bwidth /* Q0 */ #else const Word16 bwidth, /* Q0 */ const Word16 is_init /* i : indicate call during initialization */ #endif ) { Word16 i; Loading Loading @@ -206,6 +211,29 @@ void open_decoder_LPD_fx( set16_fx( hBWE_TD->cur_sub_Aq_fx, 0, M + 1 ); /* Q12 */ } #ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM IF( st->hIGFDec != NULL ) { test(); IF( !is_init || NE_16( st->element_mode, IVAS_CPE_MDCT ) ) { init_tcx_cfg_fx( st->hTcxCfg, total_brate, st->sr_core, st->output_Fs, st->L_frame, st->bwidth, st->hTcxDec->L_frameTCX, st->fscale, st->preemph_fac, st->tcxonly, st->rf_flag, st->igf, st->hIGFDec->infoIGFStopFreq, st->element_mode, st->ini_frame, MCT_flag, fscaleFB ); } ELSE { st->hTcxCfg->tcx_curr_overlap_mode = st->hTcxCfg->tcx_last_overlap_mode = ALDO_WINDOW; move16(); move16(); st->hTcxCfg->last_aldo = 1; move16(); } } IF( st->hTECDec != NULL ) { resetTecDec_Fx( st->hTECDec ); } #else /*TCX config*/ st->hTcxCfg->preemph_fac = st->preemph_fac; move16(); Loading Loading @@ -269,6 +297,7 @@ void open_decoder_LPD_fx( /* Initialize decoder delay */ #endif if ( NE_16( st->element_mode, IVAS_SCE ) ) { Loading