diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-02-22 13:17:06 +0200 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-09-23 21:11:29 +0200 |
commit | 0a1162e2af357be00610377f297600806b90deca (patch) | |
tree | 4d3ffe8c97a7314f84414284d53a0071dca37cb2 /tests/modetest/buffers.c | |
parent | 38c043dca248a25d3ef9cf12571569f0c98aa10a (diff) |
modetest: add support for YUV422 and YUV444 plane format
Currently modetest supports only the YUV420 and YVU420 planar YCbCr
plane formats (aka YV12 and YU12). Extend the code to add support for
YUV422 / YVU422 and YUV444 / YVU444 plane formats.
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'tests/modetest/buffers.c')
-rw-r--r-- | tests/modetest/buffers.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index f00a169f..165b9529 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -146,6 +146,10 @@ bo_create(int fd, unsigned int format, case DRM_FORMAT_NV42: case DRM_FORMAT_YUV420: case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV444: + case DRM_FORMAT_YVU444: bpp = 8; break; @@ -232,6 +236,8 @@ bo_create(int fd, unsigned int format, case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: case DRM_FORMAT_NV20: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: is_planar = true; xsub = 2; ysub = 1; @@ -240,6 +246,8 @@ bo_create(int fd, unsigned int format, case DRM_FORMAT_NV24: case DRM_FORMAT_NV42: case DRM_FORMAT_NV30: + case DRM_FORMAT_YUV444: + case DRM_FORMAT_YVU444: is_planar = true; xsub = 1; ysub = 1; @@ -305,6 +313,10 @@ bo_create(int fd, unsigned int format, case DRM_FORMAT_YUV420: case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV444: + case DRM_FORMAT_YVU444: offsets[0] = 0; handles[0] = bo->handle; pitches[0] = bo->pitch; |