libcamera: formats: Add YVU422 pixel format

The YVU422 pixel format is defined in both DRM and V4L2. libcamera
already supports YUV422, add support for the opposite chroma order.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2022-05-02 05:21:53 +03:00
parent dfcf638a0a
commit 111f9f5af2
3 changed files with 17 additions and 0 deletions
+13
View File
@@ -482,6 +482,19 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 2,
.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},
} },
{ formats::YVU422, {
.name = "YVU422",
.format = formats::YVU422,
.v4l2Formats = {
.single = V4L2PixelFormat(),
.multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU422M),
},
.bitsPerPixel = 16,
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
.packed = false,
.pixelsPerGroup = 2,
.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},
} },
/* Greyscale formats. */
{ formats::R8, {