Loading apps/renderer.c +0 −14 Original line number Diff line number Diff line Loading @@ -169,10 +169,8 @@ 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 @@ -886,11 +884,7 @@ 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, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -2518,10 +2512,8 @@ 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; Loading Loading @@ -2611,9 +2603,7 @@ 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 @@ -2634,9 +2624,7 @@ 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 @@ -2761,12 +2749,10 @@ 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/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_POINT_ROM_CONST /* Ora: issue #1150 HRTF ROM tables should be defined as 'const'*/ #define FIX_1135_EXT_RENDERER_HANDLES /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */ #define FIX_1158_FASTCONV_REVERB_HRTF /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */ #define FIX_1166_TDREND_DIV0 /* FhG,Eri: issue 1166: potential divide by zero in TD Renderer */ #define FIX_835_PARAMMC_BUFFER_VALUES /* FhG: BASOP issue 835: wide range of buffer values for cx in ParamMC */ Loading lib_dec/lib_dec.c +0 −7 Original line number Diff line number Diff line Loading @@ -510,13 +510,6 @@ ivas_error IVAS_DEC_Configure( hDecoderConfig->render_framesize = renderFramesize; } #ifndef FIX_1135_EXT_RENDERER_HANDLES if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { hDecoderConfig->Opt_Headrotation = TRUE; } #endif /* Set decoder parameters to initial values */ if ( ( error = ivas_init_decoder_front( st_ivas ) ) != IVAS_ERR_OK ) { Loading lib_rend/lib_rend.c +0 −139 Original line number Diff line number Diff line Loading @@ -204,11 +204,7 @@ struct IVAS_REND AUDIO_CONFIG outputConfig; EFAP_WRAPPER efapOutWrapper; IVAS_LSSETUP_CUSTOM_STRUCT customLsOut; #ifdef FIX_1135_EXT_RENDERER_HANDLES SPLIT_REND_WRAPPER *splitRendWrapper; #else SPLIT_REND_WRAPPER splitRendWrapper; #endif IVAS_REND_AudioBuffer splitRendEncBuffer; IVAS_REND_HeadRotData headRotData; Loading Loading @@ -1112,11 +1108,7 @@ static ivas_error initHeadRotation( static void closeHeadRotation( IVAS_REND_HANDLE hIvasRend ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend != NULL && hIvasRend->headRotData.headRotEnabled && hIvasRend->headRotData.hOrientationTracker != NULL ) #else if ( ( hIvasRend != NULL ) && ( hIvasRend->headRotData.hOrientationTracker != NULL ) ) #endif { free( hIvasRend->headRotData.hOrientationTracker ); } Loading Loading @@ -1225,11 +1217,7 @@ static rendering_context getRendCtx( ctx.pHeadRotData = &hIvasRend->headRotData; ctx.hhRendererConfig = &hIvasRend->hRendererConfig; ctx.pSplitRendBFI = &hIvasRend->splitRendBFI; #ifdef FIX_1135_EXT_RENDERER_HANDLES ctx.pSplitRendWrapper = hIvasRend->splitRendWrapper; #else ctx.pSplitRendWrapper = &hIvasRend->splitRendWrapper; #endif ctx.pCombinedOrientationData = &hIvasRend->hCombinedOrientationData; return ctx; Loading Loading @@ -1275,11 +1263,7 @@ static ivas_error initIsmMasaRendering( ivas_td_binaural_close( &inputIsm->tdRendWrapper.hBinRendererTd ); } #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper != NULL ? inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputIsm->hReverb ); Loading Loading @@ -1383,11 +1367,7 @@ static ivas_error setRendInputActiveIsm( } else if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -1410,11 +1390,7 @@ static void clearInputIsm( initRendInputBase( &inputIsm->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); /* Free input's internal handles */ #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper != NULL ? inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputIsm->hReverb ); Loading Loading @@ -2112,11 +2088,7 @@ static ivas_error initMcBinauralRendering( /* if we need to use TD renderer and CREND was open, close it */ if ( useTDRend ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif } if ( !reconfigureFlag || ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) ) Loading Loading @@ -2208,11 +2180,7 @@ static ivas_error initMcMasaRendering( ivas_td_binaural_close( &inputMc->tdRendWrapper.hBinRendererTd ); } #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputMc->hReverb ); Loading Loading @@ -2397,11 +2365,7 @@ static void clearInputMc( efap_free_data( &inputMc->efapInWrapper.hEfap ); } #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputMc->hReverb ); Loading Loading @@ -2574,11 +2538,7 @@ static ivas_error updateSbaPanGains( } else { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -2590,11 +2550,7 @@ static ivas_error updateSbaPanGains( return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -2626,11 +2582,7 @@ static ivas_error initSbaMasaRendering( { ivas_error error; #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputSba->crendWrapper, inputSba->base.ctx.pSplitRendWrapper != NULL ? inputSba->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputSba->crendWrapper, inputSba->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif if ( ( error = ivas_dirac_ana_open( &inputSba->hDirAC, inSampleRate ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2708,11 +2660,7 @@ static void clearInputSba( initRendInputBase( &inputSba->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); /* Free input's internal handles */ #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputSba->crendWrapper, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputSba->crendWrapper, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif if ( inputSba->cldfbRendWrapper.hCldfbRend != NULL ) { Loading Loading @@ -2810,10 +2758,8 @@ ivas_error IVAS_REND_Open( const bool asHrtfBinary, /* i : load hrtf binary file */ const int16_t nonDiegeticPan, /* i : non-diegetic object flag */ const float nonDiegeticPanGain, /* i : non-diegetic panning gain */ #ifdef FIX_1135_EXT_RENDERER_HANDLES const int16_t Opt_Headrotation, /* i : indicates whether head-rotation is used */ const int16_t Opt_ExternalOrientation, /* i : indicates whether external orientations are used */ #endif const int16_t num_subframes /* i : number of subframes */ ) { Loading Loading @@ -2869,46 +2815,34 @@ ivas_error IVAS_REND_Open( } /* Initialize headrotation data */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->headRotData.headRotEnabled = 0; if ( Opt_Headrotation ) { #endif if ( ( error = initHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif /* Initialize external orientation data */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->hExternalOrientationData = NULL; if ( Opt_ExternalOrientation ) { #endif if ( ( error = ivas_external_orientation_open( &( hIvasRend->hExternalOrientationData ), num_subframes ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif /* Initilize combined orientation data */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->hCombinedOrientationData = NULL; if ( Opt_Headrotation || Opt_ExternalOrientation ) { #endif if ( ( error = ivas_combined_orientation_open( &( hIvasRend->hCombinedOrientationData ), outputSampleRate, num_subframes ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif /* Initialize EFAP */ if ( ( error = initEfap( &hIvasRend->efapOutWrapper, outConfig, &hIvasRend->customLsOut ) ) != IVAS_ERR_OK ) Loading @@ -2918,7 +2852,6 @@ ivas_error IVAS_REND_Open( /* Initialize inputs */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->splitRendWrapper = NULL; if ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { Loading @@ -2929,9 +2862,6 @@ ivas_error IVAS_REND_Open( isar_init_split_rend_handles( hIvasRend->splitRendWrapper ); } #else isar_init_split_rend_handles( &hIvasRend->splitRendWrapper ); #endif hIvasRend->splitRendEncBuffer.data = NULL; for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) Loading Loading @@ -3023,17 +2953,13 @@ ivas_error IVAS_REND_Open( } } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { #endif if ( ( error = ivas_HRTF_statistics_init( &( hIvasRend->hHrtfs.hHrtfStatistics ), hIvasRend->sampleRateOut ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif return IVAS_ERR_OK; } Loading Loading @@ -3546,11 +3472,7 @@ ivas_error IVAS_REND_AddInput( int16_t cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, getAudioConfigType( inConfig ) ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_pre_rend_init( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_pre_rend_init( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -3968,11 +3890,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsSba[i].base.inConfig != IVAS_AUDIO_CONFIG_INVALID ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->splitRendWrapper != NULL && hIvasRend->splitRendWrapper->hBinHrSplitPreRend != NULL ) #else if ( hIvasRend->splitRendWrapper.hBinHrSplitPreRend != NULL ) #endif { if ( hIvasRend->hRendererConfig->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) { Loading Loading @@ -4474,22 +4392,14 @@ ivas_error IVAS_REND_FeedRenderConfig( { int16_t cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->splitRendWrapper != NULL ) { ISAR_PRE_REND_close( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); free( hIvasRend->splitRendWrapper ); hIvasRend->splitRendWrapper = NULL; } #else ISAR_PRE_REND_close( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); #endif #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_pre_rend_init( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_pre_rend_init( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -4646,12 +4556,10 @@ ivas_error IVAS_REND_SetOrientationTrackingMode( const IVAS_HEAD_ORIENT_TRK_T orientation_tracking /* i : Head orientation tracking type */ ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->headRotData.headRotEnabled == 0 ) { return IVAS_ERR_OK; } #endif return ivas_orient_trk_SetTrackingType( hIvasRend->headRotData.hOrientationTracker, orientation_tracking ); } Loading Loading @@ -5285,11 +5193,7 @@ static ivas_error renderIsmToBinauralRoom( hCombinedOrientationData = ismInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -5903,11 +5807,7 @@ static ivas_error renderMcToBinaural( hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -5996,11 +5896,7 @@ static ivas_error renderMcToBinauralRoom( hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -6091,11 +5987,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -6701,11 +6593,7 @@ static ivas_error renderSbaToBinaural( hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -6782,11 +6670,7 @@ static ivas_error renderSbaToBinauralRoom( hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -7527,19 +7411,10 @@ static ivas_error getSamplesInternal( ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { int16_t num_poses_orig; #ifdef FIX_1135_EXT_RENDERER_HANDLES num_poses_orig = hIvasRend->splitRendWrapper->multiBinPoseData.num_poses; #else num_poses_orig = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses; #endif outAudio = hIvasRend->splitRendEncBuffer; #ifdef FIX_1135_EXT_RENDERER_HANDLES ISAR_PRE_REND_GetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper->multiBinPoseData, hIvasRend->headRotData.sr_pose_pred_axis ); assert( num_poses_orig == hIvasRend->splitRendWrapper->multiBinPoseData.num_poses && "number of poses should not change dynamically" ); #else ISAR_PRE_REND_GetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper.multiBinPoseData, hIvasRend->headRotData.sr_pose_pred_axis ); assert( num_poses_orig == hIvasRend->splitRendWrapper.multiBinPoseData.num_poses && "number of poses should not change dynamically" ); #endif /* Clear output buffer for split rendering bitstream */ set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); Loading Loading @@ -7604,11 +7479,7 @@ static ivas_error getSamplesInternal( } } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( hIvasRend->splitRendWrapper, #else if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, #endif hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, Loading Loading @@ -7780,16 +7651,12 @@ void IVAS_REND_Close( ivas_limiter_close( &hIvasRend->hLimiter ); /* Split binaural rendering */ #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->splitRendWrapper != NULL ) { ISAR_PRE_REND_close( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); free( hIvasRend->splitRendWrapper ); hIvasRend->splitRendWrapper = NULL; } #else ISAR_PRE_REND_close( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); #endif closeHeadRotation( hIvasRend ); Loading Loading @@ -8437,9 +8304,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( int32_t output_Fs; RENDERER_TYPE renderer_type; int16_t j, k, bin; #ifdef FIX_1135_EXT_RENDERER_HANDLES int16_t num_poses; #endif float binCenterFreq, tmpFloat; ivas_error error; float frequency_axis[CLDFB_NO_CHANNELS_MAX]; Loading @@ -8454,7 +8319,6 @@ static ivas_error ivas_masa_ext_rend_parambin_init( nBins = inputMasa->hMasaExtRend->hSpatParamRendCom->num_freq_bands; renderer_type = inputMasa->hMasaExtRend->renderer_type; #ifdef FIX_1135_EXT_RENDERER_HANDLES num_poses = 1; if ( inputMasa->base.ctx.pSplitRendWrapper != NULL ) { Loading @@ -8462,9 +8326,6 @@ static ivas_error ivas_masa_ext_rend_parambin_init( } for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) #else for ( pos_idx = 0; pos_idx < inputMasa->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; pos_idx++ ) #endif { hDiracDecBin = inputMasa->hMasaExtRend->hDiracDecBin[pos_idx]; Loading lib_rend/lib_rend.h +0 −2 Original line number Diff line number Diff line Loading @@ -113,10 +113,8 @@ ivas_error IVAS_REND_Open( const bool asHrtfBinary, /* i : load hrtf binary file */ const int16_t nonDiegeticPan, /* i : non-diegetic object flag */ const float nonDiegeticPanGain, /* i : non-diegetic panning gain */ #ifdef FIX_1135_EXT_RENDERER_HANDLES const int16_t Opt_Headrotation, /* i : indicates whether head-rotation is used */ const int16_t Opt_ExternalOrientation, /* i : indicates whether external orientations are used */ #endif const int16_t num_subframes /* i : number of subframes */ ); Loading Loading
apps/renderer.c +0 −14 Original line number Diff line number Diff line Loading @@ -169,10 +169,8 @@ 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 @@ -886,11 +884,7 @@ 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, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -2518,10 +2512,8 @@ 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; Loading Loading @@ -2611,9 +2603,7 @@ 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 @@ -2634,9 +2624,7 @@ 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 @@ -2761,12 +2749,10 @@ 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/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_POINT_ROM_CONST /* Ora: issue #1150 HRTF ROM tables should be defined as 'const'*/ #define FIX_1135_EXT_RENDERER_HANDLES /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */ #define FIX_1158_FASTCONV_REVERB_HRTF /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */ #define FIX_1166_TDREND_DIV0 /* FhG,Eri: issue 1166: potential divide by zero in TD Renderer */ #define FIX_835_PARAMMC_BUFFER_VALUES /* FhG: BASOP issue 835: wide range of buffer values for cx in ParamMC */ Loading
lib_dec/lib_dec.c +0 −7 Original line number Diff line number Diff line Loading @@ -510,13 +510,6 @@ ivas_error IVAS_DEC_Configure( hDecoderConfig->render_framesize = renderFramesize; } #ifndef FIX_1135_EXT_RENDERER_HANDLES if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { hDecoderConfig->Opt_Headrotation = TRUE; } #endif /* Set decoder parameters to initial values */ if ( ( error = ivas_init_decoder_front( st_ivas ) ) != IVAS_ERR_OK ) { Loading
lib_rend/lib_rend.c +0 −139 Original line number Diff line number Diff line Loading @@ -204,11 +204,7 @@ struct IVAS_REND AUDIO_CONFIG outputConfig; EFAP_WRAPPER efapOutWrapper; IVAS_LSSETUP_CUSTOM_STRUCT customLsOut; #ifdef FIX_1135_EXT_RENDERER_HANDLES SPLIT_REND_WRAPPER *splitRendWrapper; #else SPLIT_REND_WRAPPER splitRendWrapper; #endif IVAS_REND_AudioBuffer splitRendEncBuffer; IVAS_REND_HeadRotData headRotData; Loading Loading @@ -1112,11 +1108,7 @@ static ivas_error initHeadRotation( static void closeHeadRotation( IVAS_REND_HANDLE hIvasRend ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend != NULL && hIvasRend->headRotData.headRotEnabled && hIvasRend->headRotData.hOrientationTracker != NULL ) #else if ( ( hIvasRend != NULL ) && ( hIvasRend->headRotData.hOrientationTracker != NULL ) ) #endif { free( hIvasRend->headRotData.hOrientationTracker ); } Loading Loading @@ -1225,11 +1217,7 @@ static rendering_context getRendCtx( ctx.pHeadRotData = &hIvasRend->headRotData; ctx.hhRendererConfig = &hIvasRend->hRendererConfig; ctx.pSplitRendBFI = &hIvasRend->splitRendBFI; #ifdef FIX_1135_EXT_RENDERER_HANDLES ctx.pSplitRendWrapper = hIvasRend->splitRendWrapper; #else ctx.pSplitRendWrapper = &hIvasRend->splitRendWrapper; #endif ctx.pCombinedOrientationData = &hIvasRend->hCombinedOrientationData; return ctx; Loading Loading @@ -1275,11 +1263,7 @@ static ivas_error initIsmMasaRendering( ivas_td_binaural_close( &inputIsm->tdRendWrapper.hBinRendererTd ); } #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper != NULL ? inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputIsm->hReverb ); Loading Loading @@ -1383,11 +1367,7 @@ static ivas_error setRendInputActiveIsm( } else if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -1410,11 +1390,7 @@ static void clearInputIsm( initRendInputBase( &inputIsm->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); /* Free input's internal handles */ #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper != NULL ? inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputIsm->hReverb ); Loading Loading @@ -2112,11 +2088,7 @@ static ivas_error initMcBinauralRendering( /* if we need to use TD renderer and CREND was open, close it */ if ( useTDRend ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif } if ( !reconfigureFlag || ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) ) Loading Loading @@ -2208,11 +2180,7 @@ static ivas_error initMcMasaRendering( ivas_td_binaural_close( &inputMc->tdRendWrapper.hBinRendererTd ); } #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputMc->hReverb ); Loading Loading @@ -2397,11 +2365,7 @@ static void clearInputMc( efap_free_data( &inputMc->efapInWrapper.hEfap ); } #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif ivas_reverb_close( &inputMc->hReverb ); Loading Loading @@ -2574,11 +2538,7 @@ static ivas_error updateSbaPanGains( } else { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -2590,11 +2550,7 @@ static ivas_error updateSbaPanGains( return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -2626,11 +2582,7 @@ static ivas_error initSbaMasaRendering( { ivas_error error; #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputSba->crendWrapper, inputSba->base.ctx.pSplitRendWrapper != NULL ? inputSba->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputSba->crendWrapper, inputSba->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif if ( ( error = ivas_dirac_ana_open( &inputSba->hDirAC, inSampleRate ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2708,11 +2660,7 @@ static void clearInputSba( initRendInputBase( &inputSba->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); /* Free input's internal handles */ #ifdef FIX_1135_EXT_RENDERER_HANDLES ivas_rend_closeCrend( &inputSba->crendWrapper, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); #else ivas_rend_closeCrend( &inputSba->crendWrapper, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ); #endif if ( inputSba->cldfbRendWrapper.hCldfbRend != NULL ) { Loading Loading @@ -2810,10 +2758,8 @@ ivas_error IVAS_REND_Open( const bool asHrtfBinary, /* i : load hrtf binary file */ const int16_t nonDiegeticPan, /* i : non-diegetic object flag */ const float nonDiegeticPanGain, /* i : non-diegetic panning gain */ #ifdef FIX_1135_EXT_RENDERER_HANDLES const int16_t Opt_Headrotation, /* i : indicates whether head-rotation is used */ const int16_t Opt_ExternalOrientation, /* i : indicates whether external orientations are used */ #endif const int16_t num_subframes /* i : number of subframes */ ) { Loading Loading @@ -2869,46 +2815,34 @@ ivas_error IVAS_REND_Open( } /* Initialize headrotation data */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->headRotData.headRotEnabled = 0; if ( Opt_Headrotation ) { #endif if ( ( error = initHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif /* Initialize external orientation data */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->hExternalOrientationData = NULL; if ( Opt_ExternalOrientation ) { #endif if ( ( error = ivas_external_orientation_open( &( hIvasRend->hExternalOrientationData ), num_subframes ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif /* Initilize combined orientation data */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->hCombinedOrientationData = NULL; if ( Opt_Headrotation || Opt_ExternalOrientation ) { #endif if ( ( error = ivas_combined_orientation_open( &( hIvasRend->hCombinedOrientationData ), outputSampleRate, num_subframes ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif /* Initialize EFAP */ if ( ( error = initEfap( &hIvasRend->efapOutWrapper, outConfig, &hIvasRend->customLsOut ) ) != IVAS_ERR_OK ) Loading @@ -2918,7 +2852,6 @@ ivas_error IVAS_REND_Open( /* Initialize inputs */ #ifdef FIX_1135_EXT_RENDERER_HANDLES hIvasRend->splitRendWrapper = NULL; if ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { Loading @@ -2929,9 +2862,6 @@ ivas_error IVAS_REND_Open( isar_init_split_rend_handles( hIvasRend->splitRendWrapper ); } #else isar_init_split_rend_handles( &hIvasRend->splitRendWrapper ); #endif hIvasRend->splitRendEncBuffer.data = NULL; for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) Loading Loading @@ -3023,17 +2953,13 @@ ivas_error IVAS_REND_Open( } } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { #endif if ( ( error = ivas_HRTF_statistics_init( &( hIvasRend->hHrtfs.hHrtfStatistics ), hIvasRend->sampleRateOut ) ) != IVAS_ERR_OK ) { return error; } #ifdef FIX_1135_EXT_RENDERER_HANDLES } #endif return IVAS_ERR_OK; } Loading Loading @@ -3546,11 +3472,7 @@ ivas_error IVAS_REND_AddInput( int16_t cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, getAudioConfigType( inConfig ) ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_pre_rend_init( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_pre_rend_init( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -3968,11 +3890,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsSba[i].base.inConfig != IVAS_AUDIO_CONFIG_INVALID ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->splitRendWrapper != NULL && hIvasRend->splitRendWrapper->hBinHrSplitPreRend != NULL ) #else if ( hIvasRend->splitRendWrapper.hBinHrSplitPreRend != NULL ) #endif { if ( hIvasRend->hRendererConfig->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) { Loading Loading @@ -4474,22 +4392,14 @@ ivas_error IVAS_REND_FeedRenderConfig( { int16_t cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->splitRendWrapper != NULL ) { ISAR_PRE_REND_close( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); free( hIvasRend->splitRendWrapper ); hIvasRend->splitRendWrapper = NULL; } #else ISAR_PRE_REND_close( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); #endif #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ivas_pre_rend_init( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_pre_rend_init( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -4646,12 +4556,10 @@ ivas_error IVAS_REND_SetOrientationTrackingMode( const IVAS_HEAD_ORIENT_TRK_T orientation_tracking /* i : Head orientation tracking type */ ) { #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->headRotData.headRotEnabled == 0 ) { return IVAS_ERR_OK; } #endif return ivas_orient_trk_SetTrackingType( hIvasRend->headRotData.hOrientationTracker, orientation_tracking ); } Loading Loading @@ -5285,11 +5193,7 @@ static ivas_error renderIsmToBinauralRoom( hCombinedOrientationData = ismInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -5903,11 +5807,7 @@ static ivas_error renderMcToBinaural( hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -5996,11 +5896,7 @@ static ivas_error renderMcToBinauralRoom( hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -6091,11 +5987,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -6701,11 +6593,7 @@ static ivas_error renderSbaToBinaural( hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -6782,11 +6670,7 @@ static ivas_error renderSbaToBinauralRoom( hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( *hCombinedOrientationData != NULL ) #else if ( hCombinedOrientationData != NULL ) #endif { for ( subframe_idx = 0; subframe_idx < ( *hCombinedOrientationData )->num_subframes; subframe_idx++ ) { Loading Loading @@ -7527,19 +7411,10 @@ static ivas_error getSamplesInternal( ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { int16_t num_poses_orig; #ifdef FIX_1135_EXT_RENDERER_HANDLES num_poses_orig = hIvasRend->splitRendWrapper->multiBinPoseData.num_poses; #else num_poses_orig = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses; #endif outAudio = hIvasRend->splitRendEncBuffer; #ifdef FIX_1135_EXT_RENDERER_HANDLES ISAR_PRE_REND_GetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper->multiBinPoseData, hIvasRend->headRotData.sr_pose_pred_axis ); assert( num_poses_orig == hIvasRend->splitRendWrapper->multiBinPoseData.num_poses && "number of poses should not change dynamically" ); #else ISAR_PRE_REND_GetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper.multiBinPoseData, hIvasRend->headRotData.sr_pose_pred_axis ); assert( num_poses_orig == hIvasRend->splitRendWrapper.multiBinPoseData.num_poses && "number of poses should not change dynamically" ); #endif /* Clear output buffer for split rendering bitstream */ set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); Loading Loading @@ -7604,11 +7479,7 @@ static ivas_error getSamplesInternal( } } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( hIvasRend->splitRendWrapper, #else if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, #endif hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, Loading Loading @@ -7780,16 +7651,12 @@ void IVAS_REND_Close( ivas_limiter_close( &hIvasRend->hLimiter ); /* Split binaural rendering */ #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( hIvasRend->splitRendWrapper != NULL ) { ISAR_PRE_REND_close( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); free( hIvasRend->splitRendWrapper ); hIvasRend->splitRendWrapper = NULL; } #else ISAR_PRE_REND_close( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); #endif closeHeadRotation( hIvasRend ); Loading Loading @@ -8437,9 +8304,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( int32_t output_Fs; RENDERER_TYPE renderer_type; int16_t j, k, bin; #ifdef FIX_1135_EXT_RENDERER_HANDLES int16_t num_poses; #endif float binCenterFreq, tmpFloat; ivas_error error; float frequency_axis[CLDFB_NO_CHANNELS_MAX]; Loading @@ -8454,7 +8319,6 @@ static ivas_error ivas_masa_ext_rend_parambin_init( nBins = inputMasa->hMasaExtRend->hSpatParamRendCom->num_freq_bands; renderer_type = inputMasa->hMasaExtRend->renderer_type; #ifdef FIX_1135_EXT_RENDERER_HANDLES num_poses = 1; if ( inputMasa->base.ctx.pSplitRendWrapper != NULL ) { Loading @@ -8462,9 +8326,6 @@ static ivas_error ivas_masa_ext_rend_parambin_init( } for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) #else for ( pos_idx = 0; pos_idx < inputMasa->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; pos_idx++ ) #endif { hDiracDecBin = inputMasa->hMasaExtRend->hDiracDecBin[pos_idx]; Loading
lib_rend/lib_rend.h +0 −2 Original line number Diff line number Diff line Loading @@ -113,10 +113,8 @@ ivas_error IVAS_REND_Open( const bool asHrtfBinary, /* i : load hrtf binary file */ const int16_t nonDiegeticPan, /* i : non-diegetic object flag */ const float nonDiegeticPanGain, /* i : non-diegetic panning gain */ #ifdef FIX_1135_EXT_RENDERER_HANDLES const int16_t Opt_Headrotation, /* i : indicates whether head-rotation is used */ const int16_t Opt_ExternalOrientation, /* i : indicates whether external orientations are used */ #endif const int16_t num_subframes /* i : number of subframes */ ); Loading