From 3baafeb18be238e6cab7d1b61d7325b3b5831833 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 25 Mar 2024 15:35:43 +0100 Subject: [PATCH 1/2] issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations; under FIX_1043_JBM_MD_BUFFER --- lib_com/options.h | 2 ++ lib_dec/ivas_init_dec.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index fda3eb0d4d..fd11f1d0eb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -161,6 +161,8 @@ #define FIX_1022_REMOVE_PARAMISM_DEC /* VA: issue 1022: remove unused function ivas_param_ism_dec() */ #define FIX_1035_HT_OSBA /* Dlb: issue 1035: Issue with headtracking in OSBA*/ +#define FIX_1043_JBM_MD_BUFFER /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */ + /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index b92dc19ded..7858a2d80c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2262,7 +2262,11 @@ ivas_error ivas_init_decoder( } } +#ifdef FIX_1043_JBM_MD_BUFFER + if ( st_ivas->hJbmMetadata == NULL && st_ivas->hDecoderConfig->Opt_tsm ) +#else if ( st_ivas->hJbmMetadata == NULL ) +#endif { if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { -- GitLab From e23c2baff8c0885c9607bde95f6bb58befc72767 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 25 Mar 2024 16:35:47 +0100 Subject: [PATCH 2/2] fix MASA EXT output --- lib_dec/ivas_jbm_dec.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 1c550fa68f..d734a9bde2 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -214,7 +214,11 @@ ivas_error ivas_jbm_dec_tc( return error; } +#ifdef FIX_1043_JBM_MD_BUFFER + if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hDecoderConfig->Opt_tsm ) +#else if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) +#endif { ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); } @@ -413,7 +417,12 @@ ivas_error ivas_jbm_dec_tc( ivas_omasa_render_objects_from_mix( st_ivas, p_output, st_ivas->nchan_ism, output_frame ); } - ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); +#ifdef FIX_1043_JBM_MD_BUFFER + if ( st_ivas->hDecoderConfig->Opt_tsm ) +#endif + { + ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); + } } } else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) @@ -812,7 +821,11 @@ void ivas_jbm_dec_feed_tc_to_renderer( { ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas ); +#ifdef FIX_1043_JBM_MD_BUFFER + if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hDecoderConfig->Opt_tsm ) +#else if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) +#endif { ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots ); } @@ -897,7 +910,13 @@ void ivas_jbm_dec_feed_tc_to_renderer( if ( st_ivas->renderer_type == RENDERER_OMASA_MIX_EXT || st_ivas->renderer_type == RENDERER_OMASA_OBJECT_EXT ) { ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas ); - ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots ); + +#ifdef FIX_1043_JBM_MD_BUFFER + if ( st_ivas->hDecoderConfig->Opt_tsm ) +#endif + { + ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots ); + } } else { -- GitLab