Commit 69ffef2d authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_2380_HARM_GSC_GAIN_COMP_FX

parent e52789e8
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -70,19 +70,13 @@ static Word16 VDQ_vec_fx( Word16 *Qvec_out_fx, const Word16 *mean_dic_fx, const
/* _ None                                                                 */
/*========================================================================*/

#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
Word16 Comp_and_apply_gain_fx(
#else
void Comp_and_apply_gain_fx(
#endif
    Word16 exc_diffQ[],      /* i/o: Quantized excitation                  */
    Word16 Ener_per_bd_iQ[], /* i  : Target ener per band              Q13 */
    Word16 Ener_per_bd_yQ[], /* i/o: Ener per band for norm vector   i->Q13/o->Q13 */
    Word16 Mbands_gn,        /* i  : number of bands                       */
    const Word16 ReUseGain,  /* i  : Reuse the gain in Ener_per_bd_yQ      */
#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
    const Word16 Flag_adj_q_exc, /* i  : Flag allowing Q_exc adjustment   */
#endif
    Word16 Qexc_diff,
    Word16 Q_exc )
{
@@ -90,11 +84,9 @@ void Comp_and_apply_gain_fx(
    Word16 StartBin, NB_Qbins;
    Word16 y_gain;
    Word16 L16, frac, exp1, tmp_exp;
#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
    Word16 Q_adapt;
    Word16 Q_exc_diffQ[L_FRAME16k];
    Word32 exc_diffQ32[L_FRAME16k];
#endif
    Word32 L32;

    /* Recreate excitation for local synthesis and decoder */
@@ -139,7 +131,6 @@ void Comp_and_apply_gain_fx(
            Ener_per_bd_yQ[i_band] = shl_sat( y_gain, sub( exp1, 13 ) );
            move16(); /*Q1     */
            tmp_exp = add( add( exp1, 1 ), sub( Q_exc, Qexc_diff ) );
#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
            IF( Flag_adj_q_exc != 0 )
            {
                FOR( i = StartBin; i < NB_Qbins + StartBin; i++ )
@@ -155,7 +146,6 @@ void Comp_and_apply_gain_fx(
                }
            }
            ELSE
#endif
            {
                FOR( i = StartBin; i < NB_Qbins + StartBin; i++ )
                {
@@ -166,7 +156,6 @@ void Comp_and_apply_gain_fx(
            }
        }
    }
#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
    Q_adapt = Q_exc;
    move16();
    test();
@@ -185,9 +174,6 @@ void Comp_and_apply_gain_fx(
        }
    }
    return Q_adapt;
#else
    return;
#endif
}


+0 −12
Original line number Diff line number Diff line
@@ -683,9 +683,7 @@ void highband_exc_dct_in_fx(
    Word16 frac, exp, tmp1;
    Word16 tmp2;
    Word16 *end, Q_hb_exc;
#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
    Word16 Flag_adj_q_exc, old_Q_exc;
#endif

    FOR( j = 10; j < MBANDS_GN; j++ )
    {
@@ -949,7 +947,6 @@ void highband_exc_dct_in_fx(
            move16();
        }
    }
#if defined FIX_2380_HARM_GSC_GAIN_COMP_FX
    Flag_adj_q_exc = 0;
    move16();
    IF( NE_16( element_mode, EVS_MONO ) && lt_ener_per_band_fx != NULL ) /* to keep all EVS BE */
@@ -967,15 +964,6 @@ void highband_exc_dct_in_fx(
        Comp_and_apply_gain_fx( exc_wo_nf, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 1, Flag_adj_q_exc, Qexc_diffQ, *Q_exc );
        Vr_add( exc_dct_in, exc_wo_nf, exc_wo_nf, L_frame );
    }
#else /* #if defined FIX_2338_HARM_GSC_GAIN_COMP */
        Comp_and_apply_gain_fx( exc_diffQ, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 0, Qexc_diffQ, *Q_exc );

        IF( exc_wo_nf != NULL )
        {
            Comp_and_apply_gain_fx( exc_wo_nf, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 1, Qexc_diffQ, *Q_exc );
            Vr_add( exc_dct_in, exc_wo_nf, exc_wo_nf, L_frame );
        }
#endif

    /*--------------------------------------------------------------------------------------*
     * add the correction layer to the LF bins,
+0 −1
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@
/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_2380_HARM_GSC_GAIN_COMP_FX                  /* VA: basop issue 2380 & 2381: Fix issue when switching from CNG low energy to active content with high energy */
#define FIX_2406_FIX_GAIN_ON_INACTIVE                   /* VA: basop issue 2406: gain between 6.4 and 8kHz was too weak during inactive content with Fs=16kHz  */
#define FIX_2407_FIX_RESIDU_IVAS                        /* VA: basop 2407, Implementation issue in residu_ivas + unnecessary complexity */

+0 −6
Original line number Diff line number Diff line
@@ -1682,19 +1682,13 @@ void Ener_per_band_comp_ivas_fx(
    const Word16 L_frame        /* i  : frame length                      */
);

#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
Word16 Comp_and_apply_gain_fx(
#else
void Comp_and_apply_gain_fx(
#endif
    Word16 exc_diffQ[],      /* i/o: Quantized excitation                  */
    Word16 Ener_per_bd_iQ[], /* i  : Target ener per band              Q13 */
    Word16 Ener_per_bd_yQ[], /* i/o: Ener per band for norm vector   i->Q13/o->Q13 */
    Word16 Mbands_gn,        /* i  : number of bands                       */
    const Word16 ReUseGain,  /* i  : Reuse the gain in Ener_per_bd_yQ      */
#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
    const Word16 Flag_adj_q_exc, /* i  : Ener_per_bd_iQ of lt_ener_per_band_fx   */
#endif
    Word16 Qexc_diff,
    Word16 Q_exc );