diff mbox

Kernel docs: muddying the waters a bit

Message ID 20160306232908.GA3732@linuxtv.org (mailing list archive)
State New, archived
Headers show

Commit Message

Johannes Stezenbach March 6, 2016, 11:29 p.m. UTC
On Sat, Mar 05, 2016 at 11:29:37PM -0300, Mauro Carvalho Chehab wrote:
> 
> I converted one of the big tables to CSV. At least now it recognized
> it as a table. Yet, the table was very badly formated:
> 	https://mchehab.fedorapeople.org/media-kabi-docs-test/rst_tests/packed-rgb.html
> 
> This is how this table should look like:
> 	https://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html
> 
> Also, as this table has merged cells at the legend. I've no idea how
> to tell sphinx to do that on csv format.
> 
> The RST files are on this git tree:
> 	https://git.linuxtv.org/mchehab/v4l2-docs-poc.git/

Yeah, seems it can't do merged cells in csv.  Attached patch converts it
back to grid table format and fixes the table definition.
The html output looks usable, but clearly it is no fun to
work with tables in Sphinx.

Sphinx' latex writer can't handle nested tables, though.
Python's docutils rst2latex can, but that doesn't help here.
rst2pdf also supports it.  But I have doubts such a large
table would render OK in pdf without using landscape orientation.
I have not tried because I used python3-sphinx but rst2pdf
is only availble for Python2 in Debian so it does not integrate
with Sphinx.


Johannes

Comments

Johannes Stezenbach March 7, 2016, 8:48 a.m. UTC | #1
On Mon, Mar 07, 2016 at 12:29:08AM +0100, Johannes Stezenbach wrote:
> On Sat, Mar 05, 2016 at 11:29:37PM -0300, Mauro Carvalho Chehab wrote:
> > 
> > I converted one of the big tables to CSV. At least now it recognized
> > it as a table. Yet, the table was very badly formated:
> > 	https://mchehab.fedorapeople.org/media-kabi-docs-test/rst_tests/packed-rgb.html
> > 
> > This is how this table should look like:
> > 	https://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html
> > 
> > Also, as this table has merged cells at the legend. I've no idea how
> > to tell sphinx to do that on csv format.
> > 
> > The RST files are on this git tree:
> > 	https://git.linuxtv.org/mchehab/v4l2-docs-poc.git/
> 
> Yeah, seems it can't do merged cells in csv.  Attached patch converts it
> back to grid table format and fixes the table definition.
> The html output looks usable, but clearly it is no fun to
> work with tables in Sphinx.
> 
> Sphinx' latex writer can't handle nested tables, though.
> Python's docutils rst2latex can, but that doesn't help here.
> rst2pdf also supports it.  But I have doubts such a large
> table would render OK in pdf without using landscape orientation.
> I have not tried because I used python3-sphinx but rst2pdf
> is only availble for Python2 in Debian so it does not integrate
> with Sphinx.

Just a quick idea:
Perhaps one alternative would be to use Graphviz to render
the problematic tables, it supports a HTML-like syntax
and can be embedded in Spinx documents:

http://www.sphinx-doc.org/en/stable/ext/graphviz.html
http://www.graphviz.org/content/node-shapes#html
http://stackoverflow.com/questions/13890568/graphviz-html-nested-tables


Johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mauro Carvalho Chehab March 7, 2016, 12:15 p.m. UTC | #2
Em Mon, 7 Mar 2016 09:48:26 +0100
Johannes Stezenbach <js@linuxtv.org> escreveu:

