2016-06-30 21:18:56 +08:00
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
|
|
|
******************************
|
|
|
|
Multi-planar format structures
|
|
|
|
******************************
|
|
|
|
|
2016-07-04 00:28:28 +08:00
|
|
|
The :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures define size
|
2016-06-30 21:18:56 +08:00
|
|
|
and layout for each of the planes in a multi-planar format. The
|
2016-07-04 00:28:28 +08:00
|
|
|
:ref:`struct v4l2_pix_format_mplane <v4l2-pix-format-mplane>` structure contains
|
2016-06-30 21:18:56 +08:00
|
|
|
information common to all planes (such as image width and height) and an
|
2016-07-04 00:28:28 +08:00
|
|
|
array of :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures,
|
2016-06-30 21:18:56 +08:00
|
|
|
describing all planes of that format.
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 19:14:19 +08:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 22:14:23 +08:00
|
|
|
.. _v4l2-plane-pix-format:
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: struct v4l2_plane_pix_format
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``sizeimage``
|
|
|
|
|
|
|
|
- Maximum size in bytes required for image data in this plane.
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``bytesperline``
|
|
|
|
|
|
|
|
- Distance in bytes between the leftmost pixels in two adjacent
|
2016-07-05 03:25:48 +08:00
|
|
|
lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
- __u16
|
|
|
|
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``reserved[6]``
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- Reserved for future extensions. Should be zeroed by drivers and
|
2016-07-05 03:25:48 +08:00
|
|
|
applications.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-08-19 22:48:14 +08:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
.. _v4l2-pix-format-mplane:
|
|
|
|
|
|
|
|
.. flat-table:: struct v4l2_pix_format_mplane
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``width``
|
|
|
|
|
|
|
|
- Image width in pixels. See struct
|
2016-07-05 03:25:48 +08:00
|
|
|
:ref:`v4l2_pix_format <v4l2-pix-format>`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``height``
|
|
|
|
|
|
|
|
- Image height in pixels. See struct
|
2016-07-05 03:25:48 +08:00
|
|
|
:ref:`v4l2_pix_format <v4l2-pix-format>`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``pixelformat``
|
|
|
|
|
|
|
|
- The pixel format. Both single- and multi-planar four character
|
2016-07-05 03:25:48 +08:00
|
|
|
codes can be used.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
|
|
|
- enum :ref:`v4l2_field <v4l2-field>`
|
|
|
|
|
|
|
|
- ``field``
|
|
|
|
|
|
|
|
- See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
|
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
|
|
|
- enum :ref:`v4l2_colorspace <v4l2-colorspace>`
|
|
|
|
|
|
|
|
- ``colorspace``
|
|
|
|
|
|
|
|
- See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
|
|
|
|
|
|
|
|
- .. row 6
|
|
|
|
|
|
|
|
- struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>`
|
|
|
|
|
|
|
|
- ``plane_fmt[VIDEO_MAX_PLANES]``
|
|
|
|
|
|
|
|
- An array of structures describing format of each plane this pixel
|
2016-07-05 03:25:48 +08:00
|
|
|
format consists of. The number of valid entries in this array has
|
|
|
|
to be put in the ``num_planes`` field.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 7
|
|
|
|
|
|
|
|
- __u8
|
|
|
|
|
|
|
|
- ``num_planes``
|
|
|
|
|
|
|
|
- Number of planes (i.e. separate memory buffers) for this format
|
2016-07-05 03:25:48 +08:00
|
|
|
and the number of valid entries in the ``plane_fmt`` array.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 8
|
|
|
|
|
|
|
|
- __u8
|
|
|
|
|
|
|
|
- ``flags``
|
|
|
|
|
|
|
|
- Flags set by the application or driver, see :ref:`format-flags`.
|
|
|
|
|
|
|
|
- .. row 9
|
|
|
|
|
|
|
|
- enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>`
|
|
|
|
|
|
|
|
- ``ycbcr_enc``
|
|
|
|
|
|
|
|
- This information supplements the ``colorspace`` and must be set by
|
2016-07-05 03:25:48 +08:00
|
|
|
the driver for capture streams and by the application for output
|
|
|
|
streams, see :ref:`colorspaces`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 10
|
|
|
|
|
|
|
|
- enum :ref:`v4l2_quantization <v4l2-quantization>`
|
|
|
|
|
|
|
|
- ``quantization``
|
|
|
|
|
|
|
|
- This information supplements the ``colorspace`` and must be set by
|
2016-07-05 03:25:48 +08:00
|
|
|
the driver for capture streams and by the application for output
|
|
|
|
streams, see :ref:`colorspaces`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 11
|
|
|
|
|
|
|
|
- enum :ref:`v4l2_xfer_func <v4l2-xfer-func>`
|
|
|
|
|
|
|
|
- ``xfer_func``
|
|
|
|
|
|
|
|
- This information supplements the ``colorspace`` and must be set by
|
2016-07-05 03:25:48 +08:00
|
|
|
the driver for capture streams and by the application for output
|
|
|
|
streams, see :ref:`colorspaces`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- .. row 12
|
|
|
|
|
|
|
|
- __u8
|
|
|
|
|
2016-07-13 19:43:30 +08:00
|
|
|
- ``reserved[7]``
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
- Reserved for future extensions. Should be zeroed by drivers and
|
2016-07-05 03:25:48 +08:00
|
|
|
applications.
|