From 46e593d6af2639efb0116113995773d2fd250d91 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 12 Nov 2024 14:31:09 +0100 Subject: [PATCH 1/2] issue 1222: Reduction of the number of channel buffers in OMASA decoder; FIX_1222_OMASA_DEC_CHANNEL_BUFFERS --- lib_com/options.h | 1 + lib_dec/ivas_masa_dec.c | 4 ++++ lib_rend/ivas_dirac_dec_binaural_functions.c | 4 ++++ lib_rend/ivas_output_init.c | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index cc9635ea6a..b155e8bfb8 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,7 @@ #define FIX_1209_SID_SIGNALING /* VA: issue 1209: remove dead code in IVAS SID signaling */ +#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 2b9d071901..e0b12fd962 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1483,7 +1483,11 @@ ivas_error ivas_masa_dec_reconfigure( { if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) { +#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS + tc_nchan_to_allocate = BINAURAL_CHANNELS + st_ivas->nchan_ism; +#else tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS + 2; +#endif } else { diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 7acf77dfd9..dc61748545 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -321,7 +321,11 @@ ivas_error ivas_dirac_dec_init_binaural_data( nchan_to_allocate = 2 * BINAURAL_CHANNELS; if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) { +#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS + nchan_to_allocate = BINAURAL_CHANNELS + st_ivas->nchan_ism; +#else nchan_to_allocate = 2 * BINAURAL_CHANNELS + 2; +#endif } n_samples_granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); diff --git a/lib_rend/ivas_output_init.c b/lib_rend/ivas_output_init.c index 594f09ea47..46025d4829 100644 --- a/lib_rend/ivas_output_init.c +++ b/lib_rend/ivas_output_init.c @@ -344,7 +344,11 @@ int16_t ivas_get_nchan_buffers_dec( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { +#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS + nchan_out_buff = max( nchan_out_buff, BINAURAL_CHANNELS + st_ivas->nchan_ism ); +#else nchan_out_buff = max( nchan_out_buff, 2 * BINAURAL_CHANNELS + 2 ); +#endif } else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) { -- GitLab From b0f6eeece13183691ac3f63704b0f1e339f0be1e Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 5 Dec 2024 14:32:02 +0100 Subject: [PATCH 2/2] fix merge issue --- lib_com/options.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index d18b0fb1a6..298c4bff0e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,13 +160,9 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ -<<<<<<< HEAD -#define FIX_1209_SID_SIGNALING /* VA: issue 1209: remove dead code in IVAS SID signaling */ -#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ -======= #define FIX_1226_FASTCONV_HRTF_LOADING_OPTIM /* VA: issue 1226: for FastConv binaural renderer in decoder, load only HTRT coefficient set that is needed */ #define FIX_1227_Crend_HRTF_LOADING_OPTIM /* VA: issue 1227: for Crend binaural renderer in decoder, load only HTRT coefficient set that is needed */ ->>>>>>> remotes/origin/main +#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ /* #################### End BE switches ################################## */ -- GitLab