Commit 3600f497 authored by emerit's avatar emerit
Browse files

proposed fix

parent 6efbc98f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 ########################### */

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