From 7a5d83da931e383afe37505788c9369d25c562e2 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 4 Oct 2025 15:44:18 +0200 Subject: [PATCH] port remaining changes from float MR1655 --- lib_com/options.h | 1 + lib_rend/ivas_rotation.c | 5 +++++ lib_rend/lib_rend.c | 12 ++++++++++++ lib_rend/lib_rend.h | 9 +++++++++ 4 files changed, 27 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index afb4e5bf8..e10ae91c7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -192,6 +192,7 @@ #define FIX_ISSUE_2008_MISSING_CODE_FROM_PORTING /* FhG: Issue 2008: Code deleted while porting float-main MR !1504 (BASOP issue 1565)*/ #define ADJUST_MCT_CHANNELS_MAX /* FhG: set correct max mct channels constant*/ #define FIX_1053_REVERB_RECONFIGURATION +#define FIX_1113_EXTREND_ISAR /* FhG: issue 1113: fix external renderer asserts for FOA/HOA2 and CLDFB config */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index a829db866..4fb8217e5 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -508,7 +508,12 @@ void rotateFrame_shd_cldfb( float realRot[2 * HEADROT_ORDER + 1], imagRot[2 * HEADROT_ORDER + 1]; float SHrotmat[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM]; +#ifdef FIX_1113_EXTREND_ISAR + assert( ( nInChannels == HOA3_CHANNELS || nInChannels == HOA2_CHANNELS || nInChannels == FOA_CHANNELS ) && + "Number of channels must correspond to an ambisonics order!" ); +#else assert( nInChannels == HEADROT_SHMAT_DIM && "Number of channels must be 16!" ); +#endif /* initialize rotation matrices with zeros */ for ( i = 0; i < HEADROT_SHMAT_DIM; i++ ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 3fc234775..07c3d6086 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2565,7 +2565,11 @@ static ivas_error updateSbaPanGains( if ( hRendCfg->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) #endif { +#ifdef FIX_1113_EXTREND_ISAR + assert( *rendCtx.pOutSampleRate == 48000 && "split binaural fast conv mode is currently supported with 48k sampling rate only" ); +#else assert( inConfig == IVAS_AUDIO_CONFIG_HOA3 && ( *rendCtx.pOutSampleRate == 48000 ) && "split binaural fast conv mode is currently supported with HOA3 input and 48k sampling rate only" ); +#endif if ( ( error = ivas_rend_openCldfbRend( &inputSba->cldfbRendWrapper, inConfig, outConfig, &rendCtx.pSplitRendWrapper->multiBinPoseData, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) { return error; @@ -4274,7 +4278,11 @@ ivas_error IVAS_REND_InitConfig( * *-------------------------------------------------------------------*/ +#ifdef FIX_1113_EXTREND_ISAR +ivas_error IVAS_REND_GetRenderConfig( +#else int16_t IVAS_REND_GetRenderConfig( +#endif IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ ) @@ -4338,7 +4346,11 @@ int16_t IVAS_REND_GetRenderConfig( * *-------------------------------------------------------------------*/ +#ifdef FIX_1113_EXTREND_ISAR +ivas_error IVAS_REND_FeedRenderConfig( +#else int16_t IVAS_REND_FeedRenderConfig( +#endif IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ) diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 463e1a882..4ed038df9 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -246,12 +246,21 @@ ivas_error IVAS_REND_InitConfig( const IVAS_AUDIO_CONFIG outAudioConfig /* i : output audioConfig */ ); +#ifdef FIX_1113_EXTREND_ISAR +ivas_error IVAS_REND_GetRenderConfig( +#else int16_t IVAS_REND_GetRenderConfig( +#endif IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ ); + +#ifdef FIX_1113_EXTREND_ISAR +ivas_error IVAS_REND_FeedRenderConfig( +#else int16_t IVAS_REND_FeedRenderConfig( +#endif IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); -- GitLab