From a58434fad5f0310804534dd596042c5c292a1a65 Mon Sep 17 00:00:00 2001 From: malenov Date: Thu, 23 Jan 2025 10:18:27 +0100 Subject: [PATCH] Fix the logic reading the GSC_IVAS_mode parameter in OMASA format --- lib_com/options.h | 2 +- lib_dec/acelp_core_dec.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index f6aaeba759..aa3047dffb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,7 +172,7 @@ #define NONBE_1217_OBJ_EDIT_FOA /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */ #define NONBE_1215_FIX_JBM_MAX_SCALING /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */ #define NONBE_FIX_1255_OBJ_EDIT_JBM /* VA: issue 1255: restore object editing in JBM */ - +#define NONBE_FIX_1189_GSC_IVAS_OMASA /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 4ac0e098be..0bba174b7c 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -483,7 +483,11 @@ ivas_error acelp_core_dec( if ( st->element_mode > EVS_MONO && st->idchan == 0 && !( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) && !tdm_low_rate_mode ) { +#ifdef NONBE_FIX_1189_GSC_IVAS_OMASA + if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->inactive_coder_type_flag ) ) +#else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) ) +#endif { st->GSC_IVAS_mode = get_next_indice( st, 2 ); } -- GitLab