Commit 76292191 authored by vaclav's avatar vaclav
Browse files

harmonize lp_gain_updt_fx(), under CLEANUP_ACELP_ENC

parent a0501b1d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -6855,6 +6855,7 @@ void gain_dec_lbr_fx(
    const Word16 L_subfr       /* i  : subfr lenght                                                    */
);
#ifndef CLEANUP_ACELP_ENC
void lp_gain_updt_fx(
    const Word16 i_subfr,        /* i  :  subframe number      Q0    */
    const Word16 gain_pit,       /* i  : Decoded gain pitch    Q14   */
@@ -6863,8 +6864,13 @@ void lp_gain_updt_fx(
    Word16 *lp_gainc,            /* i/o: LP-filtered code gain (FEC) Q3 */
    const Word16 L_frame         /* i  : length of the frame         */
);
#endif
#ifdef CLEANUP_ACELP_ENC
void lp_gain_updt_fx(
    const Word16 element_mode, /* i  : element mode                */
#else
void lp_gain_updt_ivas_fx(
#endif
    const Word16 i_subfr,        /* i  :  subframe number      Q0    */
    const Word16 gain_pit,       /* i  : Decoded gain pitch    Q14   */
    const Word32 norm_gain_code, /* i  : Normalised gain code   Q16  */
+0 −1
Original line number Diff line number Diff line
@@ -1302,7 +1302,6 @@ ivas_error core_switching_post_dec_ivas_fx(
    test();
    IF( st_fx->core == ACELP_CORE && st_fx->bfi && hHQ_core != NULL && !st_fx->con_tcx )
    {
        /*needed to be converted to fixed curretnly using evs implementation not in line*/
        if ( ( error = acelp_core_switch_dec_bfi_ivas_fx( st_fx, hHQ_core->fer_samples_fx, st_fx->coder_type ) ) != IVAS_ERR_OK )
        {
            return error;
+4 −0
Original line number Diff line number Diff line
@@ -99,7 +99,11 @@ void decod_amr_wb_fx(
        gain_dec_amr_wb_fx( st_fx, st_fx->core_brate, &gain_pit_fx, &L_gain_code_fx, hAmrwb_IO->past_qua_en_fx, &gain_inov_fx, code_fx, &L_norm_gain_code_fx );

        /* update LP filtered gains for the case of frame erasures */
#ifdef CLEANUP_ACELP_ENC
        lp_gain_updt_fx( EVS_MONO, i_subfr, gain_pit_fx, L_norm_gain_code_fx, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_FRAME );
#else
        lp_gain_updt_fx( i_subfr, gain_pit_fx, L_norm_gain_code_fx, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_FRAME );
#endif

#ifdef CLEANUP_ACELP_ENC
        st_fx->tilt_code_fx = est_tilt_fx( exc_fx + i_subfr, gain_pit_fx, code_fx, L_gain_code_fx, &voice_fac_fx, st_fx->Q_exc, L_SUBFR );
+4 −0
Original line number Diff line number Diff line
@@ -235,6 +235,9 @@ ivas_error decod_gen_voic_fx(
        }

        /* update LP filtered gains for the case of frame erasures */
#ifdef CLEANUP_ACELP_ENC
        lp_gain_updt_fx( st_fx->element_mode, i_subfr_fx, gain_pit_fx, L_add( norm_gain_code_fx, norm_gain_preQ_fx ), &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_frame );
#else
        IF( EQ_16( st_fx->element_mode, EVS_MONO ) )
        {
            lp_gain_updt_fx( i_subfr_fx, gain_pit_fx, L_add( norm_gain_code_fx, norm_gain_preQ_fx ), &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_frame );
@@ -243,6 +246,7 @@ ivas_error decod_gen_voic_fx(
        {
            lp_gain_updt_ivas_fx( i_subfr_fx, gain_pit_fx, L_add( norm_gain_code_fx, norm_gain_preQ_fx ), &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, L_frame );
        }
#endif

        /*----------------------------------------------------------------------*
         * Find the total excitation
+4 −0
Original line number Diff line number Diff line
@@ -426,7 +426,11 @@ void dec_pit_exc_fx(
            move16();
            pt_gain++;

#ifdef CLEANUP_ACELP_ENC
            lp_gain_updt_fx( st_fx->element_mode, i_subfr_fx, gain_pit_fx, 0, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, st_fx->L_frame );
#else
            lp_gain_updt_ivas_fx( i_subfr_fx, gain_pit_fx, 0, &st_fx->lp_gainp_fx, &st_fx->lp_gainc_fx, st_fx->L_frame );
#endif
        }
    }

Loading