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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user