diff --git a/lib_com/options.h b/lib_com/options.h index 8ab496fe29c07a9b8a88f75f15790baa0339750c..f44ad78c495f49741c4827fa6db8df71a225738e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,6 +164,7 @@ #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_871_ACELP_CRASH_IN_OSBA /* FhG: isse 871: crash in ACELP core encoder with OSBA */ #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 98cd33401e0a896dbfcc1eecd425d7d2b154d6dd..9b8b9feb2d9e85db826e48a02cd36702c4da20f0 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 */