> On Mon, Mar 07, 2016 at 12:29:08AM +0100, Johannes Stezenbach wrote:
> > On Sat, Mar 05, 2016 at 11:29:37PM -0300, Mauro Carvalho Chehab wrote:  
> > > 
> > > I converted one of the big tables to CSV. At least now it recognized
> > > it as a table. Yet, the table was very badly formated:
> > > 	https://mchehab.fedorapeople.org/media-kabi-docs-test/rst_tests/packed-rgb.html
> > > 
> > > This is how this table should look like:
> > > 	https://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html
> > > 
> > > Also, as this table has merged cells at the legend. I've no idea how
> > > to tell sphinx to do that on csv format.
> > > 
> > > The RST files are on this git tree:
> > > 	https://git.linuxtv.org/mchehab/v4l2-docs-poc.git/  
> > 
> > Yeah, seems it can't do merged cells in csv.  Attached patch converts it
> > back to grid table format and fixes the table definition.
> > The html output looks usable, but clearly it is no fun to
> > work with tables in Sphinx.
> > 
> > Sphinx' latex writer can't handle nested tables, though.
> > Python's docutils rst2latex can, but that doesn't help here.
> > rst2pdf also supports it.  But I have doubts such a large
> > table would render OK in pdf without using landscape orientation.
> > I have not tried because I used python3-sphinx but rst2pdf
> > is only availble for Python2 in Debian so it does not integrate
> > with Sphinx.  
> 
> Just a quick idea:
> Perhaps one alternative would be to use Graphviz to render
> the problematic tables, it supports a HTML-like syntax
> and can be embedded in Spinx documents:
> 
> http://www.sphinx-doc.org/en/stable/ext/graphviz.html
> http://www.graphviz.org/content/node-shapes#html
> http://stackoverflow.com/questions/13890568/graphviz-html-nested-tables

That could work, but it is scary... Graphviz is great to generate
diagrams, but it really sucks when one wants to put a graph element
on a specific place, as it loves to reorder elements putting them on
unexpected places.

Btw, 

I converted all docs from our uAPI docbook to rst using pandoc.
It was a brainless conversion, except for a few fixes.

The output is at:
	https://mchehab.fedorapeople.org/media-kabi-docs-test/rst_tests/

I added it on the top of my PoC tree at:
	https://git.linuxtv.org/mchehab/v4l2-docs-poc.git/  

Besides tables, I noticed some other bad things that needs to be
corrected somehow:

1) Document divisions are not numbered. We need that. It should be
broken into:
	- Document divisions - one per documented API:
		- V4L2
		- Remote Controllers
		- DVB
		- Media Controller

	- Chapters
	- Sessions

Everything should be numbered, as, when discussing API improvements,
it is usual the need of pinpoint to an specific chapter and section.

Tables and images should also be numbered, and we need a way to
use references for table/image numbers.

2) Images

Most images didn't popup. We have images on different file formats:
	- SVG
	- GIF
	- PDF
	- PNG

3) References

It could be a conversion issue, but there are lots of missing 
references at the documentation.

4) We need to have some way to tell sphinx to not put some things
at the lateral ToC bar. For example, at the V4L2 "Changes" section,
we don't want to have one entry per version at the ToC bar.

Giving that, I suspect that we'll have huge headaches to address
if we use sphinx, as it seems too limited to handle complex
documents. We should try to use some other tool that would give
us better results.


Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mauro Carvalho Chehab March 7, 2016, 12:19 p.m. UTC | #3
Em Mon, 7 Mar 2016 00:29:08 +0100
Johannes Stezenbach <js@linuxtv.org> escreveu:

> On Sat, Mar 05, 2016 at 11:29:37PM -0300, Mauro Carvalho Chehab wrote:
> > 
> > I converted one of the big tables to CSV. At least now it recognized
> > it as a table. Yet, the table was very badly formated:
> > 	https://mchehab.fedorapeople.org/media-kabi-docs-test/rst_tests/packed-rgb.html
> > 
> > This is how this table should look like:
> > 	https://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html
> > 
> > Also, as this table has merged cells at the legend. I've no idea how
> > to tell sphinx to do that on csv format.
> > 
> > The RST files are on this git tree:
> > 	https://git.linuxtv.org/mchehab/v4l2-docs-poc.git/  
> 
> Yeah, seems it can't do merged cells in csv.  Attached patch converts it
> back to grid table format and fixes the table definition.
> The html output looks usable, but clearly it is no fun to
> work with tables in Sphinx.

Yes, the output is OK, but, as you said, working with tables in
Sphinx is hard, and using asciiart for the kind of tables we have
is not nice.

> 
> Sphinx' latex writer can't handle nested tables, though.

Yeah, this is a big trouble that need to be solved if you're
willing to use Sphinx.

Btw, it crashes when trying to generate man pages:

	Exception occurred:
	  File "/usr/lib/python2.7/site-packages/docutils/writers/manpage.py", line 627, in depart_entry
	    self._active_table.append_cell(self.body[start:])
	AttributeError: 'NoneType' object has no attribute 'append_cell'
	The full traceback has been saved in /tmp/sphinx-err-04qRMz.log, if you want to report the issue to the developers.

So, if we're willing to use sphinx, someone should either fix
it to produce latex nexted table and fix it to generate manpages,
or we'll need to stick with just html output.

