Commit a7ee5592 authored by emerit's avatar emerit
Browse files

Merge branch 'float-1530-Non-diegetic_panning_of_mono_to_stereo_is_3LKFS_quieter' into 'main'

[non-BE]Codec Level Harmonization: Non-diegetic panning of mono to stereo is 3LKFS quieter

See merge request !2539
parents c0f0903d 83665b32
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 ######################### */
+6 −0
Original line number Diff line number Diff line
@@ -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 );