Use the same safer averaging formula and remove MMX code