weston/tests
Pekka Paalanen ae12b9596d tests: add yuv-buffer test
This adds a test to ensure that the wl_shm formats YUV420, NV12 and YUYV
are decoded and converted to RGB correctly in GL-renderer.

The test deliberately uses a 256 x 256 test image so that effects from
width vs. pitch vs. stride cannot be observed, and row padding is zero.
Also padding between planes is zero. Attempting to use a test image with
less "round" dimensions lead to stride mismatch in GL-renderer, likely
due to GL_UNPACK_ALIGNMENT being left at value 4. It is unclear if YUV
wl_shm buffers' row stride needs to be aligned to 4 bytes or not, so I
did not pursue fixing it. GL-renderer seems to be confusing width, pitch
and stride even further, and not e.g. allow padding with ARGB buffers.
See also: https://gitlab.freedesktop.org/wayland/weston/-/issues/354

Furthermore, the test arranges so that each 2x2 pixel block has the same
color. This avoids having to consider chroma siting when sub-sampling.
This way all the test cases can use the same reference image.

The source image chocolate-cake.png is taken and copyright by Pekka
Paalanen, hereby licensed as
http://creativecommons.org/licenses/by-sa/4.0/ .

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-12-17 09:34:09 +00:00
..
reference tests: add yuv-buffer test 2020-12-17 09:34:09 +00:00
alpha-blending-test.c tests: add alpha-blending test 2020-12-09 14:06:43 +02:00
bad-buffer-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
buffer-transforms-test.c tests: add buffer transform tests 2020-02-28 16:02:10 +02:00
config-parser-test.c tests/config-parser: Remove useless duplicate test 2019-11-28 19:24:13 +00:00
devices-test.c tests: migrate devices 2020-01-30 10:10:35 +00:00
drm-smoke-test.c tests: add drm-backend smoke test 2020-06-02 13:47:15 +00:00
event-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
input-timestamps-helper.c tests: replace fprintf() with testlog() 2019-11-22 12:54:10 +02:00
input-timestamps-helper.h tests: Introduce input timestamps helper 2018-02-20 10:20:29 +02:00
internal-screenshot-test.c tests: Add a way to write a Weston.ini inside the test 2020-09-05 07:14:49 +00:00
ivi-layout-internal-test.c tests: migrate ivi-layout-internal 2020-01-30 10:10:35 +00:00
ivi-layout-test-client.c tests: migrate ivi-layout-test 2020-01-30 10:10:34 +00:00
ivi-layout-test-plugin.c tests: migrate ivi-layout-test 2020-01-30 10:10:34 +00:00
ivi-shell-app-test.c tests: Convert ivi-shell-app-test.c to use weston_ini_setup 2020-09-30 09:41:34 -03:00
ivi-test.h ivi-shell: implement surface_on_many_layer test 2016-06-29 11:32:23 +03:00
keyboard-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
linux-explicit-synchronization-test.c tests: migrate linux-explicit-synchronization 2020-01-30 10:10:35 +00:00
matrix-test.c Rename matrix.h to libweston/matrix.h 2019-04-18 12:31:46 +03:00
meson.build tests: add yuv-buffer test 2020-12-17 09:34:09 +00:00
output-transforms-test.c tests: add output transform tests 2020-02-28 15:07:51 +02:00
plugin-registry-test.c tests: thread-based client harness 2020-01-30 10:10:34 +00:00
pointer-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
presentation-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
roles-test.c tests: thread-based client harness 2020-01-30 10:10:34 +00:00
setbacklight.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:19 -07:00
string-test.c tests: add missing include 2017-01-23 14:12:06 +02:00
subsurface-shot-test.c tests: move fill_color into helpers 2020-03-11 17:24:47 +02:00
subsurface-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
surface-global-test.c tests: migrate surface, surface-global 2020-01-30 10:10:35 +00:00
surface-screenshot-test.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
surface-test.c tests: migrate surface, surface-global 2020-01-30 10:10:35 +00:00
text-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
timespec-test.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
touch-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
vertex-clip-test.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
viewporter-shot-test.c tests: add viewport test for repeat mode 2020-03-12 13:22:06 +02:00
viewporter-test.c tests: move viewport creation into helpers 2020-03-11 17:11:03 +02:00
weston-test-client-helper.c tests: factor out verify_image() 2020-12-09 14:06:43 +02:00
weston-test-client-helper.h tests: factor out verify_image() 2020-12-09 14:06:43 +02:00
weston-test-desktop-shell.c tests: start to use Weston's default screenshooter in the test suite 2020-10-27 12:19:39 +00:00
weston-test-fixture-compositor.c tests: start to use Weston's default screenshooter in the test suite 2020-10-27 12:19:39 +00:00
weston-test-fixture-compositor.h tests: add mechanism to change Weston's behavior when running certain tests 2020-10-27 11:21:55 +00:00
weston-test-runner.c tests: re-order test naming pattern 2020-02-27 16:08:42 +02:00
weston-test-runner.h tests: add get_test_fixture_index() 2020-02-27 16:08:42 +02:00
weston-test.c tests: drop test suite screenshooter implementation and protocol extension 2020-10-27 12:19:39 +00:00
weston-testsuite-data.h tests: thread-based client harness 2020-01-30 10:10:34 +00:00
xwayland-test.c tests: migrate xwayland 2020-01-30 10:10:35 +00:00
yuv-buffer-test.c tests: add yuv-buffer test 2020-12-17 09:34:09 +00:00