From 987e8e651d54043f9cd67d2cbf07ca57833fffdd Mon Sep 17 00:00:00 2001 From: kiene Date: Wed, 3 Apr 2024 15:15:33 +0200 Subject: [PATCH 1/3] add ivas_reverb_open calls after each ivas_td_binaural_open --- lib_com/options.h | 1 + lib_dec/ivas_init_dec.c | 19 +++++++++++++++++++ lib_dec/ivas_mct_dec.c | 9 +++++++++ lib_dec/ivas_omasa_dec.c | 9 +++++++++ lib_dec/ivas_sba_dec.c | 9 +++++++++ 5 files changed, 47 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 34c6f7410a..1c965f45a1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,7 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ +// #define NONBE_FIX_1075 /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 7858a2d80c..869b5deded 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2086,6 +2086,15 @@ ivas_error ivas_init_decoder( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */ if ( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ) != IVAS_ERR_OK ) @@ -2155,6 +2164,16 @@ ivas_error ivas_init_decoder( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif + } } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index e0ef92ecfc..948f0fc3f7 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1251,6 +1251,15 @@ static ivas_error ivas_mc_dec_reconfig( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index b1a0a0e9ee..f52b0719b8 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -386,6 +386,15 @@ ivas_error ivas_omasa_dec_config( { return error; } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif #ifdef FIX_1033_MEMORY_LEAK_OMASA } #endif diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index af102dd96e..8547643049 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -503,6 +503,15 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } +#ifdef NONBE_FIX_1075 + if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + { + if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } /* Allocate memory for OSBA delay buffer */ -- GitLab From 02610133d0b242bd4d6ffc39df068cb271290eaa Mon Sep 17 00:00:00 2001 From: kiene Date: Wed, 10 Apr 2024 16:07:17 +0200 Subject: [PATCH 2/3] remove merge leftover --- lib_com/options.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index eaed683afd..a9fda8c4d3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,7 +173,6 @@ #define NON_BE_FIX_1048_THRESHOLD_COH_BASOP /* Nokia: Fix 1048 replace comparison with 0 with comparison to threshold, to align with BASOP*/ #define NONBE_FIX_1054_NEGATIVE_LVQ_INDEX /* Nokia: issue 1054: Input to decode_comb in deindex_lvq_SHB should be positive */ ->>>>>>> main /* ##################### End NON-BE switches ########################### */ -- GitLab From 7d2e66c0f649ba7767a3f78cde552fd956446662 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 10 Apr 2024 16:17:28 +0200 Subject: [PATCH 3/3] run formatter --- lib_dec/ivas_init_dec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 869b5deded..dedddedce9 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2173,7 +2173,6 @@ ivas_error ivas_init_decoder( } } #endif - } } -- GitLab