diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c
index 66eaf82895b744e7077b32c8da62fe95e00620bb..d06baf6c94f9f83a7af6c1420957011b45ad4211 100644
--- a/tests/tiny_psnr.c
+++ b/tests/tiny_psnr.c
@@ -208,7 +208,7 @@ int main(int argc, char *argv[])
                     b = buf[1][j];
                 }
                 sse += (a - b) * (a - b);
-                dist = abs(a - b);
+                dist = llabs(a - b);
                 if (dist > maxdist)
                     maxdist = dist;
                 break;