Commit 3ea265be authored by multrus's avatar multrus
Browse files

[cleanup] accept CLEANUP_HQ_CORE

parent 0c540960
Loading
Loading
Loading
Loading
+0 −166
Original line number Diff line number Diff line
@@ -208,172 +208,6 @@ void mdct_spectrum_denorm_fx(
    return;
}

#ifndef CLEANUP_HQ_CORE
void mdct_spectrum_denorm_ivas_fx(
    const Word32 inp_vector[],    /* i   : Q0  :                                       */
    Word32 L_y2[],                /* i/o : Qs  : decoded spectrum                      */
    const Word16 band_start[],    /* i   : Q0  : table of start freq for every subband */
    const Word16 band_end[],      /* i   : Q0  : table of end freq for every subband   */
    const Word16 band_width[],    /* i   : Q0  : table of bandwidth for every subband  */
    const Word32 L_band_energy[], /* i   : Qbe : band energy                           */
    const Word16 npulses[],       /* i   : Q0  : number of coded spectrum              */
    const Word16 bands,           /* i   : Q0  : number of subbands                    */
    const Word16 ld_slope_fx,     /* i   : Q15 :                                       */
    const Word16 pd_thresh_fx     /* i   : Q15 :                                       */
)
{
    Word16 i, k;
    Word32 L_Eyy;
    Word32 L_tmp, L_temp;
    Word16 temp_fx, temp_lo_fx, temp_hi_fx;
    Word32 L_inp_tmp[L_FRAME48k];
    Word16 exp_norm;
    Word16 exp_safe;
    Word16 exp_normn, exp_normd;

    Word16 pd_fx;
    Word16 Qpd;

    Word16 div_pd_fx;
    Word16 Qdivpd;
    Word32 L_div_pd;

    Word16 frac, exp;

    Word16 gain_tweak_fx;
    Word16 Qtweak;

    Word16 exp_shift;

    Word16 QEyy;
    Word16 pow_fx;
    Word16 Qpow;
    Word16 Qdiv;
    Word16 Qgamma;
    Word16 gamma_fx;

    Word16 cond_fx;

    exp_safe = 4; /* safe bit for overflow */
    move16();

    FOR( k = 0; k < bands; k++ )
    {
        L_tmp = L_deposit_l( 0 );
        FOR( i = band_start[k]; i <= band_end[k]; i++ )
        {
            L_inp_tmp[i] = L_mult( extract_l( inp_vector[i] ), extract_l( inp_vector[i] ) );
            move32(); /* Q0+Q0+1 */
            L_tmp = L_or( L_tmp, L_inp_tmp[i] );
        }
        exp_norm = norm_l( L_tmp );
        exp_norm = sub( exp_norm, exp_safe );

        L_Eyy = L_deposit_l( 0 );
        FOR( i = band_start[k]; i <= band_end[k]; i++ )
        {
            /*Eyy += (float) inp_vector[i] * inp_vector[i]; */
            L_Eyy = L_add( L_Eyy, L_shl( L_inp_tmp[i], exp_norm ) ); /* Q1+exp_norm */
        }
        QEyy = add( 1, exp_norm );

        IF( L_Eyy > 0x0L )
        {
            /* Set gamma to be pulse gain which results in perfect quantized subband energy */
            /*gamma = (float) sqrt (pow (2.0f, band_energy[k]) / Eyy); */

            /* Pow part  (pow(2.0f, band_energy) ) */
            L_temp = L_shr( L_band_energy[k], sub( SWB_BWE_LR_Qbe, 16 ) );
            temp_lo_fx = L_Extract_lc( L_temp, &temp_hi_fx );
            Qpow = sub( 14, temp_hi_fx );
            pow_fx = extract_l( Pow2( 14, temp_lo_fx ) ); /* Qpow */

            /* Div part  ( pow (2.0f, band_energy[i])/Eyy ) */
            exp_normn = norm_s( pow_fx );
            exp_normn = sub( exp_normn, 1 );
            exp_normd = norm_l( L_Eyy );
            temp_fx = div_s( shl( pow_fx, exp_normn ), extract_h( L_shl( L_Eyy, exp_normd ) ) ); /* ((Qpow + exp_norm) - (QEyy + exp_normd)) + 31 */
            Qdiv = add( sub( add( Qpow, exp_normn ), add( QEyy, exp_normd ) ), 31 );

            exp_norm = norm_s( temp_fx );
            temp_fx = shl( temp_fx, exp_norm ); /* Qdiv + exp_norm */
            Qdiv = add( Qdiv, exp_norm );

            /* Sqrt part sqrt(pow (2.0f, band_energy[i])/Eyy) */
            Qgamma = add( Qdiv, 16 );
            IF( s_and( Qdiv, 1 ) == 0 ) /* Qdiv % 2 == 0 */
            {
                L_temp = Sqrt_l( L_shr( L_deposit_h( temp_fx ), 1 ), &exp_norm );
                L_temp = L_shr( L_temp, exp_norm );
                Qgamma = sub( shr( Qgamma, 1 ), 1 );
                gamma_fx = round_fx( L_temp );
            }
            ELSE
            {
                L_temp = Sqrt_l( L_deposit_h( temp_fx ), &exp_norm );
                L_temp = L_shr( L_temp, exp_norm );
                Qgamma = shr( Qgamma, 1 );
                gamma_fx = round_fx( L_temp );
            }

            /* Adjust gamma based on pulse density (0 bit MSE gain estimator) */
            /*pd = (float) npulses[k] / band_width[k]; */
            exp_normn = norm_s( npulses[k] );
            exp_normn = sub( exp_normn, 1 );
            exp_normd = norm_s( band_width[k] );
            pd_fx = div_s( shl( npulses[k], exp_normn ), shl( band_width[k], exp_normd ) ); /* 15 + (exp_normn + exp_normd) */
            Qpd = add( sub( exp_normn, exp_normd ), 15 );

            cond_fx = sub( shl_sat( pd_fx, sub( 15, Qpd ) ), pd_thresh_fx /*Q15*/ ); /* Q15 */
            move16();                                                                /* allow overflow happen. */
            IF( cond_fx < 0 )
            {
                /*gain_tweak = (float) pow (2.0f, (ld_slope * log2_f (pd / pd_thresh))); */
                /* Div part */
                exp_normn = norm_s( pd_fx );
                exp_normn = sub( exp_normn, 1 );
                exp_normd = norm_s( pd_thresh_fx );
                div_pd_fx = div_s( shl( pd_fx, exp_normn ), shl( pd_thresh_fx, exp_normd ) ); /* Qpd+exp_normn - (15 + exp_normd) + 15 */
                Qdivpd = add( sub( add( Qpd, exp_normn ), add( 15, exp_normd ) ), 15 );

                /* Log2 part */
                exp_norm = norm_s( div_pd_fx );
                L_div_pd = L_deposit_h( shl( div_pd_fx, exp_norm ) ); /* Qdivpd + exp_norm + 16 */
                Qdivpd = add( add( Qdivpd, exp_norm ), 16 );

                frac = Log2_norm_lc( L_div_pd );
                exp = sub( 30, Qdivpd );
                L_tmp = L_Comp( exp, frac ); /* Q16 */

                /* Mult part */
                L_tmp = Mpy_32_16_1( L_tmp, ld_slope_fx );

                /* Pow part */
                temp_lo_fx = L_Extract_lc( L_tmp, &temp_hi_fx );
                Qtweak = sub( 14, temp_hi_fx );
                gain_tweak_fx = extract_l( Pow2( 14, temp_lo_fx ) );

                /*gamma *= gain_tweak; */
                L_tmp = L_mult( gamma_fx, gain_tweak_fx ); /* Qgamma+Qtweak+1 */
                exp_norm = norm_l( L_tmp );
                gamma_fx = round_fx_sat( L_shl( L_tmp, exp_norm ) );
                Qgamma = sub( add( add( Qgamma, Qtweak ), exp_norm ), 15 ); /*Qgamma+Qtweak+1+exp_norm-16; */
            }

            exp_shift = sub( SWB_BWE_LR_Qs - 1, Qgamma );
            FOR( i = band_start[k]; i <= band_end[k]; i++ )
            {
                /*y2[i] = gamma * inp_vector[i]; */
                L_tmp = L_mult( gamma_fx, extract_l( inp_vector[i] ) ); /* Qgamma+0+1=Qgamma+1 */
                L_y2[i] = L_shl( L_tmp, exp_shift );                    /* SWB_BWE_LR_Qs */
                move32();
            }
        }
    }

    return;
}
#endif

