blob: 337e8188caf17485397a0f84444758ece7149174 [file] [log] [blame]
Markus Heiser5377d912016-06-30 15:18:56 +02001.. -*- coding: utf-8; mode: rst -*-
2
3******************************
4Multi-planar format structures
5******************************
6
Mauro Carvalho Chehabfc78c7c2016-09-08 05:43:01 -03007The struct :c:type:`v4l2_plane_pix_format` structures define size
Markus Heiser5377d912016-06-30 15:18:56 +02008and layout for each of the planes in a multi-planar format. The
Mauro Carvalho Chehabfc78c7c2016-09-08 05:43:01 -03009struct :c:type:`v4l2_pix_format_mplane` structure contains
Markus Heiser5377d912016-06-30 15:18:56 +020010information common to all planes (such as image width and height) and an
Mauro Carvalho Chehabfc78c7c2016-09-08 05:43:01 -030011array of struct :c:type:`v4l2_plane_pix_format` structures,
Markus Heiser5377d912016-06-30 15:18:56 +020012describing all planes of that format.
13
14
Mauro Carvalho Chehab5bd4bb72016-08-17 08:14:19 -030015.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
16
Mauro Carvalho Chehabe8be7e92016-08-29 17:37:59 -030017.. c:type:: v4l2_plane_pix_format
Mauro Carvalho Chehabfa92b04d2016-08-19 11:14:23 -030018
Markus Heiser5377d912016-06-30 15:18:56 +020019.. flat-table:: struct v4l2_plane_pix_format
20 :header-rows: 0
21 :stub-columns: 0
22 :widths: 1 1 2
23
Laurent Pinchartc2b66ca2016-09-05 08:44:34 -030024 * - __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 Heiser5377d912016-06-30 15:18:56 +020035
36
Mauro Carvalho Chehab43e41382016-08-19 11:48:14 -030037.. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
Markus Heiser5377d912016-06-30 15:18:56 +020038
Mauro Carvalho Chehabe8be7e92016-08-29 17:37:59 -030039.. c:type:: v4l2_pix_format_mplane
Markus Heiser5377d912016-06-30 15:18:56 +020040
41.. flat-table:: struct v4l2_pix_format_mplane
42 :header-rows: 0
43 :stub-columns: 0
44 :widths: 1 1 2
45
Laurent Pinchartc2b66ca2016-09-05 08:44:34 -030046 * - __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 Delgado5f3d32e2016-08-18 11:33:37 -030081 * - 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 Pinchartc2b66ca2016-09-05 08:44:34 -030086 * - 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.