From 2588e57c1f16e44aff3951b67b36bb89f5952db7 Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Mon, 30 Oct 2023 15:09:22 +0100 Subject: [PATCH 1/2] ISM-to-MASA rendering. mismatch in 2D array size in declaration and use. switch: FIX_889_ARRAY_SIZE --- lib_com/options.h | 1 + lib_rend/lib_rend.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 54389fefef..445e14941f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -153,6 +153,7 @@ #define FIX_879_USAN_ERROR_IN_MASA_DECODING /* FhG: Issue 879 : avoid arithmetic with NULL pointer in the DirAC decoder to fix USAN error */ #define FIX_740_MASA_PREREND_VALIDITY_CHECK /* Nokia: issue 740: fix incorrect validity check in lib_rend to allow use of MASA prerenderer */ +#define FIX_889_ARRAY_SIZE /* Nokia: issue #889: mismatch in 2D array size declaration and use */ /* #################### End BE switches ################################## */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index a7de09eb00..516f78d637 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -436,7 +436,11 @@ static void accumulateCLDFBArrayToBuffer( static void copyBufferTo2dArray( const IVAS_REND_AudioBuffer buffer, +#ifdef FIX_889_ARRAY_SIZE + float array[][L_FRAME48k] ) +#else float array[MAX_OUTPUT_CHANNELS][L_FRAME48k] ) +#endif { uint32_t smplIdx; uint32_t chnlIdx; @@ -459,7 +463,11 @@ static void copyBufferTo2dArray( } static void accumulate2dArrayToBuffer( +#ifdef FIX_889_ARRAY_SIZE + float array[][L_FRAME48k], +#else float array[MAX_OUTPUT_CHANNELS][L_FRAME48k], +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT const #endif -- GitLab From 07b2a4820e9793e38d6ebe6abed16ab2fa80b764 Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Mon, 30 Oct 2023 15:11:08 +0100 Subject: [PATCH 2/2] correct issue number in switch: FIX_890_ARRAY_SIZE --- lib_com/options.h | 2 +- lib_rend/lib_rend.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 445e14941f..4cbcde4909 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -153,7 +153,7 @@ #define FIX_879_USAN_ERROR_IN_MASA_DECODING /* FhG: Issue 879 : avoid arithmetic with NULL pointer in the DirAC decoder to fix USAN error */ #define FIX_740_MASA_PREREND_VALIDITY_CHECK /* Nokia: issue 740: fix incorrect validity check in lib_rend to allow use of MASA prerenderer */ -#define FIX_889_ARRAY_SIZE /* Nokia: issue #889: mismatch in 2D array size declaration and use */ +#define FIX_890_ARRAY_SIZE /* Nokia: issue #890: mismatch in 2D array size declaration and use */ /* #################### End BE switches ################################## */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 516f78d637..e4295c1c78 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -436,7 +436,7 @@ static void accumulateCLDFBArrayToBuffer( static void copyBufferTo2dArray( const IVAS_REND_AudioBuffer buffer, -#ifdef FIX_889_ARRAY_SIZE +#ifdef FIX_890_ARRAY_SIZE float array[][L_FRAME48k] ) #else float array[MAX_OUTPUT_CHANNELS][L_FRAME48k] ) @@ -463,7 +463,7 @@ static void copyBufferTo2dArray( } static void accumulate2dArrayToBuffer( -#ifdef FIX_889_ARRAY_SIZE +#ifdef FIX_890_ARRAY_SIZE float array[][L_FRAME48k], #else float array[MAX_OUTPUT_CHANNELS][L_FRAME48k], -- GitLab