diff --git a/lib_com/options.h b/lib_com/options.h index 8e7f23a706863c9d7d5b7017a70902381234ee08..eeecc2ef86b0f98b4f4592361a3c0d66d09b6b48 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -209,6 +209,7 @@ #define FIX_1003_PARAMISM_BINAURAL_RECONFIG_USAN /* FhG: fix for #1003: fix USAN caused by ParamISM reconfig */ #define FIX_1001_ARI_HM_OVERFLOW /* FhG: fix for undef behaviour in in the harmonic TCX model arithmetic coder */ #define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */ +#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 BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index a629189adbc14b3a63f16a7aef48983bea51dc6b..bb43a73855f2504dc7e1b593b19e9c3b7239b3dc 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -142,6 +142,13 @@ ivas_error ivas_masa_decode( 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 ) )