From e8a966d778d76b46b6c5501cddf8cf2aa665acb5 Mon Sep 17 00:00:00 2001 From: malenov Date: Thu, 23 Jan 2025 10:46:07 +0100 Subject: [PATCH] Fix the logic reading the GSC_IVAS_mode parameter in OMASA format --- lib_com/options.h | 1 + lib_dec/acelp_core_dec.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 03c171f58..f1fce4eb9 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,6 +173,7 @@ #define NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* DLB: adjust prerendering and mixing gain in OSBA encoder. This is fix to float codes*/ #define NONBE_1211_DTX_BR_SWITCHING /* VA: port float issue 1211: fix crash in MASA DTX bitrate switching */ +#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 FIXES switches ############################ */ diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 8233e2637..6e2ace282 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -487,7 +487,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