From a6574b3431bfc868171aa02cf5a7f83674874b0a Mon Sep 17 00:00:00 2001 From: Adriana Vasilache Date: Fri, 23 Feb 2024 11:49:09 +0200 Subject: [PATCH 1/2] fix issue 1004 in ivas_masa_dec() --- lib_com/options.h | 2 +- lib_dec/ivas_masa_dec.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 48d7a6cb28..c72e407d3f 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -181,7 +181,7 @@ #endif #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nokia: issue #984: complete the OMASA EXT output implementation */ - +#define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index c211bea575..f7731831b7 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -136,6 +136,12 @@ ivas_error ivas_masa_decode( if ( masa_brate == IVAS_SID_5k2 ) { st->next_bit_pos = (int16_t) ( ( masa_brate / FRAMES_PER_SEC ) - 1 - SID_FORMAT_NBITS ); +#ifdef NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS + if ( ivas_format == MASA_FORMAT ) + { + hMasa->config.numberOfDirections = 1; + } +#endif } else { -- GitLab From 00d1268de901ee67c13aaf307c71c97f89affe38 Mon Sep 17 00:00:00 2001 From: Adriana Vasilache Date: Mon, 26 Feb 2024 13:17:36 +0200 Subject: [PATCH 2/2] change in issue 1004 --- lib_dec/ivas_masa_dec.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index f7731831b7..3984b79c54 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -136,18 +136,19 @@ ivas_error ivas_masa_decode( if ( masa_brate == IVAS_SID_5k2 ) { st->next_bit_pos = (int16_t) ( ( masa_brate / FRAMES_PER_SEC ) - 1 - SID_FORMAT_NBITS ); -#ifdef NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS - if ( ivas_format == MASA_FORMAT ) - { - hMasa->config.numberOfDirections = 1; - } -#endif } else { st->next_bit_pos = (int16_t) ( ( masa_brate / FRAMES_PER_SEC ) - 1 ); } +#ifdef NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS + if ( ivas_format == MASA_FORMAT && ( masa_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) ) + { + hMasa->config.numberOfDirections = 1; + } +#endif + if ( !st->bfi && ivas_total_brate > IVAS_SID_5k2 ) { if ( !( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) -- GitLab