From 68cd670ca4920f5bf7fc1f05c8cc0ce138ec7f39 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 6 Aug 2020 05:18:06 +0300 Subject: kms++: Add support for missing 8 -and 16-bit RGB formats Add support for the RGB332, XRGB1555 and XRGB4444 formats to the PixelFormat class, the Python API, and the drawing utilities. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- kms++/src/pixelformats.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'kms++/src') diff --git a/kms++/src/pixelformats.cpp b/kms++/src/pixelformats.cpp index fe86fca..2c60c1e 100644 --- a/kms++/src/pixelformats.cpp +++ b/kms++/src/pixelformats.cpp @@ -24,9 +24,15 @@ static const map format_info_array = { { PixelFormat::YVU422, { PixelColorType::YUV, 3, { { 8, 1, 1, }, { 8, 2, 1 }, { 8, 2, 1 } }, } }, { PixelFormat::YUV444, { PixelColorType::YUV, 3, { { 8, 1, 1, }, { 8, 1, 1 }, { 8, 1, 1 } }, } }, { PixelFormat::YVU444, { PixelColorType::YUV, 3, { { 8, 1, 1, }, { 8, 1, 1 }, { 8, 1, 1 } }, } }, + /* RGB8 */ + { PixelFormat::RGB332, { PixelColorType::RGB, 1, { { 8, 1, 1 } }, } }, /* RGB16 */ { PixelFormat::RGB565, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, { PixelFormat::BGR565, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, + { PixelFormat::XRGB4444, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, + { PixelFormat::XRGB1555, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, + { PixelFormat::ARGB4444, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, + { PixelFormat::ARGB1555, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, /* RGB24 */ { PixelFormat::RGB888, { PixelColorType::RGB, 1, { { 24, 1, 1 } }, } }, { PixelFormat::BGR888, { PixelColorType::RGB, 1, { { 24, 1, 1 } }, } }, @@ -50,9 +56,6 @@ static const map format_info_array = { { PixelFormat::ABGR2101010, { PixelColorType::RGB, 1, { { 32, 1, 1 } }, } }, { PixelFormat::RGBA1010102, { PixelColorType::RGB, 1, { { 32, 1, 1 } }, } }, { PixelFormat::BGRA1010102, { PixelColorType::RGB, 1, { { 32, 1, 1 } }, } }, - - { PixelFormat::ARGB4444, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, - { PixelFormat::ARGB1555, { PixelColorType::RGB, 1, { { 16, 1, 1 } }, } }, }; const struct PixelFormatInfo& get_pixel_format_info(PixelFormat format) -- cgit v1.2.3