Commit f6fbd503 authored by vaclav's avatar vaclav
Browse files

Merge branch 'basop-2311-harmonisation-of-gsc-gain' into 'main'

basop-2311-harmonisation-of-gsc-gain  [non-BE][Split non-BE][allow-regression]

See merge request !2699
parents 14195602 cbe1ea06
Loading
Loading
Loading
Loading
+196 −63
Original line number Diff line number Diff line
@@ -43,11 +43,12 @@
#include "wmc_auto.h"

/*-------------------------------------------------------------------*
 * Local constants
 * Local function prototypes
 *-------------------------------------------------------------------*/

static Word16 VDQ_vec_fx( Word16 *Qvec_out_fx, const Word16 *mean_dic_fx, const Word16 *dic_fx, const Word16 index_fx, const Word16 vec_en_fx );


/*========================================================================*/
/* FUNCTION : void Comp_and_apply_gain_enc_fx                             */
/*------------------------------------------------------------------------*/
@@ -114,6 +115,7 @@ void Comp_and_apply_gain_fx(
             * y_gain  = pow(10.0, (Ener_per_bd_iQ[i_band]-Ener_per_bd_yQ[i_band]))
             * = pow(2, 3.321928*(Ener_per_bd_iQ[i_band]-Ener_per_bd_yQ[i_band]))
             *-----------------------------------------------------------------*/

            L16 = sub( Ener_per_bd_iQ[i_band], Ener_per_bd_yQ[i_band] ); /*Q12 */
            L32 = L_mult( L16, 27213 );                                  /* 3.321928 in Q13 -> Q26 */
            L32 = L_shr( L32, 10 );                                      /* From Q26 to Q16 */
@@ -137,6 +139,7 @@ void Comp_and_apply_gain_fx(
    return;
}


void Comp_and_apply_gain_ivas_fx(
    Word16 exc_diffQ[],      /* i/o: Quantized excitation                   */
    Word16 Ener_per_bd_iQ[], /* i  : Target ener per band               Q13 */
@@ -192,6 +195,7 @@ void Comp_and_apply_gain_ivas_fx(
             * y_gain  = pow(10.0, (Ener_per_bd_iQ[i_band]-Ener_per_bd_yQ[i_band]))
             * = pow(2, 3.321928*(Ener_per_bd_iQ[i_band]-Ener_per_bd_yQ[i_band]))
             *-----------------------------------------------------------------*/

            L16 = sub_sat( Ener_per_bd_iQ[i_band], Ener_per_bd_yQ[i_band] ); /*Q12 */
            L32 = L_mult( L16, 27213 );                                      /* 3.321928 in Q13 -> Q26 */
            L32 = L_shr( L32, 10 );                                          /* From Q26 to Q16 */
@@ -381,13 +385,16 @@ void Ener_per_band_comp_ivas_fx(


/*-------------------------------------------------------------------*
 * gsc_gainQ()
 * GSC_gain_adj()
 *
 *
 * Quantization of the energy per band
 *-------------------------------------------------------------------*/

static void GSC_gain_adj(
    const Word16 coder_type, /* i  : Coder type        */
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
    const Word16 Mbands_gn, /* i  : Number of band    */
#endif
    const Word32 core_brate,  /* i  : Bit rate          */
    const Word16 mean_g,      /* i  : Average gain Q12  */
    Word16 *old_y_gain,       /* i/o: Previous frame dequantized vector */
@@ -397,10 +404,24 @@ static void GSC_gain_adj(
{
    /* Gain adjustment to fit ACELP generic inactive coding gain at low rate */
    Word16 Gain_off, i;
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
    Word16 Fac_div;
    Fac_div = 102;
    move16();
#endif

#ifdef OPT_NBE_2311_HARM_GSC_GAIN
    test();
    IF( coder_type != INACTIVE && NE_16( coder_type, UNVOICED ) )
#else
    IF( coder_type != INACTIVE )
#endif
    {
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
        FOR( i = 0; i < Mbands_gn; i++ )
#else
        FOR( i = 0; i < MBANDS_GN; i++ )
#endif
        {
            old_y_gain[i] = y_gain_tmp[i];
            move16();
@@ -412,7 +433,20 @@ static void GSC_gain_adj(
    {
        Gain_off = 0;
        move16();

#ifdef OPT_NBE_2311_HARM_GSC_GAIN
        test();
        IF( LE_32( core_brate, ACELP_5k00 ) && EQ_16( coder_type, UNVOICED ) ) /* IVAS LR mode only */
        {
            Gain_off = 18432;
            move16();      /* 9 -> Q11 */
            Fac_div = 205; /* Q15 -> Q16 to compensate for Gain_off being Q11 instead of Q12 */
            move16();
        }
        ELSE IF( LE_32( core_brate, ACELP_7k20 ) )
#else
        IF( LE_32( core_brate, ACELP_7k20 ) )
#endif
        {
            Gain_off = 32767;
            move16(); /* 8 -> Q12 */
@@ -444,7 +478,11 @@ static void GSC_gain_adj(
            old_y_gain[i] = y_gain_tmp[i];
            move16();
            /*y_gainQ[i] = y_gain_tmp[i]+mean_4g[0]-(i*(Gain_off/20.f)/((float) Mbands_gn));*/
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
            y_gainQ[i] = add( y_gain_tmp[i], sub( mean_g, i_mult2( i, mult_r( Gain_off, Fac_div /* 20/MBANDS_GN in Q15 */ ) ) ) );
#else
            y_gainQ[i] = add( y_gain_tmp[i], sub( mean_g, i_mult2( i, mult_r( Gain_off, 102 /* 20/MBANDS_GN in Q15 */ ) ) ) );
#endif
            move16();
        }
    }
@@ -452,7 +490,7 @@ static void GSC_gain_adj(
    return;
}


#ifndef OPT_NBE_2311_HARM_GSC_GAIN
/*-------------------------------------------------------------------*
 * GSC_gain_adj_ivas_fx()
 *
@@ -533,7 +571,6 @@ static void GSC_gain_adj_ivas_fx(
    return;
}


/*-------------------------------------------------------------------*
 * GSC_gain_DQ()
 *
@@ -929,8 +966,8 @@ Word16 gsc_gainQ_ivas_fx(

    return mean_4g_fx[0];
}


#endif
#ifndef OPT_BE_2311_HARM_GSC_GAIN
/*==========================================================================*/
/* FUNCTION : Word16 gsc_gaindec_fx()                                       */
/*--------------------------------------------------------------------------*/
@@ -951,7 +988,6 @@ Word16 gsc_gainQ_ivas_fx(
/* RETURN ARGUMENTS :                                                       */
/* _ (Word16)                  : average frequency gain                     */
/*==========================================================================*/

Word16 gsc_gaindec_fx(                             /* o  : average frequency gain    */
                       Decoder_State *st_fx,       /* i/o: decoder state structure   */
                       Word16 y_gainQ_fx[],        /* o  : quantized gain per band   */
@@ -1088,7 +1124,7 @@ Word16 gsc_gaindec_fx( /* o : average frequency gai

    return mean_4g_fx;
}

#endif

/*==========================================================================*/
/* FUNCTION : Word16 gsc_gaindec_ivas_fx()                                  */
@@ -1111,7 +1147,12 @@ Word16 gsc_gaindec_fx( /* o : average frequency gai
/* _ (Word16)                    : average frequency gain                   */
/*==========================================================================*/

#ifndef OPT_BE_2311_HARM_GSC_GAIN
Word16 gsc_gaindec_ivas_fx( /* o  : average frequency gain    */
#else
/*! r: average frequency gain    */
Word16 gsc_gaindec_fx(
#endif
                            Decoder_State *st_fx,       /* i/o: decoder state structure         */
                            Word16 y_gainQ_fx[],        /* o  : quantized gain per band     Q12 */
                            const Word32 core_brate_fx, /* i  : core used                       */
@@ -1125,6 +1166,7 @@ Word16 gsc_gaindec_ivas_fx( /* o : average frequenc
    Word16 Mbands_gn = MBANDS_GN;
    move16();
    Word16 y_gain_tmp3_fx[MBANDS_GN];

    if ( EQ_16( st_fx->L_frame, L_FRAME16k ) )
    {
        Mbands_gn = MBANDS_GN16k;
@@ -1191,6 +1233,7 @@ Word16 gsc_gaindec_ivas_fx( /* o : average frequenc
            /*--------------------------------------------------------------------------------------*
             * UQ of the first 8 bands and half of the last 8 bands
             *--------------------------------------------------------------------------------------*/

            idx_g_fx = (Word16) get_next_indice_fx( st_fx, 5 );
            VDQ_vec_fx( y_gainQ_fx, YGain_mean_LR_fx, YGain_dic1_LR_fx, idx_g_fx, 3 );
#ifdef FIX_2312_CONDITION_MISSING_GSC_DEC_LR
@@ -1224,9 +1267,11 @@ Word16 gsc_gaindec_ivas_fx( /* o : average frequenc
                    y_gainQ_fx[i] = round_fx( L_shl( L_mult( y_gainQ_fx[i], 23101 ), 1 ) ); /*Q12 */
                    move16();
                }

                /*----------------------------------------------------------------------*
                 * Copy the true Q values in the specific bands
                 *----------------------------------------------------------------------*/

                y_gainQ_fx[8] = y_gain_tmp3_fx[0]; /*Q12*/
                move16();
                y_gainQ_fx[10] = y_gain_tmp3_fx[1]; /*Q12*/
@@ -1279,8 +1324,21 @@ Word16 gsc_gaindec_ivas_fx( /* o : average frequenc
        }
    }

#ifndef OPT_NBE_2311_HARM_GSC_GAIN
#ifdef OPT_BE_2311_HARM_GSC_GAIN
    IF( st_fx->element_mode == EVS_MONO )
    {
        GSC_gain_adj( coder_type, core_brate_fx, mean_4g_fx, old_y_gain_fx, y_gainQ_fx, y_gainQ_fx );
    }
    ELSE
#endif
    {
        /* Gain adjustment to fit ACELP generic inactive coding gain at low rate */
        GSC_gain_adj_ivas_fx( coder_type, Mbands_gn, core_brate_fx, mean_4g_fx, old_y_gain_fx, y_gainQ_fx, y_gainQ_fx );
    }
#else
    GSC_gain_adj( coder_type, Mbands_gn, core_brate_fx, mean_4g_fx, old_y_gain_fx, y_gainQ_fx, y_gainQ_fx );
#endif

    return mean_4g_fx;
}
@@ -1292,6 +1350,20 @@ Word16 gsc_gaindec_ivas_fx( /* o : average frequenc
 * Quantization of the energy per band
 *-------------------------------------------------------------------*/

#ifdef OPT_NBE_2311_HARM_GSC_GAIN
Word16 gsc_gainQ_fx(
    BSTR_ENC_HANDLE hBstr,      /* i/o: encoder bitstream handle     */
    const Word16 idchan,        /* i  : channel ID                   */
    const Word16 y_gain4[],     /* i  : Energy per band           Q12*/
    Word16 y_gainQ[],           /* o  : quantized energy per band Q12*/
    const Word32 core_brate,    /* i  : Core rate                    */
    const Word16 coder_type,    /* i  : coding type                  */
    const Word16 bwidth,        /* i  : input signal bandwidth       */
    const Word16 L_frame,       /* i  : frame length                 */
    const Word16 tdm_LRTD_flag, /* i  : LRTD stereo mode flag        */
    const Word32 core_brate_inp /* i  : true core bitrate            */
)
#else
Word16 gsc_gainQ_fx(                          /*Q12*/
                     BSTR_ENC_HANDLE hBstr,   /* i/o: bitstream handle            */
                     const Word16 y_gain4[],  /* i  : Energy per band              Q12 */
@@ -1300,24 +1372,39 @@ Word16 gsc_gainQ_fx( /*Q12*/
                     const Word16 coder_type, /* i  : coding type                      */
                     const Word16 bwidth      /* i  : input signal bandwidth           */
)
#endif
{
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
    Word16 y_gain_tmp[MBANDS_GN16k], y_gain_tmp2[MBANDS_GN16k];
#else
    Word16 y_gain_tmp[MBANDS_GN], y_gain_tmp2[MBANDS_GN];
#endif
    Word16 i, idx_g = 0;
    move16();
    Word16 mean_4g[1] = { 0 }, tmp16, tmp1, tmp2;
    move16();
    Word16 Mbands_gn = MBANDS_GN;
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
    Word16 y_gain_tmp3[MBANDS_GN16k];
#else
    Word16 y_gain_tmp3[MBANDS_GN];
#endif
    Word16 cnt;
    Word32 L_tmp;

    mean_4g[0] = 0;
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
    if ( EQ_16( L_frame, L_FRAME16k ) )
    {
        Mbands_gn = MBANDS_GN16k;
        move16();
    }
#endif

    test();
    test();
    IF( ( EQ_16( coder_type, AUDIO ) || ( coder_type == INACTIVE ) ) && ( bwidth == NB ) )
    {

        /*ftmp1 =  mean(y_gain4, 10)-0.6f;*/
        L_tmp = L_deposit_l( 0 );
        FOR( cnt = 0; cnt < 10; cnt++ )
@@ -1401,7 +1488,6 @@ Word16 gsc_gainQ_fx( /*Q12*/
    ELSE
    {
        /*ftmp1 =  mean(y_gain4, 16);*/

        L_tmp = 0;
        move32();
        FOR( cnt = 0; cnt < 16; cnt++ )
@@ -1410,7 +1496,7 @@ Word16 gsc_gainQ_fx( /*Q12*/
        }
        tmp16 = round_fx( L_tmp );

        tmp1 = sub( tmp16, 4915 );
        tmp1 = sub( tmp16, 4915 ); /* 0.6 Q12 */
        tmp2 = add( tmp16, 4915 );
        L_tmp = 0;
        move32();
@@ -1466,6 +1552,14 @@ Word16 gsc_gainQ_fx( /*Q12*/

            idx_g = vquant_fx( y_gain_tmp2, YGain_mean_LR_fx, y_gain_tmp2, YGain_dic1_LR_fx, 3, 32 );
            push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 );

#ifdef OPT_NBE_2311_HARM_GSC_GAIN
            test();
            test();
            test();
            IF( !( coder_type == INACTIVE && tdm_LRTD_flag == 0 && EQ_16( idchan, 1 ) ) || GT_32( core_brate_inp, GSC_LRES_GAINQ_LIMIT ) )
            {
#endif
                idx_g = vquant_fx( y_gain_tmp2 + 3, YGain_mean_LR_fx + 3, y_gain_tmp2 + 3, YGain_dic2_LR_fx, 4, 32 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 );
                idx_g = vquant_fx( y_gain_tmp2 + 7, YGain_mean_LR_fx + 7, y_gain_tmp2 + 7, YGain_dic3_LR_fx, 5, 32 );
@@ -1498,22 +1592,61 @@ Word16 gsc_gainQ_fx( /*Q12*/
                move16();
                y_gain_tmp[14] = y_gain_tmp3[3];
                move16();
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
            }
            ELSE
            {
                Copy( y_gain_tmp2, y_gain_tmp, 3 );
                set16_fx( y_gain_tmp + 3, 0, MBANDS_GN16k - 3 );
            }
#endif
        }
        ELSE
        {
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
            IF( EQ_16( L_frame, L_FRAME ) )
#endif
            {
                idx_g = vquant_fx( y_gain_tmp, YG_mean16_fx, y_gain_tmp, YG_dicMR_1_fx, 4, 64 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 );

                idx_g = vquant_fx( y_gain_tmp + 4, YG_mean16_fx + 4, y_gain_tmp + 4, YG_dicMR_2_fx, 4, 32 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 );

                idx_g = vquant_fx( y_gain_tmp + 8, YG_mean16_fx + 8, y_gain_tmp + 8, YG_dicMR_3_fx, 4, 32 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 );

                idx_g = vquant_fx( y_gain_tmp + 12, YG_mean16_fx + 12, y_gain_tmp + 12, YG_dicMR_4_fx, 4, 16 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 4 );
            }
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
            ELSE
            {
                idx_g = vquant_fx( y_gain_tmp, YG_mean16HR_fx, y_gain_tmp, YG_dicHR_1_fx, 4, 128 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 7 );

                idx_g = vquant_fx( y_gain_tmp + 4, YG_mean16HR_fx + 4, y_gain_tmp + 4, YG_dicHR_2_fx, 4, 64 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 );

                idx_g = vquant_fx( y_gain_tmp + 8, YG_mean16HR_fx + 8, y_gain_tmp + 8, YG_dicHR_3_fx, 4, 64 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 );

                idx_g = vquant_fx( y_gain_tmp + 12, YG_mean16HR_16kHz_fx, y_gain_tmp + 12, YG_dicHR_4_16kHz_fx, 4, 64 );
                push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 );

                idx_g = vquant_fx( y_gain_tmp + 16, YG_meanL2G_16kHz_fx, y_gain_tmp + 16, YG_dicL2G_16kHz_fx, 2, 8 );
                push_indice( hBstr, IND_Y_GAIN_HF, idx_g, 3 );
            }
#endif
        }
    }

    /* Gain adjustment to fit ACELP generic inactive coding gain at low rate */
#ifdef OPT_NBE_2311_HARM_GSC_GAIN
    GSC_gain_adj( coder_type, Mbands_gn, core_brate, mean_4g[0], y_gain_tmp2 /* dummy buffer */, y_gain_tmp, y_gainQ );
#else
    GSC_gain_adj( coder_type, core_brate, mean_4g[0], y_gain_tmp2 /* dummy buffer */, y_gain_tmp, y_gainQ );
#endif

    return mean_4g[0]; /*Q12*/
}
+1 −1
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ void pre_echo_att_fx(
#ifdef FIX_1904_HARM_GSC_ENC
    Word16 etmp_e, tmp_e;
#endif

    test();
    IF( gsc_attack_flag_fx > 0 && EQ_16( last_coder_type, AUDIO ) ) /*gsc_attack_flag_fx does not get set for all the test cases */
    {
@@ -203,7 +204,6 @@ void pre_echo_att_fx(

    return;
}

#ifndef FIX_1904_HARM_GSC_ENC
void pre_echo_att_ivas_fx(
    Word32 *Last_frame_ener_fx,      /* i/o: Energy of the last frame         2*Q_new+1*/
+8 −7
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@
#define REMOVE_UNUSED_CODE_IVAS_DEC                     /* VA: remove unused code in ivas_jbm_dec_tc_fx() */
#define FIX_2294_CLANG_18_WARNINGS_ENC                  /* VA: Fix some encoder clang-18 warnings, desc. in 2294 */
#define REMOVE_CAM_FROM_IVAS                            /* VA: basop issue 210: remove obsoelte CAM code from IVAS */
#define OPT_BE_2311_HARM_GSC_GAIN                       /* VA: issue 2311: BE part of the GSC gain harmonization pipeline #70380 shows the BE */
#define HARM_CORECODER_UPDT                             /* VA: basop issue 2342: Remove duplicated code in core-coder common update functions */

/* #################### End BE switches ################################## */
@@ -110,20 +111,20 @@
#define FIX_2315_AGC_MEMORY_RESET                       /* VA: basop issue 2315: fix reset of the AGC memory */
#define FIX_2312_CONDITION_MISSING_GSC_DEC_LR           /* VA: basop issue 2297: addition of condition missing in the GSC gain decoder at low-rate */
#define FIX_2313_HF_RESET_16KHZ                         /* VA: basop issue 2313: Call hf_synth_reset_fx() also for 16 kHz output_Fs */
#define OPT_2308_FIND_TARGET                            /* VA: Issue 2308, Speeds up computation and improve accuracy of the impulse response */
#define OPT_NBE_2311_HARM_GSC_GAIN                      /* VA: issue 2311: non-BE part of the GSC gain harmonization */

/* ##################### End NON-BE switches ########################### */

/* ################## End MAINTENANCE switches ######################### */

/* clang-format on */

/* #################### Start BASOP optimization switches ############################ */

#define NONBE_OPT_2239_IVAS_FILTER_PROCESS              /* Dolby: Issue 2239, optimize ivas_filter_process_fx. */
#define NONBE_OPT_2193_EIG2X2                           /* Dolby: Issue 2193, optimize eig2x2_fx. */
#define OPT_2308_FIND_TARGET               /* VA: Issue 2308, Speeds up computation and improve accuracy of the impulse response */

/* #################### End BASOP optimization switches ############################ */

/* ################## End MAINTENANCE switches ######################### */

/* clang-format on */

#endif
+19 −1
Original line number Diff line number Diff line
@@ -1504,6 +1504,7 @@ Word16 gsc_gaindec_fx(
    const Word16 bwidth_fx      /* i  : i   signal bandwidth      */
);
#ifndef OPT_BE_2311_HARM_GSC_GAIN
/*! r: average frequency gain    */
Word16 gsc_gaindec_ivas_fx(
    Decoder_State *st_fx,       /* i/o: decoder state structure   */
@@ -1513,7 +1514,8 @@ Word16 gsc_gaindec_ivas_fx(
    const Word16 coder_type,    /* i  : coding type               */
    const Word16 bwidth_fx      /* i  : input signal bandwidth    */
);
#endif
#ifndef OPT_NBE_2311_HARM_GSC_GAIN
Word16 gsc_gainQ_fx(
    BSTR_ENC_HANDLE hBstr,   /* i/o: bitstream handle                   */
    const Word16 y_gain4[],  /* i  : Energy per band              Q13   */
@@ -1537,6 +1539,21 @@ Word16 gsc_gainQ_ivas_fx(
    const Word32 core_brate_inp /* i  : true core bitrate            */
);
#else
Word16 gsc_gainQ_fx(
    BSTR_ENC_HANDLE hBstr,      /* i/o: encoder bitstream handle     */
    const Word16 idchan,        /* i  : channel ID                   */
    const Word16 y_gain4[],     /* i  : Energy per band             Q12 */
    Word16 y_gainQ[],           /* o  : quantized energy per band   Q12 */
    const Word32 core_brate,    /* i  : Core rate                    */
    const Word16 coder_type,    /* i  : coding type                  */
    const Word16 bwidth,        /* i  : input signal bandwidth       */
    const Word16 L_frame,       /* i  : frame length                 */
    const Word16 tdm_LRTD_flag, /* i  : LRTD stereo mode flag        */
    const Word32 core_brate_inp /* i  : true core bitrate            */
);
#endif
void fer_energy_fx(
    const Word16 L_frame, /* i  : frame length                           */
    const Word16 clas,    /* i  : frame classification                   */
@@ -4984,6 +5001,7 @@ void freq_dnw_scaling_fx(
    Word16 Qx,                     /* Q format of fy_norm*/
    const Word16 L_frame           /* i  : frame length                  */
);
#ifndef FIX_1904_HARM_GSC_ENC
void highband_exc_dct_in_fx(
    const Word32 core_brate,         /* i  : core bitrate                            */
+6 −0
Original line number Diff line number Diff line
@@ -667,6 +667,7 @@ void gsc_dec_fx(
            i--;
        }

#ifndef OPT_BE_2311_HARM_GSC_GAIN
        IF( EQ_16( st_fx->element_mode, EVS_MONO ) )
        {
            mean_gain = gsc_gaindec_fx( st_fx, Ener_per_bd_iQ, brate_intermed_tbl[i], hGSCDec->old_y_gain_fx, coder_type, st_fx->bwidth ); /* Q3 */
@@ -675,6 +676,9 @@ void gsc_dec_fx(
        {
            mean_gain = gsc_gaindec_ivas_fx( st_fx, Ener_per_bd_iQ, brate_intermed_tbl[i], hGSCDec->old_y_gain_fx, coder_type, st_fx->bwidth ); /* Q3 */
        }
#else
        mean_gain = gsc_gaindec_fx( st_fx, Ener_per_bd_iQ, brate_intermed_tbl[i], hGSCDec->old_y_gain_fx, coder_type, st_fx->bwidth ); /* Q3 */
#endif

        st_fx->lp_gainc_fx = mult_r( 640, mean_gain ); /*10 in Q6 x Q12 -> lp_gainc in Q3 */
        move16();
@@ -860,6 +864,7 @@ void gsc_dec_fx(
    /*--------------------------------------------------------------------------------------*
     * Estimate noise level
     *--------------------------------------------------------------------------------------*/

#ifdef FIX_1904_HARM_GSC_ENC
    highband_exc_dct_in_fx( st_fx->core_brate, mfreq_bindiv_loc, *last_bin, Diff_len, hGSCDec->noise_lev, pit_band_idx, exc_diffQ,
                            &hGSCDec->seed_tcx, Ener_per_bd_iQ, nb_subfr, exc_dct_in, st_fx->last_coder_type, bitallocation_band, lsf_new,
@@ -871,6 +876,7 @@ void gsc_dec_fx(
                                 hGSCDec->last_exc_dct_in_fx, &hGSCDec->last_ener_fx, hGSCDec->last_bitallocation_band, bitallocation_exc, st_fx->bfi, coder_type,
                                 st_fx->bwidth, exc_wo_nf, Qexc_diffQ, Q_exc, st_fx->GSC_noisy_speech, hGSCDec->lt_ener_per_band_fx, st_fx->L_frame, st_fx->element_mode, st_fx->GSC_IVAS_mode );
#endif

    exc_dct_in[0] = 0;
    move16();

Loading