From 0a7c73533eb65b12bb30dca3431af560c8be3c30 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 18 Aug 2025 21:44:14 +0200 Subject: [PATCH] port CR --- lib_com/options.h | 1 + lib_enc/ivas_decision_matrix_enc.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 70355c137..151d6e0b1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -198,6 +198,7 @@ #define FIX_1158_FASTCONV_REVERB_HRTF /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */ #define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */ #define NONBE_1131_ACELP_OOB /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */ +#define NONBE_1240_FIX_CORE_SELECTION_ISM_SW /* VA: issue 1240: Remove the forcing of the TCX core in ISM when switching from a high bitarte to a low one */ #define FIX_1101_CLEANING_JBM_CALL /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index f6cfdbc61..d84f73a7d 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -183,7 +183,12 @@ void ivas_decision_matrix_enc( st->core = ACELP_CORE; } +#ifdef NONBE_1240_FIX_CORE_SELECTION_ISM_SW + /* sanity check: highest bitrates in ISM */ + if ( st->is_ism_format && st->tcxonly && st->total_brate > MAX_ACELP_BRATE_ISM ) +#else if ( st->is_ism_format && st->tcxonly ) +#endif { st->core = TCX_20_CORE; } -- GitLab