summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_pixelformat.cpp
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2020-06-17 17:44:42 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-06-23 01:39:28 +0300
commitc3ed943c992a09c5fc19e25328dca7aa52691c36 (patch)
tree83b9846e4f2886d38c7d57b3662f02b5c83ff593 /src/libcamera/v4l2_pixelformat.cpp
parent405ba5fd4ab7a53e57eeafe4a458e6db3edf042b (diff)
libcamera: Add support for planar YUV422 and YUV420 formats
These formats can be helpful when downstream applications or libraries support them natively (avoiding a costly conversion). Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Tested-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/v4l2_pixelformat.cpp')
-rw-r--r--src/libcamera/v4l2_pixelformat.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 741f6c26..6745d17d 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -63,6 +63,8 @@ const std::map<V4L2PixelFormat, PixelFormat> vpf2pf{
{ V4L2PixelFormat(V4L2_PIX_FMT_NV61), formats::NV61 },
{ V4L2PixelFormat(V4L2_PIX_FMT_NV12), formats::NV12 },
{ V4L2PixelFormat(V4L2_PIX_FMT_NV21), formats::NV21 },
+ { V4L2PixelFormat(V4L2_PIX_FMT_YUV420), formats::YUV420 },
+ { V4L2PixelFormat(V4L2_PIX_FMT_YUV422P), formats::YUV422 },
/* Greyscale formats. */
{ V4L2PixelFormat(V4L2_PIX_FMT_GREY), formats::R8 },