> Python's docutils rst2latex can, but that doesn't help here.
> rst2pdf also supports it.

At least here, rst2* scripts were unable to identify that the
index.rst had links to other rst documents. 

In the specific case of rst2latex, I got several errors like:

	index.rst:21: (ERROR/3) Unknown interpreted text role "ref".


> But I have doubts such a large
> table would render OK in pdf without using landscape orientation.

Yeah, in the past, when we had pdf enabled for DocBook (e. g. when
media development was using a separate mercurial tree), I guess
we had tags changing the text orientation on a few tables that
would otherwise won't diplay fine, but I can't remember the dirty
details anymore.

> I have not tried because I used python3-sphinx but rst2pdf
> is only availble for Python2 in Debian so it does not integrate
> with Sphinx.
> 
> 
> Johannes
diff mbox

Patch

From 61674b398e778bd5ff644ffd493d5ff1cfaca0ef Mon Sep 17 00:00:00 2001
From: Johannes Stezenbach <js@sig21.net>
Date: Sun, 6 Mar 2016 23:55:19 +0100
Subject: [PATCH] some progress for html output

---
 _static/borderless.css     |  3 --
 _static/v4l2tables.css     |  9 +++++
 _templates/layout.html     |  9 +----
 packed-rgb.rst             | 88 +++++++++++++++++++++++++++++-----------------
 pixfmt-yuyv.rst            |  2 +-
 v4l-table-within-table.rst | 72 +++++++++++++++++++------------------
 6 files changed, 105 insertions(+), 78 deletions(-)
 delete mode 100644 _static/borderless.css
 create mode 100644 _static/v4l2tables.css

diff --git a/_static/borderless.css b/_static/borderless.css
deleted file mode 100644
index bfd4b01..0000000
--- a/_static/borderless.css
+++ /dev/null
@@ -1,3 +0,0 @@ 
-table#table-borderless {
-    border: 1px solid black;
-}
diff --git a/_static/v4l2tables.css b/_static/v4l2tables.css
new file mode 100644
index 0000000..c045e45
--- /dev/null
+++ b/_static/v4l2tables.css
@@ -0,0 +1,9 @@ 
+table.noborder {
+    border: 1px solid black;
+    background: white;
+    white-space: nowrap;
+}
+
+table.noborder td, table.noborder th {
+    padding: 0px;
+}
diff --git a/_templates/layout.html b/_templates/layout.html
index b6bf12b..637332d 100644
--- a/_templates/layout.html
+++ b/_templates/layout.html
@@ -1,9 +1,2 @@ 
 {% extends "!layout.html" %}
-{% block tables %}
-<style>
-table#table-borderless {
-    border: 1px solid black;
-}
-</style>
-{{ super() }}
-{% endblock %}
+{% set css_files = css_files + ["_static/v4l2tables.css"] %}
diff --git a/packed-rgb.rst b/packed-rgb.rst
index 352b91c..b4fcf3e 100644
--- a/packed-rgb.rst
+++ b/packed-rgb.rst
@@ -9,25 +9,46 @@  graphics frame buffers. They occupy 8, 16, 24 or 32 bits per pixel.
 These are all packed-pixel formats, meaning all the data for a pixel lie
 next to each other in memory.
 
-.. csv-table:: Table: Packed RGB Image Formats
-  :header: Identifier,Code, ,Byte 0 in memory,Byte 1,Byte 2,Byte 3
+.. table:: Packed RGB Image Formats
+   :class: noborder
 
