From 8ba23f9a5386ba3749117ef8861c2f62e8881ff8 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Mon, 24 Feb 2025 15:36:24 +0200 Subject: [PATCH] Port changes of float MR1284 to BASOP code. --- lib_com/options.h | 3 +++ lib_dec/ivas_qmetadata_dec.c | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 0c8105d8c..35f91135f 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,4 +164,7 @@ #define FIX_ISSUE_1247 #define NONBE_FIX_1087_OOB_SBA_DTX_RS /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */ #define FIX_1285_DECODER_CRASH + +#define FIX_940_DEBUGGING_VARIABLE /* Nokia: issue #940: remove debugging variable */ + #endif diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index 434fc958d..5d748659f 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -4647,7 +4647,11 @@ static void read_stream_dct_coeffs_omasa_fx( Word16 *index, /*Q0*/ const Word16 first_line /*Q0*/ ) { +#ifdef FIX_940_DEBUGGING_VARIABLE + Word16 sign; +#else Word16 sign, nbits; +#endif Word16 i, j, i_min; Word32 step; @@ -4655,7 +4659,9 @@ static void read_stream_dct_coeffs_omasa_fx( step = STEP_M2T_FX; move32(); +#ifndef FIX_940_DEBUGGING_VARIABLE nbits = 0; +#endif move16(); sign = 1; move16(); @@ -4669,7 +4675,9 @@ static void read_stream_dct_coeffs_omasa_fx( sign = -1; move16(); } +#ifndef FIX_940_DEBUGGING_VARIABLE nbits = add( nbits, 1 ); +#endif } set16_fx( q_idx, 0, len_stream ); @@ -4695,7 +4703,9 @@ static void read_stream_dct_coeffs_omasa_fx( { i_min = extract_l( L_add( shl( i_min, 1 ), bit_stream[( *index )--] ) ); /*Q0*/ } +#ifndef FIX_940_DEBUGGING_VARIABLE nbits = add( nbits, j ); +#endif /* read GR orders */ GR1 = extract_l( L_add( bit_stream[( *index )--], 1 ) ); /*Q0*/ IF( EQ_16( GR1, 2 ) ) -- GitLab