Commit 8203514e authored by Frank Galligan's avatar Frank Galligan

Fix signed integer overflow warped_motion.c

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=497

Change-Id: I725881f3e3dd6bdb104d71ba8045fd83aa7e3e40
parent de48e94c
......@@ -371,7 +371,8 @@ static int32_t do_cubic_filter(int32_t *p, int x) {
return p[1] * (1 << WARPEDPIXEL_FILTER_BITS);
} else {
const int64_t v1 = (int64_t)x * x * x * (3 * (p[0] - p[1]) + p[2] - p[-1]);
const int64_t v2 = x * x * (2 * p[-1] - 5 * p[0] + 4 * p[1] - p[2]);
const int64_t v2 =
(int64_t)x * x * (2 * p[-1] - 5 * p[0] + 4 * p[1] - p[2]);
const int64_t v3 = x * (p[1] - p[-1]);
const int64_t v4 = 2 * p[0];
return (int32_t)ROUND_POWER_OF_TWO_SIGNED(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment