Commit cfa2e0aa authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

corrected gain_code_fx and gain_preQ_fx scaling before prep_tbe_exc_fx()

parent 34dad453
Loading
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -321,7 +321,13 @@ ivas_error decod_gen_voic_fx(
        {
            idx = idiv1616( i_subfr_fx, L_SUBFR );
        }

#ifdef FIX_2010_HF_ENERGY_LOSS
        IF( LT_32( MIN_BRATE_AVQ_EXC, st_fx->core_brate ) )
        {
            gain_code_fx = L_shl( gain_code_fx, 1 );
            gain_preQ_fx = shl( gain_preQ_fx, 1 );
        }
#endif
        prep_tbe_exc_fx( L_frame, L_SUBFR, i_subfr_fx, gain_pit_fx, gain_code_fx, code_fx, voice_fac_fx,
                         &voice_factors_fx[idx], bwe_exc_fx, gain_preQ_fx, code_preQ_fx,
                         st_fx->Q_exc, T0_fx, T0_frac_fx, st_fx->coder_type, st_fx->core_brate,
@@ -357,12 +363,7 @@ ivas_error decod_gen_voic_fx(
        gain_buf[idx] = gain_pit_fx; // Q14
        move16();
    }
#ifdef FIX_2010_HF_ENERGY_LOSS
    IF( LT_32( MIN_BRATE_AVQ_EXC, st_fx->core_brate ) )
    {
        Scale_sig( bwe_exc_fx, shl( st_fx->L_frame, 1 ), 1 );
    }
#endif

    /* FEC fast recovery */

    IF( do_WI_fx )