libcamera: Add support for XRGB8888 and XBGR8888

Add support for XRGB8888 and XBGR8888 formats.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund 2020-09-30 16:10:07 +02:00
parent fe54a16294
commit 4fd6bb3320
2 changed files with 22 additions and 0 deletions

View file

@ -175,6 +175,26 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 1,
.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::XRGB8888, {
.name = "XRGB8888",
.format = formats::XRGB8888,
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XBGR32),
.bitsPerPixel = 32,
.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
.packed = false,
.pixelsPerGroup = 1,
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::XBGR8888, {
.name = "XBGR8888",
.format = formats::XBGR8888,
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XRGB32),
.bitsPerPixel = 32,
.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
.packed = false,
.pixelsPerGroup = 1,
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::ABGR8888, {
.name = "ABGR8888",
.format = formats::ABGR8888,