[FFmpeg-cvslog] avutil/tests/color_utils: reduce accuracy threshold to pass to 1e-7

Hendrik Leppkes git at videolan.org
Sat Dec 7 16:03:09 EET 2024


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Sat Dec  7 14:51:49 2024 +0100| [5215ec677c5510dcffc5c91003be145315df82fa] | committer: Hendrik Leppkes

avutil/tests/color_utils: reduce accuracy threshold to pass to 1e-7

Fixes FATE on a variety of configurations due to accuracy problems in
floating point math. Most constants tested against here are not even
specified with 7 decimal digits.

Reviewed-by: Niklas Haas <git at haasn.dev>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5215ec677c5510dcffc5c91003be145315df82fa
---

 libavutil/tests/color_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/tests/color_utils.c b/libavutil/tests/color_utils.c
index 27ba8b529e..b8200e91fa 100644
--- a/libavutil/tests/color_utils.c
+++ b/libavutil/tests/color_utils.c
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
             printf("trc=%s calling func(%f) expected=%f roundtrip=%f\n",
                     name, test_data[i], result, roundtrip);
 
-            if (result > 0.0 && fabs(roundtrip - test_data[i]) > 1e-8) {
+            if (result > 0.0 && fabs(roundtrip - test_data[i]) > 1e-7) {
                 printf("  FAIL\n");
                 return 1;
             }



More information about the ffmpeg-cvslog mailing list