summaryrefslogtreecommitdiff
path: root/src/libcamera/formats.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-02 05:21:53 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-03 17:56:44 +0300
commit3b9fe4ae996b532e6a3bfdcbd26b77514072e3f8 (patch)
treed582b55fa5a069980ab91ce7fdc6465d39d0eafc /src/libcamera/formats.cpp
parent111f9f5af2d5c9bae8a93d52153f98242674458f (diff)
libcamera: formats: Add YUV444 and YVU444 pixel formats
Extend planar YUV format support with 4:4:4 formats. Those formats are used by the i.MX8 ISI driver that will be supported by the simple pipeline handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/formats.cpp')
-rw-r--r--src/libcamera/formats.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index edfc852c..283ecb3d 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -495,6 +495,32 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 2,
.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},
} },
+ { formats::YUV444, {
+ .name = "YUV444",
+ .format = formats::YUV444,
+ .v4l2Formats = {
+ .single = V4L2PixelFormat(),
+ .multi = V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),
+ },
+ .bitsPerPixel = 24,
+ .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .packed = false,
+ .pixelsPerGroup = 1,
+ .planes = {{ { 1, 1 }, { 1, 1 }, { 1, 1 } }},
+ } },
+ { formats::YVU444, {
+ .name = "YVU444",
+ .format = formats::YVU444,
+ .v4l2Formats = {
+ .single = V4L2PixelFormat(),
+ .multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU444M),
+ },
+ .bitsPerPixel = 24,
+ .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .packed = false,
+ .pixelsPerGroup = 1,
+ .planes = {{ { 1, 1 }, { 1, 1 }, { 1, 1 } }},
+ } },
/* Greyscale formats. */
{ formats::R8, {