constWord16ReUseGain,/* i : Reuse the gain in Ener_per_bd_yQ */
#ifdef FIX_2380_HARM_GSC_GAIN_COMP_FX
constWord16max_lt_ener,/* i : max_lt_ener of lt_ener_per_band_fx */
constWord16max_target_ener,/* i : max_target_ener of Ener_per_bd_iQ */
#endif
Word16Qexc_diff,
Word16Q_exc)
@@ -107,7 +107,7 @@ void Comp_and_apply_gain_fx(
move16();
test();
test();
IF(GT_16(Q_exc,3)&&EQ_16(ReUseGain,0)&>_16(max_lt_ener,8192/* 13 bits */))/* When lt_energy is high, Q_exc shouldn't be high too, addresses cases when switching from CNG */
IF(GT_16(Q_exc,3)&&EQ_16(ReUseGain,0)&>_16(max_target_ener,12))/* When target energy is high, Q_exc shouldn't be high too, addresses cases when switching from CNG or from almos*/
{
Q_adapt=sub(3-1,Q_exc);/* add extra 1 bit headroom */