Commit fe037d37 authored by emerit's avatar emerit
Browse files

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

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

See merge request !2842
parents 45b0764c 588fb0d8
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,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 */
#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() */

+11 −0
Original line number Diff line number Diff line
@@ -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_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;

    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;
}