summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2026-05-08 11:44:58 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2026-05-08 11:57:36 +0300
commit87ae7df687dc5b2066f8ee1bedd65b4bcef0a491 (patch)
tree424d2e29d299766e1813c7f37378fb8b875f3ded
parent62bc50666198b14f0adecfce08b6b2f20057e080 (diff)
kms++: Add ABGR1555, ABGR4444, XBGR1555, and XBGR4444
-rw-r--r--kms++/inc/kms++/pixelformats.h4
-rw-r--r--kms++/src/pixelformats.cpp48
2 files changed, 52 insertions, 0 deletions
diff --git a/kms++/inc/kms++/pixelformats.h b/kms++/inc/kms++/pixelformats.h
index 17b05c0..79dbe81 100644
--- a/kms++/inc/kms++/pixelformats.h
+++ b/kms++/inc/kms++/pixelformats.h
@@ -38,11 +38,15 @@ enum class PixelFormat {
RGB565,
BGR565,
XRGB1555,
+ XBGR1555,
RGBX4444,
XRGB4444,
+ XBGR4444,
ARGB1555,
+ ABGR1555,
RGBA4444,
ARGB4444,
+ ABGR4444,
RGB888,
BGR888,
XRGB8888,
diff --git a/kms++/src/pixelformats.cpp b/kms++/src/pixelformats.cpp
index cf730ba..126a614 100644
--- a/kms++/src/pixelformats.cpp
+++ b/kms++/src/pixelformats.cpp
@@ -70,6 +70,18 @@ static map<PixelFormat, PixelFormatInfo> format_info_array = {
}
},
{
+ PixelFormat::XBGR1555, {
+ PixelFormatInfo {
+ "XBGR1555",
+ "XB15",
+ "",
+ PixelColorType::RGB,
+ { 1, 1 },
+ { { 2, 1, 1, 1 } },
+ }
+ }
+ },
+ {
PixelFormat::RGBX4444, {
PixelFormatInfo {
"RGBX4444",
@@ -94,6 +106,18 @@ static map<PixelFormat, PixelFormatInfo> format_info_array = {
}
},
{
+ PixelFormat::XBGR4444, {
+ PixelFormatInfo {
+ "XBGR4444",
+ "XB12",
+ "",
+ PixelColorType::RGB,
+ { 1, 1 },
+ { { 2, 1, 1, 1 } },
+ }
+ }
+ },
+ {
PixelFormat::ARGB1555, {
PixelFormatInfo {
"ARGB1555",
@@ -106,6 +130,18 @@ static map<PixelFormat, PixelFormatInfo> format_info_array = {
}
},
{
+ PixelFormat::ABGR1555, {
+ PixelFormatInfo {
+ "ABGR1555",
+ "AB15",
+ "",
+ PixelColorType::RGB,
+ { 1, 1 },
+ { { 2, 1, 1, 1 } },
+ }
+ }
+ },
+ {
PixelFormat::RGBA4444, {
PixelFormatInfo {
"RGBA4444",
@@ -130,6 +166,18 @@ static map<PixelFormat, PixelFormatInfo> format_info_array = {
}
},
{
+ PixelFormat::ABGR4444, {
+ PixelFormatInfo {
+ "ABGR4444",
+ "AB12",
+ "",
+ PixelColorType::RGB,
+ { 1, 1 },
+ { { 2, 1, 1, 1 } },
+ }
+ }
+ },
+ {
PixelFormat::RGB888, {
PixelFormatInfo {
"RGB888",