From 88da52080109e0f265da649562d96f1450d7b5b4 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 21 Jun 2023 18:18:40 +0200 Subject: [PATCH 01/11] propagate current output config to internal config --- lib_dec/ivas_output_config.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 16787b63cd..1b82adb84d 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -104,11 +104,19 @@ void ivas_renderer_select( else { *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + *internal_config = output_config; +#else *internal_config = AUDIO_CONFIG_BINAURAL; +#endif // FIX_571_REVERB_NOT_ACTIVATED_ISM } #else *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + *internal_config = output_config; +#else *internal_config = AUDIO_CONFIG_BINAURAL; +#endif // FIX_571_REVERB_NOT_ACTIVATED_ISM #endif } else -- GitLab From b93c3030d30f0312d71b84954bf6c696e640b6d8 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 21 Jun 2023 18:19:09 +0200 Subject: [PATCH 02/11] add compiler define for 571 --- lib_com/options.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_com/options.h b/lib_com/options.h index c13f313a91..b17b2a14d6 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -152,6 +152,7 @@ #define FIX_565_SBA_BURST_IN_FEC /* VA: Issue 565: Fix noise burst during FEC, due to wrong total_brate initialization */ #define FIX_562_ISM2_64KBPS /* VA: issue 562: fix ISM2 at 64kbps issue */ #define FIX_559_EXTL_IGF_MISMATCH /* VA: issue 559: fix mismatch between st->extl and st->igf observed as crash in PlanarSBA bitrate switching */ +#define FIX_571_REVERB_NOT_ACTIVATED_ISM /* Philips: Issue 571: Reverb not activated for discrete and parametric ISM */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ -- GitLab From 7e473c0eb54db1a0023e060c2ea39441de8484e8 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 21 Jun 2023 18:33:30 +0200 Subject: [PATCH 03/11] clangd whispering --- lib_dec/ivas_output_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 1b82adb84d..385a5103df 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -113,7 +113,7 @@ void ivas_renderer_select( #else *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; #ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - *internal_config = output_config; + *internal_config = output_config; #else *internal_config = AUDIO_CONFIG_BINAURAL; #endif // FIX_571_REVERB_NOT_ACTIVATED_ISM -- GitLab From a970429255bb7fbcfc38960814c3991cc0ff3da0 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Thu, 22 Jun 2023 10:44:42 +0200 Subject: [PATCH 04/11] Activates reverb for parametric ISM --- lib_dec/ivas_output_config.c | 4 ++-- lib_rend/ivas_dirac_dec_binaural_functions.c | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 385a5103df..e60a48a10c 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -108,7 +108,7 @@ void ivas_renderer_select( *internal_config = output_config; #else *internal_config = AUDIO_CONFIG_BINAURAL; -#endif // FIX_571_REVERB_NOT_ACTIVATED_ISM +#endif } #else *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; @@ -116,7 +116,7 @@ void ivas_renderer_select( *internal_config = output_config; #else *internal_config = AUDIO_CONFIG_BINAURAL; -#endif // FIX_571_REVERB_NOT_ACTIVATED_ISM +#endif #endif } else diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 4616993f79..1f3ac58318 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -1378,7 +1378,11 @@ static void ivas_dirac_dec_binaural_process_output( offsetSamples = 0; nSlots = st_ivas->hDirAC->subframe_nbslots[subframe]; +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) +#endif { /* Process second / room effect part of binaural output when needed */ ivas_binaural_reverb_processSubframe( st_ivas->hDiracDecBin->hReverb, numInChannels, nSlots, inRe, inIm, reverbRe, reverbIm ); @@ -1445,7 +1449,11 @@ static void ivas_dirac_dec_binaural_process_output( } } +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) +#endif { /* Combine second (reverb) part with the first (HRTF) part to obtain binaural output signal with room effect */ v_add( outSlotRe, reverbRe[chA][slot], outSlotRe, CLDFB_NO_CHANNELS_MAX ); -- GitLab From 818a23392f07d0ea0413d1c2fbe0ae532d7a1a3d Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Thu, 22 Jun 2023 12:44:53 +0200 Subject: [PATCH 05/11] Reverted change in switching modes in ivas_dirac_dec_binaural_process_output function --- lib_rend/ivas_dirac_dec_binaural_functions.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 1f3ac58318..4616993f79 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -1378,11 +1378,7 @@ static void ivas_dirac_dec_binaural_process_output( offsetSamples = 0; nSlots = st_ivas->hDirAC->subframe_nbslots[subframe]; -#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) -#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) -#endif { /* Process second / room effect part of binaural output when needed */ ivas_binaural_reverb_processSubframe( st_ivas->hDiracDecBin->hReverb, numInChannels, nSlots, inRe, inIm, reverbRe, reverbIm ); @@ -1449,11 +1445,7 @@ static void ivas_dirac_dec_binaural_process_output( } } -#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) -#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) -#endif { /* Combine second (reverb) part with the first (HRTF) part to obtain binaural output signal with room effect */ v_add( outSlotRe, reverbRe[chA][slot], outSlotRe, CLDFB_NO_CHANNELS_MAX ); -- GitLab From 9f73d76fec97023ff03c24537504e4b65173ded0 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Thu, 22 Jun 2023 12:47:00 +0200 Subject: [PATCH 06/11] Fix for erroneous renderer modes switching in case of BINAURAL_ROOM_REVERB output configuration --- lib_dec/ivas_output_config.c | 12 ++++++++++++ lib_rend/lib_rend.c | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index e60a48a10c..f1e7c65a64 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -135,7 +135,11 @@ void ivas_renderer_select( else if ( st_ivas->ivas_format == MASA_FORMAT || ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->nchan_transport <= 2 ) ) { *internal_config = output_config; +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( output_config == AUDIO_CONFIG_BINAURAL ) +#endif { *renderer_type = RENDERER_BINAURAL_PARAMETRIC; } @@ -147,7 +151,11 @@ void ivas_renderer_select( else if ( st_ivas->ivas_format == SBA_FORMAT ) { *internal_config = AUDIO_CONFIG_HOA3; +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( output_config == AUDIO_CONFIG_BINAURAL ) +#endif { *renderer_type = RENDERER_BINAURAL_FASTCONV; } @@ -183,7 +191,11 @@ void ivas_renderer_select( if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { *internal_config = output_config; +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( output_config == AUDIO_CONFIG_BINAURAL ) +#endif { *renderer_type = RENDERER_BINAURAL_PARAMETRIC; } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 4e75d5fea8..d9ab18ebc5 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2489,7 +2489,11 @@ static ivas_error initMasaDummyDecForBinauralOut( decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */ ivas_output_init( &( decDummy->hOutSetup ), output_config ); +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( output_config == AUDIO_CONFIG_BINAURAL ) +#endif { decDummy->renderer_type = RENDERER_BINAURAL_PARAMETRIC; } -- GitLab From cab49d5ed8a6c9a30758310ecbd5a22686e2c64a Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Fri, 23 Jun 2023 09:34:54 +0200 Subject: [PATCH 07/11] Fix for erroneous renderer modes switching in case of BINAURAL_ROOM_REVERB output configuration --- lib_rend/ivas_dirac_dec_binaural_functions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 1f3ac58318..87bc40298d 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -1379,7 +1379,7 @@ static void ivas_dirac_dec_binaural_process_output( nSlots = st_ivas->hDirAC->subframe_nbslots[subframe]; #ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) #else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) #endif @@ -1450,7 +1450,7 @@ static void ivas_dirac_dec_binaural_process_output( } #ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) #else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) #endif -- GitLab From 14f026d0aad392c49504be9a7db21f0ce6be13fd Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Fri, 23 Jun 2023 14:06:38 +0200 Subject: [PATCH 08/11] Fix for erroneous renderer modes switching in case of BINAURAL_ROOM_REVERB output configuration --- lib_dec/ivas_binRenderer_internal.c | 8 ++++++++ lib_dec/ivas_output_config.c | 16 ++++++++-------- lib_rend/ivas_dirac_dec_binaural_functions.c | 8 -------- lib_rend/ivas_reverb.c | 8 ++++++++ lib_rend/lib_rend.c | 4 ---- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 5bd09236e0..b3c31a9794 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -723,7 +723,11 @@ ivas_error ivas_binRenderer_open( } /* Allocate memories needed for reverb module */ +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->hIntSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->hIntSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, @@ -731,7 +735,11 @@ ivas_error ivas_binRenderer_open( &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + RENDERER_BINAURAL_FASTCONV, +#else RENDERER_BINAURAL_FASTCONV_ROOM, +#endif st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) { diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index f1e7c65a64..94e22ea419 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -82,7 +82,11 @@ void ivas_renderer_select( { if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( output_config == AUDIO_CONFIG_BINAURAL ) +#else if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#endif { *renderer_type = RENDERER_BINAURAL_PARAMETRIC; } @@ -135,11 +139,7 @@ void ivas_renderer_select( else if ( st_ivas->ivas_format == MASA_FORMAT || ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->nchan_transport <= 2 ) ) { *internal_config = output_config; -#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) -#else if ( output_config == AUDIO_CONFIG_BINAURAL ) -#endif { *renderer_type = RENDERER_BINAURAL_PARAMETRIC; } @@ -191,11 +191,7 @@ void ivas_renderer_select( if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { *internal_config = output_config; -#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) -#else if ( output_config == AUDIO_CONFIG_BINAURAL ) -#endif { *renderer_type = RENDERER_BINAURAL_PARAMETRIC; } @@ -207,7 +203,11 @@ void ivas_renderer_select( else { *internal_config = transport_config; +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) +#else if ( output_config == AUDIO_CONFIG_BINAURAL ) +#endif { #ifdef DEBUGGING if ( ( ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 87bc40298d..4616993f79 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -1378,11 +1378,7 @@ static void ivas_dirac_dec_binaural_process_output( offsetSamples = 0; nSlots = st_ivas->hDirAC->subframe_nbslots[subframe]; -#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) -#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) -#endif { /* Process second / room effect part of binaural output when needed */ ivas_binaural_reverb_processSubframe( st_ivas->hDiracDecBin->hReverb, numInChannels, nSlots, inRe, inIm, reverbRe, reverbIm ); @@ -1449,11 +1445,7 @@ static void ivas_dirac_dec_binaural_process_output( } } -#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) -#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) -#endif { /* Combine second (reverb) part with the first (HRTF) part to obtain binaural output signal with room effect */ v_add( outSlotRe, reverbRe[chA][slot], outSlotRe, CLDFB_NO_CHANNELS_MAX ); diff --git a/lib_rend/ivas_reverb.c b/lib_rend/ivas_reverb.c index 6374b6812e..cfea5594a1 100644 --- a/lib_rend/ivas_reverb.c +++ b/lib_rend/ivas_reverb.c @@ -1813,7 +1813,11 @@ ivas_error ivas_binaural_reverb_open( set_f( hReverb->preDelayBufferImag[k], 0.0f, hReverb->numBins ); } +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( renderer_type == RENDERER_BINAURAL_FASTCONV ) +#else if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif { if ( !roomAcoustics->override ) { @@ -1900,7 +1904,11 @@ ivas_error ivas_binaural_reverb_open( } else { +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if (renderer_type == RENDERER_BINAURAL_FASTCONV ) +#else if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif { ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections ); ivas_binaural_reverb_setPreDelay( hReverb, 10 ); diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d9ab18ebc5..4e75d5fea8 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2489,11 +2489,7 @@ static ivas_error initMasaDummyDecForBinauralOut( decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */ ivas_output_init( &( decDummy->hOutSetup ), output_config ); -#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) -#else if ( output_config == AUDIO_CONFIG_BINAURAL ) -#endif { decDummy->renderer_type = RENDERER_BINAURAL_PARAMETRIC; } -- GitLab From c21992b0b8386318525445b8c2a5a631e25f5fe4 Mon Sep 17 00:00:00 2001 From: Charles Kinuthia Date: Mon, 3 Jul 2023 18:24:31 +0200 Subject: [PATCH 09/11] [fix] enable reverb for ISM mode switching - enable reverb when switching from ParamISM to DiscISM for the first time. --- lib_dec/ivas_ism_dec.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index c031ec8c4b..cae5ebaf4d 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -184,6 +184,15 @@ static ivas_error ivas_ism_bitrate_switching( { return error; } +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if ( st_ivas->hIntSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } } else @@ -258,6 +267,14 @@ static ivas_error ivas_ism_bitrate_switching( { st_ivas->hHrtfTD = NULL; } + +#ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM + if (st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB) + { + ivas_reverb_close( &st_ivas->hReverb ); + } + +#endif } } else -- GitLab From 128fd43c203a70de57a50e28007c915d5eb5516e Mon Sep 17 00:00:00 2001 From: Charles Kinuthia Date: Tue, 4 Jul 2023 11:26:11 +0200 Subject: [PATCH 10/11] clang-format --- lib_dec/ivas_ism_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index cae5ebaf4d..5533fcd6b3 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -269,7 +269,7 @@ static ivas_error ivas_ism_bitrate_switching( } #ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if (st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB) + if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { ivas_reverb_close( &st_ivas->hReverb ); } -- GitLab From e0d7ebc680f4cc4a6fa87ab6f3dead6e52bca071 Mon Sep 17 00:00:00 2001 From: Marek Szczerba Date: Tue, 4 Jul 2023 15:43:25 +0200 Subject: [PATCH 11/11] Clang issue --- lib_rend/ivas_reverb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_reverb.c b/lib_rend/ivas_reverb.c index cfea5594a1..0ec7e1f1f4 100644 --- a/lib_rend/ivas_reverb.c +++ b/lib_rend/ivas_reverb.c @@ -1905,7 +1905,7 @@ ivas_error ivas_binaural_reverb_open( else { #ifdef FIX_571_REVERB_NOT_ACTIVATED_ISM - if (renderer_type == RENDERER_BINAURAL_FASTCONV ) + if ( renderer_type == RENDERER_BINAURAL_FASTCONV ) #else if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) #endif -- GitLab