Loading apps/decoder.c +14 −0 Original line number Diff line number Diff line Loading @@ -291,7 +291,11 @@ int main( if ( arg.hrtfReaderEnabled ) { /* sanity check */ #ifdef NONBE_1293_SR_HRTF if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) #else if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { arg.hrtfReaderEnabled = false; fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" ); Loading Loading @@ -594,8 +598,16 @@ int main( fprintf( stdout, "FEC: %.2f %%\n", arg.FER ); } } #else #ifdef FIX_VOIP_FUNCTIONS if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif #endif /*-------------------------------------------------------------------* Loading Loading @@ -697,7 +709,9 @@ int main( #endif goto cleanup; } #ifndef FIX_587_DEFAULT_REVERB renderConfig.roomAcoustics.override = true; #endif } /* ISAR frame size is set from command line, not renderer config file. Loading apps/renderer.c +29 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,10 @@ typedef struct char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; int8_t orientation_tracking; #ifdef FIX_1135_EXT_RENDERER_HANDLES int16_t Opt_Headrotation; int16_t Opt_ExternalOrientation; #endif int16_t nonDiegeticPan; float nonDiegeticPanGain; IVAS_REND_COMPLEXITY_LEVEL complexityLevel; Loading Loading @@ -896,7 +900,11 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError opening renderer handle: %s\n", ivas_error_to_string( error ) ); goto cleanup; Loading Loading @@ -1117,7 +1125,9 @@ int main( #endif goto cleanup; } #ifndef FIX_587_DEFAULT_REVERB renderConfig.roomAcoustics.override = 1; #endif } /* ISAR frame size is set from command line, not renderer config file. Loading Loading @@ -2652,7 +2662,13 @@ static CmdlnArgs defaultArgs( clearString( args.renderConfigFilePath ); clearString( args.externalOrientationFilePath ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args.Opt_Headrotation = 0; args.Opt_ExternalOrientation = 0; #endif args.orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; args.nonDiegeticPan = 0; args.nonDiegeticPanGain = 0.f; Loading Loading @@ -2744,6 +2760,9 @@ static void parseOption( break; case CmdLnOptionId_trajFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_Headrotation = 1; #endif strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_outputMetadata: Loading @@ -2764,6 +2783,9 @@ static void parseOption( break; case CmdLnOptionId_exteriorOrientationFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_ExternalOrientation = 1; #endif strncpy( args->externalOrientationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_customHrtfFile: Loading Loading @@ -2897,6 +2919,13 @@ static CmdlnArgs parseCmdlnArgs( exit( -1 ); /* Error printout handled by failing function */ } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { args.Opt_Headrotation = 1; } #endif return args; } Loading lib_com/common_api_types.h +2 −0 Original line number Diff line number Diff line Loading @@ -300,7 +300,9 @@ typedef enum typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG { #ifndef FIX_587_DEFAULT_REVERB int16_t override; #endif int16_t nBands; /* Number of frequency bands for which reverb properties are provided, integer, range [2..256] */ float pFc_input[IVAS_CLDFB_NO_CHANNELS_MAX]; /* Center frequencies for which following values are provided: */ float pAcoustic_rt60[IVAS_CLDFB_NO_CHANNELS_MAX]; /* - The room's T60 per center frequency */ Loading lib_com/options.h +8 −3 Original line number Diff line number Diff line Loading @@ -198,7 +198,8 @@ #define NONBE_FIX_1141_OSBA_ROOM_RENDERING /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */ #define NONBE_1360_LFE_DELAY /* Dlb: LFE delay alignment when rendering in CLDFB domain*/ #define NONBE_1229_FIX_ISM1_DPID /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */ #define NONBE_SVD_OPTIMIZATION #define NONBE_SVD_OPTIMIZATION /* FhG: port-2211-svd-optimization */ #define FIX_1135_EXT_RENDERER_HANDLES /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */ #define FIX_1209_SID_SIGNALING /* VA: issue 1209: remove dead code in IVAS SID signaling */ #define FIX_1158_FASTCONV_REVERB_HRTF /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */ #define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */ Loading @@ -207,6 +208,10 @@ #define FIX_1101_CLEANING_JBM_CALL /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */ #define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */ #define FIX_1348_OVERFLOW /* FhG: fix BASOP overflow in hq_lr_dec(), brings floating-point code inline with FX */ #define FIX_VOIP_FUNCTIONS /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */ #define FIX_587_DEFAULT_REVERB /* Philips: issue 587: inconsistent default reverb parameters across renderers */ #define NONBE_1214_PLC_LSF_MEMORY /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */ #define NONBE_1293_SR_HRTF /* VA: issue 1293: add support of external HRTFs in split rendering */ #define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */ /* #################### End BASOP porting switches ############################ */ Loading lib_dec/core_switching_dec.c +6 −0 Original line number Diff line number Diff line Loading @@ -263,8 +263,14 @@ ivas_error core_switching_pre_dec( st->uv_count = 0; } #ifdef NONBE_1214_PLC_LSF_MEMORY if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) /* EVS and HQ -> ACELP */ || ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 && st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) || ( st->core == ACELP_CORE && st->last_L_frame > L_FRAME16k ) /* TCX @ 25.6/32 kHz -> ACELP */ ) #else if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) || ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 && st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) ) #endif { if ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) { Loading Loading
apps/decoder.c +14 −0 Original line number Diff line number Diff line Loading @@ -291,7 +291,11 @@ int main( if ( arg.hrtfReaderEnabled ) { /* sanity check */ #ifdef NONBE_1293_SR_HRTF if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) #else if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { arg.hrtfReaderEnabled = false; fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" ); Loading Loading @@ -594,8 +598,16 @@ int main( fprintf( stdout, "FEC: %.2f %%\n", arg.FER ); } } #else #ifdef FIX_VOIP_FUNCTIONS if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif #endif /*-------------------------------------------------------------------* Loading Loading @@ -697,7 +709,9 @@ int main( #endif goto cleanup; } #ifndef FIX_587_DEFAULT_REVERB renderConfig.roomAcoustics.override = true; #endif } /* ISAR frame size is set from command line, not renderer config file. Loading
apps/renderer.c +29 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,10 @@ typedef struct char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; int8_t orientation_tracking; #ifdef FIX_1135_EXT_RENDERER_HANDLES int16_t Opt_Headrotation; int16_t Opt_ExternalOrientation; #endif int16_t nonDiegeticPan; float nonDiegeticPanGain; IVAS_REND_COMPLEXITY_LEVEL complexityLevel; Loading Loading @@ -896,7 +900,11 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError opening renderer handle: %s\n", ivas_error_to_string( error ) ); goto cleanup; Loading Loading @@ -1117,7 +1125,9 @@ int main( #endif goto cleanup; } #ifndef FIX_587_DEFAULT_REVERB renderConfig.roomAcoustics.override = 1; #endif } /* ISAR frame size is set from command line, not renderer config file. Loading Loading @@ -2652,7 +2662,13 @@ static CmdlnArgs defaultArgs( clearString( args.renderConfigFilePath ); clearString( args.externalOrientationFilePath ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args.Opt_Headrotation = 0; args.Opt_ExternalOrientation = 0; #endif args.orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; args.nonDiegeticPan = 0; args.nonDiegeticPanGain = 0.f; Loading Loading @@ -2744,6 +2760,9 @@ static void parseOption( break; case CmdLnOptionId_trajFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_Headrotation = 1; #endif strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_outputMetadata: Loading @@ -2764,6 +2783,9 @@ static void parseOption( break; case CmdLnOptionId_exteriorOrientationFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_ExternalOrientation = 1; #endif strncpy( args->externalOrientationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_customHrtfFile: Loading Loading @@ -2897,6 +2919,13 @@ static CmdlnArgs parseCmdlnArgs( exit( -1 ); /* Error printout handled by failing function */ } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { args.Opt_Headrotation = 1; } #endif return args; } Loading
lib_com/common_api_types.h +2 −0 Original line number Diff line number Diff line Loading @@ -300,7 +300,9 @@ typedef enum typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG { #ifndef FIX_587_DEFAULT_REVERB int16_t override; #endif int16_t nBands; /* Number of frequency bands for which reverb properties are provided, integer, range [2..256] */ float pFc_input[IVAS_CLDFB_NO_CHANNELS_MAX]; /* Center frequencies for which following values are provided: */ float pAcoustic_rt60[IVAS_CLDFB_NO_CHANNELS_MAX]; /* - The room's T60 per center frequency */ Loading
lib_com/options.h +8 −3 Original line number Diff line number Diff line Loading @@ -198,7 +198,8 @@ #define NONBE_FIX_1141_OSBA_ROOM_RENDERING /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */ #define NONBE_1360_LFE_DELAY /* Dlb: LFE delay alignment when rendering in CLDFB domain*/ #define NONBE_1229_FIX_ISM1_DPID /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */ #define NONBE_SVD_OPTIMIZATION #define NONBE_SVD_OPTIMIZATION /* FhG: port-2211-svd-optimization */ #define FIX_1135_EXT_RENDERER_HANDLES /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */ #define FIX_1209_SID_SIGNALING /* VA: issue 1209: remove dead code in IVAS SID signaling */ #define FIX_1158_FASTCONV_REVERB_HRTF /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */ #define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */ Loading @@ -207,6 +208,10 @@ #define FIX_1101_CLEANING_JBM_CALL /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */ #define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */ #define FIX_1348_OVERFLOW /* FhG: fix BASOP overflow in hq_lr_dec(), brings floating-point code inline with FX */ #define FIX_VOIP_FUNCTIONS /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */ #define FIX_587_DEFAULT_REVERB /* Philips: issue 587: inconsistent default reverb parameters across renderers */ #define NONBE_1214_PLC_LSF_MEMORY /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */ #define NONBE_1293_SR_HRTF /* VA: issue 1293: add support of external HRTFs in split rendering */ #define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */ /* #################### End BASOP porting switches ############################ */ Loading
lib_dec/core_switching_dec.c +6 −0 Original line number Diff line number Diff line Loading @@ -263,8 +263,14 @@ ivas_error core_switching_pre_dec( st->uv_count = 0; } #ifdef NONBE_1214_PLC_LSF_MEMORY if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) /* EVS and HQ -> ACELP */ || ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 && st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) || ( st->core == ACELP_CORE && st->last_L_frame > L_FRAME16k ) /* TCX @ 25.6/32 kHz -> ACELP */ ) #else if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) || ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 && st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) ) #endif { if ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) { Loading