summaryrefslogtreecommitdiff
path: root/src/libcamera/formats.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-01-31 20:40:00 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-02-01 22:34:13 +0200
commit040a6dcfbccaf1005da2c571769b1f89df1f07cf (patch)
treee2871cb95083f6831f94c6f4b00384ebe17aa5af /src/libcamera/formats.cpp
parent7c496f1c54dd5846925183471b30fec227624a65 (diff)
libcamera: formats: Add RGB565_BE format
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/formats.cpp')
-rw-r--r--src/libcamera/formats.cpp10
1 files changed, 10 insertions, 0 deletions
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<PixelFormat, PixelFormatInfo> 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,