Commit 0686cbf6 authored by vaclav's avatar vaclav
Browse files

fix

parent 73a38884
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -295,6 +295,7 @@ void get_max_pulses_fx(
    return;
}


/*--------------------------------------------------------------------------*
 * fine_gain_dec()
 *
@@ -316,7 +317,6 @@ void fine_gain_dec_fx(
    Word16 gain_dbq;
    Word32 L_tmp;


    FOR( band = 0; band < num_sfm; band++ )
    {
        gbits = gain_bits[ord[band]];
+8 −5
Original line number Diff line number Diff line
@@ -25791,11 +25791,14 @@ const Word16 ivas_band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = {
const Word16 ivas_band_len_ener_shift[9] = { 1, 2, 2, 2, 3, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ };              // Q0            /* 96 requires 1 bit more than 48 */
const Word16 ivas_fine_gain_pred_sqrt_bw[9] = { 5793, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */
/*% sfms=[8,16,24,32,40,48,64,80,96], round(sqrt(sfms)*2^11) */
/*----------------------------------------------------------------------------------*
 * means of ISFs for WB active speech
 *----------------------------------------------------------------------------------*/
const Word16 Mean_isf_wb[M] = /* G722.2 active speech ISF's means    Q2.56*/
    {
/* G722.2 active speech ISF's means    Q2.56*/
const Word16 Mean_isf_wb[M] = {
    738, 1326, 2336, 3578, 4596, 5662, 6711, 7730,
    8750, 9753, 10705, 11728, 12833, 13971, 15043, 4037
};
+4 −4
Original line number Diff line number Diff line
@@ -736,6 +736,7 @@ void ivas_hq_core_dec_fx(
    /*--------------------------------------------------------------------------
     * Attenuate HFs in case of band-width switching (from higher BW to lower BW)
     *--------------------------------------------------------------------------*/

    /* attenuate HFs in case of band-width switching */
    IF( GT_16( st_fx->bws_cnt1, 0 ) )
    {
@@ -784,12 +785,12 @@ void ivas_hq_core_dec_fx(
        Copy_Scale_sig_32_16( t_audio_q, st_fx->t_audio_q_fx, L_FRAME, -13 ); /* -1Q */
    }


    /*--------------------------------------------------------------------------
     * Inverse transform
     * Overlap-add
     * Pre-echo reduction
     *--------------------------------------------------------------------------*/

    test();
    test();
    IF( st_fx->element_mode > EVS_MONO && ( core_switching_flag || hq_recovery_flag ) )
@@ -838,7 +839,6 @@ void ivas_hq_core_dec_fx(
        index = tcx_cfg->tcx_last_overlap_mode; /* Q0 */
        move16();


        /* LB synthesis */
        E_audio = sub( 31, Q_audio );
        IMDCT_fx( t_audio_q, E_audio, hTcxDec->syn_Overl, hTcxDec->syn_Overl_TDAC, wtda_audio_16, tcx_cfg->tcx_aldo_window_1, tcx_cfg->tcx_aldo_window_1_trunc, tcx_cfg->tcx_aldo_window_2, tcx_cfg->tcx_mdct_window_half, tcx_cfg->tcx_mdct_window_minimum, tcx_cfg->tcx_mdct_window_trans, tcx_cfg->tcx_mdct_window_half_length, tcx_cfg->tcx_mdct_window_min_length, index,
@@ -1079,10 +1079,10 @@ void HQ_core_dec_init_fx(
    move16();
    set16_fx( hHQ_core->prev_En_sb_fx, 0, NB_SWB_SUBBANDS );


    /*----------------------------------------------------------------------------------*
     * HQ FEC
     *----------------------------------------------------------------------------------*/

    hHQ_core->time_offs = 0;
    move16();
    set16_fx( hHQ_core->X_sav_fx, 0, PH_ECU_SPEC_SIZE );
@@ -1121,10 +1121,10 @@ void HQ_core_dec_init_fx(
    move16();
    move16();


    return;
}


/*-------------------------------------------------------------------*
 * HQ_nbfec_init_fx()
 *
+1 −2
Original line number Diff line number Diff line
@@ -399,7 +399,6 @@ void ivas_hq_hr_dec_fx(

    enforce_zero_for_min_envelope_fx( *hqswb_clas, ynrm, t_audio_q, nb_sfm, sfm_start, sfm_end );


    IF( EQ_16( *is_transient, 1 ) )
    {
        ivas_de_interleave_spectrum_fx( t_audio_q, length );
@@ -682,7 +681,6 @@ void hq_hr_dec_fx(

    enforce_zero_for_min_envelope_fx( *hqswb_clas, ynrm, t_audio_q, nb_sfm, sfm_start, sfm_end );


    IF( EQ_16( *is_transient, 1 ) )
    {
        de_interleave_spectrum_fx( t_audio_q, length );
@@ -691,6 +689,7 @@ void hq_hr_dec_fx(
    /*------------------------------------------------------------------*
     * WB/SWB bandwidth switching
     *------------------------------------------------------------------*/

    hq_pred_hb_bws_fx( st_fx, ynrm, length, *hqswb_clas, SWB_fenv );

    /* update */
+4 −0
Original line number Diff line number Diff line
@@ -206,7 +206,11 @@ void hq_lr_enc_fx(
        }
        ELSE
        {
#ifdef HARM_HQ_CORE
            hqswb_clas_fx = peak_avrg_ratio_fx( HQ_BWE_CROSSOVER_BRATE /* st_fx->total_brate - temp. hack to keep EVS BE*/, L_t_audio, NUMC_N, &hHQ_core->mode_count, &hHQ_core->mode_count1, SWB_BWE_LR_Qs ); /* Q0 */
#else
            hqswb_clas_fx = peak_avrg_ratio_fx( st_fx->total_brate, L_t_audio, NUMC_N, &hHQ_core->mode_count, &hHQ_core->mode_count1, SWB_BWE_LR_Qs ); /* Q0 */
#endif
        }

        /* write the classification information into the bitstream */
Loading