summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-23 11:19:38 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-08-06 15:43:59 +0100
commit38ca814e9723562da7b3a63f89662f801ca45614 (patch)
tree1693b25e31479240b71ea9e8253398942a7b08a8 /include
parent000257a707fed083c6b9ed95d9497ba709cf6f30 (diff)
libcamera: formats: add numPlanes helper
Determine the number of planes used by a format by counting the number of PixelFormatPlaneInfo entries with a valid entry. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/formats.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h
index b8e47491..51a8a6b8 100644
--- a/include/libcamera/internal/formats.h
+++ b/include/libcamera/internal/formats.h
@@ -46,6 +46,8 @@ public:
unsigned int frameSize(const Size &size,
const std::array<unsigned int, 3> &strides) const;
+ unsigned int numPlanes() const;
+
/* \todo Add support for non-contiguous memory planes */
const char *name;
PixelFormat format;