From 5d034bfca1fcd53ee7de0c05dc8e5001eaa0efb8 Mon Sep 17 00:00:00 2001 From: marc emerit Date: Wed, 25 Feb 2026 13:07:48 +0100 Subject: [PATCH 1/3] proposed fix --- lib_com/options.h | 1 + lib_dec/ivas_mono_dmx_renderer.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 33c1d943ab..d9d0433920 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,6 +173,7 @@ #define FIX_2432_ISM_SPIKES_16KHZ /* VA: basop issue 2432: fix spikes in ISM decoding at 16kHz output sampling rate */ +#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 ########################### */ /* ################## End MAINTENANCE switches ######################### */ diff --git a/lib_dec/ivas_mono_dmx_renderer.c b/lib_dec/ivas_mono_dmx_renderer.c index 1dc0651534..27f345a68d 100644 --- a/lib_dec/ivas_mono_dmx_renderer.c +++ b/lib_dec/ivas_mono_dmx_renderer.c @@ -229,8 +229,14 @@ void ivas_apply_non_diegetic_panning( { float pan_left, pan_right; +#ifdef FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning + float pan = ( non_diegetic_pan_gain + 1.f ) * 0.5f; + pan_left = sinf( pan * M_PI_2 ); + pan_right = cosf( pan * M_PI_2 ); +#else pan_left = ( non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; +#endif v_multc( input_f, pan_right, output_f[1], output_frame ); v_multc( input_f, pan_left, output_f[0], output_frame ); -- GitLab From 554ca9eb0f9dda285315fa6af6d0e3b24d813925 Mon Sep 17 00:00:00 2001 From: marc emerit Date: Wed, 25 Feb 2026 16:20:13 +0100 Subject: [PATCH 2/3] replace M_PI using EVS_PI --- lib_dec/ivas_mono_dmx_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_mono_dmx_renderer.c b/lib_dec/ivas_mono_dmx_renderer.c index 27f345a68d..0ca83dfa67 100644 --- a/lib_dec/ivas_mono_dmx_renderer.c +++ b/lib_dec/ivas_mono_dmx_renderer.c @@ -231,8 +231,8 @@ void ivas_apply_non_diegetic_panning( #ifdef FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning float pan = ( non_diegetic_pan_gain + 1.f ) * 0.5f; - pan_left = sinf( pan * M_PI_2 ); - pan_right = cosf( pan * M_PI_2 ); + pan_left = sinf( pan * EVS_PI * 0.5f ); + pan_right = cosf( pan * EVS_PI * 0.5f ); #else pan_left = ( non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; -- GitLab From 9e601d58919efd3e807c7cbe8b54c66c85a0b09f Mon Sep 17 00:00:00 2001 From: marc emerit Date: Wed, 25 Feb 2026 17:45:20 +0100 Subject: [PATCH 3/3] Trigger Build -- GitLab