Commit 61a03c29 authored by Martin Storsjö's avatar Martin Storsjö

decode: Use abs() instead of labs()

Both inputs and the assigned variable here are int, so there's no
need to use labs() which uses long (which varies in size among
supported platforms).
parent e85482ba
...@@ -331,8 +331,8 @@ static void derive_warpmv(const Dav1dTileContext *const t, ...@@ -331,8 +331,8 @@ static void derive_warpmv(const Dav1dTileContext *const t,
int mvd[8], ret = 0; int mvd[8], ret = 0;
const int thresh = 4 * iclip(imax(bw4, bh4), 4, 28); const int thresh = 4 * iclip(imax(bw4, bh4), 4, 28);
for (int i = 0; i < np; i++) { for (int i = 0; i < np; i++) {
mvd[i] = labs(pts[i][1][0] - pts[i][0][0] - mv.x) + mvd[i] = abs(pts[i][1][0] - pts[i][0][0] - mv.x) +
labs(pts[i][1][1] - pts[i][0][1] - mv.y); abs(pts[i][1][1] - pts[i][0][1] - mv.y);
if (mvd[i] > thresh) if (mvd[i] > thresh)
mvd[i] = -1; mvd[i] = -1;
else else
......
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