| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
****************************** |
| 5 |
Multi-planar format structures |
| 6 |
****************************** |
| 7 |
|
| 8 |
The struct :c:type:`v4l2_plane_pix_format` structures define size |
| 9 |
and layout for each of the planes in a multi-planar format. The |
| 10 |
struct :c:type:`v4l2_pix_format_mplane` structure contains |
| 11 |
information common to all planes (such as image width and height) and an |
| 12 |
array of struct :c:type:`v4l2_plane_pix_format` structures, |
| 13 |
describing all planes of that format. |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
.. tabularcolumns:: |p{1.4cm}|p{4.0cm}|p{11.9cm}| |
| 18 |
|
| 19 |
.. c:type:: v4l2_plane_pix_format |
| 20 |
|
| 21 |
.. flat-table:: struct v4l2_plane_pix_format |
| 22 |
:header-rows: 0 |
| 23 |
:stub-columns: 0 |
| 24 |
:widths: 1 1 2 |
| 25 |
|
| 26 |
* - __u32 |
| 27 |
- ``sizeimage`` |
| 28 |
- Maximum size in bytes required for image data in this plane, |
| 29 |
set by the driver. When the image consists of variable length |
| 30 |
compressed data this is the number of bytes required by the |
| 31 |
codec to support the worst-case compression scenario. |
| 32 |
|
| 33 |
The driver will set the value for uncompressed images. |
| 34 |
|
| 35 |
Clients are allowed to set the sizeimage field for variable length |
| 36 |
compressed data flagged with ``V4L2_FMT_FLAG_COMPRESSED`` at |
| 37 |
:ref:`VIDIOC_ENUM_FMT`, but the driver may ignore it and set the |
| 38 |
value itself, or it may modify the provided value based on |
| 39 |
alignment requirements or minimum/maximum size requirements. |
| 40 |
If the client wants to leave this to the driver, then it should |
| 41 |
set sizeimage to 0. |
| 42 |
* - __u32 |
| 43 |
- ``bytesperline`` |
| 44 |
- Distance in bytes between the leftmost pixels in two adjacent |
| 45 |
lines. See struct :c:type:`v4l2_pix_format`. |
| 46 |
* - __u16 |
| 47 |
- ``reserved[6]`` |
| 48 |
- Reserved for future extensions. Should be zeroed by drivers and |
| 49 |
applications. |
| 50 |
|
| 51 |
|
| 52 |
.. raw:: latex |
| 53 |
|
| 54 |
\small |
| 55 |
|
| 56 |
.. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.3cm}| |
| 57 |
|
| 58 |
.. c:type:: v4l2_pix_format_mplane |
| 59 |
|
| 60 |
.. flat-table:: struct v4l2_pix_format_mplane |
| 61 |
:header-rows: 0 |
| 62 |
:stub-columns: 0 |
| 63 |
:widths: 1 1 2 |
| 64 |
|
| 65 |
* - __u32 |
| 66 |
- ``width`` |
| 67 |
- Image width in pixels. See struct |
| 68 |
:c:type:`v4l2_pix_format`. |
| 69 |
* - __u32 |
| 70 |
- ``height`` |
| 71 |
- Image height in pixels. See struct |
| 72 |
:c:type:`v4l2_pix_format`. |
| 73 |
* - __u32 |
| 74 |
- ``pixelformat`` |
| 75 |
- The pixel format. Both single- and multi-planar four character |
| 76 |
codes can be used. |
| 77 |
* - __u32 |
| 78 |
- ``field`` |
| 79 |
- Field order, from enum :c:type:`v4l2_field`. |
| 80 |
See struct :c:type:`v4l2_pix_format`. |
| 81 |
* - __u32 |
| 82 |
- ``colorspace`` |
| 83 |
- Colorspace encoding, from enum :c:type:`v4l2_colorspace`. |
| 84 |
See struct :c:type:`v4l2_pix_format`. |
| 85 |
* - struct :c:type:`v4l2_plane_pix_format` |
| 86 |
- ``plane_fmt[VIDEO_MAX_PLANES]`` |
| 87 |
- An array of structures describing format of each plane this pixel |
| 88 |
format consists of. The number of valid entries in this array has |
| 89 |
to be put in the ``num_planes`` field. |
| 90 |
* - __u8 |
| 91 |
- ``num_planes`` |
| 92 |
- Number of planes (i.e. separate memory buffers) for this format |
| 93 |
and the number of valid entries in the ``plane_fmt`` array. |
| 94 |
* - __u8 |
| 95 |
- ``flags`` |
| 96 |
- Flags set by the application or driver, see :ref:`format-flags`. |
| 97 |
* - union { |
| 98 |
- (anonymous) |
| 99 |
* - __u8 |
| 100 |
- ``ycbcr_enc`` |
| 101 |
- Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`. |
| 102 |
See struct :c:type:`v4l2_pix_format`. |
| 103 |
* - __u8 |
| 104 |
- ``hsv_enc`` |
| 105 |
- HSV encoding, from enum :c:type:`v4l2_hsv_encoding`. |
| 106 |
See struct :c:type:`v4l2_pix_format`. |
| 107 |
* - } |
| 108 |
- |
| 109 |
* - __u8 |
| 110 |
- ``quantization`` |
| 111 |
- Quantization range, from enum :c:type:`v4l2_quantization`. |
| 112 |
See struct :c:type:`v4l2_pix_format`. |
| 113 |
* - __u8 |
| 114 |
- ``xfer_func`` |
| 115 |
- Transfer function, from enum :c:type:`v4l2_xfer_func`. |
| 116 |
See struct :c:type:`v4l2_pix_format`. |
| 117 |
* - __u8 |
| 118 |
- ``reserved[7]`` |
| 119 |
- Reserved for future extensions. Should be zeroed by drivers and |
| 120 |
applications. |
| 121 |
|
| 122 |
.. raw:: latex |
| 123 |
|
| 124 |
\normalsize |