From 85d0b924052cd74fce1b413a984ba050d3dc0106 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Mon, 24 Feb 2025 15:34:19 +0200 Subject: [PATCH] Port changes of float repo MR1284 to float reference 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 e2194149a..650b902b5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -174,6 +174,9 @@ #define NONBE_1233_HQ_CLASSIFIER_DIV_BY_ZERO /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */ #define NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* DLB: adjust prerendering and mixing gain in OSBA encoder. This is fix to float codes*/ + +#define FIX_940_DEBUGGING_VARIABLE /* Nokia: issue #940: remove debugging variable */ + /* #################### End FIXES switches ############################ */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index 414bef715..c6f214d57 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -4253,14 +4253,20 @@ static void read_stream_dct_coeffs_omasa( int16_t *index, const int16_t first_line ) { +#ifdef FIX_940_DEBUGGING_VARIABLE + int16_t sign; +#else int16_t sign, nbits; +#endif int16_t i, j, i_min; float step; int16_t GR1, GR2; step = STEP_M2T; +#ifndef FIX_940_DEBUGGING_VARIABLE nbits = 0; +#endif sign = 1; if ( first_line == 0 ) { @@ -4270,7 +4276,9 @@ static void read_stream_dct_coeffs_omasa( { sign = -1; } +#ifndef FIX_940_DEBUGGING_VARIABLE nbits++; +#endif } set_s( q_idx, 0, len_stream ); @@ -4292,7 +4300,9 @@ static void read_stream_dct_coeffs_omasa( { i_min = ( i_min << 1 ) + bit_stream[( *index )--]; } +#ifndef FIX_940_DEBUGGING_VARIABLE nbits += j; +#endif /* read GR orders */ GR1 = bit_stream[( *index )--] + 1; if ( GR1 == 2 ) -- GitLab