Skip to content
Snippets Groups Projects
Commit ae12b959 authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Pekka Paalanen
Browse files

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: wayland/weston#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: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent aa7de33e
No related branches found
No related tags found
No related merge requests found
Pipeline #245275 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment