From 86a5765b550a817bafb989456e11c2ae87ab4bd0 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 29 Aug 2023 14:06:58 +0200 Subject: [PATCH 1/4] issue 729: fix ASAN ACELP errors with 2 ISM coding using LTV; under FIX_729_ASAN_2ISM_ACELP --- lib_com/options.h | 1 + lib_enc/ivas_decision_matrix_enc.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index be3261f808..5e8ae68f00 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,6 +168,7 @@ #define FIX_718_JBM_MD_UDPATE /* Fhg: fix issue #718, wrong setting of the update flag in the TD obj renderer in the JBM path */ #define FIX_719_CRASH_IN_CLEANUP /* VA: issue 719: fix Decoder crash after call to goto to cleanup */ +#define FIX_729_ASAN_2ISM_ACELP /* VA: issue 729: fix ASAN ACELP errors with 2 ISM coding using LTV */ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index 40c07944ec..4eefa6a3e6 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -224,6 +224,17 @@ void ivas_decision_matrix_enc( } } +#ifdef FIX_729_ASAN_2ISM_ACELP + /* sanity check to avoid too low ACELP bitrate in case of "limitation to avoid too high bitrate in one active TCX channel" at element_brate = 32000 */ + if ( st->is_ism_format && st->flag_ACELP16k && !st->low_rate_mode && st->core == ACELP_CORE && st->total_brate < ACELP_16k_LOW_LIMIT + FB_TBE_1k8 ) + { + st->core = TCX_20_CORE; + st->coder_type = AUDIO; + st->sp_aud_decision2 = 1; + } + +#endif + /*---------------------------------------------------------------------* * Select ACELP and GSC extension layer *---------------------------------------------------------------------*/ -- GitLab From 8333c0242fb278b7ed8d4c33a99f357a772fbd63 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 29 Aug 2023 14:08:48 +0200 Subject: [PATCH 2/4] tuning within FIX_729_ASAN_2ISM_ACELP --- lib_enc/ivas_decision_matrix_enc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index 4eefa6a3e6..e0e573a8fe 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -228,11 +228,10 @@ void ivas_decision_matrix_enc( /* sanity check to avoid too low ACELP bitrate in case of "limitation to avoid too high bitrate in one active TCX channel" at element_brate = 32000 */ if ( st->is_ism_format && st->flag_ACELP16k && !st->low_rate_mode && st->core == ACELP_CORE && st->total_brate < ACELP_16k_LOW_LIMIT + FB_TBE_1k8 ) { - st->core = TCX_20_CORE; + st->core = ACELP_CORE; st->coder_type = AUDIO; - st->sp_aud_decision2 = 1; + st->sp_aud_decision2 = 0; } - #endif /*---------------------------------------------------------------------* -- GitLab From 563a085eb2e641b1c6dbae71cd9d751458c78b57 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 29 Aug 2023 14:26:00 +0200 Subject: [PATCH 3/4] tuning within FIX_729_ASAN_2ISM_ACELP --- lib_enc/ivas_decision_matrix_enc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index e0e573a8fe..82a1429abb 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -228,9 +228,7 @@ void ivas_decision_matrix_enc( /* sanity check to avoid too low ACELP bitrate in case of "limitation to avoid too high bitrate in one active TCX channel" at element_brate = 32000 */ if ( st->is_ism_format && st->flag_ACELP16k && !st->low_rate_mode && st->core == ACELP_CORE && st->total_brate < ACELP_16k_LOW_LIMIT + FB_TBE_1k8 ) { - st->core = ACELP_CORE; - st->coder_type = AUDIO; - st->sp_aud_decision2 = 0; + st->core = TCX_20_CORE; } #endif -- GitLab From 2554d461adf9e8815653631e9e7770dcab2b0e9f Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 31 Aug 2023 18:26:58 +0200 Subject: [PATCH 4/4] - rename switch name to NONBE_* --- lib_com/options.h | 4 ++-- lib_enc/ivas_decision_matrix_enc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index d43b91815f..4eac787b42 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,14 +160,14 @@ /* #################### End BE switches ################################## */ -#define FIX_729_ASAN_2ISM_ACELP /* VA: issue 729: fix ASAN ACELP errors with 2 ISM coding using LTV */ - /* #################### Start NON-BE switches ############################ */ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_736_FOA_BR_SWITCH /* FhG/Dlb : Issue 736: FOA bitrate switching decoding crashes in in ivas_spar_to_dirac */ #define NONBE_FIX_746_NONDIEGETIC_MD /* Eri: Issue 746: The non-diegetic panning flag affects the encoder bitstream even if extended metadata is not enabled. Crashes the decoder.*/ +#define NONBE_FIX_729_ASAN_2ISM_ACELP /* VA: issue 729: fix ASAN ACELP errors with 2 ISM coding using LTV */ + /* ##################### End NON-BE switches ############################# */ diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index 82a1429abb..80ec66940e 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -224,7 +224,7 @@ void ivas_decision_matrix_enc( } } -#ifdef FIX_729_ASAN_2ISM_ACELP +#ifdef NONBE_FIX_729_ASAN_2ISM_ACELP /* sanity check to avoid too low ACELP bitrate in case of "limitation to avoid too high bitrate in one active TCX channel" at element_brate = 32000 */ if ( st->is_ism_format && st->flag_ACELP16k && !st->low_rate_mode && st->core == ACELP_CORE && st->total_brate < ACELP_16k_LOW_LIMIT + FB_TBE_1k8 ) { -- GitLab