summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-02 01:42:10 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-07 19:17:57 +0300
commit1b0bd492c2c1262215a242bdf83403df87d97c64 (patch)
tree355d72e1165a35bebac284d503bc75d3721fdf8f /include
parent94cbaa381aa8b1b3f34ad8bf14989456ba79a9af (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/formats.h5
1 files changed, 4 insertions, 1 deletions
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;