From 7855dc922f789a30930f777b062d630d38391ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sat, 18 Jul 2020 16:13:21 +0200 Subject: libcamera: Add support for planar YVU420 format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for planar YVU420. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- 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 3f895a7c..8f9bdafe 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -407,6 +407,16 @@ const std::map pixelFormatInfo{ .pixelsPerGroup = 2, .planes = {{ { 2, 1 }, { 1, 2 }, { 1, 2 } }}, } }, + { formats::YVU420, { + .name = "YVU420", + .format = PixelFormat(formats::YVU420), + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YVU420), + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .packed = false, + .pixelsPerGroup = 2, + .planes = {{ { 2, 1 }, { 1, 2 }, { 1, 2 } }}, + } }, { formats::YUV422, { .name = "YUV422", .format = PixelFormat(formats::YUV422), -- cgit v1.2.1