2018-08-30 08:15:26 -06:00
|
|
|
.. Permission is granted to copy, distribute and/or modify this
|
|
|
|
.. document under the terms of the GNU Free Documentation License,
|
|
|
|
.. Version 1.1 or any later version published by the Free Software
|
|
|
|
.. Foundation, with no Invariant Sections, no Front-Cover Texts
|
|
|
|
.. and no Back-Cover Texts. A copy of the license is included at
|
|
|
|
.. Documentation/media/uapi/fdl-appendix.rst.
|
|
|
|
..
|
|
|
|
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
|
|
|
|
|
2016-06-30 07:18:56 -06:00
|
|
|
****************************
|
|
|
|
Defining Colorspaces in V4L2
|
|
|
|
****************************
|
|
|
|
|
|
|
|
In V4L2 colorspaces are defined by four values. The first is the
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
colorspace identifier (enum :c:type:`v4l2_colorspace`)
|
2016-06-30 07:18:56 -06:00
|
|
|
which defines the chromaticities, the default transfer function, the
|
|
|
|
default Y'CbCr encoding and the default quantization method. The second
|
|
|
|
is the transfer function identifier (enum
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
:c:type:`v4l2_xfer_func`) to specify non-standard
|
2016-06-30 07:18:56 -06:00
|
|
|
transfer functions. The third is the Y'CbCr encoding identifier (enum
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
:c:type:`v4l2_ycbcr_encoding`) to specify
|
2016-06-30 07:18:56 -06:00
|
|
|
non-standard Y'CbCr encodings and the fourth is the quantization
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
identifier (enum :c:type:`v4l2_quantization`) to
|
2016-06-30 07:18:56 -06:00
|
|
|
specify non-standard quantization methods. Most of the time only the
|
2016-08-29 14:37:59 -06:00
|
|
|
colorspace field of struct :c:type:`v4l2_pix_format`
|
|
|
|
or struct :c:type:`v4l2_pix_format_mplane`
|
2016-07-10 08:57:43 -06:00
|
|
|
needs to be filled in.
|
|
|
|
|
2016-08-18 08:33:37 -06:00
|
|
|
.. _hsv-colorspace:
|
2016-08-15 14:49:50 -06:00
|
|
|
|
2016-08-18 08:33:37 -06:00
|
|
|
On :ref:`HSV formats <hsv-formats>` the *Hue* is defined as the angle on
|
|
|
|
the cylindrical color representation. Usually this angle is measured in
|
|
|
|
degrees, i.e. 0-360. When we map this angle value into 8 bits, there are
|
|
|
|
two basic ways to do it: Divide the angular value by 2 (0-179), or use the
|
|
|
|
whole range, 0-255, dividing the angular value by 1.41. The enum
|
|
|
|
:c:type:`v4l2_hsv_encoding` specifies which encoding is used.
|
|
|
|
|
|
|
|
.. note:: The default R'G'B' quantization is full range for all
|
2020-08-20 04:47:16 -06:00
|
|
|
colorspaces. HSV formats are always full range.
|
2016-06-30 07:18:56 -06:00
|
|
|
|
2019-03-29 10:13:50 -06:00
|
|
|
.. tabularcolumns:: |p{6.7cm}|p{10.8cm}|
|
2016-06-30 07:18:56 -06:00
|
|
|
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
.. c:type:: v4l2_colorspace
|
2016-06-30 07:18:56 -06:00
|
|
|
|
|
|
|
.. flat-table:: V4L2 Colorspaces
|
|
|
|
:header-rows: 1
|
|
|
|
: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 05:44:34 -06:00
|
|
|
* - Identifier
|
|
|
|
- Details
|
|
|
|
* - ``V4L2_COLORSPACE_DEFAULT``
|
|
|
|
- The default colorspace. This can be used by applications to let
|
|
|
|
the driver fill in the colorspace.
|
|
|
|
* - ``V4L2_COLORSPACE_SMPTE170M``
|
|
|
|
- See :ref:`col-smpte-170m`.
|
|
|
|
* - ``V4L2_COLORSPACE_REC709``
|
|
|
|
- See :ref:`col-rec709`.
|
|
|
|
* - ``V4L2_COLORSPACE_SRGB``
|
|
|
|
- See :ref:`col-srgb`.
|
2018-09-13 05:47:28 -06:00
|
|
|
* - ``V4L2_COLORSPACE_OPRGB``
|
|
|
|
- See :ref:`col-oprgb`.
|
[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 05:44:34 -06:00
|
|
|
* - ``V4L2_COLORSPACE_BT2020``
|
|
|
|
- See :ref:`col-bt2020`.
|
|
|
|
* - ``V4L2_COLORSPACE_DCI_P3``
|
|
|
|
- See :ref:`col-dcip3`.
|
|
|
|
* - ``V4L2_COLORSPACE_SMPTE240M``
|
|
|
|
- See :ref:`col-smpte-240m`.
|
|
|
|
* - ``V4L2_COLORSPACE_470_SYSTEM_M``
|
|
|
|
- See :ref:`col-sysm`.
|
|
|
|
* - ``V4L2_COLORSPACE_470_SYSTEM_BG``
|
|
|
|
- See :ref:`col-sysbg`.
|
|
|
|
* - ``V4L2_COLORSPACE_JPEG``
|
|
|
|
- See :ref:`col-jpeg`.
|
|
|
|
* - ``V4L2_COLORSPACE_RAW``
|
|
|
|
- The raw colorspace. This is used for raw image capture where the
|
|
|
|
image is minimally processed and is using the internal colorspace
|
|
|
|
of the device. The software that processes an image using this
|
|
|
|
'colorspace' will have to know the internals of the capture
|
|
|
|
device.
|
2016-06-30 07:18:56 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
.. c:type:: v4l2_xfer_func
|
2016-06-30 07:18:56 -06:00
|
|
|
|
2017-09-02 14:50:45 -06:00
|
|
|
.. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
|
|
|
|
|
2016-06-30 07:18:56 -06:00
|
|
|
.. flat-table:: V4L2 Transfer Function
|
|
|
|
:header-rows: 1
|
|
|
|
: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 05:44:34 -06:00
|
|
|
* - Identifier
|
|
|
|
- Details
|
|
|
|
* - ``V4L2_XFER_FUNC_DEFAULT``
|
|
|
|
- Use the default transfer function as defined by the colorspace.
|
|
|
|
* - ``V4L2_XFER_FUNC_709``
|
|
|
|
- Use the Rec. 709 transfer function.
|
|
|
|
* - ``V4L2_XFER_FUNC_SRGB``
|
|
|
|
- Use the sRGB transfer function.
|
2018-09-13 05:47:28 -06:00
|
|
|
* - ``V4L2_XFER_FUNC_OPRGB``
|
|
|
|
- Use the opRGB transfer function.
|
[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 05:44:34 -06:00
|
|
|
* - ``V4L2_XFER_FUNC_SMPTE240M``
|
|
|
|
- Use the SMPTE 240M transfer function.
|
|
|
|
* - ``V4L2_XFER_FUNC_NONE``
|
|
|
|
- Do not use a transfer function (i.e. use linear RGB values).
|
|
|
|
* - ``V4L2_XFER_FUNC_DCI_P3``
|
|
|
|
- Use the DCI-P3 transfer function.
|
|
|
|
* - ``V4L2_XFER_FUNC_SMPTE2084``
|
2017-07-27 03:09:10 -06:00
|
|
|
- Use the SMPTE 2084 transfer function. See :ref:`xf-smpte-2084`.
|
2016-06-30 07:18:56 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
.. c:type:: v4l2_ycbcr_encoding
|
2016-06-30 07:18:56 -06:00
|
|
|
|
2019-03-29 10:13:50 -06:00
|
|
|
.. tabularcolumns:: |p{7.2cm}|p{10.3cm}|
|
2016-08-17 08:47:21 -06:00
|
|
|
|
2016-06-30 07:18:56 -06:00
|
|
|
.. flat-table:: V4L2 Y'CbCr Encodings
|
|
|
|
:header-rows: 1
|
|
|
|
: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 05:44:34 -06:00
|
|
|
* - Identifier
|
|
|
|
- Details
|
|
|
|
* - ``V4L2_YCBCR_ENC_DEFAULT``
|
|
|
|
- Use the default Y'CbCr encoding as defined by the colorspace.
|
|
|
|
* - ``V4L2_YCBCR_ENC_601``
|
|
|
|
- Use the BT.601 Y'CbCr encoding.
|
|
|
|
* - ``V4L2_YCBCR_ENC_709``
|
|
|
|
- Use the Rec. 709 Y'CbCr encoding.
|
|
|
|
* - ``V4L2_YCBCR_ENC_XV601``
|
|
|
|
- Use the extended gamut xvYCC BT.601 encoding.
|
|
|
|
* - ``V4L2_YCBCR_ENC_XV709``
|
|
|
|
- Use the extended gamut xvYCC Rec. 709 encoding.
|
|
|
|
* - ``V4L2_YCBCR_ENC_BT2020``
|
|
|
|
- Use the default non-constant luminance BT.2020 Y'CbCr encoding.
|
|
|
|
* - ``V4L2_YCBCR_ENC_BT2020_CONST_LUM``
|
|
|
|
- Use the constant luminance BT.2020 Yc'CbcCrc encoding.
|
|
|
|
* - ``V4L2_YCBCR_ENC_SMPTE_240M``
|
|
|
|
- Use the SMPTE 240M Y'CbCr encoding.
|
2016-06-30 07:18:56 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 08:33:37 -06:00
|
|
|
.. c:type:: v4l2_hsv_encoding
|
|
|
|
|
|
|
|
.. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
|
|
|
|
|
|
|
|
.. flat-table:: V4L2 HSV Encodings
|
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
* - Identifier
|
|
|
|
- Details
|
|
|
|
* - ``V4L2_HSV_ENC_180``
|
|
|
|
- For the Hue, each LSB is two degrees.
|
|
|
|
* - ``V4L2_HSV_ENC_256``
|
|
|
|
- For the Hue, the 360 degrees are mapped into 8 bits, i.e. each
|
|
|
|
LSB is roughly 1.41 degrees.
|
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 03:41:26 -06:00
|
|
|
.. c:type:: v4l2_quantization
|
2016-06-30 07:18:56 -06:00
|
|
|
|
2016-08-17 08:47:21 -06:00
|
|
|
.. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
|
|
|
|
|
2016-06-30 07:18:56 -06:00
|
|
|
.. flat-table:: V4L2 Quantization Methods
|
|
|
|
:header-rows: 1
|
|
|
|
: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 05:44:34 -06:00
|
|
|
* - Identifier
|
|
|
|
- Details
|
|
|
|
* - ``V4L2_QUANTIZATION_DEFAULT``
|
|
|
|
- Use the default quantization encoding as defined by the
|
2020-08-20 04:47:16 -06:00
|
|
|
colorspace. This is always full range for R'G'B' and HSV.
|
|
|
|
It is usually limited range for Y'CbCr.
|
[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 05:44:34 -06:00
|
|
|
* - ``V4L2_QUANTIZATION_FULL_RANGE``
|
|
|
|
- Use the full range quantization encoding. I.e. the range [0…1] is
|
|
|
|
mapped to [0…255] (with possible clipping to [1…254] to avoid the
|
|
|
|
0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to
|
|
|
|
[0…255] (with possible clipping to [1…254] to avoid the 0x00 and
|
|
|
|
0xff values).
|
|
|
|
* - ``V4L2_QUANTIZATION_LIM_RANGE``
|
|
|
|
- Use the limited range quantization encoding. I.e. the range [0…1]
|
|
|
|
is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
|
2020-08-20 04:47:16 -06:00
|
|
|
[16…240]. Limited Range cannot be used with HSV.
|