SDL_image: test: Add some tolerance to AVIF decoding

From 8f89013a1ca0e18c603659fd51622c5d89bd96d0 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Mon, 23 May 2022 17:56:04 +0100
Subject: [PATCH] test: Add some tolerance to AVIF decoding

When running this test on macOS, the result was visually
indistinguishable from the reference image, but not identical. Allow a
small difference in its decoding (sum of squares of colour channel
differences <= 300).

Fixes: 59dff46 "Add a simple automated test"
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 test/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/main.c b/test/main.c
index bf94395..3a47ffc 100644
--- a/test/main.c
+++ b/test/main.c
@@ -139,7 +139,7 @@ static const Format formats[] =
         "sample.bmp",
         23,
         42,
-        0,              /* lossless */
+        300,
         IMG_INIT_AVIF,
 #ifdef LOAD_AVIF
         SDL_TRUE,