Loading lib_rend/lib_rend.c +40 −12 Original line number Diff line number Diff line Loading @@ -2171,7 +2171,12 @@ static ivas_error initMcBinauralRendering( input_mc *inputMc, const AUDIO_CONFIG inConfig, const AUDIO_CONFIG outConfig, RENDER_CONFIG_DATA *hRendCfg ) RENDER_CONFIG_DATA *hRendCfg #ifdef FIX_513_REND_MC_ALLOC , uint8_t reconfigureFlag #endif ) { ivas_error error; #ifdef SPLIT_REND_WITH_HEAD_ROT Loading Loading @@ -2202,9 +2207,12 @@ static ivas_error initMcBinauralRendering( /* if TD renderer was open and we need to use CREND, close it */ if ( #ifdef FIX_513_REND_MC_ALLOC !useTDRend && reconfigureFlag || ( !useTDRend && #endif inputMc->tdRendWrapper.hBinRendererTd != NULL ) #ifdef FIX_513_REND_MC_ALLOC ) #endif { ivas_td_binaural_close( &inputMc->tdRendWrapper.hBinRendererTd ); inputMc->tdRendWrapper.hHrtfTD = NULL; Loading @@ -2212,7 +2220,7 @@ static ivas_error initMcBinauralRendering( #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef FIX_513_REND_MC_ALLOC if ( !useTDRend ) if ( reconfigureFlag || !useTDRend ) { #endif for ( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i ) Loading Loading @@ -2244,7 +2252,7 @@ static ivas_error initMcBinauralRendering( #endif #ifdef FIX_513_REND_MC_ALLOC if ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) if ( reconfigureFlag || ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) ) { #endif ivas_reverb_close( &inputMc->hReverb ); Loading @@ -2253,7 +2261,7 @@ static ivas_error initMcBinauralRendering( #endif #ifdef FIX_513_REND_MC_ALLOC if ( inConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM && !inputMc->base.ctx.pHeadRotData->headRotEnabled ) if ( reconfigureFlag || ( inConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM && !inputMc->base.ctx.pHeadRotData->headRotEnabled ) ) { #endif if ( inputMc->efapInWrapper.hEfap != NULL ) Loading Loading @@ -2510,7 +2518,12 @@ static ivas_error setRendInputActiveMc( if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { if ( ( error = initMcBinauralRendering( inputMc, inConfig, outConfig, hRendCfg ) ) != IVAS_ERR_OK ) if ( ( error = initMcBinauralRendering( inputMc, inConfig, outConfig, hRendCfg #ifdef FIX_513_REND_MC_ALLOC , TRUE #endif ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -4399,9 +4412,14 @@ ivas_error IVAS_REND_ConfigureCustomInputLoudspeakerLayout( * set for the MC input. */ inputMc->customLsInput = makeCustomLsSetup( layout ); inputMc->lfeRouting = defaultLfeRouting( inputMc->base.inConfig, inputMc->customLsInput, hIvasRend->outputConfig, *inputMc->base.ctx.pCustomLsOut ); inputMc->lfeRouting = defaultLfeRouting( inputMc->base.inConfig, inputMc->customLsInput, hIvasRend->outputConfig, *inputMc->base.ctx.pCustomLsOut ); if ( ( error = initEfap( &inputMc->efapInWrapper, inputMc->base.inConfig, &inputMc->customLsInput ) ) != IVAS_ERR_OK ) if ( ( error = initEfap( &inputMc->efapInWrapper, inputMc->base.inConfig, &inputMc->customLsInput ) ) != IVAS_ERR_OK ) { return error; } Loading @@ -4412,7 +4430,15 @@ ivas_error IVAS_REND_ConfigureCustomInputLoudspeakerLayout( if ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { if ( ( error = initMcBinauralRendering( inputMc, inputMc->base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig ) ) != IVAS_ERR_OK ) if ( ( error = initMcBinauralRendering( inputMc, inputMc->base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig #ifdef FIX_513_REND_MC_ALLOC , TRUE #endif ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -5258,7 +5284,8 @@ ivas_error IVAS_REND_SetHeadRotation( initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig ); hIvasRend->hRendererConfig, FALSE ); } } #endif Loading Loading @@ -5319,7 +5346,8 @@ ivas_error IVAS_REND_DisableHeadRotation( initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig ); hIvasRend->hRendererConfig, FALSE ); } } } Loading Loading
lib_rend/lib_rend.c +40 −12 Original line number Diff line number Diff line Loading @@ -2171,7 +2171,12 @@ static ivas_error initMcBinauralRendering( input_mc *inputMc, const AUDIO_CONFIG inConfig, const AUDIO_CONFIG outConfig, RENDER_CONFIG_DATA *hRendCfg ) RENDER_CONFIG_DATA *hRendCfg #ifdef FIX_513_REND_MC_ALLOC , uint8_t reconfigureFlag #endif ) { ivas_error error; #ifdef SPLIT_REND_WITH_HEAD_ROT Loading Loading @@ -2202,9 +2207,12 @@ static ivas_error initMcBinauralRendering( /* if TD renderer was open and we need to use CREND, close it */ if ( #ifdef FIX_513_REND_MC_ALLOC !useTDRend && reconfigureFlag || ( !useTDRend && #endif inputMc->tdRendWrapper.hBinRendererTd != NULL ) #ifdef FIX_513_REND_MC_ALLOC ) #endif { ivas_td_binaural_close( &inputMc->tdRendWrapper.hBinRendererTd ); inputMc->tdRendWrapper.hHrtfTD = NULL; Loading @@ -2212,7 +2220,7 @@ static ivas_error initMcBinauralRendering( #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef FIX_513_REND_MC_ALLOC if ( !useTDRend ) if ( reconfigureFlag || !useTDRend ) { #endif for ( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i ) Loading Loading @@ -2244,7 +2252,7 @@ static ivas_error initMcBinauralRendering( #endif #ifdef FIX_513_REND_MC_ALLOC if ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) if ( reconfigureFlag || ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) ) { #endif ivas_reverb_close( &inputMc->hReverb ); Loading @@ -2253,7 +2261,7 @@ static ivas_error initMcBinauralRendering( #endif #ifdef FIX_513_REND_MC_ALLOC if ( inConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM && !inputMc->base.ctx.pHeadRotData->headRotEnabled ) if ( reconfigureFlag || ( inConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM && !inputMc->base.ctx.pHeadRotData->headRotEnabled ) ) { #endif if ( inputMc->efapInWrapper.hEfap != NULL ) Loading Loading @@ -2510,7 +2518,12 @@ static ivas_error setRendInputActiveMc( if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { if ( ( error = initMcBinauralRendering( inputMc, inConfig, outConfig, hRendCfg ) ) != IVAS_ERR_OK ) if ( ( error = initMcBinauralRendering( inputMc, inConfig, outConfig, hRendCfg #ifdef FIX_513_REND_MC_ALLOC , TRUE #endif ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -4399,9 +4412,14 @@ ivas_error IVAS_REND_ConfigureCustomInputLoudspeakerLayout( * set for the MC input. */ inputMc->customLsInput = makeCustomLsSetup( layout ); inputMc->lfeRouting = defaultLfeRouting( inputMc->base.inConfig, inputMc->customLsInput, hIvasRend->outputConfig, *inputMc->base.ctx.pCustomLsOut ); inputMc->lfeRouting = defaultLfeRouting( inputMc->base.inConfig, inputMc->customLsInput, hIvasRend->outputConfig, *inputMc->base.ctx.pCustomLsOut ); if ( ( error = initEfap( &inputMc->efapInWrapper, inputMc->base.inConfig, &inputMc->customLsInput ) ) != IVAS_ERR_OK ) if ( ( error = initEfap( &inputMc->efapInWrapper, inputMc->base.inConfig, &inputMc->customLsInput ) ) != IVAS_ERR_OK ) { return error; } Loading @@ -4412,7 +4430,15 @@ ivas_error IVAS_REND_ConfigureCustomInputLoudspeakerLayout( if ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { if ( ( error = initMcBinauralRendering( inputMc, inputMc->base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig ) ) != IVAS_ERR_OK ) if ( ( error = initMcBinauralRendering( inputMc, inputMc->base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig #ifdef FIX_513_REND_MC_ALLOC , TRUE #endif ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -5258,7 +5284,8 @@ ivas_error IVAS_REND_SetHeadRotation( initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig ); hIvasRend->hRendererConfig, FALSE ); } } #endif Loading Loading @@ -5319,7 +5346,8 @@ ivas_error IVAS_REND_DisableHeadRotation( initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig ); hIvasRend->hRendererConfig, FALSE ); } } } Loading