-  ``V4L2_PIX_FMT_RGB332``,'RGB1',,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`1`,b\ :sub:`0`
-  ``V4L2_PIX_FMT_ARGB444``,'AR12',,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,a\ :sub:`3`,a\ :sub:`2`,a\ :sub:`1`,a\ :sub:`0`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`
-  ``V4L2_PIX_FMT_XRGB444``,'XR12',,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,-,-,-,-,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`
-  ``V4L2_PIX_FMT_ARGB555``,'AR15',,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,a,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,g\ :sub:`4`,g\ :sub:`3`
-  ``V4L2_PIX_FMT_XRGB555``,'XR15',,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,-,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,g\ :sub:`4`,g\ :sub:`3`
-  ``V4L2_PIX_FMT_RGB565``,'RGBP',,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`
-  ``V4L2_PIX_FMT_ARGB555X``,'AR15' | (1<<31),,a,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,g\ :sub:`4`,g\ :sub:`3`,,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`
-  ``V4L2_PIX_FMT_XRGB555X``,'XR15' | (1<<31),,-,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,g\ :sub:`4`,g\ :sub:`3`,,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`
-  ``V4L2_PIX_FMT_RGB565X``,'RGBR',,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`,,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`
-  ``V4L2_PIX_FMT_BGR24``,'BGR3',,b\ :sub:`7`,b\ :sub:`6`,b\ :sub:`5`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,g\ :sub:`7`,g\ :sub:`6`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,,r\ :sub:`7`,r\ :sub:`6`,r\ :sub:`5`,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`
-  ``V4L2_PIX_FMT_RGB24``,'RGB3',,r\ :sub:`7`,r\ :sub:`6`,r\ :sub:`5`,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,,g\ :sub:`7`,g\ :sub:`6`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,,b\ :sub:`7`,b\ :sub:`6`,b\ :sub:`5`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`
-  ``V4L2_PIX_FMT_BGR666``,'BGRH',,b\ :sub:`5`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,g\ :sub:`5`,g\ :sub:`4`,,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,r\ :sub:`5`,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,,r\ :sub:`1`,r\ :sub:`0`,-,-,-,-,-,-,,-,-,-,-,-,-,-,-
-  ``V4L2_PIX_FMT_ABGR32``,'AR24',,b\ :sub:`7`,b\ :sub:`6`,b\ :sub:`5`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,g\ :sub:`7`,g\ :sub:`6`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,,r\ :sub:`7`,r\ :sub:`6`,r\ :sub:`5`,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,,a\ :sub:`7`,a\ :sub:`6`,a\ :sub:`5`,a\ :sub:`4`,a\ :sub:`3`,a\ :sub:`2`,a\ :sub:`1`,a\ :sub:`0`
-  ``V4L2_PIX_FMT_XBGR32``,'XR24',,b\ :sub:`7`,b\ :sub:`6`,b\ :sub:`5`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`,,g\ :sub:`7`,g\ :sub:`6`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,,r\ :sub:`7`,r\ :sub:`6`,r\ :sub:`5`,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,,-,-,-,-,-,-,-,-
-  ``V4L2_PIX_FMT_ARGB32``,'BA24',,a\ :sub:`7`,a\ :sub:`6`,a\ :sub:`5`,a\ :sub:`4`,a\ :sub:`3`,a\ :sub:`2`,a\ :sub:`1`,a\ :sub:`0`,,r\ :sub:`7`,r\ :sub:`6`,r\ :sub:`5`,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,,g\ :sub:`7`,g\ :sub:`6`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,,b\ :sub:`7`,b\ :sub:`6`,b\ :sub:`5`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`
-  ``V4L2_PIX_FMT_XRGB32``,'BX24',,-,-,-,-,-,-,-,-,,r\ :sub:`7`,r\ :sub:`6`,r\ :sub:`5`,r\ :sub:`4`,r\ :sub:`3`,r\ :sub:`2`,r\ :sub:`1`,r\ :sub:`0`,,g\ :sub:`7`,g\ :sub:`6`,g\ :sub:`5`,g\ :sub:`4`,g\ :sub:`3`,g\ :sub:`2`,g\ :sub:`1`,g\ :sub:`0`,,b\ :sub:`7`,b\ :sub:`6`,b\ :sub:`5`,b\ :sub:`4`,b\ :sub:`3`,b\ :sub:`2`,b\ :sub:`1`,b\ :sub:`0`
+   +-----------------------------+-----------------------+-----+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
+   | Identifier                  | Code                  |     | Byte 0 in memory                                                                                                                         | Byte 1                                                                                                                              | Byte 2                                                                                                                              | Byte 3                                                                                                                        |
+   |                             |                       +-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   |                             |                       | Bit | 7                  | 6             | 5             | 4             | 3             | 2             | 1             | 0             | Bit | 7             | 6             | 5             | 4             | 3             | 2             | 1             | 0             | Bit | 7             | 6             | 5             | 4             | 3             | 2             | 1             | 0             | Bit | 7             | 6             | 5             | 4             | 3             | 2             | 1             | 0             |
+   +=============================+=======================+=====+====================+===============+===============+===============+===============+===============+===============+===============+=====+===============+===============+===============+===============+===============+===============+===============+===============+=====+===============+===============+===============+===============+===============+===============+===============+===============+=====+===============+===============+===============+===============+===============+===============+===============+===============+
+   | ``V4L2_PIX_FMT_RGB332``     | 'RGB1'                |     | r\ :sub:`2`        | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`1`   | b\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |     
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_ARGB444``    | 'AR12'                |     | g\ :sub:`3`        | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_XRGB444``    | 'XR12'                |     | g\ :sub:`3`        | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | \-            | \-            | \-            | \-            | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_ARGB555``    | 'AR15'                |     | g\ :sub:`2`        | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | a             | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_XRGB555``    | 'XR15'                |     | g\ :sub:`2`        | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | \-            | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_RGB565``     | 'RGBP'                |     | g\ :sub:`2`        | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_ARGB555X``   | 'AR15' | (1 << 31)    |     | a                  | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |     | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_XRGB555X``   | 'XR15' | (1 << 31)    |     | \-                 | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |     | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_RGB565X``    | 'RGBR'                |     | r\ :sub:`4`        | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   |     | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_BGR24``      | 'BGR3'                |     | b\ :sub:`7`        | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_RGB24``      | 'RGB3'                |     | r\ :sub:`7`        | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | b\ :sub:`7`   | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     |               |               |               |               |               |               |               |               |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_BGR666``     | 'BGRH'                |     | b\ :sub:`5`        | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   | g\ :sub:`5`   | g\ :sub:`4`   |     | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   |     | r\ :sub:`1`   | r\ :sub:`0`   | \-            | \-            | \-            | \-            | \-            | \-            |     | \-            | \-            | \-            | \-            | \-            | \-            | \-            | \-            |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_ABGR32``     | 'AR24'                |     | b\ :sub:`7`        | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     | a\ :sub:`7`   | a\ :sub:`6`   | a\ :sub:`5`   | a\ :sub:`4`   | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_XBGR32``     | 'XR24'                |     | b\ :sub:`7`        | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     | \-            | \-            | \-            | \-            | \-            | \-            | \-            | \-            |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_ARGB32``     | 'BA24'                |     | a\ :sub:`7`        | a\ :sub:`6`   | a\ :sub:`5`   | a\ :sub:`4`   | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   |     | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | b\ :sub:`7`   | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_XRGB32``     | 'BX24'                |     | \-                 | \-            | \-            | \-            | \-            | \-            | \-            | \-            |     | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | b\ :sub:`7`   | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |
+   +-----------------------------+-----------------------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
 
 Bit 7 is the most significant bit.
 
@@ -74,21 +95,24 @@  They are documented here for reference. The meaning of their alpha bits
 (a) is ill-defined and interpreted as in either the corresponding ARGB
 or XRGB format, depending on the driver.
 
-+----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
-| Identifier                 | Code     |     | Byte 0 in memory   | Byte 1        | Byte 2        | Byte 3        |
-+============================+==========+=====+====================+===============+===============+===============+===============+===============+===============+===============+====+===============+===============+===============+===============+===============+===============+===============+===============+====+===============+===============+===============+===============+===============+===============+===============+===============+====+===============+===============+===============+===============+===============+===============+===============+===============+
-| ``V4L2_PIX_FMT_RGB444``    | 'R444'   |     | g\ :sub:`3`        | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |    | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |
-+----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
-| ``V4L2_PIX_FMT_RGB555``    | 'RGBO'   |     | g\ :sub:`2`        | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |    | a             | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |
-+----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
-| ``V4L2_PIX_FMT_RGB555X``   | 'RGBQ'   |     | a                  | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |    | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |
-+----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
-| ``V4L2_PIX_FMT_BGR32``     | 'BGR4'   |     | b\ :sub:`7`        | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |    | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |    | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |    | a\ :sub:`7`   | a\ :sub:`6`   | a\ :sub:`5`   | a\ :sub:`4`   | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   |
-+----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
-| ``V4L2_PIX_FMT_RGB32``     | 'RGB4'   |     | a\ :sub:`7`        | a\ :sub:`6`   | a\ :sub:`5`   | a\ :sub:`4`   | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   |    | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |    | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |    | b\ :sub:`7`   | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |
-+----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+.. table:: Deprecated Packed RGB Image Formats
+   :class: noborder
 
-Table: Deprecated Packed RGB Image Formats
+   +----------------------------+----------+-----+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
+   | Identifier                 | Code     |     | Byte 0 in memory                                                                                                                         | Byte 1                                                                                                                              | Byte 2                                                                                                                              | Byte 3                                                                                                                        |
+   |                            |          +-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   |                            |          | Bit | 7                  | 6             | 5             | 4             | 3             | 2             | 1             | 0             | Bit | 7             | 6             | 5             | 4             | 3             | 2             | 1             | 0             | Bit | 7             | 6             | 5             | 4             | 3             | 2             | 1             | 0             | Bit | 7             | 6             | 5             | 4             | 3             | 2             | 1             | 0             |
+   +============================+==========+=====+====================+===============+===============+===============+===============+===============+===============+===============+=====+===============+===============+===============+===============+===============+===============+===============+===============+=====+===============+===============+===============+===============+===============+===============+===============+===============+=====+===============+===============+===============+===============+===============+===============+===============+===============+
+   | ``V4L2_PIX_FMT_RGB444``    | 'R444'   |     | g\ :sub:`3`        | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_RGB555``    | 'RGBO'   |     | g\ :sub:`2`        | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | a             | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_RGB555X``   | 'RGBQ'   |     | a                  | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   | g\ :sub:`4`   | g\ :sub:`3`   |     | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     |               |               |               |               |               |               |               |               |     |               |               |               |               |               |               |               |               |
+   +----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_BGR32``     | 'BGR4'   |     | b\ :sub:`7`        | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     | a\ :sub:`7`   | a\ :sub:`6`   | a\ :sub:`5`   | a\ :sub:`4`   | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   |
+   +----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
+   | ``V4L2_PIX_FMT_RGB32``     | 'RGB4'   |     | a\ :sub:`7`        | a\ :sub:`6`   | a\ :sub:`5`   | a\ :sub:`4`   | a\ :sub:`3`   | a\ :sub:`2`   | a\ :sub:`1`   | a\ :sub:`0`   |     | r\ :sub:`7`   | r\ :sub:`6`   | r\ :sub:`5`   | r\ :sub:`4`   | r\ :sub:`3`   | r\ :sub:`2`   | r\ :sub:`1`   | r\ :sub:`0`   |     | g\ :sub:`7`   | g\ :sub:`6`   | g\ :sub:`5`   | g\ :sub:`4`   | g\ :sub:`3`   | g\ :sub:`2`   | g\ :sub:`1`   | g\ :sub:`0`   |     | b\ :sub:`7`   | b\ :sub:`6`   | b\ :sub:`5`   | b\ :sub:`4`   | b\ :sub:`3`   | b\ :sub:`2`   | b\ :sub:`1`   | b\ :sub:`0`   |
+   +----------------------------+----------+-----+--------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-----+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
 
 A test utility to determine which RGB formats a driver actually supports
 is available from the LinuxTV v4l-dvb repository. See V4L-DVB for access
diff --git a/pixfmt-yuyv.rst b/pixfmt-yuyv.rst
index 9ec268d..9e4b6dd 100644
--- a/pixfmt-yuyv.rst
+++ b/pixfmt-yuyv.rst
@@ -11,7 +11,7 @@  In this format each four bytes is two pixels. Each four bytes is two
 Y's, a Cb and a Cr. Each Y goes to one of the pixels, and the Cb and Cr
 belong to both pixels. As you can see, the Cr and Cb components have
 half the horizontal resolution of the Y component.
-``V4L2_PIX_FMT_YUYV `` is known in the Windows environment as YUY2.
+``V4L2_PIX_FMT_YUYV`` is known in the Windows environment as YUY2.
 
 **Byte Order..**
 
diff --git a/v4l-table-within-table.rst b/v4l-table-within-table.rst
index d2a6079..c8e1b21 100644
--- a/v4l-table-within-table.rst
+++ b/v4l-table-within-table.rst
@@ -1,37 +1,41 @@ 
 V4l2 CID table example
 ======================
 
-==============================	==============	=========
-ID				Type		Definition
-==============================	==============	=========
-V4L2_CID_COLOR_KILLER		boolean		Enable the color killer (i. e. force a black & white image in case of a weak video signal).
-V4L2_CID_COLORFX		enum		Selects a color effect. The following values are defined:
-
-						==============================	=====================
-						Value				Definition
-						==============================	=====================
-						V4L2_COLORFX_NONE		Color effect is disabled.
-						V4L2_COLORFX_ANTIQUE		An aging (old photo) effect.
-						V4L2_COLORFX_ART_FREEZE		Frost color effect.
-						V4L2_COLORFX_AQUA		Water color, cool tone.
-						V4L2_COLORFX_BW			Black and white.
-						V4L2_COLORFX_EMBOSS		Emboss, the highlights and shadows replace light/dark
-										boundaries and low contrast areas are set to a gray background.
-						V4L2_COLORFX_GRASS_GREEN	Grass green.
-						V4L2_COLORFX_NEGATIVE		Negative.
-						V4L2_COLORFX_SEPIA		Sepia tone.
-						V4L2_COLORFX_SKETCH		Sketch.
-						V4L2_COLORFX_SKIN_WHITEN	Skin whiten.
-						V4L2_COLORFX_SKY_BLUE		Sky blue.
-						V4L2_COLORFX_SOLARIZATION	Solarization, the image is partially reversed in tone, only
-										color values above or below a certain threshold are inverted.
-						V4L2_COLORFX_SILHOUETTE		Silhouette (outline).
-						V4L2_COLORFX_VIVID		Vivid colors.
-						V4L2_COLORFX_SET_CBCR		The Cb and Cr chroma components are replaced by fixed coefficients
-										determined by V4L2_CID_COLORFX_CBCR control.
-						==============================	=====================
-V4L2_CID_COLORFX_CBCR		integer		Determines the Cb and Cr coefficients for V4L2_COLORFX_SET_CBCR
-						color effect. Bits [7:0] of the supplied 32 bit value are interpreted as
-						Cr component, bits [15:8] as Cb component and bits [31:16] must be zero.
-V4L2_CID_AUTOBRIGHTNESS		boolean		Enable Automatic Brightness.
-==============================	==============	=========
+.. tabularcolumns:: |l|l|p{20cm}|
+.. table::
+   :class: noborder
+   
+   ==============================  ==============  =========
+   ID                              Type            Definition
+   ==============================  ==============  =========
+   V4L2_CID_COLOR_KILLER           boolean         Enable the color killer (i. e. force a black & white image in case of a weak video signal).
+   V4L2_CID_COLORFX                enum            Selects a color effect. The following values are defined:
+   
+                                                   ==============================  =====================
+                                                   Value                           Definition
+                                                   ==============================  =====================
+                                                   V4L2_COLORFX_NONE               Color effect is disabled.
+                                                   V4L2_COLORFX_ANTIQUE            An aging (old photo) effect.
+                                                   V4L2_COLORFX_ART_FREEZE         Frost color effect.
+                                                   V4L2_COLORFX_AQUA               Water color, cool tone.
+                                                   V4L2_COLORFX_BW                 Black and white.
+                                                   V4L2_COLORFX_EMBOSS             Emboss, the highlights and shadows replace light/dark
+                                                                                   boundaries and low contrast areas are set to a gray background.
+                                                   V4L2_COLORFX_GRASS_GREEN        Grass green.
+                                                   V4L2_COLORFX_NEGATIVE           Negative.
+                                                   V4L2_COLORFX_SEPIA              Sepia tone.
+                                                   V4L2_COLORFX_SKETCH             Sketch.
+                                                   V4L2_COLORFX_SKIN_WHITEN        Skin whiten.
+                                                   V4L2_COLORFX_SKY_BLUE           Sky blue.
+                                                   V4L2_COLORFX_SOLARIZATION       Solarization, the image is partially reversed in tone, only
+                                                                                   color values above or below a certain threshold are inverted.
+                                                   V4L2_COLORFX_SILHOUETTE         Silhouette (outline).
+                                                   V4L2_COLORFX_VIVID              Vivid colors.
+                                                   V4L2_COLORFX_SET_CBCR           The Cb and Cr chroma components are replaced by fixed coefficients
+                                                                                   determined by V4L2_CID_COLORFX_CBCR control.
+                                                   ==============================  =====================
+   V4L2_CID_COLORFX_CBCR           integer         Determines the Cb and Cr coefficients for V4L2_COLORFX_SET_CBCR
+                                                   color effect. Bits [7:0] of the supplied 32 bit value are interpreted as
+                                                   Cr component, bits [15:8] as Cb component and bits [31:16] must be zero.
+   V4L2_CID_AUTOBRIGHTNESS         boolean         Enable Automatic Brightness.
+   ==============================  ==============  =========
-- 
2.7.0