diff --git a/lib_com/options.h b/lib_com/options.h index 8a4dc67706ac1cc2d05a033db6463b7e226ed627..873cd94c6af57b99a8672cb2094ca5d22d40a8ab 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -167,6 +167,9 @@ #define FIX_564 /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */ #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ +#define FIX_559_EXTL_IGF_MISMATCH /* VA: issue 559: fix mismatch between st->extl and st->igf observed as crash in PlanarSBA bitrate switching */ + + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_enc/ivas_core_enc.c b/lib_enc/ivas_core_enc.c index f8c33ea62d3c318f1c23dddfc63d402b93aa4c60..982967b71264350617328d2c05217aa9590e544a 100644 --- a/lib_enc/ivas_core_enc.c +++ b/lib_enc/ivas_core_enc.c @@ -367,7 +367,11 @@ ivas_error ivas_core_enc( } /* SWB TBE encoder */ +#ifdef FIX_559_EXTL_IGF_MISMATCH + if ( st->extl == SWB_TBE || st->extl == FB_TBE ) +#else if ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->igf && st->core == ACELP_CORE && st->extl != WB_TBE ) ) +#endif { if ( st->core_brate != FRAME_NO_DATA && st->core_brate != SID_2k40 ) { diff --git a/lib_enc/ivas_core_pre_proc.c b/lib_enc/ivas_core_pre_proc.c index 51b757fef43c554a0a38624616cab9935803ac63..e64e0ecc3f675723b8ae80e70d1c3da92bb18248 100644 --- a/lib_enc/ivas_core_pre_proc.c +++ b/lib_enc/ivas_core_pre_proc.c @@ -288,6 +288,13 @@ ivas_error pre_proc_ivas( else if ( element_brate != last_element_brate ) { SetModeIndex( st, st->bits_frame_nominal * FRAMES_PER_SEC, element_mode, MCT_flag ); + +#ifdef FIX_559_EXTL_IGF_MISMATCH + if ( st->extl != -1 && st->extl != IGF_BWE && st->igf == 1 ) + { + st->igf = 0; + } +#endif }