Update lossgain coding.