From 3600f497e808528a644a7de31cf4ff6b07c6a070 Mon Sep 17 00:00:00 2001 From: marc emerit Date: Wed, 25 Feb 2026 13:24:45 +0100 Subject: [PATCH 1/4] proposed fix --- lib_com/options.h | 1 + lib_dec/ivas_mono_dmx_renderer_fx.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 10396a5c3..2886a7c99 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -108,6 +108,7 @@ #define FIX_2283_ISM_MD_DELAY /* Dolby: Fix ISM metadata delay round-off */ #define FIX_2283_Q_CLDFB /* FhG: Fix Q format issue in CLDFB */ #define FIX_2283_ACCU_CLDFB /* FhG: Fix to consider Q-format differences in accumulateCLDFBArrayToBuffer_fx() */ +#define FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning /* FhG: Adjust non-diegetic panning law to harmonize codec levels with 3GPP reference software */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 36d5bd48a..ecf479d4d 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -35,6 +35,9 @@ #include "prot_fx.h" #include "ivas_prot_fx.h" #include "ivas_cnst.h" +#ifdef FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning +#include "rom_com.h" +#endif #include "wmc_auto.h" @@ -319,6 +322,12 @@ void ivas_apply_non_diegetic_panning_fx( const Word16 output_frame /* i : output frame length per channel */ ) { + +#ifdef FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning + Word16 pan = add( mult_r( non_diegetic_pan_gain_fx, 32 ), 32 ); // 0.5.Q15 = 16384 // Q15 + v_multc_fx( input_f_fx, L_shl( L_deposit_l( cos_table_129[64 - pan] ), 16 ), output_fx[1], output_frame ); + v_multc_fx( input_f_fx, L_shl( L_deposit_l( cos_table_129[pan] ), 16 ), output_fx[0], output_frame ); +#else Word16 pan_left_fx, pan_right_fx; pan_left_fx = add( mult( non_diegetic_pan_gain_fx, 16384 ), 16384 ); // 0.5.Q15 = 16384 @@ -326,6 +335,8 @@ void ivas_apply_non_diegetic_panning_fx( v_multc_fx( input_f_fx, L_shl( L_deposit_l( pan_right_fx ), 16 ), output_fx[1], output_frame ); v_multc_fx( input_f_fx, L_shl( L_deposit_l( pan_left_fx ), 16 ), output_fx[0], output_frame ); +#endif + return; } -- GitLab From 705370166c9bcd35e81f1c9ec3ebd2818dd882b4 Mon Sep 17 00:00:00 2001 From: marc emerit Date: Wed, 25 Feb 2026 17:45:02 +0100 Subject: [PATCH 2/4] Trigger Build -- GitLab From fd660ee666338307da38b4c7d567fbfdd302a085 Mon Sep 17 00:00:00 2001 From: marc emerit Date: Wed, 25 Feb 2026 18:16:59 +0100 Subject: [PATCH 3/4] Trigger Build -- GitLab From 588fb0d8ac416bcf9aa112c9f4ce4239d9ee905c Mon Sep 17 00:00:00 2001 From: marc emerit Date: Fri, 27 Feb 2026 10:49:31 +0100 Subject: [PATCH 4/4] bugs fix --- lib_dec/ivas_mono_dmx_renderer_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index c54a6ae4c..97ed332be 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -325,8 +325,8 @@ void ivas_apply_non_diegetic_panning_fx( #ifdef FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning Word16 pan = add( mult_r( non_diegetic_pan_gain_fx, 32 ), 32 ); // 0.5.Q15 = 16384 // Q15 - v_multc_fx( input_f_fx, L_shl( L_deposit_l( cos_table_129[64 - pan] ), 16 ), output_fx[1], output_frame ); - v_multc_fx( input_f_fx, L_shl( L_deposit_l( cos_table_129[pan] ), 16 ), output_fx[0], output_frame ); + v_multc_fx_16( input_f_fx, cos_table_129[pan], output_fx[1], output_frame ); + v_multc_fx_16( input_f_fx, cos_table_129[64 - pan], output_fx[0], output_frame ); #else Word16 pan_left_fx, pan_right_fx; -- GitLab