From 1b0bd492c2c1262215a242bdf83403df87d97c64 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 2 Sep 2021 01:42:10 +0300 Subject: libcamera: formats: Support V4L2 non-contiguous formats V4L2 describes multi-planar formats with different 4CCs depending on whether or not the planes are stored contiguously in memory. Support this when translating between PixelFormat and V4L2PixelFormat. Signed-off-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Reviewed-by: Jean-Michel Hautbois --- include/libcamera/internal/formats.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h index b2869c93..5ebc68f9 100644 --- a/include/libcamera/internal/formats.h +++ b/include/libcamera/internal/formats.h @@ -54,7 +54,10 @@ public: /* \todo Add support for non-contiguous memory planes */ const char *name; PixelFormat format; - V4L2PixelFormat v4l2Format; + struct { + V4L2PixelFormat single; + V4L2PixelFormat multi; + } v4l2Formats; unsigned int bitsPerPixel; enum ColourEncoding colourEncoding; bool packed; -- cgit v1.2.1