diff --git a/lib_com/options.h b/lib_com/options.h index a50299efb49c889371e302eb138fdef59180c31e..928f1a2f722508a745b442f4f68587028fb64212 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,6 +165,7 @@ #define NONBE_1302_FIX_OMASA_JBM_FLUSH /* VA: issue 1302: fix OMASA JBM bitrate switching flush in binaural output */ #define FIX_1319_STACK_SBA_DECODER /* VA: issue 1319: Optimize the definition of buffer lengths in the SBA decoder */ #define NONBE_FIX_1261_MASA_EXT_META_JBM /* Nokia: issue #1261: MASA metadata EXT output delay buffer init in JBM */ +#define NONBE_FIX_1143_MASA_BRSW /* Nok: Fix for issue 1143: MSAN use of uninitialized value in masa decoding to binaural with dtx bitrate switching and 5 % FER */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index e31e689130879323303c917d435c5ae2642a1088..cc3ccb4dacb8ed734bfd68dcdf59978856240ea7 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1393,8 +1393,14 @@ ivas_error ivas_masa_dec_reconfigure( sts = st_ivas->hCPE[cpe_id]->hCoreCoder; sts[0]->bit_stream = bit_stream + num_bits; num_bits += (int16_t) ( st_ivas->hCPE[cpe_id]->element_brate / FRAMES_PER_SEC ); +#ifdef NONBE_FIX_1143_MASA_BRSW + if ( ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate >= MASA_STEREO_MIN_BITRATE ) || + ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == FRAME_NO_DATA ) || + ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == IVAS_SID_5k2 ) ) +#else if ( ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate >= MASA_STEREO_MIN_BITRATE ) || ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == FRAME_NO_DATA ) ) +#endif { st_ivas->hCPE[cpe_id]->nchan_out = 1;