From 4b0682e30f21399f30098234b7f6cf319ea7d34d Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Thu, 9 Nov 2023 10:22:04 +0100 Subject: [PATCH] fix USAN null pointer in MASA external renderer to Ambisonics. switch NONBE_FIX_897_USAN_WITH_MASA_RENDERING --- lib_com/options.h | 1 + lib_rend/ivas_dirac_rend.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index d738ad025f..07b102baf7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,6 +163,7 @@ #define NONBE_UNIFIED_DECODING_PATHS /* FhG: unify decoding paths */ #define NONBE_FIX_874_OMASA_BRSW_2TD /* Nokia: issue 874: Fixes the crashes with the long test vectors that prompted switching to TD*/ #define NONBE_FIX_225_MASA_EXT_REND /* Nokia: Resolve #225: Complete MASA external renderer implementation */ +#define NONBE_FIX_897_USAN_WITH_MASA_RENDERING /* Nokia: issue #897: USAN null pointer in MASA external renderer to Ambisonics */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_rend/ivas_dirac_rend.c b/lib_rend/ivas_dirac_rend.c index 98cd33401e..9b8b9feb2d 100644 --- a/lib_rend/ivas_dirac_rend.c +++ b/lib_rend/ivas_dirac_rend.c @@ -2141,10 +2141,13 @@ static void ivas_masa_ext_dirac_render_sf( DirAC_mem = hDirACRend->stack_mem; reference_power = DirAC_mem.reference_power; +#ifdef NONBE_FIX_897_USAN_WITH_MASA_RENDERING + reference_power_smooth = ( DirAC_mem.reference_power == NULL ) ? NULL : DirAC_mem.reference_power + hSpatParamRendCom->num_freq_bands; +#else reference_power_smooth = DirAC_mem.reference_power + hSpatParamRendCom->num_freq_bands; +#endif onset_filter = DirAC_mem.onset_filter; onset_filter_subframe = ( DirAC_mem.onset_filter == NULL ) ? NULL : DirAC_mem.onset_filter + hSpatParamRendCom->num_freq_bands; - coherence_flag = 1; /* There is always coherence assumed for ext rend of MASA */ /* Construct default MASA band mapping */ -- GitLab