adapt_gain_dif