From 5b6f2996c9dc69feb6b56606a5887028ed5072d6 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 12 Apr 2024 14:39:40 +0200 Subject: [PATCH 1/2] [cleanup] accept FIX_1033_MEMORY_LEAK_OMASA --- lib_com/options.h | 1 - lib_dec/ivas_mct_dec.c | 4 ---- lib_dec/ivas_omasa_dec.c | 8 -------- 3 files changed, 13 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 134e2c9565..77959cab00 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -156,7 +156,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ -#define FIX_1033_MEMORY_LEAK_OMASA /* Nokia / Orange: issue #1033: Memory leak in OMASA to BINAURAL with HRTF with bitrate switching */ #define FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI /* FhG: move setting of pointers for parameter decoding so they are skipped in lost frames when they are not needed */ #define FIX_1043_JBM_MD_BUFFER /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */ #define FIX_970_USAN_IN_NELP_SEED diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 948f0fc3f7..88ef9df74b 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1210,15 +1210,11 @@ static ivas_error ivas_mc_dec_reconfig( if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) ) { -#ifdef FIX_1033_MEMORY_LEAK_OMASA if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) { -#endif ivas_td_binaural_close( &st_ivas->hBinRendererTd ); st_ivas->hHrtfTD = NULL; -#ifdef FIX_1033_MEMORY_LEAK_OMASA } -#endif } #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index f52b0719b8..7004538730 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -378,10 +378,8 @@ ivas_error ivas_omasa_dec_config( if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { /* Allocate TD renderer for the objects in DISC mode */ -#ifdef FIX_1033_MEMORY_LEAK_OMASA if ( st_ivas->hBinRendererTd == NULL ) { -#endif if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; @@ -395,9 +393,7 @@ ivas_error ivas_omasa_dec_config( } } #endif -#ifdef FIX_1033_MEMORY_LEAK_OMASA } -#endif /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */ if ( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ) != IVAS_ERR_OK ) { @@ -406,16 +402,12 @@ ivas_error ivas_omasa_dec_config( } else { -#ifdef FIX_1033_MEMORY_LEAK_OMASA if ( st_ivas->hBinRendererTd != NULL && st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE ) { -#endif /* TD renderer handle */ ivas_td_binaural_close( &st_ivas->hBinRendererTd ); st_ivas->hHrtfTD = NULL; -#ifdef FIX_1033_MEMORY_LEAK_OMASA } -#endif /* ISM renderer handle + ISM data handle */ ivas_omasa_separate_object_renderer_close( st_ivas ); } -- GitLab From 1de49a35857ef3de41e1605a152a943fd499b2ed Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 12 Apr 2024 14:40:28 +0200 Subject: [PATCH 2/2] [cleanup] accept FIX_1043_JBM_MD_BUFFER --- lib_com/options.h | 1 - lib_dec/ivas_init_dec.c | 4 ---- lib_dec/ivas_jbm_dec.c | 12 ------------ 3 files changed, 17 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 77959cab00..0799f2bf16 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -157,7 +157,6 @@ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ #define FIX_1038_OFFSET_TO_NULL_PTR_IN_EVS_TCX_BFI /* FhG: move setting of pointers for parameter decoding so they are skipped in lost frames when they are not needed */ -#define FIX_1043_JBM_MD_BUFFER /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */ #define FIX_970_USAN_IN_NELP_SEED #define FIX_1044_ISM_REND_MEMORY /* VA: issue 1044: Lower the memory of the ISM renderer handle. */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index dedddedce9..4fb2f78a2e 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2280,11 +2280,7 @@ 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 a4d760fbbd..ffb018c06d 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -214,11 +214,7 @@ 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 ); } @@ -417,9 +413,7 @@ ivas_error ivas_jbm_dec_tc( ivas_omasa_render_objects_from_mix( st_ivas, p_output, st_ivas->nchan_ism, output_frame ); } -#ifdef FIX_1043_JBM_MD_BUFFER if ( st_ivas->hDecoderConfig->Opt_tsm ) -#endif { ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); } @@ -821,11 +815,7 @@ 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 ); } @@ -911,9 +901,7 @@ 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->hDecoderConfig->Opt_tsm ) -#endif { ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots ); } -- GitLab