Let the calculation to be compatible with Google's HW implementation. Change-Id: I22e179888cdb0419e230351c0a47661b37051fef