From b397a5f6e035668a9d74f8af09c20cf947e811cf Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 6 Aug 2020 05:18:05 +0300 Subject: kms++: Add support for the planar YUV formats Add support for the 6 planar YUV formats (YUV and YVU, combined with 420, 422 or 444 subsampling) to the PixelFormat class, the Python API, and the drawing utilities. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- kms++util/src/testpat.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kms++util/src/testpat.cpp') diff --git a/kms++util/src/testpat.cpp b/kms++util/src/testpat.cpp index c120de3..ac38673 100644 --- a/kms++util/src/testpat.cpp +++ b/kms++util/src/testpat.cpp @@ -120,6 +120,15 @@ static void draw_test_pattern_part(IFramebuffer& fb, unsigned start_y, unsigned case PixelColorType::YUV: switch (plane_info.xsub + plane_info.ysub) { + case 2: + for (y = start_y; y < end_y; y++) { + for (x = 0; x < w; x++) { + RGB pixel = get_test_pattern_pixel(fb, x, y); + draw_yuv444_pixel(fb, x, y, pixel.yuv(yuvt)); + } + } + break; + case 3: for (y = start_y; y < end_y; y++) { for (x = 0; x < w; x += 2) { -- cgit v1.2.3