diff --git a/lib_com/options.h b/lib_com/options.h index 9e8a3faffc91b95d1e1364510c208c05e7f5c751..42ba64994a8f0e529aaece12b126d910c26087f0 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -180,6 +180,8 @@ #define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */ #ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM #endif +#define FIX_1043_JBM_MD_BUFFER /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */ + #define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 28243db860cfd56e3ffb93a49f61f2cd45ef242b..dfbe9f497e319d8abfd56d32f03dba12c6a02af4 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2201,7 +2201,12 @@ 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 ) { diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index ed9c49a51a35d1fe3ffcc0c47aefc40a18f910cf..e61825b77f3dd77368358b4c8a53efa26efda47b 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 ); } @@ -423,7 +427,12 @@ ivas_error ivas_jbm_dec_tc( ivas_omasa_rearrange_channels( p_output, nchan_transport_ism, output_frame ); #endif - 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 ) @@ -822,7 +831,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 ); } @@ -902,7 +915,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 {