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 | |
Mauro Carvalho Chehab | fc78c7c | 2016-09-08 05:43:01 -0300 | [diff] [blame] | 7 | The struct :c:type:`v4l2_plane_pix_format` structures define size |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 8 | and layout for each of the planes in a multi-planar format. The |
Mauro Carvalho Chehab | fc78c7c | 2016-09-08 05:43:01 -0300 | [diff] [blame] | 9 | struct :c:type:`v4l2_pix_format_mplane` structure contains |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 10 | information common to all planes (such as image width and height) and an |
Mauro Carvalho Chehab | fc78c7c | 2016-09-08 05:43:01 -0300 | [diff] [blame] | 11 | array of struct :c:type:`v4l2_plane_pix_format` structures, |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 12 | describing all planes of that format. |
| 13 | |
| 14 | |
Mauro Carvalho Chehab | 5bd4bb7 | 2016-08-17 08:14:19 -0300 | [diff] [blame] | 15 | .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| |
| 16 | |
Mauro Carvalho Chehab | e8be7e9 | 2016-08-29 17:37:59 -0300 | [diff] [blame] | 17 | .. c:type:: v4l2_plane_pix_format |
Mauro Carvalho Chehab | fa92b04d | 2016-08-19 11:14:23 -0300 | [diff] [blame] | 18 | |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 19 | .. flat-table:: struct v4l2_plane_pix_format |
| 20 | :header-rows: 0 |
| 21 | :stub-columns: 0 |
| 22 | :widths: 1 1 2 |
| 23 | |
Laurent Pinchart | c2b66ca | 2016-09-05 08:44:34 -0300 | [diff] [blame] | 24 | * - __u32 |
| 25 | - ``sizeimage`` |
| 26 | - Maximum size in bytes required for image data in this plane. |
| 27 | * - __u32 |
| 28 | - ``bytesperline`` |
| 29 | - Distance in bytes between the leftmost pixels in two adjacent |
| 30 | lines. See struct :c:type:`v4l2_pix_format`. |
| 31 | * - __u16 |
| 32 | - ``reserved[6]`` |
| 33 | - Reserved for future extensions. Should be zeroed by drivers and |
| 34 | applications. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 35 | |
| 36 | |
Mauro Carvalho Chehab | 43e4138 | 2016-08-19 11:48:14 -0300 | [diff] [blame] | 37 | .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}| |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 38 | |
Mauro Carvalho Chehab | e8be7e9 | 2016-08-29 17:37:59 -0300 | [diff] [blame] | 39 | .. c:type:: v4l2_pix_format_mplane |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 40 | |
| 41 | .. flat-table:: struct v4l2_pix_format_mplane |
| 42 | :header-rows: 0 |
| 43 | :stub-columns: 0 |
| 44 | :widths: 1 1 2 |
| 45 | |
Laurent Pinchart | c2b66ca | 2016-09-05 08:44:34 -0300 | [diff] [blame] | 46 | * - __u32 |
| 47 | - ``width`` |
| 48 | - Image width in pixels. See struct |
| 49 | :c:type:`v4l2_pix_format`. |
| 50 | * - __u32 |
| 51 | - ``height`` |
| 52 | - Image height in pixels. See struct |
| 53 | :c:type:`v4l2_pix_format`. |
| 54 | * - __u32 |
| 55 | - ``pixelformat`` |
| 56 | - The pixel format. Both single- and multi-planar four character |
| 57 | codes can be used. |
| 58 | * - enum :c:type:`v4l2_field` |
| 59 | - ``field`` |
| 60 | - See struct :c:type:`v4l2_pix_format`. |
| 61 | * - enum :c:type:`v4l2_colorspace` |
| 62 | - ``colorspace`` |
| 63 | - See struct :c:type:`v4l2_pix_format`. |
| 64 | * - struct :c:type:`v4l2_plane_pix_format` |
| 65 | - ``plane_fmt[VIDEO_MAX_PLANES]`` |
| 66 | - An array of structures describing format of each plane this pixel |
| 67 | format consists of. The number of valid entries in this array has |
| 68 | to be put in the ``num_planes`` field. |
| 69 | * - __u8 |
| 70 | - ``num_planes`` |
| 71 | - Number of planes (i.e. separate memory buffers) for this format |
| 72 | and the number of valid entries in the ``plane_fmt`` array. |
| 73 | * - __u8 |
| 74 | - ``flags`` |
| 75 | - Flags set by the application or driver, see :ref:`format-flags`. |
| 76 | * - enum :c:type:`v4l2_ycbcr_encoding` |
| 77 | - ``ycbcr_enc`` |
| 78 | - This information supplements the ``colorspace`` and must be set by |
| 79 | the driver for capture streams and by the application for output |
| 80 | streams, see :ref:`colorspaces`. |
Ricardo Ribalda Delgado | 5f3d32e | 2016-08-18 11:33:37 -0300 | [diff] [blame^] | 81 | * - enum :c:type:`v4l2_hsv_encoding` |
| 82 | - ``hsv_enc`` |
| 83 | - This information supplements the ``colorspace`` and must be set by |
| 84 | the driver for capture streams and by the application for output |
| 85 | streams, see :ref:`colorspaces`. |
Laurent Pinchart | c2b66ca | 2016-09-05 08:44:34 -0300 | [diff] [blame] | 86 | * - enum :c:type:`v4l2_quantization` |
| 87 | - ``quantization`` |
| 88 | - This information supplements the ``colorspace`` and must be set by |
| 89 | the driver for capture streams and by the application for output |
| 90 | streams, see :ref:`colorspaces`. |
| 91 | * - enum :c:type:`v4l2_xfer_func` |
| 92 | - ``xfer_func`` |
| 93 | - This information supplements the ``colorspace`` and must be set by |
| 94 | the driver for capture streams and by the application for output |
| 95 | streams, see :ref:`colorspaces`. |
| 96 | * - __u8 |
| 97 | - ``reserved[7]`` |
| 98 | - Reserved for future extensions. Should be zeroed by drivers and |
| 99 | applications. |