From 94d853d3a3ce20593be15359fbd49e30865dabeb Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 Nov 2019 01:50:46 +0100 Subject: test: add tests for zimg RGB repacking This tests the RGB repacker code in zimg, which deserves to be tested because it's tricky and there will be more formats. scale_test.c contains some code that can be used to test any scaler. Or at least that would be great; currently it can only test repacking of some byte-aligned-component RGB formats. It should be called repack_test.c, but I'm too lazy to change the filename now. The idea is that libswscale is used to cross-check the conversions performed by the zimg wrapper. This is why it's "OK" that scale_test.c does libswscale calls. scale_sws.c is the equivalent to scale_zimg.c, and is of course worthless (because it tests libswscale by comparing the results with libswscale), but still might help with finding bugs in scale_test.c. This borrows a sorted list of image formats from test/img_format.c, for the same reason that file sorts them. There's a slight possibility that this can be used to test vo_gpu.c too some times in the future. --- wscript_build.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wscript_build.py') diff --git a/wscript_build.py b/wscript_build.py index ffb7bebb9c..d9c03fe7f1 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -400,6 +400,9 @@ def build(ctx): ( "test/img_format.c", "tests" ), ( "test/json.c", "tests" ), ( "test/linked_list.c", "tests" ), + ( "test/scale_sws.c", "tests" ), + ( "test/scale_test.c", "tests" ), + ( "test/scale_zimg.c", "tests && zimg" ), ( "test/tests.c", "tests" ), ## Video -- cgit v1.2.3