From 43c76473e96a244cfdf47f5475717be961a36f97 Mon Sep 17 00:00:00 2001 From: malenov Date: Tue, 21 Jan 2025 09:37:35 +0100 Subject: [PATCH 1/3] Fix the logic reading the GSC_IVAS_mode parameter in OMASA format --- lib_com/options.h | 2 ++ lib_dec/acelp_core_dec_fx.c | 4 ++++ lib_dec/acelp_core_dec_ivas_fx.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index ac88ba0fc..ced989769 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -123,6 +123,7 @@ #define FIX_1113_OPT_DIRAC_BIN_REND /* FhG: Various optimizations to ivas_dirac_dec_binaual_functions.c */ #define FIX_ISSUE_1187 /* Ittiam: Fix for issue 1187: Assertion error observed in evs_enc_fx (with option stereo_dmx_evs) from bass_pf_enc_fx function*/ #define FIX_ISSUE_1186 /* Ittiam: Fix for Issue 1186: Energy/scaling issue for ISM-1 at all bitrates */ +<<<<<<< HEAD #define FIX_ISSUE_1165 /* Ittiam: Fix for issue 1165: Assertion in lpc2lsp_fx for OMASA LTV input */ #define FIX_ISSUE_1185 /* Ittiam: Fix for issue 1185: Assertion in ivas_dirac_dec_binaural_internal_fx() for crash in decoder in fft30_with_cmplx_data()*/ #define FIX_ISSUE_1209 /* Ittiam: Fix for issue 1209: Assertion exit in BASOP encoder (stereo_dmx_evs)*/ @@ -135,4 +136,5 @@ #define FIX_1010_OPT_NORM_NOSAT /* FhG: SVD complexity optimizations (non-be) */ #define FIX_1010_OPT_SEC_SINGLE_RESCALE /* FhG: SVD complexity optimizations (non-be) */ #define NONBE_1211_DTX_BR_SWITCHING /* VA: port float issue 1211: fix crash in MASA DTX bitrate switching */ +#define FIX_1189_GSC_IVAS_OMASA /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */ #endif diff --git a/lib_dec/acelp_core_dec_fx.c b/lib_dec/acelp_core_dec_fx.c index a41a0c813..f0edc3f92 100644 --- a/lib_dec/acelp_core_dec_fx.c +++ b/lib_dec/acelp_core_dec_fx.c @@ -614,7 +614,11 @@ ivas_error acelp_core_dec_fx( { test(); test(); +#ifdef FIX_1189_GSC_IVAS_OMASA + IF( EQ_16( st_fx->coder_type, AUDIO ) || ( EQ_16( st_fx->coder_type, INACTIVE ) && EQ_16( st_fx->inactive_coder_type_flag, 1 ) ) ) +#else IF( EQ_16( st_fx->coder_type, AUDIO ) || ( ( st_fx->coder_type == INACTIVE ) && LE_32( st_fx->total_brate, MAX_GSC_INACTIVE_BRATE ) ) ) +#endif { st_fx->GSC_IVAS_mode = get_next_indice( st_fx, 2 ); move16(); diff --git a/lib_dec/acelp_core_dec_ivas_fx.c b/lib_dec/acelp_core_dec_ivas_fx.c index 49b329783..5b90a28dd 100644 --- a/lib_dec/acelp_core_dec_ivas_fx.c +++ b/lib_dec/acelp_core_dec_ivas_fx.c @@ -611,7 +611,11 @@ ivas_error acelp_core_dec_ivas_fx( { test(); test(); +#ifdef FIX_1189_GSC_IVAS_OMASA + IF( EQ_16( st_fx->coder_type, AUDIO ) || ( EQ_16( st_fx->coder_type, INACTIVE ) && EQ_16( st_fx->inactive_coder_type_flag, 1 ) ) ) +#else IF( EQ_16( st->coder_type, AUDIO ) || ( st->coder_type == INACTIVE && LE_32( st->total_brate, MAX_GSC_INACTIVE_BRATE ) ) ) +#endif { st->GSC_IVAS_mode = get_next_indice_fx( st, 2 ); move16(); -- GitLab From e319764e568b879019af8b80f58abb5aa1e58aba Mon Sep 17 00:00:00 2001 From: malenov Date: Thu, 23 Jan 2025 10:36:07 +0100 Subject: [PATCH 2/3] do not apply in EVS code --- lib_dec/acelp_core_dec_fx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib_dec/acelp_core_dec_fx.c b/lib_dec/acelp_core_dec_fx.c index f0edc3f92..a41a0c813 100644 --- a/lib_dec/acelp_core_dec_fx.c +++ b/lib_dec/acelp_core_dec_fx.c @@ -614,11 +614,7 @@ ivas_error acelp_core_dec_fx( { test(); test(); -#ifdef FIX_1189_GSC_IVAS_OMASA - IF( EQ_16( st_fx->coder_type, AUDIO ) || ( EQ_16( st_fx->coder_type, INACTIVE ) && EQ_16( st_fx->inactive_coder_type_flag, 1 ) ) ) -#else IF( EQ_16( st_fx->coder_type, AUDIO ) || ( ( st_fx->coder_type == INACTIVE ) && LE_32( st_fx->total_brate, MAX_GSC_INACTIVE_BRATE ) ) ) -#endif { st_fx->GSC_IVAS_mode = get_next_indice( st_fx, 2 ); move16(); -- GitLab From 3ad1d3cd32f4c1b2b3c584c5d1d84bf714824bff Mon Sep 17 00:00:00 2001 From: malenov Date: Thu, 23 Jan 2025 14:11:00 +0100 Subject: [PATCH 3/3] change st_fx to st --- lib_dec/acelp_core_dec_ivas_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/acelp_core_dec_ivas_fx.c b/lib_dec/acelp_core_dec_ivas_fx.c index 5b90a28dd..e560ef92b 100644 --- a/lib_dec/acelp_core_dec_ivas_fx.c +++ b/lib_dec/acelp_core_dec_ivas_fx.c @@ -612,7 +612,7 @@ ivas_error acelp_core_dec_ivas_fx( test(); test(); #ifdef FIX_1189_GSC_IVAS_OMASA - IF( EQ_16( st_fx->coder_type, AUDIO ) || ( EQ_16( st_fx->coder_type, INACTIVE ) && EQ_16( st_fx->inactive_coder_type_flag, 1 ) ) ) + IF( EQ_16( st->coder_type, AUDIO ) || ( EQ_16( st->coder_type, INACTIVE ) && EQ_16( st->inactive_coder_type_flag, 1 ) ) ) #else IF( EQ_16( st->coder_type, AUDIO ) || ( st->coder_type == INACTIVE && LE_32( st->total_brate, MAX_GSC_INACTIVE_BRATE ) ) ) #endif -- GitLab