/*==========================================================================*/
/* FUNCTION      : void hq2_core_configure_fx()                             */
+0 −2
Original line number Diff line number Diff line
@@ -1596,7 +1596,6 @@ void ivas_hq_core_dec_fx(
    Word16 *Q_output 
);

#ifdef CLEANUP_HQ_CORE
void ivas_HQ_FEC_Mem_update_fx(
    Decoder_State *st_fx,                                       /* i/o: decoder state structure                 */
    Word32 *t_audio_q_fx,                                       /*Q12*/
@@ -1612,7 +1611,6 @@ void ivas_HQ_FEC_Mem_update_fx(
    Word16 hq_core_type,                                        /* i : normal or low-rate MDCT(HQ) core         */
    Word16 output_frame 
);
#endif
/* o  : Consumed bits  Q0 */
Word16 ivas_hq_classifier_dec_fx(                          
    Decoder_State *st_fx,                                       /* i/o: decoder state structure                 */
+0 −1
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#define FIX_1478_UNINIT_ON_BFI                          /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */
#define CLEANUP_HQ_CORE                                 /* VA: basop issue 2300: Remove unused code in core-coder: HQ core */
#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 */
+0 −40
Original line number Diff line number Diff line
@@ -2242,20 +2242,6 @@ void mdct_spectrum_denorm_fx(
    const Word16 pd_thresh_fx     /* i   : Q15 :                                       */
);
#ifndef CLEANUP_HQ_CORE
void mdct_spectrum_denorm_ivas_fx(
    const Word32 inp_vector[],    /* i   : Q0  :                                       */
    Word32 L_y2[],                /* i/o : Qs  : decoded spectrum                      */
    const Word16 band_start[],    /* i   : Q0  : table of start freq for every subband */
    const Word16 band_end[],      /* i   : Q0  : table of end freq for every subband   */
    const Word16 band_width[],    /* i   : Q0  : table of bandwidth for every subband  */
    const Word32 L_band_energy[], /* i   : Qbe : band energy                           */
    const Word16 npulses[],       /* i   : Q0  : number of coded spectrum              */
    const Word16 bands,           /* i   : Q0  : numbers of subbands                   */
    const Word16 ld_slope_fx,     /* i   : Q15 :                                       */
    const Word16 pd_thresh_fx     /* i   : Q15 :                                       */
);
#endif
void hq2_core_configure_fx(
    const Word16 frame_length, /* Q0 */
    const Word16 num_bits,     /* Q0 */
@@ -3837,32 +3823,6 @@ void swb_bwe_enc_lr_fx(
    Word16 *ni_seed_fx            /* i/o: random seed for search buffer NI             */
);
#ifndef CLEANUP_HQ_CORE
void swb_bwe_enc_lr_ivas_fx(
    Encoder_State *st_fx,    /* i/o: encoder state structure                      */
    const Word32 L_m_core[], /* i  : lowband synthesis                            */
    Word16 QsL,
    const Word32 L_m_orig[],      /* i/o: scaled orig signal (MDCT)                    */
    Word32 L_m[],                 /* o  : highband synthesis with lowband zeroed       */
    const Word32 L_total_brate,   /* i  : total bitrate for selecting subband pattern  */
    Word16 BANDS_fx,              /* i  : Total number of Subbands in a frame          */
    Word16 *band_start_fx,        /* i  : band start of each SB                        */
    Word16 *band_end_fx,          /* i  : band end of each SB                          */
    Word32 *L_band_energy,        /* i  : band_energy of each SB                       */
    Word16 Qbe,                   /* i  : Q value of band energy                       */
    Word16 *p2a_flags_fx,         /* i  : HF tonal indicator                           */
    const Word16 hqswb_clas_fx,   /* i  : HQ_NORMAL2 or HQ_HARMONIC mode               */
    Word16 lowlength_fx,          /* i  : lowband length                               */
    Word16 highlength_fx,         /* i  : highband length                              */
    Word16 *prev_frm_index_fx,    /* i/o: previous frame lag index for harmonic mode   */
    const Word16 har_bands_fx,    /* i  : Number of LF harmonic bands                  */
    Word16 *prev_frm_hfe2,        /* i/o: */
    Word16 *prev_stab_hfe2,       /* i/o: */
    const Word16 band_width_fx[], /* i  : band_width information                       */
    const Word32 L_y2_ni[],       /* i  : band_width information                       */
    Word16 *ni_seed_fx            /* i/o: random seed for search buffer NI             */
);
#endif
void isf_enc_amr_wb_fx(
    Encoder_State *st, /* i/o: state structure                             */
    Word16 *isf_new,   /* i/o: quantized ISF vector                        */
+0 −280
Original line number Diff line number Diff line
@@ -399,286 +399,6 @@ void HQ_FEC_processing_fx(
    return;
}

#ifndef CLEANUP_HQ_CORE
void ivas_HQ_FEC_Mem_update_fx(
    Decoder_State *st_fx, /* i/o: decoder state structure            */
    Word32 *t_audio_q_fx, /*Q12*/
    Word32 *normq_fx,     /*Q14*/
    Word16 *ynrm,
    Word16 *Num_bands_p,
    Word16 is_transient,
    Word16 hqswb_clas,
    Word16 c_switching_flag,
    Word16 nb_sfm,
    Word16 num_Sb,
    Word16 *mean_en_high_fx, /*Q5*/
    Word16 hq_core_type,     /* i : normal or low-rate MDCT(HQ) core */
    Word16 output_frame )
{
    Word16 Min_ind;
    Word32 Min_value;
    Word16 Max_ind;
    Word16 stat_mode_curr;

    Word16 i, j, k;
    Word16 offset;
    Word16 exp, exp1, exp2, tmp_fx;
    Word32 *norm_values_fx; // Q12
    Word32 L_tmp, tmp_energy_fx = 0 /*Q8*/, Max_coeff_fx /*Q12*/;
    Word32 en_high_fx[MAX_SB_NB]; // Q12
    HQ_NBFEC_HANDLE hHQ_nbfec;
    HQ_DEC_HANDLE hHQ_core;
    hHQ_nbfec = st_fx->hHQ_nbfec;
    hHQ_core = st_fx->hHQ_core;
    move32(); // for tmp_energy_fx
    IF( EQ_16( output_frame, L_FRAME8k ) )
    {

        IF( is_transient )
        {
            set16_fx( hHQ_nbfec->prev_sign_switch_2, 0, HQ_FEC_SIGN_SFM );
            set16_fx( hHQ_nbfec->prev_sign_switch, 0, HQ_FEC_SIGN_SFM );
        }
        ELSE
        {
            FOR( j = 0; j < HQ_FEC_SIGN_SFM; j++ )
            {
                hHQ_nbfec->prev_sign_switch[j] = hHQ_nbfec->prev_sign_switch_2[j];
                move16();
                hHQ_nbfec->prev_sign_switch_2[j] = 0;
                move16();

                FOR( i = 0; i < HQ_FEC_BAND_SIZE; i++ )
                {
                    test();
                    test();
                    test();
                    IF( ( hHQ_nbfec->old_coeffs_fx[i + j * HQ_FEC_BAND_SIZE] > 0 && t_audio_q_fx[i + j * HQ_FEC_BAND_SIZE] < 0 ) || ( hHQ_nbfec->old_coeffs_fx[i + j * HQ_FEC_BAND_SIZE] < 0 && t_audio_q_fx[i + j * HQ_FEC_BAND_SIZE] > 0 ) )
                    {
                        hHQ_nbfec->prev_sign_switch[j] = add( hHQ_nbfec->prev_sign_switch[j], 1 );
                        move16();
                        hHQ_nbfec->prev_sign_switch_2[j] = add( hHQ_nbfec->prev_sign_switch_2[j], 1 );
                        move16();
                    }
                }
            }
        }
        /* if LR MDCT core is used, recalculate norms from decoded MDCT spectrum (using code from hq_hr_enc_fx()) */
        test();
        IF( ( EQ_16( hqswb_clas, HQ_HVQ ) ) || ( EQ_16( hq_core_type, LOW_RATE_HQ_CORE ) ) )
        {
            /* First group */
            logqnorm_fx( t_audio_q_fx, 12, ynrm, 32, WID_G1, (const Word16) EQ_16( hqswb_clas, HQ_HVQ ) );
            j = ynrm[0];
            move16();
            offset = WID_G1;
            move16();

            FOR( i = 1; i < SFM_G1; i++ )
            {
                logqnorm_fx( &t_audio_q_fx[offset], 12, &ynrm[i], 40, WID_G1, (const Word16) EQ_16( hqswb_clas, HQ_HVQ ) );
                offset = add( offset, WID_G1 );
            }

            /* Second group */
            FOR( i = SFM_G1; i < SFM_G1 + 2; i++ )
            {
                logqnorm_fx( &t_audio_q_fx[offset], 12, &ynrm[i], 40, WID_G2, (const Word16) EQ_16( hqswb_clas, HQ_HVQ ) );
                offset = add( offset, WID_G2 );
            }
        }

        /* Memory update for the LGF log2 Norm */
        FOR( i = 0; i < nb_sfm; i++ )
        {
            normq_fx[i] = dicn_fx[ynrm[i]];
            move32();
        }
        k = 0;
        move16();
        FOR( i = 0; i < num_Sb; i++ )
        {
            norm_values_fx = &hHQ_nbfec->ynrm_values_fx[i][0];
            Copy32( norm_values_fx, &norm_values_fx[1], MAX_PGF - 1 );

            L_tmp = L_deposit_l( 0 );
            FOR( j = 0; j < Num_bands_p[i]; j++ )
            {
                L_tmp = L_add( L_tmp, L_shr( normq_fx[k], 3 ) ); /*11*/
                k = add( k, 1 );
            }
            tmp_fx = shl_sat( inv_tbl_fx[Num_bands_p[i]], 1 ); /*16*/
            norm_values_fx[0] = Mult_32_16( L_tmp, tmp_fx );   /*11 + 16 - 15*/
            move32();
            tmp_energy_fx = L_add( tmp_energy_fx, L_shr( L_tmp, 3 ) ); /*8*/
        }
        test();
        test();
        IF( ( c_switching_flag ) || ( ( st_fx->last_core == ACELP_CORE ) && ( EQ_16( st_fx->core, HQ_CORE ) ) ) )
        {
            FOR( i = 0; i < MAX_SB_NB; i++ )
            {
                FOR( j = 1; j < MAX_PGF; j++ )
                {
                    hHQ_nbfec->ynrm_values_fx[i][j] = hHQ_nbfec->ynrm_values_fx[i][0];
                    move32();
                }
            }
        }
        set16_fx( hHQ_nbfec->Norm_gain_fx, 32767, SFM_N_NB ); /*15*/
        /* st->energy_MA_Curr[1]=Energy of the current frame */
        tmp_fx = inv_tbl_fx[nb_sfm];
        move16();                                    /*15*/
        L_tmp = Mult_32_16( tmp_energy_fx, tmp_fx ); /*8 + 15 - 15*/

        hHQ_nbfec->energy_MA_Curr_fx[1] = extract_h( L_shl( L_tmp, 16 - 8 ) );
        move16();
        /* Moving Average */
        hHQ_nbfec->energy_MA_Curr_fx[0] = s_max( 1, add( mult_r( 26214, hHQ_nbfec->energy_MA_Curr_fx[0] ), mult_r( 6554, hHQ_nbfec->energy_MA_Curr_fx[1] ) ) );
        move16();

        /*st->diff_energy = (float)fabs((st->energy_MA_Curr[1] - st->energy_MA_Curr[0])/st->energy_MA_Curr[0]); */
        hHQ_nbfec->diff_energy_fx = abs_s( sub( hHQ_nbfec->energy_MA_Curr_fx[1], hHQ_nbfec->energy_MA_Curr_fx[0] ) );
        move16();
        exp1 = sub( norm_l( hHQ_nbfec->diff_energy_fx ), 1 );
        exp2 = norm_l( hHQ_nbfec->energy_MA_Curr_fx[0] );
        hHQ_nbfec->diff_energy_fx = div_s( extract_h( L_shl( hHQ_nbfec->diff_energy_fx, exp1 ) ), extract_h( L_shl( hHQ_nbfec->energy_MA_Curr_fx[0], exp2 ) ) );
        move16();
        exp = add( 15, sub( exp1, exp2 ) );
        hHQ_nbfec->diff_energy_fx = shl( hHQ_nbfec->diff_energy_fx, sub( 11, exp ) ); /*11*/
        move16();

        /* Classify the stationary mode : 12%  */
        IF( LT_16( hHQ_nbfec->diff_energy_fx, ED_THRES_12P_fx ) )
        {
            stat_mode_curr = 1;
            move16();
        }
        ELSE
        {
            stat_mode_curr = 0;
            move16();
        }

        /* Apply Hysteresis to prevent frequent mode changing */
        if ( EQ_16( hHQ_nbfec->stat_mode_old, stat_mode_curr ) )
        {
            hHQ_nbfec->stat_mode_out = stat_mode_curr;
            move16();
        }

        hHQ_nbfec->stat_mode_old = stat_mode_curr;
        move16();

        /* Find max. band index (Minimum value means maximum energy) */
        Min_ind = 0;
        move16();
        Min_value = L_deposit_l( 100 );
        FOR( i = 0; i < num_Sb; i++ )
        {
            IF( GT_32( Min_value, ynrm[i] ) )
            {
                Min_value = ynrm[i];
                move16();
                Min_ind = i;
                move16();
            }
        }

        /* Find max. coeff in band 0 */
        Max_ind = 0;
        move16();
        IF( Min_ind == 0 )
        {
            Max_coeff_fx = L_deposit_l( 0 );
            FOR( i = 0; i < 8; i++ )
            {
                L_tmp = L_abs( t_audio_q_fx[i] ); // Q12
                IF( LT_32( Max_coeff_fx, L_tmp ) )
                {
                    Max_coeff_fx = L_add( L_tmp, 0 );
                    Max_ind = i;
                    move16();
                }
            }
        }

        /* Find energy difference from band 16 */
        k = 1;
        move16();

        FOR( i = k; i < num_Sb; i++ )
        {
            en_high_fx[i] = L_deposit_l( 0 );
            FOR( j = 0; j < 2; j++ )
            {
                /*en_high[i] += 0.5f*st->ynrm_values[i][j+1];*/
                en_high_fx[i] = L_add( en_high_fx[i], L_shr( hHQ_nbfec->ynrm_values_fx[i][j + 1], 1 ) ); /*Q12*/
                move32();
            }
        }

        *mean_en_high_fx = 0;
        move16();
        FOR( i = k; i < num_Sb; i++ )
        {
            /* *mean_en_high += (float)(en_high[i]/st->ynrm_values[i][0]);*/
            exp1 = sub( norm_l( en_high_fx[i] ), 1 );
            exp2 = norm_l( hHQ_nbfec->ynrm_values_fx[i][0] );
            tmp_fx = div_s( extract_h( L_shl( en_high_fx[i], exp1 ) ), extract_h( L_shl( hHQ_nbfec->ynrm_values_fx[i][0], exp2 ) ) );
            exp = add( 15, sub( exp1, exp2 ) );
            *mean_en_high_fx = add_sat( *mean_en_high_fx, shr_sat( tmp_fx, sub( exp, 5 ) ) );
            move16();
        }
        *mean_en_high_fx = mult( *mean_en_high_fx, inv_tbl_fx[sub( num_Sb, k )] );
        move16();

        test();
        test();
        test();
        test();
        test();
        test();
        test();
        test();
        test();
        IF( ( LT_16( Min_ind, 5 ) ) && ( LT_16( abs_s( sub( Min_ind, hHQ_nbfec->old_Min_ind ) ), 2 ) ) && ( LT_16( hHQ_nbfec->diff_energy_fx, ED_THRES_90P_fx ) ) && ( !st_fx->bfi ) && ( !st_fx->prev_bfi ) && ( !st_fx->prev_old_bfi ) && ( !is_transient ) && ( !hHQ_core->old_is_transient[1] ) && ( EQ_16( hHQ_nbfec->prev_last_core, HQ_CORE ) ) && ( EQ_16( st_fx->last_core, HQ_CORE ) ) )
        {
            hHQ_nbfec->phase_mat_flag = 1;
            move16();
            test();
            if ( ( Min_ind == 0 ) && ( LT_16( Max_ind, 3 ) ) )
            {
                hHQ_nbfec->phase_mat_flag = 0;
                move16();
            }
        }
        ELSE
        {
            hHQ_nbfec->phase_mat_flag = 0;
            move16();
        }

        hHQ_nbfec->old_Min_ind = Min_ind;
        move16();

        FOR( i = 0; i < L_FRAME8k; i++ )
        {
            hHQ_nbfec->old_coeffs_fx[i] = t_audio_q_fx[i];
            move32();
        }
    }

    hHQ_core->old_is_transient[2] = hHQ_core->old_is_transient[1];
    move16();
    hHQ_core->old_is_transient[1] = hHQ_core->old_is_transient[0];
    move16();
    hHQ_core->old_is_transient[0] = is_transient;
    move16();

    return;
}
#endif
void HQ_FEC_Mem_update_fx(
    Decoder_State *st_fx, /* i/o: decoder state structure            */
    Word32 *t_audio_q_fx, /*Q12*/
Loading