Commit 005ff815 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "warped_motion: Fix ubsan warning for signed integer overflow" into nextgenv2

parents 93713944 db926357
......@@ -215,7 +215,7 @@ static int32_t do_cubic_filter(int32_t *p, int x) {
} else if (x == (1 << WARPEDPIXEL_PREC_BITS)) {
return p[1];
} else {
const int64_t v1 = x * x * x * (3 * (p[0] - p[1]) + p[2] - p[-1]);
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 v3 = x * (p[1] - p[-1]);
const int64_t v4 = 2 * p[0];
......
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