Commit 86c75677 authored by vaclav's avatar vaclav
Browse files

harmonize handle 'hTdCngDec'

parent 982c7d04
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -6316,10 +6316,6 @@ void td_cng_dec_init_fx(
    DEC_CORE_HANDLE st /* i/o: decoder state structure     */
);
void td_cng_dec_init_ivas_fx(
    DEC_CORE_HANDLE st /* i/o: decoder state structure     */
);
// wavadjust_fec_dec_fx.c
void set_state(
    Word16 *state,
+90 −135

File changed.

Preview size limit exceeded, changes collapsed.

+6 −7
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@ void bw_switching_pre_proc_fx(
    {
        st_fx->prev_ener_shb_fx = 0;
        move16();
        set16_fx( st_fx->prev_SWB_fenv_fx, 0, SWB_FENV );
        set16_fx( st_fx->hBWE_FD->prev_SWB_fenv_fx, 0, SWB_FENV );
    }
    ELSE IF( ( ( st_fx->core == ACELP_CORE && ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) || EQ_16( st_fx->last_core, TCX_20_CORE ) ) ) || ( EQ_16( st_fx->core, st_fx->last_core ) && NE_16( st_fx->extl, st_fx->last_extl ) ) ) && GE_16( st_fx->last_bwidth, SWB ) )
    {
@@ -1230,9 +1230,9 @@ ivas_error core_switching_post_dec_fx(
    test();
    test();
    test();
    IF( EQ_32( st_fx->output_Fs, 48000 ) && ( ( GT_32( st_fx->last_core_brate, SID_2k40 ) ) && ( EQ_32( st_fx->core_brate, FRAME_NO_DATA ) || EQ_32( st_fx->core_brate, SID_2k40 ) ) ) )
    IF( st_fx->hTdCngDec != NULL && EQ_32( st_fx->output_Fs, 48000 ) && ( ( GT_32( st_fx->last_core_brate, SID_2k40 ) ) && ( EQ_32( st_fx->core_brate, FRAME_NO_DATA ) || EQ_32( st_fx->core_brate, SID_2k40 ) ) ) )
    {
        set16_fx( st_fx->interpol_3_2_cng_dec_fx, 0, INTERP_3_2_MEM_LEN );
        set16_fx( st_fx->hTdCngDec->interpol_3_2_cng_dec_fx, 0, INTERP_3_2_MEM_LEN );
    }

    /* reset FB TBE buffers */
@@ -1903,9 +1903,9 @@ ivas_error core_switching_post_dec_ivas_fx(
    test();
    test();
    test();
    IF( EQ_32( st_fx->output_Fs, 48000 ) && ( ( GT_32( st_fx->last_core_brate, SID_2k40 ) ) && ( EQ_32( st_fx->core_brate, FRAME_NO_DATA ) || EQ_32( st_fx->core_brate, SID_2k40 ) ) ) )
    IF( st_fx->hTdCngDec != NULL && EQ_32( st_fx->output_Fs, 48000 ) && ( ( GT_32( st_fx->last_core_brate, SID_2k40 ) ) && ( EQ_32( st_fx->core_brate, FRAME_NO_DATA ) || EQ_32( st_fx->core_brate, SID_2k40 ) ) ) )
    {
        set16_fx( st_fx->interpol_3_2_cng_dec_fx, 0, INTERP_3_2_MEM_LEN );
        set16_fx( st_fx->hTdCngDec->interpol_3_2_cng_dec_fx, 0, INTERP_3_2_MEM_LEN );
    }

    return error;
@@ -3146,12 +3146,11 @@ void ivas_bw_switching_pre_proc_fx(
    test();
    IF( EQ_16( st->last_bwidth, 0 ) && LE_16( st->extl, SWB_CNG ) )
    {

        st->prev_ener_shb_fx = 0;
        move16();
        IF( st->hBWE_FD != NULL )
        {
            set16_fx( st->prev_SWB_fenv_fx, 0, SWB_FENV );
            set16_fx( st->hBWE_FD->prev_SWB_fenv_fx, 0, SWB_FENV );
        }
    }
    ELSE IF( ( ( ( st->core == ACELP_CORE ) && ( EQ_16( st->last_core, HQ_CORE ) || EQ_16( st->last_core, TCX_10_CORE ) || EQ_16( st->last_core, TCX_20_CORE ) ) ) || ( EQ_16( st->core, st->last_core ) && NE_16( st->extl, st->last_extl ) ) ) && GE_16( st->last_bwidth, SWB ) )
+1 −1
Original line number Diff line number Diff line
@@ -683,7 +683,7 @@ ivas_error evs_dec_fx(
                fra = Log2_norm_lc( L_shl( L_tmp, exp ) );
                exp = sub( sub( 30, shl( hb_synth_fx_exp, 1 ) ), exp );
                L_tmp = Mpy_32_16( exp, fra, LG10 );
                st_fx->last_shb_ener_fx = round_fx_sat( L_shl_sat( L_tmp, 10 ) ); /*Q8*/
                st_fx->hTdCngDec->last_shb_ener_fx = round_fx_sat( L_shl_sat( L_tmp, 10 ) ); /*Q8*/
            }
        }
        hBWE_TD->prev_hb_synth_fx_exp = hb_synth_fx_exp;
+2 −2
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ void ivas_hq_pred_hb_bws_fx(

    IF( GE_16( st_fx->last_inner_frame, L_FRAME32k ) && st_fx->hBWE_FD != NULL )
    {
        set16_fx( st_fx->prev_SWB_fenv_fx, st_fx->prev_ener_shb_fx, SWB_FENV );
        set16_fx( st_fx->hBWE_FD->prev_SWB_fenv_fx, st_fx->prev_ener_shb_fx, SWB_FENV );
    }

    return;
@@ -125,7 +125,7 @@ void hq_pred_hb_bws_fx(

    IF( GE_16( st_fx->last_inner_frame, L_FRAME32k ) )
    {
        set16_fx( st_fx->prev_SWB_fenv_fx, st_fx->prev_ener_shb_fx, SWB_FENV );
        set16_fx( st_fx->hBWE_FD->prev_SWB_fenv_fx, st_fx->prev_ener_shb_fx, SWB_FENV );
    }

    return;
Loading