From 6c4b929d2953fa933504518c1b2eaac892945a4a Mon Sep 17 00:00:00 2001 From: pihlajakuja Date: Fri, 1 Jul 2022 12:20:53 +0000 Subject: [PATCH 1/2] Fixes wrong constant variable in spherical indexing of MASA decoder EXT output --- lib_dec/ivas_masa_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 0e2c68f385..c60877be92 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -643,7 +643,7 @@ static uint16_t index_theta_phi_16( } else { - theta = MASA_NTOT2_FAC * (float) ( id_th + 0.5f ); + theta = MASA_ANGLE_AT_EQUATOR * (float) ( id_th + 0.5f ); if ( id_th == 1 ) { cum_n = 2 * (uint16_t) ceilf( MASA_NTOT2_FAC * ( sinf( theta ) - MASA_ASIN_OFFSET ) ); -- GitLab From f5e15c5cb8e6a0796c86c4b0206cef82acaf4fd5 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Tue, 5 Jul 2022 12:01:02 +0300 Subject: [PATCH 2/2] Add switch for FIX_34 --- lib_com/options.h | 2 ++ lib_dec/ivas_masa_dec.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 5ee8fff0cd..e13a62b867 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -147,6 +147,8 @@ /*#define FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10*/ /* IVAS-180 write last overlap mode in TCX10 frames to allow for correct TCX10/TCX5 subframe decomposition in TCX10 frames after a lost frame */ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ +#define FIX_34 /* Nokia: Fix bug in MASA format EXT output spherical indexing */ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index c60877be92..9ca10ab239 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -643,7 +643,11 @@ static uint16_t index_theta_phi_16( } else { +#ifdef FIX_34 theta = MASA_ANGLE_AT_EQUATOR * (float) ( id_th + 0.5f ); +#else + theta = MASA_NTOT2_FAC * (float) ( id_th + 0.5f ); +#endif if ( id_th == 1 ) { cum_n = 2 * (uint16_t) ceilf( MASA_NTOT2_FAC * ( sinf( theta ) - MASA_ASIN_OFFSET ) ); -- GitLab