From ef0d167b76316e284f7b846054c0828b89ffb55c Mon Sep 17 00:00:00 2001 From: naghibza Date: Fri, 12 Jun 2026 09:17:21 +0200 Subject: [PATCH 1/2] Fix decimation idx calculation in ivas_lfe_tdplc_fx --- lib_com/options.h | 1 + lib_dec/ivas_lfe_plc_fx.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index e985a75ef..d97b4e739 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -101,6 +101,7 @@ #define NONBE_FIX2614_LP_CNG_ASSERT /* FhG: */ #define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */ #define FIX_BASOP_1765_MASA1TC_CNG_MISMATCH /* Nokia: BASOP issue 1765: Improve accuracy of FD CNG noise estimation */ +#define FIX_BASOP_2630_LFE_TDPLC_DECIM_IDX /* FhG: BASOP #2630: ivas_lfe_tdplc_fx decimation index uses 48000 (was 44100) and drops the extra >>1, matching float ( i * 48000 ) / output_Fs */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_lfe_plc_fx.c b/lib_dec/ivas_lfe_plc_fx.c index a088b44ad..b7b5bd444 100755 --- a/lib_dec/ivas_lfe_plc_fx.c +++ b/lib_dec/ivas_lfe_plc_fx.c @@ -1016,8 +1016,13 @@ void ivas_lfe_tdplc_fx( { FOR( i = 0; i < rec_frame_len; i++ ) { +#ifdef FIX_BASOP_2630_LFE_TDPLC_DECIM_IDX + idx = BASOP_Util_Divide3232_Scale( Mpy_32_32( L_shl( i, 16 ), L_shl( 48000, 15 ) ), output_Fs, &temp_q ); + idx = shr( idx, sub( 15, temp_q ) ); +#else idx = BASOP_Util_Divide3232_Scale( Mpy_32_32( L_shl( i, 16 ), L_shl( 44100, 15 ) ), output_Fs, &temp_q ); idx = shr( idx, add( sub( 15, temp_q ), 1 ) ); +#endif rec_frame_us_16_fx[i] = rec_frame_us_16_fx[idx]; move16(); } -- GitLab From f8a22e8937e48f7bc59dda95ca921a4636ccff9d Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 19 Jun 2026 12:53:00 +0200 Subject: [PATCH 2/2] editorial: shlightly shuffle defines in options.h --- lib_com/options.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 5ad039e43..5d42aebc4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -99,10 +99,11 @@ #define FIX_BASOP_2639_INCORRECT_ARRAY_INDEX /* Dolby: BASOP #2639: incorrect array index in ivas_spar_unquant_dtx_indicies */ #define FIX_BASOP_2640_MASA_STEREO_TYPE_ASSERT /* Nokia: BASOP issue 2640: Fix assert by saturating shift when exponent difference is very large. */ #define FIX_2636_OMASA_INTERFORMAT_BRATE /* VA: basop issue 2636: Correct condition in function ivas_interformat_brate_fx() */ +#define FIX_BASOP_2630_LFE_TDPLC_DECIM_IDX /* FhG: BASOP #2630: ivas_lfe_tdplc_fx decimation index uses 48000 (was 44100) and drops the extra >>1, matching float ( i * 48000 ) / output_Fs */ #define FIX_2493_CHECK_64BIT /* FhG: Verify that 64 bit ops do not encounter an overflow. */ -#define NONBE_FIX_2493_EXTRACT_L_estDownmixGain_fx /* FhG: Fix extract_l overflow inside estDownmixGain_fx() */ -#define NONBE_FIX_2493_EXTRACT_L_swb_pre_proc_fx /* FhG: Fix extract_l overflow inside swb_pre_proc_fx(). Saturation, not a optimal fix. */ +#define NONBE_FIX_2493_EXTRACT_L_estDownmixGain_fx /* FhG: Fix extract_l overflow inside estDownmixGain_fx() */ +#define NONBE_FIX_2493_EXTRACT_L_swb_pre_proc_fx /* FhG: Fix extract_l overflow inside swb_pre_proc_fx(). Saturation, not a optimal fix. */ #define NONBE_FIX_2493_EXTRACT_L_spectral_balancer_fx16 /* FhG: Fix extract_l overflow inside spectral_balancer_fx16(). Saturation, not a optimal fix. */ #define NONBE_FIX_2493_EXTRACT_L_IGF_CalculateStereoEnvelope_fx /* FhG: Fix extract_l overflow inside IGF_CalculateStereoEnvelope_fx(). Was completely wrong. */ #define NONBE_FIX_2493_EXTRACT_L_GetTCXMaxenergyChange_fx /* FhG: Fix extract_l overflow inside GetTCXMaxenergyChange_fx(). Saturation, not a optimal fix. */ @@ -114,7 +115,6 @@ #define NONBE_FIX_2493_EXTRACT_L_swb_tbe_enc_fx /* FhG: Fix extract_l overflow inside swb_tbe_enc_fx() */ #define NONBE_FIX_2493_EXTRACT_L_bw_detect_fx /* FhG: Fix extract_l overflow inside bw_detect_fx(). Saturation, not a optimal fix. */ #define FIX_2493_CHECK_EXTRACT_L_FIX_INSTRUMENTATION /* FhG: Fix instrumentation related to extract_l. */ -#define FIX_BASOP_2630_LFE_TDPLC_DECIM_IDX /* FhG: BASOP #2630: ivas_lfe_tdplc_fx decimation index uses 48000 (was 44100) and drops the extra >>1, matching float ( i * 48000 ) / output_Fs */ /* ##################### End NON-BE switches ########################### */ -- GitLab