avoids int rollover when working with large input BUG=webp:312 Change-Id: I6ad9f93b6c4b665c559bff87716a7b847f66a20d