Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame^] | 1 | .. -*- coding: utf-8; mode: rst -*- |
| 2 | |
| 3 | ****************************** |
| 4 | Multi-planar format structures |
| 5 | ****************************** |
| 6 | |
| 7 | The :c:type:`struct v4l2_plane_pix_format` structures define size |
| 8 | and layout for each of the planes in a multi-planar format. The |
| 9 | :c:type:`struct v4l2_pix_format_mplane` structure contains |
| 10 | information common to all planes (such as image width and height) and an |
| 11 | array of :c:type:`struct v4l2_plane_pix_format` structures, |
| 12 | describing all planes of that format. |
| 13 | |
| 14 | |
| 15 | .. _v4l2-plane-pix-format: |
| 16 | |
| 17 | .. flat-table:: struct v4l2_plane_pix_format |
| 18 | :header-rows: 0 |
| 19 | :stub-columns: 0 |
| 20 | :widths: 1 1 2 |
| 21 | |
| 22 | |
| 23 | - .. row 1 |
| 24 | |
| 25 | - __u32 |
| 26 | |
| 27 | - ``sizeimage`` |
| 28 | |
| 29 | - Maximum size in bytes required for image data in this plane. |
| 30 | |
| 31 | - .. row 2 |
| 32 | |
| 33 | - __u32 |
| 34 | |
| 35 | - ``bytesperline`` |
| 36 | |
| 37 | - Distance in bytes between the leftmost pixels in two adjacent |
| 38 | lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. |
| 39 | |
| 40 | - .. row 3 |
| 41 | |
| 42 | - __u16 |
| 43 | |
| 44 | - ``reserved[6]`` |
| 45 | |
| 46 | - Reserved for future extensions. Should be zeroed by drivers and |
| 47 | applications. |
| 48 | |
| 49 | |
| 50 | |
| 51 | .. _v4l2-pix-format-mplane: |
| 52 | |
| 53 | .. flat-table:: struct v4l2_pix_format_mplane |
| 54 | :header-rows: 0 |
| 55 | :stub-columns: 0 |
| 56 | :widths: 1 1 2 |
| 57 | |
| 58 | |
| 59 | - .. row 1 |
| 60 | |
| 61 | - __u32 |
| 62 | |
| 63 | - ``width`` |
| 64 | |
| 65 | - Image width in pixels. See struct |
| 66 | :ref:`v4l2_pix_format <v4l2-pix-format>`. |
| 67 | |
| 68 | - .. row 2 |
| 69 | |
| 70 | - __u32 |
| 71 | |
| 72 | - ``height`` |
| 73 | |
| 74 | - Image height in pixels. See struct |
| 75 | :ref:`v4l2_pix_format <v4l2-pix-format>`. |
| 76 | |
| 77 | - .. row 3 |
| 78 | |
| 79 | - __u32 |
| 80 | |
| 81 | - ``pixelformat`` |
| 82 | |
| 83 | - The pixel format. Both single- and multi-planar four character |
| 84 | codes can be used. |
| 85 | |
| 86 | - .. row 4 |
| 87 | |
| 88 | - enum :ref:`v4l2_field <v4l2-field>` |
| 89 | |
| 90 | - ``field`` |
| 91 | |
| 92 | - See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. |
| 93 | |
| 94 | - .. row 5 |
| 95 | |
| 96 | - enum :ref:`v4l2_colorspace <v4l2-colorspace>` |
| 97 | |
| 98 | - ``colorspace`` |
| 99 | |
| 100 | - See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. |
| 101 | |
| 102 | - .. row 6 |
| 103 | |
| 104 | - struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>` |
| 105 | |
| 106 | - ``plane_fmt[VIDEO_MAX_PLANES]`` |
| 107 | |
| 108 | - An array of structures describing format of each plane this pixel |
| 109 | format consists of. The number of valid entries in this array has |
| 110 | to be put in the ``num_planes`` field. |
| 111 | |
| 112 | - .. row 7 |
| 113 | |
| 114 | - __u8 |
| 115 | |
| 116 | - ``num_planes`` |
| 117 | |
| 118 | - Number of planes (i.e. separate memory buffers) for this format |
| 119 | and the number of valid entries in the ``plane_fmt`` array. |
| 120 | |
| 121 | - .. row 8 |
| 122 | |
| 123 | - __u8 |
| 124 | |
| 125 | - ``flags`` |
| 126 | |
| 127 | - Flags set by the application or driver, see :ref:`format-flags`. |
| 128 | |
| 129 | - .. row 9 |
| 130 | |
| 131 | - enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` |
| 132 | |
| 133 | - ``ycbcr_enc`` |
| 134 | |
| 135 | - This information supplements the ``colorspace`` and must be set by |
| 136 | the driver for capture streams and by the application for output |
| 137 | streams, see :ref:`colorspaces`. |
| 138 | |
| 139 | - .. row 10 |
| 140 | |
| 141 | - enum :ref:`v4l2_quantization <v4l2-quantization>` |
| 142 | |
| 143 | - ``quantization`` |
| 144 | |
| 145 | - This information supplements the ``colorspace`` and must be set by |
| 146 | the driver for capture streams and by the application for output |
| 147 | streams, see :ref:`colorspaces`. |
| 148 | |
| 149 | - .. row 11 |
| 150 | |
| 151 | - enum :ref:`v4l2_xfer_func <v4l2-xfer-func>` |
| 152 | |
| 153 | - ``xfer_func`` |
| 154 | |
| 155 | - This information supplements the ``colorspace`` and must be set by |
| 156 | the driver for capture streams and by the application for output |
| 157 | streams, see :ref:`colorspaces`. |
| 158 | |
| 159 | - .. row 12 |
| 160 | |
| 161 | - __u8 |
| 162 | |
| 163 | - ``reserved[7]`` |
| 164 | |
| 165 | - Reserved for future extensions. Should be zeroed by drivers and |
| 166 | applications. |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | .. ------------------------------------------------------------------------------ |
| 172 | .. This file was automatically converted from DocBook-XML with the dbxml |
| 173 | .. library (https://github.com/return42/sphkerneldoc). The origin XML comes |
| 174 | .. from the linux kernel, refer to: |
| 175 | .. |
| 176 | .. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook |
| 177 | .. ------------------------------------------------------------------------------ |