From a70256f90b6b57062f72e25f91ad96030dca1a0e Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 10 Dec 2024 14:23:51 +0100 Subject: [PATCH 1/2] issue 1240: Remove the forcing of the TCX core in ISM when switching from a high bitarte to a low one; under NONBE_1240_FIX_CORE_SELECCITON_ISM_SW --- 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 484de232aa..b4f87bb5e4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -177,6 +177,7 @@ #define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */ #define NONBE_1229_FIX_ISM1_DPID /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */ #define NONBE_1233_HQ_CLASSIFIER_DIV_BY_ZERO /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */ +#define NONBE_1240_FIX_CORE_SELECCITON_ISM_SW /* VA: issue 1240: Remove the forcing of the TCX core in ISM when switching from a high bitarte to a low one */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index 306aaf74b6..7d7f49220c 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -172,7 +172,12 @@ void ivas_decision_matrix_enc( st->core = ACELP_CORE; } +#ifdef NONBE_1240_FIX_CORE_SELECCITON_ISM_SW + /* sanity check: highest bitrates in ISM */ + if ( st->is_ism_format && st->total_brate > MAX_ACELP_BRATE_ISM ) +#else if ( st->is_ism_format && st->tcxonly ) +#endif { st->core = TCX_20_CORE; } -- GitLab From 6c8478309168be82ff06e5e9ee4d18b9d765a543 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 10 Dec 2024 15:40:04 +0100 Subject: [PATCH 2/2] fix within NONBE_1240_FIX_CORE_SELECTION_ISM_SW to not affect constant bitrate operations --- lib_com/options.h | 2 +- lib_enc/ivas_decision_matrix_enc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index b4f87bb5e4..29fd77327e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -177,7 +177,7 @@ #define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */ #define NONBE_1229_FIX_ISM1_DPID /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */ #define NONBE_1233_HQ_CLASSIFIER_DIV_BY_ZERO /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */ -#define NONBE_1240_FIX_CORE_SELECCITON_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 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 */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index 7d7f49220c..2b0f688226 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -172,9 +172,9 @@ void ivas_decision_matrix_enc( st->core = ACELP_CORE; } -#ifdef NONBE_1240_FIX_CORE_SELECCITON_ISM_SW +#ifdef NONBE_1240_FIX_CORE_SELECTION_ISM_SW /* sanity check: highest bitrates in ISM */ - if ( st->is_ism_format && st->total_brate > MAX_ACELP_BRATE_ISM ) + if ( st->is_ism_format && st->tcxonly && st->total_brate > MAX_ACELP_BRATE_ISM ) #else if ( st->is_ism_format && st->tcxonly ) #endif -- GitLab