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-06-30 15:18:56 +02:00
|
|
|
.. _packed-yuv:
|
|
|
|
|
|
|
|
******************
|
|
|
|
Packed YUV formats
|
|
|
|
******************
|
|
|
|
|
2020-12-07 00:03:10 +01:00
|
|
|
Similarly to the packed RGB formats, the packed YUV formats store the Y, Cb and
|
|
|
|
Cr components consecutively in memory. They may apply subsampling to the chroma
|
|
|
|
components and thus differ in how they interlave the three components.
|
2016-06-30 15:18:56 +02:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
- In all the tables that follow, bit 7 is the most significant bit in a byte.
|
|
|
|
- 'Y', 'Cb' and 'Cr' denote bits of the luma, blue chroma (also known as
|
|
|
|
'U') and red chroma (also known as 'V') components respectively. 'A'
|
|
|
|
denotes bits of the alpha component (if supported by the format), and 'X'
|
|
|
|
denotes padding bits.
|
|
|
|
|
2016-06-30 15:18:56 +02:00
|
|
|
|
2020-12-07 00:03:10 +01:00
|
|
|
4:4:4 Subsampling
|
|
|
|
=================
|
|
|
|
|
|
|
|
These formats do not subsample the chroma components and store each pixels as a
|
|
|
|
full triplet of Y, Cb and Cr values.
|
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
|
|
|
|
2020-12-07 00:03:13 +01:00
|
|
|
The next table lists the packed YUV 4:4:4 formats with less than 8 bits per
|
|
|
|
component. They are named based on the order of the Y, Cb and Cr components as
|
|
|
|
seen in a 16-bit word, which is then stored in memory in little endian byte
|
|
|
|
order, and on the number of bits for each component. For instance the YUV565
|
|
|
|
format stores a pixel in a 16-bit word [15:0] laid out at as [Y'\ :sub:`4-0`
|
|
|
|
Cb\ :sub:`5-0` Cr\ :sub:`4-0`], and stored in memory in two bytes,
|
|
|
|
[Cb\ :sub:`2-0` Cr\ :sub:`4-0`] followed by [Y'\ :sub:`4-0` Cb\ :sub:`5-3`].
|
|
|
|
|
2016-08-17 15:37:48 -03:00
|
|
|
.. raw:: latex
|
|
|
|
|
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
|
|
|
\begingroup
|
2020-12-10 11:39:46 +01:00
|
|
|
\scriptsize
|
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
|
|
|
\setlength{\tabcolsep}{2pt}
|
2016-06-30 15:18:56 +02:00
|
|
|
|
2020-12-10 11:39:46 +01:00
|
|
|
.. tabularcolumns:: |p{3.5cm}|p{0.96cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|p{0.52cm}|
|
2016-06-30 15:18:56 +02:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
.. flat-table:: Packed YUV 4:4:4 Image Formats (less than 8bpc)
|
2016-06-30 15:18:56 +02:00
|
|
|
:header-rows: 2
|
|
|
|
: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
|
|
|
* - Identifier
|
|
|
|
- Code
|
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
|
|
|
|
[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
|
|
|
- :cspan:`7` Byte 0 in memory
|
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
|
|
|
|
[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
|
|
|
- :cspan:`7` Byte 1
|
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
|
|
|
|
2017-09-02 17:46:52 -04: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
|
|
|
- 7
|
|
|
|
- 6
|
|
|
|
- 5
|
|
|
|
- 4
|
|
|
|
- 3
|
|
|
|
- 2
|
|
|
|
- 1
|
|
|
|
- 0
|
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
|
|
|
|
[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
|
|
|
- 7
|
|
|
|
- 6
|
|
|
|
- 5
|
|
|
|
- 4
|
|
|
|
- 3
|
|
|
|
- 2
|
|
|
|
- 1
|
|
|
|
- 0
|
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
|
|
|
|
[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-PIX-FMT-YUV444:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUV444``
|
|
|
|
- 'Y444'
|
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
|
|
|
|
[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
|
|
|
- Cb\ :sub:`3`
|
|
|
|
- Cb\ :sub:`2`
|
|
|
|
- Cb\ :sub:`1`
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Cr\ :sub:`3`
|
|
|
|
- Cr\ :sub:`2`
|
|
|
|
- Cr\ :sub:`1`
|
|
|
|
- Cr\ :sub:`0`
|
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
|
|
|
|
[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
|
|
|
- a\ :sub:`3`
|
|
|
|
- a\ :sub:`2`
|
|
|
|
- a\ :sub:`1`
|
|
|
|
- a\ :sub:`0`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Y'\ :sub:`0`
|
2019-03-29 11:58:14 -04: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
|
|
|
* .. _V4L2-PIX-FMT-YUV555:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUV555``
|
|
|
|
- 'YUVO'
|
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
|
|
|
|
[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
|
|
|
- Cb\ :sub:`2`
|
|
|
|
- Cb\ :sub:`1`
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Cr\ :sub:`4`
|
|
|
|
- Cr\ :sub:`3`
|
|
|
|
- Cr\ :sub:`2`
|
|
|
|
- Cr\ :sub:`1`
|
|
|
|
- Cr\ :sub:`0`
|
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
|
|
|
|
[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
|
|
|
- a
|
|
|
|
- Y'\ :sub:`4`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cb\ :sub:`4`
|
|
|
|
- Cb\ :sub:`3`
|
2019-03-29 11:58:14 -04: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
|
|
|
* .. _V4L2-PIX-FMT-YUV565:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUV565``
|
|
|
|
- 'YUVP'
|
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
|
|
|
|
[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
|
|
|
- Cb\ :sub:`2`
|
|
|
|
- Cb\ :sub:`1`
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Cr\ :sub:`4`
|
|
|
|
- Cr\ :sub:`3`
|
|
|
|
- Cr\ :sub:`2`
|
|
|
|
- Cr\ :sub:`1`
|
|
|
|
- Cr\ :sub:`0`
|
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
|
|
|
|
[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
|
|
|
- Y'\ :sub:`4`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cb\ :sub:`5`
|
|
|
|
- Cb\ :sub:`4`
|
|
|
|
- Cb\ :sub:`3`
|
2019-03-29 11:58:14 -04:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
.. raw:: latex
|
2019-03-29 11:58:14 -04:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
\endgroup
|
[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
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
.. note::
|
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
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
For the YUV444 and YUV555 formats, the value of alpha bits is undefined
|
|
|
|
when reading from the driver, ignored when writing to the driver, except
|
|
|
|
when alpha blending has been negotiated for a :ref:`Video Overlay
|
|
|
|
<overlay>` or :ref:`Video Output Overlay <osd>`.
|
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
|
|
|
|
|
|
|
|
2020-12-07 00:03:13 +01:00
|
|
|
The next table lists the packed YUV 4:4:4 formats with 8 bits per component.
|
|
|
|
They are named based on the order of the Y, Cb and Cr components as stored in
|
|
|
|
memory, and on the total number of bits per pixel. For instance, the VUYX32
|
|
|
|
format stores a pixel with Cr\ :sub:`7-0` in the first byte, Cb\ :sub:`7-0` in
|
|
|
|
the second byte and Y'\ :sub:`7-0` in the third byte.
|
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
.. flat-table:: Packed YUV Image Formats (8bpc)
|
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
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
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
* - Identifier
|
|
|
|
- Code
|
|
|
|
- Byte 0
|
|
|
|
- Byte 1
|
|
|
|
- Byte 2
|
|
|
|
- Byte 3
|
2019-03-29 11:58:14 -04:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
* .. _V4L2-PIX-FMT-YUV32:
|
2019-02-07 22:18:43 -05:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- ``V4L2_PIX_FMT_YUV32``
|
|
|
|
- 'YUV4'
|
2019-02-07 22:18:43 -05:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- A\ :sub:`7-0`
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Cr\ :sub:`7-0`
|
2019-02-07 22:18:43 -05:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
* .. _V4L2-PIX-FMT-AYUV32:
|
2019-02-07 22:18:43 -05:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- ``V4L2_PIX_FMT_AYUV32``
|
|
|
|
- 'AYUV'
|
2019-02-07 22:18:43 -05:00
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- A\ :sub:`7-0`
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Cr\ :sub:`7-0`
|
2019-03-29 11:58:14 -04:00
|
|
|
|
2019-02-07 22:18:43 -05:00
|
|
|
* .. _V4L2-PIX-FMT-XYUV32:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_XYUV32``
|
|
|
|
- 'XYUV'
|
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- X\ :sub:`7-0`
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Cr\ :sub:`7-0`
|
2019-03-29 11:58:14 -04:00
|
|
|
|
2019-02-07 22:18:43 -05:00
|
|
|
* .. _V4L2-PIX-FMT-VUYA32:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_VUYA32``
|
|
|
|
- 'VUYA'
|
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- Cr\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- A\ :sub:`7-0`
|
2019-03-29 11:58:14 -04:00
|
|
|
|
2019-02-07 22:18:43 -05:00
|
|
|
* .. _V4L2-PIX-FMT-VUYX32:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_VUYX32``
|
|
|
|
- 'VUYX'
|
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- Cr\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- X\ :sub:`7-0`
|
2016-08-17 15:37:48 -03:00
|
|
|
|
2022-03-07 16:32:00 +00:00
|
|
|
* .. _V4L2-PIX-FMT-YUVA32:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUVA32``
|
|
|
|
- 'YUVA'
|
|
|
|
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Cr\ :sub:`7-0`
|
|
|
|
- A\ :sub:`7-0`
|
|
|
|
|
|
|
|
* .. _V4L2-PIX-FMT-YUVX32:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUVX32``
|
|
|
|
- 'YUVX'
|
|
|
|
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Cr\ :sub:`7-0`
|
|
|
|
- X\ :sub:`7-0`
|
|
|
|
|
2021-03-11 01:28:47 +01:00
|
|
|
* .. _V4L2-PIX-FMT-YUV24:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUV24``
|
|
|
|
- 'YUV3'
|
|
|
|
|
|
|
|
- Y'\ :sub:`7-0`
|
|
|
|
- Cb\ :sub:`7-0`
|
|
|
|
- Cr\ :sub:`7-0`
|
|
|
|
- -\
|
|
|
|
|
2016-08-17 15:37:48 -03:00
|
|
|
.. note::
|
|
|
|
|
2020-12-07 00:03:12 +01:00
|
|
|
- The alpha component is expected to contain a meaningful value that can be
|
|
|
|
used by drivers and applications.
|
|
|
|
- The padding bits contain undefined values that must be ignored by all
|
|
|
|
applications and drivers.
|
2020-12-07 00:03:10 +01:00
|
|
|
|
2023-03-22 05:13:07 +00:00
|
|
|
The next table lists the packed YUV 4:4:4 formats with 12 bits per component.
|
|
|
|
Expand the bits per component to 16 bits, data in the high bits, zeros in the low bits,
|
|
|
|
arranged in little endian order, storing 1 pixel in 6 bytes.
|
|
|
|
|
|
|
|
.. flat-table:: Packed YUV 4:4:4 Image Formats (12bpc)
|
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
* - Identifier
|
|
|
|
- Code
|
|
|
|
- Byte 1-0
|
|
|
|
- Byte 3-2
|
|
|
|
- Byte 5-4
|
|
|
|
- Byte 7-6
|
|
|
|
- Byte 9-8
|
|
|
|
- Byte 11-10
|
|
|
|
|
|
|
|
* .. _V4L2-PIX-FMT-YUV48-12:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUV48_12``
|
|
|
|
- 'Y312'
|
|
|
|
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Cr\ :sub:`0`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Cb\ :sub:`1`
|
|
|
|
- Cr\ :sub:`1`
|
2020-12-07 00:03:10 +01:00
|
|
|
|
|
|
|
4:2:2 Subsampling
|
|
|
|
=================
|
|
|
|
|
|
|
|
These formats, commonly referred to as YUYV or YUY2, subsample the chroma
|
2022-12-21 11:24:43 +02:00
|
|
|
components horizontally by 2, storing 2 pixels in a container. The container
|
|
|
|
is 32-bits for 8-bit formats, and 64-bits for 10+-bit formats.
|
|
|
|
|
|
|
|
The packed YUYV formats with more than 8 bits per component are stored as four
|
|
|
|
16-bit little-endian words. Each word's most significant bits contain one
|
|
|
|
component, and the least significant bits are zero padding.
|
2020-12-07 00:03:10 +01:00
|
|
|
|
2020-12-10 11:39:46 +01:00
|
|
|
.. raw:: latex
|
|
|
|
|
|
|
|
\footnotesize
|
|
|
|
|
|
|
|
.. tabularcolumns:: |p{3.4cm}|p{1.2cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|
|
|
|
|
|
2022-12-21 11:24:43 +02:00
|
|
|
.. flat-table:: Packed YUV 4:2:2 Formats in 32-bit container
|
2020-12-07 00:03:10 +01:00
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
* - Identifier
|
|
|
|
- Code
|
|
|
|
- Byte 0
|
|
|
|
- Byte 1
|
|
|
|
- Byte 2
|
|
|
|
- Byte 3
|
|
|
|
- Byte 4
|
|
|
|
- Byte 5
|
|
|
|
- Byte 6
|
|
|
|
- Byte 7
|
|
|
|
* .. _V4L2-PIX-FMT-UYVY:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_UYVY``
|
|
|
|
- 'UYVY'
|
|
|
|
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cr\ :sub:`0`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Cb\ :sub:`2`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Cr\ :sub:`2`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
* .. _V4L2-PIX-FMT-VYUY:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_VYUY``
|
|
|
|
- 'VYUY'
|
|
|
|
|
|
|
|
- Cr\ :sub:`0`
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Cr\ :sub:`2`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Cb\ :sub:`2`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
* .. _V4L2-PIX-FMT-YUYV:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YUYV``
|
|
|
|
- 'YUYV'
|
|
|
|
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Cr\ :sub:`0`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Cb\ :sub:`2`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
- Cr\ :sub:`2`
|
|
|
|
* .. _V4L2-PIX-FMT-YVYU:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_YVYU``
|
|
|
|
- 'YVYU'
|
|
|
|
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cr\ :sub:`0`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Cr\ :sub:`2`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
- Cb\ :sub:`2`
|
|
|
|
|
2022-12-21 11:24:43 +02:00
|
|
|
.. tabularcolumns:: |p{3.4cm}|p{1.2cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|
|
|
|
|
|
|
|
|
.. flat-table:: Packed YUV 4:2:2 Formats in 64-bit container
|
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
* - Identifier
|
|
|
|
- Code
|
|
|
|
- Word 0
|
|
|
|
- Word 1
|
|
|
|
- Word 2
|
|
|
|
- Word 3
|
|
|
|
* .. _V4L2-PIX-FMT-Y210:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_Y210``
|
|
|
|
- 'Y210'
|
|
|
|
|
|
|
|
- Y'\ :sub:`0` (bits 15-6)
|
|
|
|
- Cb\ :sub:`0` (bits 15-6)
|
|
|
|
- Y'\ :sub:`1` (bits 15-6)
|
|
|
|
- Cr\ :sub:`0` (bits 15-6)
|
|
|
|
* .. _V4L2-PIX-FMT-Y212:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_Y212``
|
|
|
|
- 'Y212'
|
|
|
|
|
|
|
|
- Y'\ :sub:`0` (bits 15-4)
|
|
|
|
- Cb\ :sub:`0` (bits 15-4)
|
|
|
|
- Y'\ :sub:`1` (bits 15-4)
|
|
|
|
- Cr\ :sub:`0` (bits 15-4)
|
|
|
|
* .. _V4L2-PIX-FMT-Y216:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_Y216``
|
|
|
|
- 'Y216'
|
|
|
|
|
|
|
|
- Y'\ :sub:`0` (bits 15-0)
|
|
|
|
- Cb\ :sub:`0` (bits 15-0)
|
|
|
|
- Y'\ :sub:`1` (bits 15-0)
|
|
|
|
- Cr\ :sub:`0` (bits 15-0)
|
|
|
|
|
2020-12-10 11:39:46 +01:00
|
|
|
.. raw:: latex
|
|
|
|
|
|
|
|
\normalsize
|
|
|
|
|
2020-12-07 00:03:10 +01:00
|
|
|
**Color Sample Location:**
|
|
|
|
Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>`
|
|
|
|
horizontally.
|
|
|
|
|
|
|
|
|
|
|
|
4:1:1 Subsampling
|
|
|
|
=================
|
|
|
|
|
|
|
|
This format subsamples the chroma components horizontally by 4, storing 8
|
|
|
|
pixels in 12 bytes.
|
|
|
|
|
2020-12-10 11:39:46 +01:00
|
|
|
.. raw:: latex
|
|
|
|
|
|
|
|
\scriptsize
|
|
|
|
|
|
|
|
.. tabularcolumns:: |p{2.9cm}|p{0.8cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|
|
|
|
|
|
2020-12-07 00:03:10 +01:00
|
|
|
.. flat-table:: Packed YUV 4:1:1 Formats
|
|
|
|
:header-rows: 1
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
* - Identifier
|
|
|
|
- Code
|
|
|
|
- Byte 0
|
|
|
|
- Byte 1
|
|
|
|
- Byte 2
|
|
|
|
- Byte 3
|
|
|
|
- Byte 4
|
|
|
|
- Byte 5
|
|
|
|
- Byte 6
|
|
|
|
- Byte 7
|
|
|
|
- Byte 8
|
|
|
|
- Byte 9
|
|
|
|
- Byte 10
|
|
|
|
- Byte 11
|
|
|
|
* .. _V4L2-PIX-FMT-Y41P:
|
|
|
|
|
|
|
|
- ``V4L2_PIX_FMT_Y41P``
|
|
|
|
- 'Y41P'
|
|
|
|
|
|
|
|
- Cb\ :sub:`0`
|
|
|
|
- Y'\ :sub:`0`
|
|
|
|
- Cr\ :sub:`0`
|
|
|
|
- Y'\ :sub:`1`
|
|
|
|
- Cb\ :sub:`4`
|
|
|
|
- Y'\ :sub:`2`
|
|
|
|
- Cr\ :sub:`4`
|
|
|
|
- Y'\ :sub:`3`
|
|
|
|
- Y'\ :sub:`4`
|
|
|
|
- Y'\ :sub:`5`
|
|
|
|
- Y'\ :sub:`6`
|
|
|
|
- Y'\ :sub:`7`
|
|
|
|
|
2020-12-10 11:39:46 +01:00
|
|
|
.. raw:: latex
|
|
|
|
|
|
|
|
\normalsize
|
|
|
|
|
2020-12-07 00:03:10 +01:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
Do not confuse ``V4L2_PIX_FMT_Y41P`` with
|
|
|
|
:ref:`V4L2_PIX_FMT_YUV411P <V4L2-PIX-FMT-YUV411P>`. Y41P is derived from
|
2020-12-10 11:39:46 +01:00
|
|
|
"YUV 4:1:1 **packed**", while YUV411P stands for "YUV 4:1:1 **planar**".
|
2020-12-07 00:03:10 +01:00
|
|
|
|
|
|
|
**Color Sample Location:**
|
|
|
|
Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>`
|
|
|
|
horizontally.
|