From 5fe04cf30ab26191ff71c0e39774f9ada335d8f7 Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 19 Dec 2025 14:26:37 +0100 Subject: [PATCH 1/2] fix FIX_2297_SBA_SCALING_32KHZ --- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec_fx.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 2c70dd14f..7c7c5bc93 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -119,6 +119,7 @@ #define FIX_1466_EXTREND /* FhG: float issue 1466: enable rendering of mono/stereo to other formats in the external renderer */ #define FIX_1381_BWD /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */ #define FIX_2285_CODE_DECODER_INIT_BW /* VA: basop issue 2285: fix core-decoder initialization bandwidth */ +#define FIX_2297_SBA_SCALING_32KHZ /* basop issue 2297: Fix scaling factor before the SBA decoder for output_Fs = 32 or 16 */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index ece09b600..4433fc5d7 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -372,7 +372,11 @@ ivas_error ivas_jbm_dec_tc_fx( move16(); FOR( i = 0; i < 2; i++ ) { +#ifdef FIX_2297_SBA_SCALING_32KHZ + s = s_min( s, L_norm_arr( p_output_fx[i], output_frame ) - 11 ) /* Guard bits */; // L_frame should be used instead of L_FRAME48k */ +#else s = s_min( s, L_norm_arr( p_output_fx[i], L_FRAME48k ) - 11 ) /* Guard bits */; // L_frame should be used instead of L_FRAME48k */ +#endif } FOR( i = 0; i < 2; i++ ) { @@ -904,7 +908,11 @@ ivas_error ivas_jbm_dec_tc_fx( move16(); FOR( i = 0; i < 2; i++ ) { +#ifdef FIX_2297_SBA_SCALING_32KHZ + s = s_min( s, L_norm_arr( p_output_fx[sba_ch_idx + i], output_frame ) - 11 /* Guard bits */ ); +#else s = s_min( s, L_norm_arr( p_output_fx[sba_ch_idx + i], L_FRAME48k ) - 11 /* Guard bits */ ); +#endif } FOR( i = 0; i < 2; i++ ) { @@ -1343,7 +1351,11 @@ ivas_error ivas_jbm_dec_tc_fx( move16(); FOR( i = 0; i < 2; i++ ) { +#ifdef FIX_2297_SBA_SCALING_32KHZ + s = s_min( s, L_norm_arr( p_output_fx[i], output_frame ) - 11 /* Guard bits */ ); +#else s = s_min( s, L_norm_arr( p_output_fx[i], L_FRAME48k ) - 11 /* Guard bits */ ); +#endif } FOR( i = 0; i < 2; i++ ) { -- GitLab From fbeb193334498951e46378c957ed9f3a61eb75ee Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 19 Dec 2025 16:46:54 +0100 Subject: [PATCH 2/2] comment --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 7c7c5bc93..41376545e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -119,7 +119,7 @@ #define FIX_1466_EXTREND /* FhG: float issue 1466: enable rendering of mono/stereo to other formats in the external renderer */ #define FIX_1381_BWD /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */ #define FIX_2285_CODE_DECODER_INIT_BW /* VA: basop issue 2285: fix core-decoder initialization bandwidth */ -#define FIX_2297_SBA_SCALING_32KHZ /* basop issue 2297: Fix scaling factor before the SBA decoder for output_Fs = 32 or 16 */ +#define FIX_2297_SBA_SCALING_32KHZ /* VA: basop issue 2297: Fix scaling factor before the SBA decoder for output_Fs = 32 or 16 */ /* ##################### End NON-BE switches ########################### */ -- GitLab