diff --git a/lib_com/options.h b/lib_com/options.h index 123c0590c61fafc9e725d2f9bf9e294104003f1c..72e4fa35d4e2bdf0b03f06db7c6867612da96957 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -176,6 +176,7 @@ #define FIX_FLOAT_1518 /* FhG: fix issue 1518: loudness differences in OSBA decoding to mono or stereo output */ #define FIX_FLOAT_1533_BLEND_SUBFR2 /* FhG: float issue 1533: correct blending in blend_subfr2() */ +#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 1dc065153482fb5470d867c5d74ad2ffa22bf949..0ca83dfa6728147f91528ef9114bdad8a7d01aa7 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 * 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; +#endif v_multc( input_f, pan_right, output_f[1], output_frame ); v_multc( input_f, pan_left, output_f[0], output_frame );