2020-08-26 09:03:09 +02:00
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2018-08-30 10:15:26 -04:00
2016-07-01 13:42:29 -03:00
.. _VIDIOC_G_DV_TIMINGS:
2016-06-30 15:18:56 +02:00
***** ***** ***** ***** ***** ***** ***** ***** ***** *
ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS
***** ***** ***** ***** ***** ***** ***** ***** ***** *
2016-07-05 15:14:35 -03:00
Name
2016-07-05 07:58:48 -03:00
====
2016-06-30 15:18:56 +02:00
2016-07-05 07:58:48 -03:00
VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_SUBDEV_S_DV_TIMINGS - Get or set DV timings for input or output
2016-06-30 15:18:56 +02:00
2016-07-05 15:14:35 -03:00
Synopsis
2016-06-30 15:18:56 +02:00
========
2016-08-19 16:53:38 -03:00
.. c:function :: int ioctl( int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp )
:name: VIDIOC_G_DV_TIMINGS
.. c:function :: int ioctl( int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp )
:name: VIDIOC_S_DV_TIMINGS
.. c:function :: int ioctl( int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp )
:name: VIDIOC_SUBDEV_G_DV_TIMINGS
.. c:function :: int ioctl( int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp )
:name: VIDIOC_SUBDEV_S_DV_TIMINGS
2016-06-30 15:18:56 +02:00
2016-07-05 07:58:48 -03:00
2016-07-05 15:14:35 -03:00
Arguments
2016-06-30 15:18:56 +02:00
=========
`` fd ``
File descriptor returned by :ref: `open() <func-open>` .
`` argp ``
2017-09-02 09:54:48 -04:00
Pointer to struct :c:type: `v4l2_dv_timings` .
2016-06-30 15:18:56 +02:00
2016-07-05 15:14:35 -03:00
Description
2016-06-30 15:18:56 +02:00
===========
To set DV timings for the input or output, applications use the
2016-07-01 14:33:56 -03:00
:ref: `VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get the current timings,
2016-07-03 10:02:29 -03:00
applications use the :ref: `VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. The detailed timing
2016-06-30 15:18:56 +02:00
information is filled in using the structure struct
2016-08-29 17:37:59 -03:00
:c:type: `v4l2_dv_timings` . These ioctls take a
pointer to the struct :c:type: `v4l2_dv_timings`
2016-06-30 15:18:56 +02:00
structure as argument. If the ioctl is not supported or the timing
2016-07-03 11:53:09 -03:00
values are not correct, the driver returns `` EINVAL `` error code.
2016-06-30 15:18:56 +02:00
2020-05-07 17:12:49 +02:00
Calling `` VIDIOC_SUBDEV_S_DV_TIMINGS `` on a subdev device node that has been
registered in read-only mode is not allowed. An error is returned and the errno
variable is set to `` -EPERM `` .
2016-06-30 15:18:56 +02:00
The `` linux/v4l2-dv-timings.h `` header can be used to get the timings of
the formats in the :ref: `cea861` and :ref: `vesadmt` standards. If
the current input or output does not support DV timings (e.g. if
2016-07-01 13:58:44 -03:00
:ref: `VIDIOC_ENUMINPUT` does not set the
2016-07-03 11:53:09 -03:00
`` V4L2_IN_CAP_DV_TIMINGS `` flag), then `` ENODATA `` error code is returned.
2016-06-30 15:18:56 +02:00
2016-07-05 15:14:35 -03:00
Return Value
2016-06-30 15:18:56 +02:00
============
On success 0 is returned, on error -1 and the `` errno `` variable is set
appropriately. The generic error codes are described at the
:ref: `Generic Error Codes <gen-errors>` chapter.
EINVAL
2016-07-01 14:33:56 -03:00
This ioctl is not supported, or the :ref: `VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>`
2016-06-30 15:18:56 +02:00
parameter was unsuitable.
ENODATA
Digital video timings are not supported for this input or output.
EBUSY
The device is busy and therefore can not change the timings.
2020-05-07 17:12:49 +02:00
EPERM
`` VIDIOC_SUBDEV_S_DV_TIMINGS `` has been called on a read-only subdevice.
2016-06-30 15:18:56 +02:00
[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 08:14:19 -03:00
.. tabularcolumns :: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
2016-08-29 17:37:59 -03:00
.. c:type :: v4l2_bt_timings
2016-08-19 11:14:23 -03:00
2016-06-30 15:18:56 +02:00
.. flat-table :: struct v4l2_bt_timings
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
* - __u32
- `` width ``
- Width of the active video in pixels.
* - __u32
- `` height ``
- Height of the active video frame in lines. So for interlaced
formats the height of the active video in each field is
`` height `` /2.
* - __u32
- `` interlaced ``
- Progressive (`` V4L2_DV_PROGRESSIVE `` ) or interlaced (`` V4L2_DV_INTERLACED `` ).
* - __u32
- `` polarities ``
- This is a bit mask that defines polarities of sync signals. bit 0
(`` V4L2_DV_VSYNC_POS_POL `` ) is for vertical sync polarity and bit
1 (`` V4L2_DV_HSYNC_POS_POL `` ) is for horizontal sync polarity. If
the bit is set (1) it is positive polarity and if is cleared (0),
it is negative polarity.
* - __u64
- `` pixelclock ``
- Pixel clock in Hz. Ex. 74.25MHz->74250000
* - __u32
- `` hfrontporch ``
- Horizontal front porch in pixels
* - __u32
- `` hsync ``
- Horizontal sync length in pixels
* - __u32
- `` hbackporch ``
- Horizontal back porch in pixels
* - __u32
- `` vfrontporch ``
- Vertical front porch in lines. For interlaced formats this refers
to the odd field (aka field 1).
* - __u32
- `` vsync ``
- Vertical sync length in lines. For interlaced formats this refers
to the odd field (aka field 1).
* - __u32
- `` vbackporch ``
- Vertical back porch in lines. For interlaced formats this refers
to the odd field (aka field 1).
* - __u32
- `` il_vfrontporch ``
- Vertical front porch in lines for the even field (aka field 2) of
interlaced field formats. Must be 0 for progressive formats.
* - __u32
- `` il_vsync ``
- Vertical sync length in lines for the even field (aka field 2) of
interlaced field formats. Must be 0 for progressive formats.
* - __u32
- `` il_vbackporch ``
- Vertical back porch in lines for the even field (aka field 2) of
interlaced field formats. Must be 0 for progressive formats.
* - __u32
- `` standards ``
- The video standard(s) this format belongs to. This will be filled
in by the driver. Applications must set this to 0. See
:ref: `dv-bt-standards` for a list of standards.
* - __u32
- `` flags ``
- Several flags giving more information about the format. See
:ref: `dv-bt-flags` for a description of the flags.
2017-02-10 06:19:14 -02:00
* - struct :c:type: `v4l2_fract`
- `` picture_aspect ``
- The picture aspect if the pixels are not square. Only valid if the
`` V4L2_DV_FL_HAS_PICTURE_ASPECT `` flag is set.
* - __u8
- `` cea861_vic ``
- The Video Identification Code according to the CEA-861 standard.
Only valid if the `` V4L2_DV_FL_HAS_CEA861_VIC `` flag is set.
* - __u8
- `` hdmi_vic ``
- The Video Identification Code according to the HDMI standard.
Only valid if the `` V4L2_DV_FL_HAS_HDMI_VIC `` flag is set.
* - __u8
- `` reserved[46] ``
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
- Reserved for future extensions. Drivers and applications must set
the array to zero.
2016-06-30 15:18:56 +02:00
[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 08:14:19 -03:00
.. tabularcolumns :: |p{3.5cm}|p{3.5cm}|p{7.0cm}|p{3.5cm}|
2016-08-29 17:37:59 -03:00
.. c:type :: v4l2_dv_timings
2016-08-19 11:14:23 -03:00
2016-06-30 15:18:56 +02:00
.. flat-table :: struct v4l2_dv_timings
:header-rows: 0
:stub-columns: 0
2020-02-10 11:42:38 +01:00
:widths: 1 1 2
2016-06-30 15:18:56 +02:00
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
* - __u32
- `` type ``
- Type of DV timings as listed in :ref: `dv-timing-types` .
2020-02-10 11:42:38 +01:00
* - union {
- (anonymous)
* - struct :c:type: `v4l2_bt_timings`
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
- `` bt ``
- Timings defined by BT.656/1120 specifications
2020-02-10 11:42:38 +01:00
* - __u32
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
- `` reserved ` ` \ [32]
-
2020-02-10 11:42:38 +01:00
* - }
-
2016-06-30 15:18:56 +02:00
2016-08-19 11:14:23 -03:00
.. tabularcolumns :: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
2016-06-30 15:18:56 +02:00
.. _dv-timing-types:
.. flat-table :: DV Timing types
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
* - Timing type
- value
- Description
* -
-
-
* - `` V4L2_DV_BT_656_1120 ``
- 0
- BT.656/1120 timings
2016-06-30 15:18:56 +02:00
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 05:28:26 -04:00
.. tabularcolumns :: |p{4.5cm}|p{12.8cm}|
2016-06-30 15:18:56 +02:00
.. _dv-bt-standards:
.. flat-table :: DV BT Timing standards
:header-rows: 0
:stub-columns: 0
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
* - Timing standard
- Description
* - `` V4L2_DV_BT_STD_CEA861 ``
- The timings follow the CEA-861 Digital TV Profile standard
* - `` V4L2_DV_BT_STD_DMT ``
- The timings follow the VESA Discrete Monitor Timings standard
* - `` V4L2_DV_BT_STD_CVT ``
- The timings follow the VESA Coordinated Video Timings standard
* - `` V4L2_DV_BT_STD_GTF ``
- The timings follow the VESA Generalized Timings Formula standard
* - `` V4L2_DV_BT_STD_SDI ``
- The timings follow the SDI Timings standard.
There are no horizontal syncs/porches at all in this format.
Total blanking timings must be set in hsync or vsync fields only.
2016-06-30 15:18:56 +02:00
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 05:28:26 -04:00
.. tabularcolumns :: |p{7.0cm}|p{10.5cm}|
2016-06-30 15:18:56 +02:00
.. _dv-bt-flags:
.. flat-table :: DV BT Timing flags
:header-rows: 0
:stub-columns: 0
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
* - Flag
- Description
* - `` V4L2_DV_FL_REDUCED_BLANKING ``
- CVT/GTF specific: the timings use reduced blanking (CVT) or the
'Secondary GTF' curve (GTF). In both cases the horizontal and/or
vertical blanking intervals are reduced, allowing a higher
resolution over the same bandwidth. This is a read-only flag,
applications must not set this.
* - `` V4L2_DV_FL_CAN_REDUCE_FPS ``
- CEA-861 specific: set for CEA-861 formats with a framerate that is
a multiple of six. These formats can be optionally played at 1 /
1.001 speed to be compatible with 60 Hz based standards such as
NTSC and PAL-M that use a framerate of 29.97 frames per second. If
the transmitter can't generate such frequencies, then the flag
will also be cleared. This is a read-only flag, applications must
not set this.
* - `` V4L2_DV_FL_REDUCED_FPS ``
2018-08-15 09:10:59 -04:00
- CEA-861 specific: only valid for video transmitters or video
receivers that have the `` V4L2_DV_FL_CAN_DETECT_REDUCED_FPS ``
set. This flag is cleared otherwise. It is also only valid for
formats with the `` V4L2_DV_FL_CAN_REDUCE_FPS `` flag set, for other
formats the flag will be cleared by the driver.
If the application sets this flag for a transmitter, then the
pixelclock used to set up the transmitter is divided by 1.001 to
make it compatible with NTSC framerates. If the transmitter can't
generate such frequencies, then the flag will be cleared.
If a video receiver detects that the format uses a reduced framerate,
then it will set this flag to signal this to the application.
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
* - `` V4L2_DV_FL_HALF_LINE ``
- Specific to interlaced formats: if set, then the vertical
2019-12-02 12:46:17 +01:00
frontporch of field 1 (aka the odd field) is really one half-line
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-05 08:44:34 -03:00
longer and the vertical backporch of field 2 (aka the even field)
is really one half-line shorter, so each field has exactly the
same number of half-lines. Whether half-lines can be detected or
used depends on the hardware.
* - `` V4L2_DV_FL_IS_CE_VIDEO ``
- If set, then this is a Consumer Electronics (CE) video format.
Such formats differ from other formats (commonly called IT
formats) in that if R'G'B' encoding is used then by default the
R'G'B' values use limited range (i.e. 16-235) as opposed to full
range (i.e. 0-255). All formats defined in CEA-861 except for the
640x480p59.94 format are CE formats.
* - `` V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE ``
- Some formats like SMPTE-125M have an interlaced signal with a odd
total height. For these formats, if this flag is set, the first
field has the extra line. Else, it is the second field.
2016-09-16 07:38:04 -03:00
* - `` V4L2_DV_FL_HAS_PICTURE_ASPECT ``
- If set, then the picture_aspect field is valid. Otherwise assume that
the pixels are square, so the picture aspect ratio is the same as the
width to height ratio.
* - `` V4L2_DV_FL_HAS_CEA861_VIC ``
- If set, then the cea861_vic field is valid and contains the Video
Identification Code as per the CEA-861 standard.
* - `` V4L2_DV_FL_HAS_HDMI_VIC ``
- If set, then the hdmi_vic field is valid and contains the Video
Identification Code as per the HDMI standard (HDMI Vendor Specific
InfoFrame).
2018-08-15 09:10:59 -04:00
* - `` V4L2_DV_FL_CAN_DETECT_REDUCED_FPS ``
- CEA-861 specific: only valid for video receivers, the flag is
cleared by transmitters.
If set, then the hardware can detect the difference between
regular framerates and framerates reduced by 1000/1001. E.g.:
60 vs 59.94 Hz, 30 vs 29.97 Hz or 24 vs 23.976 Hz.