From 919a3c4a15feea56d0a0a06d0a8fb8e4364a25c1 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Tue, 20 Jun 2023 10:17:31 +0200 Subject: [PATCH 1/2] Fix for erroneous renderer modes switching in case of BINAURAL_ROOM_REVERB output configuration --- lib_com/options.h | 1 + lib_dec/ivas_ism_dec.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 8a4dc67706..b786870110 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,7 @@ #define FIX_558_PLC_DISCONT /* FhG: issue 558: fix discontinuities in DFT Stereo when switching from TCX concealment to ACELP */ #define FIX_564 /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */ #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ +#define FIX_568_ISM_BITRATE_SWITCHING /* Philips: Issue 568: Bugfix for renderer re-initialization by ISM and bitrate switching */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 6da3c05e75..31d88b1595 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -168,7 +168,11 @@ static ivas_error ivas_ism_bitrate_switching( /* Deallocate the ParamISM struct */ ivas_param_ism_dec_close( &( st_ivas->hDirAC ), st_ivas->hDecoderConfig->output_config ); +#ifdef FIX_568_ISM_BITRATE_SWITCHING + if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL ) +#endif { /* close the parametric binaural renderer */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); @@ -198,7 +202,11 @@ static ivas_error ivas_ism_bitrate_switching( } } +#ifdef FIX_568_ISM_BITRATE_SWITCHING + if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR ) +#else if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { /* close the parametric binaural renderer */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); @@ -260,7 +268,11 @@ static ivas_error ivas_ism_bitrate_switching( } } +#ifdef FIX_568_ISM_BITRATE_SWITCHING + if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR ) +#else if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { /* open the parametric binaural renderer */ if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -- GitLab From d229bdce481754fe45385a8e9e06a568352d72f6 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Tue, 20 Jun 2023 10:47:37 +0200 Subject: [PATCH 2/2] Fix for erroneous renderer modes switching in case of BINAURAL_ROOM_REVERB output configuration --- lib_dec/ivas_ism_dec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 31d88b1595..c031ec8c4b 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -229,8 +229,11 @@ static ivas_error ivas_ism_bitrate_switching( { return error; } - +#ifdef FIX_568_ISM_BITRATE_SWITCHING + if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL ) +#endif { /* open the parametric binaural renderer */ if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -- GitLab