From 040a6dcfbccaf1005da2c571769b1f89df1f07cf Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 31 Jan 2021 20:40:00 +0200 Subject: libcamera: formats: Add RGB565_BE format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new format corresponds to the V4L2 V4L2_PIX_FMT_RGB565X format, and is the big-endian version of the DRM_FORMAT_RGB565 format. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/formats.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libcamera/formats.cpp') diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index cc6e5790..55822f4c 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -155,6 +155,16 @@ const std::map pixelFormatInfo{ .pixelsPerGroup = 1, .planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }}, } }, + { formats::RGB565_BE, { + .name = "RGB565_BE", + .format = formats::RGB565_BE, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGB565X), + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .packed = false, + .pixelsPerGroup = 1, + .planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, { formats::BGR888, { .name = "BGR888", .format = formats::BGR888, -- cgit v1.2.1