Multi-planar format structures

The v4l2_plane_pix_format structures define size and layout for each of the planes in a multi-planar format. The v4l2_pix_format_mplane structure contains information common to all planes (such as image width and height) and an array of v4l2_plane_pix_format structures, describing all planes of that format.

Table 2.2. struct v4l2_plane_pix_format

__u32sizeimageMaximum size in bytes required for image data in this plane.
__u32bytesperlineDistance in bytes between the leftmost pixels in two adjacent lines. See struct v4l2_pix_format.
__u16reserved[6]Reserved for future extensions. Should be zeroed by the application.

Table 2.3. struct v4l2_pix_format_mplane

__u32widthImage width in pixels. See struct v4l2_pix_format.
__u32heightImage height in pixels. See struct v4l2_pix_format.
__u32pixelformatThe pixel format. Both single- and multi-planar four character codes can be used.
enum v4l2_fieldfieldSee struct v4l2_pix_format.
enum v4l2_colorspacecolorspaceSee struct v4l2_pix_format.
struct v4l2_plane_pix_formatplane_fmt[VIDEO_MAX_PLANES]An array of structures describing format of each plane this pixel format consists of. The number of valid entries in this array has to be put in the num_planes field.
__u8num_planesNumber of planes (i.e. separate memory buffers) for this format and the number of valid entries in the plane_fmt array.
__u8flagsFlags set by the application or driver, see Table 2.21, “Format Flags”.
enum v4l2_ycbcr_encodingycbcr_encThis information supplements the colorspace and must be set by the driver for capture streams and by the application for output streams, see the section called “Colorspaces”.
enum v4l2_quantizationquantizationThis information supplements the colorspace and must be set by the driver for capture streams and by the application for output streams, see the section called “Colorspaces”.
__u8reserved[8]Reserved for future extensions. Should be zeroed by the application.