Commit 96b6579c authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Merge remote-tracking branch 'origin/main' into...

Merge remote-tracking branch 'origin/main' into basop-2495-osba-magnitude-mismatch-4x-gain-in-binaural-room-reverb-with-trajectory

# Conflicts:
#	lib_com/options.h
parents 0a34775b 7897b35e
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@
#define FIX_2480_HARM_TONALMDCT                         /* FhG: basop issue 2480: Harmonize TonalMDCTConceal_Detect_fx() and TonalMDCTConceal_Detect_ivas_fx() */
#define FIX_2479_HARM_PITCH_GAIN                        /* FhG: basop issue 2479: Harmonize tcx_ltp_pitch_search_*(), tcx_ltp_find_gain_*fx() */
#define HARMONIZE_2481_EXTEND_SHRINK                    /* FhG: basop issue 2481: Harmonize extend_frm_*fx() and shrink_frm_*fx() */
#define FIX_FLOAT_ISSUE_1546_DEAD_CODE                  /* FhG: remove dead code reported in the issue*/

/* #################### End BE switches ################################## */

@@ -101,6 +102,7 @@
#define FIX_2488_PREVENT_NEG_PITCH                      /* VA: Fix for 2488, use saturation to prevent possible wrap-around, thus negative pitch values */
#define FIX_1547_ISMDTX_HANDLE                          /* VA: float issue 1547: fix use of 'hISMDTX' handle */
#define FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API            /* Expose Payload Type setting in RTP Header */
#define FIX_BASOP_2491_MDCT_JBM_CLICK                   /* FhG: BASOP #2491: Fix Q_synth after TCX concealment (using ACELP concealment) */
#define FIX_2495_Q_ALIGN_OSBA_RENDERER                  /* FhG: Basop issue #2495: Corrected exponent scaling of outAudio.data_fx before buffer accumulation in renderSbaToBinaural(). */

/* ##################### End NON-BE switches ########################### */
+4 −0
Original line number Diff line number Diff line
@@ -941,6 +941,9 @@ void con_tcx_fx(
    }
    ELSE
    {
#ifdef FIX_BASOP_2491_MDCT_JBM_CLICK
        tmp_deemph = shl_sat( tmp_deemph, Q_syn ); /*Q_syn*/
#else
        IF( NE_16( st->element_mode, EVS_MONO ) ) // to keep evs bit-exactness
        {
            if ( GT_16( sub( Q_syn, st->Q_syn_factor ), scf ) )
@@ -953,6 +956,7 @@ void con_tcx_fx(
        {
            tmp_deemph = shl_sat( tmp_deemph, Q_syn ); /*Q_syn*/
        }
#endif
        st->Q_syn_factor = 0;
        move16();
        st->Q_syn = Q_syn;
+11 −0
Original line number Diff line number Diff line
@@ -766,7 +766,18 @@ ivas_error ivas_core_dec_fx(
         *---------------------------------------------------------------------*/

        /*core_switching_post_dec*/
#ifdef FIX_BASOP_2491_MDCT_JBM_CLICK
        IF( EQ_16( sts[n]->element_mode, IVAS_CPE_MDCT ) && GT_32( sts[n]->core_brate, SID_2k40 ) ) // In this case, st->Q_syn_factor was already applied earlier in ivas_mdct_core_reconstruct_fx()
        {
            Q_synth = sub( 15, e_sig[0] );
        }
        ELSE
        {
            Q_synth = add( sub( 15, e_sig[0] ), st->Q_syn_factor );
        }
#else
        Q_synth = add( sub( 15, e_sig[0] ), st->Q_syn_factor );
#endif

        IF( st->cldfbSyn != NULL )
        {
+1 −1
Original line number Diff line number Diff line
@@ -1306,7 +1306,7 @@ typedef struct Decoder_State
    Word16 Q_syn;
    Word16 Q_syn2;
    Word16 Q_syn_cng;
    Word16 Q_syn_factor; // This q_factor is used to avoid using fix Q0 for synth[] at the output of con_tcx_ivas_fx() and ivas_core_dec_fx(). For con_tcx_ivas_fx, it is used for two consecutive TCX concealment processes and It cannot be greater than 0.
    Word16 Q_syn_factor; // This q_factor is used to avoid using fix Q0 for synth[] at the output of con_tcx_fx() and ivas_core_dec_fx(). For con_tcx_fx, it is used for two consecutive TCX concealment processes and It cannot be greater than 0.
    Word16 prev_Q_syn;
    Word16 prev_Q_bwe_exc;

+6 −0
Original line number Diff line number Diff line
@@ -217,7 +217,9 @@ void swb_bwe_enc_fx(
    Word16 Qenc_synth_hf, Qenc_synth;

    FD_BWE_ENC_HANDLE hBWE_FD = st_fx->hBWE_FD;
#ifndef FIX_FLOAT_ISSUE_1546_DEAD_CODE
    TD_BWE_ENC_HANDLE hBWE_TD = st_fx->hBWE_TD;
#endif

    IF( st_fx->element_mode == EVS_MONO )
    {
@@ -268,7 +270,9 @@ void swb_bwe_enc_fx(
            IF( EQ_16( st_fx->element_mode, IVAS_CPE_DFT ) )
            {
                Copy( old_input_12k8_fx + L_INP_MEM - Sample_Delay_LP, hBWE_FD->old_input_lp_fx, Sample_Delay_LP );
#ifndef FIX_FLOAT_ISSUE_1546_DEAD_CODE
                Copy( hBWE_TD->old_speech_shb_fx + L_LOOK_16k + L_SUBFR16k - Sample_Delay_HP, new_input_hp_fx, Sample_Delay_HP );
#endif
            }
            Copy( hBWE_FD->old_input_lp_fx, old_input_lp_fx, Sample_Delay_LP );
            Copy( old_input_12k8_fx + L_INP_MEM, &old_input_lp_fx[Sample_Delay_LP], L_FRAME - Sample_Delay_LP );
@@ -296,7 +300,9 @@ void swb_bwe_enc_fx(
            IF( EQ_16( st_fx->element_mode, IVAS_CPE_DFT ) )
            {
                Copy( old_input_16k_fx + L_INP_MEM - Sample_Delay_LP, hBWE_FD->old_input_lp_fx, Sample_Delay_LP );
#ifndef FIX_FLOAT_ISSUE_1546_DEAD_CODE
                Copy( hBWE_TD->old_speech_shb_fx + L_LOOK_16k + L_SUBFR16k - Sample_Delay_HP, new_input_hp_fx, Sample_Delay_HP );
#endif
            }

            Copy( hBWE_FD->old_input_lp_fx, old_input_lp_fx, Sample_Delay_LP );