diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-04-09 10:20:15 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-04-09 10:21:47 +0300 |
commit | 626edbe2fc845803ffdd25936e21202e4f123b63 (patch) | |
tree | ca438f77a5f1bdd2057c0769d4886ac9a534ca5b /kms++/inc | |
parent | 521a8cdc9f34cc4707731b0640e72615cc89d9cb (diff) |
add support for more pixel formats
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++/inc')
-rw-r--r-- | kms++/inc/kms++/pixelformats.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/kms++/inc/kms++/pixelformats.h b/kms++/inc/kms++/pixelformats.h index 1e273ef..15fee7f 100644 --- a/kms++/inc/kms++/pixelformats.h +++ b/kms++/inc/kms++/pixelformats.h @@ -24,8 +24,13 @@ enum class PixelFormat : uint32_t XRGB8888 = MakeFourCC("XR24"), XBGR8888 = MakeFourCC("XB24"), + RGBX8888 = MakeFourCC("RX24"), + BGRX8888 = MakeFourCC("BX24"), + ARGB8888 = MakeFourCC("AR24"), ABGR8888 = MakeFourCC("AB24"), + RGBA8888 = MakeFourCC("RA24"), + BGRA8888 = MakeFourCC("BA24"), RGB888 = MakeFourCC("RG24"), BGR888 = MakeFourCC("BG24"), @@ -35,6 +40,16 @@ enum class PixelFormat : uint32_t ARGB4444 = MakeFourCC("AR12"), ARGB1555 = MakeFourCC("AR15"), + + XRGB2101010 = MakeFourCC("XR30"), + XBGR2101010 = MakeFourCC("XB30"), + RGBX1010102 = MakeFourCC("RX30"), + BGRX1010102 = MakeFourCC("BX30"), + + ARGB2101010 = MakeFourCC("AR30"), + ABGR2101010 = MakeFourCC("AB30"), + RGBA1010102 = MakeFourCC("RA30"), + BGRA1010102 = MakeFourCC("BA30"), }; static inline PixelFormat FourCCToPixelFormat(const std::string& fourcc) @@ -52,6 +67,12 @@ static inline std::string PixelFormatToFourCC(PixelFormat f) return std::string(buf); } +enum class PixelColorType +{ + RGB, + YUV, +}; + struct PixelFormatPlaneInfo { uint8_t bitspp; @@ -61,6 +82,7 @@ struct PixelFormatPlaneInfo struct PixelFormatInfo { + PixelColorType type; uint8_t num_planes; struct PixelFormatPlaneInfo planes[4]; }; |