Optimize for minimum SAD.