This is to avoid overflow at uint32_t. cherry-picked #000098a0 from aom/master Change-Id: I549d2d13d0577fd05d57303a438fbc8034755e45