From 3788242e4fdc57b1421b4721120477ebb2298e52 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Wed, 10 Aug 2016 23:16:39 +0300 Subject: Add BGR888 (BG24) and BGR565 (BG16) pixelformats. Note colorbar does not support 24 bit modes (RGB888 or BGR888) yet. --- kms++/inc/kms++/pixelformats.h | 2 ++ kms++/src/pixelformats.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'kms++') diff --git a/kms++/inc/kms++/pixelformats.h b/kms++/inc/kms++/pixelformats.h index 8ecfcb3..6392de1 100644 --- a/kms++/inc/kms++/pixelformats.h +++ b/kms++/inc/kms++/pixelformats.h @@ -28,8 +28,10 @@ enum class PixelFormat : uint32_t ABGR8888 = MakeFourCC("AB24"), RGB888 = MakeFourCC("RG24"), + BGR888 = MakeFourCC("BG24"), RGB565 = MakeFourCC("RG16"), + BGR565 = MakeFourCC("BG16"), }; static inline PixelFormat FourCCToPixelFormat(const std::string& fourcc) diff --git a/kms++/src/pixelformats.cpp b/kms++/src/pixelformats.cpp index ee2356d..84ea924 100644 --- a/kms++/src/pixelformats.cpp +++ b/kms++/src/pixelformats.cpp @@ -17,8 +17,10 @@ static const map format_info_array = { { PixelFormat::NV21, { 2, { { 8, 1, 1, }, { 8, 2, 2 } }, } }, /* RGB16 */ { PixelFormat::RGB565, { 1, { { 16, 1, 1 } }, } }, + { PixelFormat::BGR565, { 1, { { 16, 1, 1 } }, } }, /* RGB24 */ { PixelFormat::RGB888, { 1, { { 24, 1, 1 } }, } }, + { PixelFormat::BGR888, { 1, { { 24, 1, 1 } }, } }, /* RGB32 */ { PixelFormat::XRGB8888, { 1, { { 32, 1, 1 } }, } }, { PixelFormat::XBGR8888, { 1, { { 32, 1, 1 } }, } }, -- cgit v1.2.3