summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/formats.cpp10
-rw-r--r--src/libcamera/formats.yaml3
-rw-r--r--src/libcamera/v4l2_pixelformat.cpp1
3 files changed, 14 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,
diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml
index 6a2fb721..43b5877e 100644
--- a/src/libcamera/formats.yaml
+++ b/src/libcamera/formats.yaml
@@ -10,6 +10,9 @@ formats:
- RGB565:
fourcc: DRM_FORMAT_RGB565
+ - RGB565_BE:
+ fourcc: DRM_FORMAT_RGB565
+ big_endian: true
- RGB888:
fourcc: DRM_FORMAT_RGB888
diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 03ab085c..166d93cf 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -47,6 +47,7 @@ namespace {
const std::map<V4L2PixelFormat, PixelFormat> vpf2pf{
/* RGB formats. */
{ V4L2PixelFormat(V4L2_PIX_FMT_RGB565), formats::RGB565 },
+ { V4L2PixelFormat(V4L2_PIX_FMT_RGB565X), formats::RGB565_BE },
{ V4L2PixelFormat(V4L2_PIX_FMT_RGB24), formats::BGR888 },
{ V4L2PixelFormat(V4L2_PIX_FMT_BGR24), formats::RGB888 },
{ V4L2PixelFormat(V4L2_PIX_FMT_XBGR32), formats::XRGB8888 },