Fix some issues at the media documentation to allow PDF build
Subsystems (2)
cover Fix some issues at the media documentation to allow PDF build
This patch series fix several issues with the media build.
The first 4 patches are actually some random fixups that were noticed while fixing the PDF build;
The next patch makes usage of Sphinx math expressions, to improve readability of some formulas at pixfmt-007.rst, related to color space conversions;
The 6th patch removes code blocks from tables, as Sphinx LaTeX output for those blocks are broken. As the code there is really trivial, it doesn't hurt much to just convert them into literals.
The 7th and 8th patch are actually two examples about how to improve table outputs with LaTeX/PDF. The problem is that LaTeX requires explicit markups to adjust the columns size. Also, Sphinx, by default, produce portrait, single-paged tables. Manual work will be needed to fix all tables and make them appear.
The last patch restores the build of the media documentation.
Please notice that there are some non-fatal issues related to the media header files converted by parse-headers.pl. Those don't happen on Sphinx 1.3.x. So, I suspect that this is actually due to some bug at the Sphinx 1.4.x output, but I didn't try to investigate, as just ignoring them seems to be OK (at least, visually, the output looked good on my eyes).
This series require my previous 9-patch docs-next series, with fix bugs related to LaTeX handling.
I'm pushing the entire stuff of both series on my development tree, at:
https://git.linuxtv.org//mchehab/experimental.git/log/?h=docs-next
The generated media PDF file is at:
https://mchehab.fedorapeople.org/media.pdf
Mauro Carvalho Chehab (9):
[media] pixfmt-nv12mt.rst: use PNG instead of GIF [media] vidioc-enumstd.rst: fix a broken reference [media] vidioc-enumstd.rst: remove bullets from sound carrier [media] docs-rst: better use the .. note:: tag [media] pixfmt-007.rst: use Sphinx math:: expressions [media] docs-rst: get rid of code-block inside tables [media] pixfmt-packed-rgb.rst: rotate a big table [media] vidioc-querycap.rst: Better format tables on PDF output
docs-rst: add media documentation to PDF output
Documentation/conf.py | 5 + Documentation/media/uapi/cec/cec-func-close.rst | 4 +- Documentation/media/uapi/cec/cec-func-ioctl.rst | 4 +- Documentation/media/uapi/cec/cec-func-open.rst | 4 +- Documentation/media/uapi/cec/cec-func-poll.rst | 4 +- Documentation/media/uapi/cec/cec-intro.rst | 4 +- .../media/uapi/cec/cec-ioc-adap-g-caps.rst | 4 +- .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 4 +- .../media/uapi/cec/cec-ioc-adap-g-phys-addr.rst | 4 +- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 4 +- Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 4 +- Documentation/media/uapi/cec/cec-ioc-receive.rst | 4 +- .../media/uapi/dvb/dvb-fe-read-status.rst | 4 +- Documentation/media/uapi/dvb/dvbapi.rst | 4 +- Documentation/media/uapi/dvb/dvbproperty.rst | 4 +- Documentation/media/uapi/dvb/examples.rst | 4 +- Documentation/media/uapi/dvb/fe-get-info.rst | 4 +- Documentation/media/uapi/dvb/fe-read-status.rst | 4 +- Documentation/media/uapi/dvb/frontend.rst | 4 +- .../media/uapi/rc/lirc-set-wideband-receiver.rst | 4 +- Documentation/media/uapi/v4l/audio.rst | 4 +- Documentation/media/uapi/v4l/buffer.rst | 13 +- Documentation/media/uapi/v4l/crop.rst | 12 +- Documentation/media/uapi/v4l/dev-codec.rst | 4 +- Documentation/media/uapi/v4l/dev-osd.rst | 4 +- Documentation/media/uapi/v4l/dev-overlay.rst | 8 +- Documentation/media/uapi/v4l/dev-rds.rst | 4 +- Documentation/media/uapi/v4l/extended-controls.rst | 4 +- Documentation/media/uapi/v4l/func-mmap.rst | 4 +- Documentation/media/uapi/v4l/pixfmt-006.rst | 4 +- Documentation/media/uapi/v4l/pixfmt-007.rst | 187 ++++++++++++++------- Documentation/media/uapi/v4l/pixfmt-nv12mt.rst | 4 +- .../media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif | Bin 2108 -> 0 bytes .../media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png | Bin 0 -> 1920 bytes .../v4l/pixfmt-nv12mt_files/nv12mt_example.gif | Bin 6858 -> 0 bytes .../v4l/pixfmt-nv12mt_files/nv12mt_example.png | Bin 0 -> 5261 bytes Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 9 +- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 4 +- Documentation/media/uapi/v4l/pixfmt-y16-be.rst | 4 +- Documentation/media/uapi/v4l/pixfmt-y16.rst | 4 +- Documentation/media/uapi/v4l/standard.rst | 4 +- Documentation/media/uapi/v4l/tuner.rst | 4 +- Documentation/media/uapi/v4l/userp.rst | 4 +- .../media/uapi/v4l/vidioc-dv-timings-cap.rst | 4 +- .../media/uapi/v4l/vidioc-enum-dv-timings.rst | 4 +- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 14 +- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 4 +- .../media/uapi/v4l/vidioc-enum-framesizes.rst | 4 +- .../media/uapi/v4l/vidioc-enum-freq-bands.rst | 4 +- .../media/uapi/v4l/vidioc-enumaudioout.rst | 4 +- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 27 ++- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 4 +- Documentation/media/uapi/v4l/vidioc-g-edid.rst | 4 +- .../media/uapi/v4l/vidioc-g-ext-ctrls.rst | 8 +- .../media/uapi/v4l/vidioc-g-modulator.rst | 4 +- .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 4 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 8 +- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 4 +- .../media/uapi/v4l/vidioc-query-dv-timings.rst | 4 +- Documentation/media/uapi/v4l/vidioc-querycap.rst | 22 +-- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 16 +- Documentation/media/uapi/v4l/vidioc-querystd.rst | 4 +- Documentation/media/uapi/v4l/vidioc-streamon.rst | 4 +- .../media/uapi/v4l/vidioc-subscribe-event.rst | 4 +- Documentation/media/v4l-drivers/bttv.rst | 1 + 65 files changed, 360 insertions(+), 162 deletions(-) delete mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif create mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png delete mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif create mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png
Signature · 1 line
2.7.4
PATCH 1/9 pixfmt-nv12mt.rst: use PNG instead of GIF
pdflatex doesn't like gif images:
None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.*' None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.*'
But it works fine with png. So, convert them. As a plus, PNG images are smaller.
--- Documentation/media/uapi/v4l/pixfmt-nv12mt.rst | 4 ++-- .../media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif | Bin 2108 -> 0 bytes .../media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png | Bin 0 -> 1920 bytes .../uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif | Bin 6858 -> 0 bytes .../uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png | Bin 0 -> 5261 bytes 5 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif create mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png delete mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif create mode 100644 Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png
Documentation/media/uapi/v4l/pixfmt-nv12mt.rst +2 -2
@@ -36,7 +36,7 @@ Layout of macroblocks in memory is presented in the following figure. .. _nv12mt: .. figure:: pixfmt-nv12mt_files/nv12mt.* - :alt: nv12mt.gif + :alt: nv12mt.png :align: center V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout
@@ -53,7 +53,7 @@ interleaved. Height of the buffer is aligned to 32. .. _nv12mt_ex: .. figure:: pixfmt-nv12mt_files/nv12mt_example.* - :alt: nv12mt_example.gif + :alt: nv12mt_example.png :align: center Example V4L2_PIX_FMT_NV12MT memory layout of macroblocks
Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif deleted binary +0 -0
Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png new file binary +0 -0
Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif deleted binary +0 -0
Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png new file binary +0 -0
Signature · 1 line
2.7.4
PATCH 2/9 vidioc-enumstd.rst: fix a broken reference
In reply to Mauro Carvalho ChehabSomehow, the conversion broke a reference here. Re-add it.
--- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/media/uapi/v4l/vidioc-enumstd.rst +1 -1
@@ -269,7 +269,7 @@ support digital TV. See also the Linux DVB API at .. _video-standards: -.. flat-table:: Video Standards (based on []) +.. flat-table:: Video Standards (based on :ref:`itu470`) :header-rows: 1 :stub-columns: 0
Signature · 1 line
2.7.4
PATCH 3/9 vidioc-enumstd.rst: remove bullets from sound carrier
In reply to Mauro Carvalho ChehabThe items at the sound carrier had a bullet. Those are not needed.
So, get rid of them.
--- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)
Documentation/media/uapi/v4l/vidioc-enumstd.rst +12 -13
@@ -330,8 +330,7 @@ support digital TV. See also the Linux DVB API at - 4433618.75 ± 1 - - :cspan:`3` f\ :sub:`OR` = 4406250 ± 2000, f\ :sub:`OB` = 4250000 - ± 2000 + - :cspan:`3` f\ :sub:`OR` = 4406250 ± 2000, f\ :sub:`OB` = 4250000 ± 2000 - .. row 5
@@ -363,27 +362,27 @@ support digital TV. See also the Linux DVB API at - Sound carrier relative to vision carrier (MHz) - - + 4.5 + - 4.5 - - + 4.5 + - 4.5 - - + 4.5 + - 4.5 - - + 5.5 ± 0.001 [#f4]_ [#f5]_ [#f6]_ [#f7]_ + - 5.5 ± 0.001 [#f4]_ [#f5]_ [#f6]_ [#f7]_ - - + 6.5 ± 0.001 + - 6.5 ± 0.001 - - + 5.5 + - 5.5 - - + 5.9996 ± 0.0005 + - 5.9996 ± 0.0005 - - + 5.5 ± 0.001 + - 5.5 ± 0.001 - - + 6.5 ± 0.001 + - 6.5 ± 0.001 - - + 6.5 + - 6.5 - - + 6.5 [#f8]_ + - 6.5 [#f8]_ Return Value
Signature · 1 line
2.7.4
PATCH 4/9 docs-rst: better use the .. note:: tag
In reply to Mauro Carvalho ChehabChange multi-line note tags to be more symetric, e. g. not starting the text together witht the tag.
--- Documentation/media/uapi/cec/cec-func-close.rst | 4 +++- Documentation/media/uapi/cec/cec-func-ioctl.rst | 4 +++- Documentation/media/uapi/cec/cec-func-open.rst | 4 +++- Documentation/media/uapi/cec/cec-func-poll.rst | 4 +++- Documentation/media/uapi/cec/cec-intro.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst | 4 +++- .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 4 +++- .../media/uapi/cec/cec-ioc-adap-g-phys-addr.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-receive.rst | 4 +++- Documentation/media/uapi/dvb/dvb-fe-read-status.rst | 4 +++- Documentation/media/uapi/dvb/dvbapi.rst | 4 +++- Documentation/media/uapi/dvb/dvbproperty.rst | 4 +++- Documentation/media/uapi/dvb/examples.rst | 4 +++- Documentation/media/uapi/dvb/fe-get-info.rst | 4 +++- Documentation/media/uapi/dvb/fe-read-status.rst | 4 +++- Documentation/media/uapi/dvb/frontend.rst | 4 +++- .../media/uapi/rc/lirc-set-wideband-receiver.rst | 4 +++- Documentation/media/uapi/v4l/audio.rst | 4 +++- Documentation/media/uapi/v4l/buffer.rst | 13 ++++++++++--- Documentation/media/uapi/v4l/crop.rst | 12 +++++++++--- Documentation/media/uapi/v4l/dev-codec.rst | 4 +++- Documentation/media/uapi/v4l/dev-osd.rst | 4 +++- Documentation/media/uapi/v4l/dev-overlay.rst | 8 ++++++-- Documentation/media/uapi/v4l/dev-rds.rst | 4 +++- Documentation/media/uapi/v4l/extended-controls.rst | 4 +++- Documentation/media/uapi/v4l/func-mmap.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-006.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-007.rst | 12 +++++++++--- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-y16-be.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-y16.rst | 4 +++- Documentation/media/uapi/v4l/standard.rst | 4 +++- Documentation/media/uapi/v4l/tuner.rst | 4 +++- Documentation/media/uapi/v4l/userp.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 9 ++++++--- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enumaudioout.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-edid.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 8 ++++++-- Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 8 ++++++-- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 16 ++++++++++++---- Documentation/media/uapi/v4l/vidioc-querystd.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-streamon.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-subscribe-event.rst | 4 +++- Documentation/media/v4l-drivers/bttv.rst | 1 + 56 files changed, 206 insertions(+), 69 deletions(-)
Documentation/media/uapi/cec/cec-func-close.rst +3 -1
@@ -32,7 +32,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. Closes the cec device. Resources associated with the file descriptor are
Documentation/media/uapi/cec/cec-func-ioctl.rst +3 -1
@@ -38,7 +38,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. The :c:func:`ioctl()` function manipulates cec device parameters. The
Documentation/media/uapi/cec/cec-func-open.rst +3 -1
@@ -45,7 +45,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To open a cec device applications call :c:func:`open()` with the
Documentation/media/uapi/cec/cec-func-poll.rst +3 -1
@@ -29,7 +29,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. With the :c:func:`poll()` function applications can wait for CEC
Documentation/media/uapi/cec/cec-intro.rst +3 -1
@@ -3,7 +3,9 @@ Introduction ============ -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. HDMI connectors provide a single pin for use by the Consumer Electronics
Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst +3 -1
@@ -31,7 +31,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst +3 -1
@@ -35,7 +35,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To query the current CEC logical addresses, applications call
Documentation/media/uapi/cec/cec-ioc-adap-g-phys-addr.rst +3 -1
@@ -34,7 +34,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To query the current physical address applications call
Documentation/media/uapi/cec/cec-ioc-dqevent.rst +3 -1
@@ -32,7 +32,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. CEC devices can send asynchronous events. These can be retrieved by
Documentation/media/uapi/cec/cec-ioc-g-mode.rst +3 -1
@@ -30,7 +30,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. By default any filehandle can use :ref:`CEC_TRANSMIT`, but in order to prevent
Documentation/media/uapi/cec/cec-ioc-receive.rst +3 -1
@@ -33,7 +33,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To receive a CEC message the application has to fill in the
Documentation/media/uapi/dvb/dvb-fe-read-status.rst +3 -1
@@ -17,7 +17,9 @@ using :ref:`FE_READ_STATUS`. Signal statistics are provided via :ref:`FE_GET_PROPERTY`. -.. note:: Most statistics require the demodulator to be fully locked +.. note:: + + Most statistics require the demodulator to be fully locked (e. g. with FE_HAS_LOCK bit set). See :ref:`Frontend statistics indicators <frontend-stat-properties>` for more details.
Documentation/media/uapi/dvb/dvbapi.rst +3 -1
@@ -8,7 +8,9 @@ Part II - Digital TV API ######################## -.. note:: This API is also known as **DVB API**, although it is generic +.. note:: + + This API is also known as **DVB API**, although it is generic enough to support all digital TV standards. **Version 5.10**
Documentation/media/uapi/dvb/dvbproperty.rst +3 -1
@@ -20,7 +20,9 @@ Also, the union didn't have any space left to be expanded without breaking userspace. So, the decision was to deprecate the legacy union/struct based approach, in favor of a properties set approach. -.. note:: On Linux DVB API version 3, setting a frontend were done via +.. note:: + + On Linux DVB API version 3, setting a frontend were done via :ref:`struct dvb_frontend_parameters <dvb-frontend-parameters>`. This got replaced on version 5 (also called "S2API", as this API were added originally_enabled to provide support for DVB-S2), because the
Documentation/media/uapi/dvb/examples.rst +3 -1
@@ -9,7 +9,9 @@ Examples In this section we would like to present some examples for using the DVB API. -..note:: This section is out of date, and the code below won't even +..note:: + + This section is out of date, and the code below won't even compile. Please refer to the `libdvbv5 <https://linuxtv.org/docs/libdvbv5/index.html>`__ for updated/recommended examples.
Documentation/media/uapi/dvb/fe-get-info.rst +3 -1
@@ -144,7 +144,9 @@ struct dvb_frontend_info - Capabilities supported by the frontend -.. note:: The frequencies are specified in Hz for Terrestrial and Cable +.. note:: + + The frequencies are specified in Hz for Terrestrial and Cable systems. They're specified in kHz for Satellite systems
Documentation/media/uapi/dvb/fe-read-status.rst +3 -1
@@ -40,7 +40,9 @@ used to check about the locking status of the frontend after being tuned. The ioctl takes a pointer to an integer where the status will be written. -.. note:: The size of status is actually sizeof(enum fe_status), with +.. note:: + + The size of status is actually sizeof(enum fe_status), with varies according with the architecture. This needs to be fixed in the future.
Documentation/media/uapi/dvb/frontend.rst +3 -1
@@ -29,7 +29,9 @@ The frontend can be accessed through ``/dev/dvb/adapter?/frontend?``. Data types and ioctl definitions can be accessed by including ``linux/dvb/frontend.h`` in your application. -.. note:: Transmission via the internet (DVB-IP) is not yet handled by this +.. note:: + + Transmission via the internet (DVB-IP) is not yet handled by this API but a future extension is possible. On Satellite systems, the API support for the Satellite Equipment
Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst +3 -1
@@ -42,7 +42,9 @@ that prevents them to be used with some remotes. Wide band receiver might also be more precise. On the other hand its disadvantage it usually reduced range of reception. -.. note:: Wide band receiver might be implictly enabled if you enable +.. note:: + + Wide band receiver might be implictly enabled if you enable carrier reports. In that case it will be disabled as soon as you disable carrier reports. Trying to disable wide band receiver while carrier reports are active will do nothing.
Documentation/media/uapi/v4l/audio.rst +3 -1
@@ -37,7 +37,9 @@ The :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and :ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDOUT>` ioctls report the current audio input and output, respectively. -.. note:: Note that, unlike :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and +.. note:: + + Note that, unlike :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and :ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` these ioctls return a structure as :ref:`VIDIOC_ENUMAUDIO` and :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>` do, not just an index.
Documentation/media/uapi/v4l/buffer.rst +10 -3
@@ -166,12 +166,15 @@ struct v4l2_buffer output device because the application did not pass new data in time. - .. note:: This may count the frames received e.g. over USB, without + .. note:: + + This may count the frames received e.g. over USB, without taking into account the frames dropped by the remote hardware due to limited compression throughput or bus bandwidth. These devices identify by not enumerating any video standards, see :ref:`standard`. + - .. row 10 - __u32
@@ -299,7 +302,9 @@ struct v4l2_plane ``bytesused`` will be set to the size of the plane (see the ``length`` field of this struct) by the driver. - .. note:: Note that the actual image data starts at ``data_offset`` + .. note:: + + Note that the actual image data starts at ``data_offset`` which may not be 0. - .. row 2
@@ -371,7 +376,9 @@ struct v4l2_plane field when ``type`` refers to a capture stream, applications when it refers to an output stream. - .. note:: That data_offset is included in ``bytesused``. So the + .. note:: + + That data_offset is included in ``bytesused``. So the size of the image in the plane is ``bytesused``-``data_offset`` at offset ``data_offset`` from the start of the plane.
Documentation/media/uapi/v4l/crop.rst +9 -3
@@ -15,7 +15,9 @@ offset into a video signal. Applications can use the following API to select an area in the video signal, query the default area and the hardware limits. -.. note:: Despite their name, the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>`, +.. note:: + + Despite their name, the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>`, :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls apply to input as well as output devices.
@@ -38,7 +40,9 @@ support scaling or the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls. Their size (and position where applicable) will be fixed in this case. -.. note:: All capture and output devices must support the +.. note:: + + All capture and output devices must support the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` ioctl such that applications can determine if scaling takes place.
@@ -144,7 +148,9 @@ reopening a device, such that piping data into or out of a device will work without special preparations. More advanced applications should ensure the parameters are suitable before starting I/O. -.. note:: On the next two examples, a video capture device is assumed; +.. note:: + + On the next two examples, a video capture device is assumed; change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device. Example: Resetting the cropping parameters
Documentation/media/uapi/v4l/dev-codec.rst +3 -1
@@ -21,7 +21,9 @@ for both capture and output to start the codec. Video compression codecs use the MPEG controls to setup their codec parameters -.. note:: The MPEG controls actually support many more codecs than +.. note:: + + The MPEG controls actually support many more codecs than just MPEG. See :ref:`mpeg-controls`. Memory-to-memory devices can often be used as a shared resource: you can
Documentation/media/uapi/v4l/dev-osd.rst +3 -1
@@ -16,7 +16,9 @@ this interface, which borrows structures and ioctls of the The OSD function is accessible through the same character special file as the :ref:`Video Output <capture>` function. -.. note:: The default function of such a ``/dev/video`` device is video +.. note:: + + The default function of such a ``/dev/video`` device is video capturing or output. The OSD function is only available after calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
Documentation/media/uapi/v4l/dev-overlay.rst +6 -2
@@ -19,7 +19,9 @@ video into a window. Video overlay devices are accessed through the same character special files as :ref:`video capture <capture>` devices. -.. note:: The default function of a ``/dev/video`` device is video +.. note:: + + The default function of a ``/dev/video`` device is video capturing. The overlay function is only available after calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
@@ -236,7 +238,9 @@ exceeded are undefined. [#f3]_ :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`, :ref:`framebuffer-flags`). - .. note:: This field was added in Linux 2.6.23, extending the + .. note:: + + This field was added in Linux 2.6.23, extending the structure. However the :ref:`VIDIOC_[G|S|TRY]_FMT <VIDIOC_G_FMT>` ioctls, which take a pointer to a :ref:`v4l2_format <v4l2-format>` parent structure with padding bytes at the end, are not affected.
Documentation/media/uapi/v4l/dev-rds.rst +3 -1
@@ -14,7 +14,9 @@ at devices capable of receiving and/or transmitting RDS information. For more information see the core RDS standard :ref:`iec62106` and the RBDS standard :ref:`nrsc4`. -.. note:: Note that the RBDS standard as is used in the USA is almost +.. note:: + + Note that the RBDS standard as is used in the USA is almost identical to the RDS standard. Any RDS decoder/encoder can also handle RBDS. Only some of the fields have slightly different meanings. See the RBDS standard for more information.
Documentation/media/uapi/v4l/extended-controls.rst +3 -1
@@ -184,7 +184,9 @@ Codec Control Reference Below all controls within the Codec control class are described. First the generic controls, then controls specific for certain hardware. -.. note:: These controls are applicable to all codecs and not just MPEG. The +.. note:: + + These controls are applicable to all codecs and not just MPEG. The defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls were originally made for MPEG codecs and later extended to cover all encoding formats.
Documentation/media/uapi/v4l/func-mmap.rst +3 -1
@@ -78,7 +78,9 @@ Arguments ``MAP_SHARED`` allows applications to share the mapped memory with other (e. g. child-) processes. - .. note:: The Linux ``videobuf`` module which is used by some + .. note:: + + The Linux ``videobuf`` module which is used by some drivers supports only ``MAP_SHARED``. ``MAP_PRIVATE`` requests copy-on-write semantics. V4L2 applications should not set the ``MAP_PRIVATE``, ``MAP_DENYWRITE``, ``MAP_EXECUTABLE`` or ``MAP_ANON``
Documentation/media/uapi/v4l/pixfmt-006.rst +3 -1
@@ -19,7 +19,9 @@ colorspace field of struct :ref:`v4l2_pix_format <v4l2-pix-format>` or struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` needs to be filled in. -.. note:: The default R'G'B' quantization is full range for all +.. note:: + + The default R'G'B' quantization is full range for all colorspaces except for BT.2020 which uses limited range R'G'B' quantization.
Documentation/media/uapi/v4l/pixfmt-007.rst +9 -3
@@ -538,7 +538,9 @@ projectors that use the DCI-P3 colorspace. The default transfer function is ``V4L2_XFER_FUNC_DCI_P3``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_709``. -.. note:: Note that this colorspace does not specify a +.. note:: + + Note that this colorspace does not specify a Y'CbCr encoding since it is not meant to be encoded to Y'CbCr. So this default Y'CbCr encoding was picked because it is the HDTV encoding. The default Y'CbCr quantization is limited range. The chromaticities of the
@@ -754,7 +756,9 @@ reference are: - 0.316 -.. note:: This colorspace uses Illuminant C instead of D65 as the white +.. note:: + + This colorspace uses Illuminant C instead of D65 as the white reference. To correctly convert an image in this colorspace to another that uses D65 you need to apply a chromatic adaptation algorithm such as the Bradford method.
@@ -888,7 +892,9 @@ reference are identical to sRGB. The transfer function use is with full range quantization where Y' is scaled to [0…255] and Cb/Cr are scaled to [-128…128] and then clipped to [-128…127]. -.. note:: The JPEG standard does not actually store colorspace +.. note:: + + The JPEG standard does not actually store colorspace information. So if something other than sRGB is used, then the driver will have to set that information explicitly. Effectively ``V4L2_COLORSPACE_JPEG`` can be considered to be an abbreviation for
Documentation/media/uapi/v4l/pixfmt-sbggr16.rst +3 -1
@@ -19,7 +19,9 @@ This format is similar to has a depth of 16 bits. The least significant byte is stored at lower memory addresses (little-endian). -..note:: The actual sampling precision may be lower than 16 bits, +..note:: + + The actual sampling precision may be lower than 16 bits, for example 10 bits per pixel with values in tange 0 to 1023. **Byte Order.**
Documentation/media/uapi/v4l/pixfmt-y16-be.rst +3 -1
@@ -17,7 +17,9 @@ Description This is a grey-scale image with a depth of 16 bits per pixel. The most significant byte is stored at lower memory addresses (big-endian). -.. note:: Tthe actual sampling precision may be lower than 16 bits, for +.. note:: + + The actual sampling precision may be lower than 16 bits, for example 10 bits per pixel with values in range 0 to 1023. **Byte Order.**
Documentation/media/uapi/v4l/pixfmt-y16.rst +3 -1
@@ -17,7 +17,9 @@ Description This is a grey-scale image with a depth of 16 bits per pixel. The least significant byte is stored at lower memory addresses (little-endian). -.. note:: The actual sampling precision may be lower than 16 bits, for +.. note:: + + The actual sampling precision may be lower than 16 bits, for example 10 bits per pixel with values in range 0 to 1023. **Byte Order.**
Documentation/media/uapi/v4l/standard.rst +3 -1
@@ -41,7 +41,9 @@ output applications call the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and *received* standard can be sensed with the :ref:`VIDIOC_QUERYSTD` ioctl. -..note:: The parameter of all these ioctls is a pointer to a +..note:: + + The parameter of all these ioctls is a pointer to a :ref:`v4l2_std_id <v4l2-std-id>` type (a standard set), *not* an index into the standard enumeration. Drivers must implement all video standard ioctls when the device has one or more video inputs or outputs.
Documentation/media/uapi/v4l/tuner.rst +3 -1
@@ -28,7 +28,9 @@ struct :ref:`v4l2_tuner <v4l2-tuner>` returned by :ref:`VIDIOC_G_TUNER <VIDIOC_G also contains signal status information applicable when the tuner of the current video or radio input is queried. -.. note:: :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` does not switch the +.. note:: + + :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` does not switch the current tuner, when there is more than one at all. The tuner is solely determined by the current video input. Drivers must support both ioctls and set the ``V4L2_CAP_TUNER`` flag in the struct :ref:`v4l2_capability
Documentation/media/uapi/v4l/userp.rst +3 -1
@@ -88,7 +88,9 @@ To start and stop capturing or output applications call the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctl. -.. note:: ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` removes all buffers from +.. note:: + + ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` removes all buffers from both queues and unlocks all buffers as a side effect. Since there is no notion of doing anything "now" on a multitasking system, if an application needs to synchronize with another event it should examine
Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst +3 -1
@@ -39,7 +39,9 @@ initialize the ``pad`` field to 0, zero the reserved array of struct ``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill in the structure. -.. note:: Drivers may return different values after +.. note:: + + Drivers may return different values after switching the video input or output. When implemented by the driver DV capabilities of subdevices can be
Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst +3 -1
@@ -49,7 +49,9 @@ error code when the index is out of bounds. To enumerate all supported DV timings, applications shall begin at index zero, incrementing by one until the driver returns ``EINVAL``. -.. note:: Drivers may enumerate a different set of DV timings after +.. note:: + + Drivers may enumerate a different set of DV timings after switching the video input or output. When implemented by the driver DV timings of subdevices can be queried
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +6 -3
@@ -40,7 +40,9 @@ fill the rest of the structure or return an ``EINVAL`` error code. All formats are enumerable by beginning at index zero and incrementing by one until ``EINVAL`` is returned. -.. note:: After switching input or output the list of enumerated image +.. note:: + + After switching input or output the list of enumerated image formats may be different.
@@ -51,7 +53,6 @@ one until ``EINVAL`` is returned. :stub-columns: 0 :widths: 1 1 2 - - .. row 1 - __u32
@@ -113,7 +114,9 @@ one until ``EINVAL`` is returned. Several image formats are already defined by this specification in :ref:`pixfmt`. - .. attention:: These codes are not the same as those used + .. attention:: + + These codes are not the same as those used in the Windows world. - .. row 7
Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst +3 -1
@@ -73,7 +73,9 @@ the device supports. Only for the ``V4L2_FRMIVAL_TYPE_DISCRETE`` type does it make sense to increase the index value to receive more frame intervals. -.. note:: The order in which the frame intervals are returned has no +.. note:: + + The order in which the frame intervals are returned has no special meaning. In particular does it not say anything about potential default frame intervals.
Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst +3 -1
@@ -72,7 +72,9 @@ the ``type`` field to determine the type of frame size enumeration the device supports. Only for the ``V4L2_FRMSIZE_TYPE_DISCRETE`` type does it make sense to increase the index value to receive more frame sizes. -.. note:: The order in which the frame sizes are returned has no special +.. note:: + + The order in which the frame sizes are returned has no special meaning. In particular does it not say anything about potential default format sizes.
Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst +3 -1
@@ -129,7 +129,9 @@ of the corresponding tuner/modulator is set. - :cspan:`2` The supported modulation systems of this frequency band. See :ref:`band-modulation`. - .. note:: Currently only one modulation system per frequency band + .. note:: + + Currently only one modulation system per frequency band is supported. More work will need to be done if multiple modulation systems are possible. Contact the linux-media mailing list
Documentation/media/uapi/v4l/vidioc-enumaudioout.rst +3 -1
@@ -41,7 +41,9 @@ structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all audio outputs applications shall begin at index zero, incrementing by one until the driver returns ``EINVAL``. -.. note:: Connectors on a TV card to loop back the received audio signal +.. note:: + + Connectors on a TV card to loop back the received audio signal to a sound card are not audio outputs in this sense. See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct
Documentation/media/uapi/v4l/vidioc-g-audioout.rst +3 -1
@@ -51,7 +51,9 @@ return the ``EINVAL`` error code when the index is out of bounds. This is a write-only ioctl, it does not return the current audio output attributes as ``VIDIOC_G_AUDOUT`` does. -.. note:: Connectors on a TV card to loop back the received audio signal +.. note:: + + Connectors on a TV card to loop back the received audio signal to a sound card are not audio outputs in this sense.
Documentation/media/uapi/v4l/vidioc-g-edid.rst +3 -1
@@ -67,7 +67,9 @@ total number of available EDID blocks and it will return 0 without copying any data. This is an easy way to discover how many EDID blocks there are. -.. note:: If there are no EDID blocks available at all, then +.. note:: + + If there are no EDID blocks available at all, then the driver will set ``blocks`` to 0 and it returns 0. To set the EDID blocks of a receiver the application has to fill in the
Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst +6 -2
@@ -127,7 +127,9 @@ still cause this situation. to a value large enough to store the payload result and ``ENOSPC`` is returned. - .. note:: For string controls, this ``size`` field should + .. note:: + + For string controls, this ``size`` field should not be confused with the length of the string. This field refers to the size of the memory that contains the string. The actual *length* of the string may well be much smaller.
@@ -265,7 +267,9 @@ still cause this situation. control and ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default value of the control. - .. note:: You can only get the default value of the control, + .. note:: + + You can only get the default value of the control, you cannot set or try it. For backwards compatibility you can also use a control class here
Documentation/media/uapi/v4l/vidioc-g-modulator.rst +3 -1
@@ -130,7 +130,9 @@ To change the radio frequency the shall be modulated. It contains a set of flags as defined in :ref:`modulator-txsubchans`. - .. note:: The tuner ``rxsubchans`` flags are reused, but the + .. note:: + + The tuner ``rxsubchans`` flags are reused, but the semantics are different. Video output devices are assumed to have an analog or PCM audio input with 1-3 channels. The ``txsubchans`` flags select one or more channels
Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst +3 -1
@@ -40,7 +40,9 @@ output device, applications initialize the ``type`` field of a struct driver fills in the remaining fields or returns an ``EINVAL`` error code if the sliced VBI API is unsupported or ``type`` is invalid. -.. note:: The ``type`` field was added, and the ioctl changed from read-only +.. note:: + + The ``type`` field was added, and the ioctl changed from read-only to write-read, in Linux 2.6.19.
Documentation/media/uapi/v4l/vidioc-g-tuner.rst +6 -2
@@ -391,7 +391,9 @@ To change the radio frequency the carrier for a monaural secondary language. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability. - .. note:: The ``V4L2_TUNER_CAP_LANG2`` and ``V4L2_TUNER_CAP_SAP`` + .. note:: + + The ``V4L2_TUNER_CAP_LANG2`` and ``V4L2_TUNER_CAP_SAP`` flags are synonyms. ``V4L2_TUNER_CAP_SAP`` applies when the tuner supports the ``V4L2_STD_NTSC_M`` video standard.
@@ -502,7 +504,9 @@ To change the radio frequency the - The tuner receives a Second Audio Program. - .. note:: The ``V4L2_TUNER_SUB_LANG2`` and ``V4L2_TUNER_SUB_SAP`` + .. note:: + + The ``V4L2_TUNER_SUB_LANG2`` and ``V4L2_TUNER_SUB_SAP`` flags are synonyms. The ``V4L2_TUNER_SUB_SAP`` flag applies when the current video standard is ``V4L2_STD_NTSC_M``.
Documentation/media/uapi/v4l/vidioc-qbuf.rst +3 -1
@@ -137,7 +137,9 @@ EIO ``VIDIOC_DQBUF`` failed due to an internal error. Can also indicate temporary problems like signal loss. - .. note:: The driver might dequeue an (empty) buffer despite returning + .. note:: + + The driver might dequeue an (empty) buffer despite returning an error, or even stop capturing. Reusing such buffer may be unsafe though and its details (e.g. ``index``) may not be returned either. It is recommended that drivers indicate recoverable errors by setting
Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst +3 -1
@@ -39,7 +39,9 @@ similar to sensing the video standard. To do so, applications call :ref:`v4l2_dv_timings <v4l2-dv-timings>`. Once the hardware detects the timings, it will fill in the timings structure. -.. note:: Drivers shall *not* switch timings automatically if new +.. note:: + + Drivers shall *not* switch timings automatically if new timings are detected. Instead, drivers should send the ``V4L2_EVENT_SOURCE_CHANGE`` event (if they support this) and expect that userspace will take action by calling :ref:`VIDIOC_QUERY_DV_TIMINGS`.
Documentation/media/uapi/v4l/vidioc-queryctrl.rst +12 -4
@@ -84,7 +84,9 @@ fills the rest of the structure or returns an ``EINVAL`` error code when the :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``minimum`` to ``maximum``, inclusive. -.. note:: It is possible for ``VIDIOC_QUERYMENU`` to return +.. note:: + + It is possible for ``VIDIOC_QUERYMENU`` to return an ``EINVAL`` error code for some indices between ``minimum`` and ``maximum``. In that case that particular menu item is not supported by this driver. Also note that the ``minimum`` value is not necessarily 0.
@@ -188,7 +190,9 @@ See also the examples in :ref:`control`. ``_BITMASK``, ``_MENU`` or ``_INTEGER_MENU`` control. Not valid for other types of controls. - .. note:: Drivers reset controls to their default value only when + .. note:: + + Drivers reset controls to their default value only when the driver is first loaded, never afterwards. - .. row 8
@@ -306,7 +310,9 @@ See also the examples in :ref:`control`. ``_BOOLEAN``, ``_BITMASK``, ``_MENU``, ``_INTEGER_MENU``, ``_U8`` or ``_U16`` control. Not valid for other types of controls. - .. note:: Drivers reset controls to their default value only when + .. note:: + + Drivers reset controls to their default value only when the driver is first loaded, never afterwards. - .. row 8
@@ -728,7 +734,9 @@ See also the examples in :ref:`control`. case the hardware calculates the gain value based on the lighting conditions which can change over time. - .. note:: Setting a new value for a volatile control will have no + .. note:: + + Setting a new value for a volatile control will have no effect and no ``V4L2_EVENT_CTRL_CH_VALUE`` will be sent, unless the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` flag (see below) is also set. Otherwise the new value will just be ignored.
Documentation/media/uapi/v4l/vidioc-querystd.rst +3 -1
@@ -43,7 +43,9 @@ will return V4L2_STD_UNKNOWN. When detection is not possible or fails, the set must contain all standards supported by the current video input or output. -.. note:: Drivers shall *not* switch the video standard +.. note:: + + Drivers shall *not* switch the video standard automatically if a new video standard is detected. Instead, drivers should send the ``V4L2_EVENT_SOURCE_CHANGE`` event (if they support this) and expect that userspace will take action by calling
Documentation/media/uapi/v4l/vidioc-streamon.rst +3 -1
@@ -76,7 +76,9 @@ then 0 is returned. Nothing happens in the case of ``VIDIOC_STREAMON``, but ``VIDIOC_STREAMOFF`` will return queued buffers to their starting state as mentioned above. -.. note:: Applications can be preempted for unknown periods right before +.. note:: + + Applications can be preempted for unknown periods right before or after the ``VIDIOC_STREAMON`` or ``VIDIOC_STREAMOFF`` calls, there is no notion of starting or stopping "now". Buffer timestamps can be used to synchronize with other events.
Documentation/media/uapi/v4l/vidioc-subscribe-event.rst +3 -1
@@ -54,7 +54,9 @@ using the :ref:`VIDIOC_DQEVENT` ioctl. - Type of the event, see :ref:`event-type`. - .. note:: ``V4L2_EVENT_ALL`` can be used with + .. note:: + + ``V4L2_EVENT_ALL`` can be used with :ref:`VIDIOC_UNSUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>` for unsubscribing all events at once.
Documentation/media/v4l-drivers/bttv.rst +1 -0
@@ -586,6 +586,7 @@ Cards ----- .. note:: + For a more updated list, please check https://linuxtv.org/wiki/index.php/Hardware_Device_Information
Signature · 1 line
2.7.4
PATCH 5/9 pixfmt-007.rst: use Sphinx math:: expressions
In reply to Mauro Carvalho ChehabEnrich math formulas by using the Sphinx math. That will allow using those formulas on pdf documents as well.
--- Documentation/media/uapi/v4l/pixfmt-007.rst | 175 ++++++++++++++++++---------- 1 file changed, 114 insertions(+), 61 deletions(-)
Documentation/media/uapi/v4l/pixfmt-007.rst +114 -61
@@ -72,23 +72,29 @@ SMPTE C set, so this colorspace is sometimes called SMPTE C as well. The transfer function defined for SMPTE 170M is the same as the one defined in Rec. 709. - L' = -1.099(-L) :sup:`0.45` + 0.099 for L ≤ -0.018 +.. math:: - L' = 4.5L for -0.018 < L < 0.018 + L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le-0.018 - L' = 1.099L :sup:`0.45` - 0.099 for L ≥ 0.018 + L' = 4.5L \text{, for } -0.018 < L < 0.018 + + L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018 Inverse Transfer function: - L = -((L' - 0.099) / -1.099) :sup:`1/0.45` for L' ≤ -0.081 +.. math:: - L = L' / 4.5 for -0.081 < L' < 0.081 + L = -\left( \frac{L' - 0.099}{-1.099} \right) ^{\frac{1}{0.45}} \text{, for } L' \le -0.081 - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \frac{L'}{4.5} \text{, for } -0.081 < L' < 0.081 + + L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: +.. math:: + Y' = 0.299R' + 0.587G' + 0.114B' Cb = -0.169R' - 0.331G' + 0.5B'
@@ -169,23 +175,29 @@ The full name of this standard is Rec. ITU-R BT.709-5. Transfer function. Normally L is in the range [0…1], but for the extended gamut xvYCC encoding values outside that range are allowed. - L' = -1.099(-L) :sup:`0.45` + 0.099 for L ≤ -0.018 +.. math:: - L' = 4.5L for -0.018 < L < 0.018 + L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le -0.018 - L' = 1.099L :sup:`0.45` - 0.099 for L ≥ 0.018 + L' = 4.5L \text{, for } -0.018 < L < 0.018 + + L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018 Inverse Transfer function: - L = -((L' - 0.099) / -1.099) :sup:`1/0.45` for L' ≤ -0.081 +.. math:: - L = L' / 4.5 for -0.081 < L' < 0.081 + L = -\left( \frac{L' - 0.099}{-1.099} \right)^\frac{1}{0.45} \text{, for } L' \le -0.081 - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \frac{L'}{4.5}\text{, for } -0.081 < L' < 0.081 + + L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_709`` encoding: +.. math:: + Y' = 0.2126R' + 0.7152G' + 0.0722B' Cb = -0.1146R' - 0.3854G' + 0.5B'
@@ -210,22 +222,26 @@ similar to the Rec. 709 encoding, but it allows for R', G' and B' values that are outside the range [0…1]. The resulting Y', Cb and Cr values are scaled and offset: - Y' = (219 / 256) * (0.2126R' + 0.7152G' + 0.0722B') + (16 / 256) +.. math:: - Cb = (224 / 256) * (-0.1146R' - 0.3854G' + 0.5B') + Y' = \frac{219}{256} * (0.2126R' + 0.7152G' + 0.0722B') + \frac{16}{256} - Cr = (224 / 256) * (0.5R' - 0.4542G' - 0.0458B') + Cb = \frac{224}{256} * (-0.1146R' - 0.3854G' + 0.5B') + + Cr = \frac{224}{256} * (0.5R' - 0.4542G' - 0.0458B') The xvYCC 601 encoding (``V4L2_YCBCR_ENC_XV601``, :ref:`xvycc`) is similar to the BT.601 encoding, but it allows for R', G' and B' values that are outside the range [0…1]. The resulting Y', Cb and Cr values are scaled and offset: - Y' = (219 / 256) * (0.299R' + 0.587G' + 0.114B') + (16 / 256) +.. math:: - Cb = (224 / 256) * (-0.169R' - 0.331G' + 0.5B') + Y' = \frac{219}{256} * (0.299R' + 0.587G' + 0.114B') + \frac{16}{256} - Cr = (224 / 256) * (0.5R' - 0.419G' - 0.081B') + Cb = \frac{224}{256} * (-0.169R' - 0.331G' + 0.5B') + + Cr = \frac{224}{256} * (0.5R' - 0.419G' - 0.081B') Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The non-standard xvYCC 709 or xvYCC 601 encodings can be
@@ -298,24 +314,30 @@ These chromaticities are identical to the Rec. 709 colorspace. Transfer function. Note that negative values for L are only used by the Y'CbCr conversion. - L' = -1.055(-L) :sup:`1/2.4` + 0.055 for L < -0.0031308 +.. math:: - L' = 12.92L for -0.0031308 ≤ L ≤ 0.0031308 + L' = -1.055(-L)^{\frac{1}{2.4} } + 0.055\text{, for }L < -0.0031308 - L' = 1.055L :sup:`1/2.4` - 0.055 for 0.0031308 < L ≤ 1 + L' = 12.92L\text{, for }-0.0031308 \le L \le 0.0031308 + + L' = 1.055L ^{\frac{1}{2.4} } - 0.055\text{, for }0.0031308 < L \le 1 Inverse Transfer function: - L = -((-L' + 0.055) / 1.055) :sup:`2.4` for L' < -0.04045 +.. math:: - L = L' / 12.92 for -0.04045 ≤ L' ≤ 0.04045 + L = -((-L' + 0.055) / 1.055) ^{2.4}\text{, for }L' < -0.04045 - L = ((L' + 0.055) / 1.055) :sup:`2.4` for L' > 0.04045 + L = L' / 12.92\text{, for }-0.04045 \le L' \le 0.04045 + + L = ((L' + 0.055) / 1.055) ^{2.4}\text{, for }L' > 0.04045 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_SYCC`` encoding as defined by :ref:`sycc`: +.. math:: + Y' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B'
@@ -395,15 +417,21 @@ are: Transfer function: - L' = L :sup:`1/2.19921875` +.. math:: + + L' = L ^{\frac{1}{2.19921875}} Inverse Transfer function: - L = L' :sup:`2.19921875` +.. math:: + + L = L'^{(2.19921875)} The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: +.. math:: + Y' = 0.299R' + 0.587G' + 0.114B' Cb = -0.169R' - 0.331G' + 0.5B'
@@ -479,19 +507,25 @@ of the primary colors and the white reference are: Transfer function (same as Rec. 709): - L' = 4.5L for 0 ≤ L < 0.018 +.. math:: - L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1 + L' = 4.5L\text{, for }0 \le L < 0.018 + + L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1 Inverse Transfer function: - L = L' / 4.5 for L' < 0.081 +.. math:: - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = L' / 4.5\text{, for } L' < 0.081 + + L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_BT2020`` encoding: +.. math:: + Y' = 0.2627R' + 0.6780G' + 0.0593B' Cb = -0.1396R' - 0.3604G' + 0.5B'
@@ -506,23 +540,20 @@ There is also an alternate constant luminance R'G'B' to Yc'CbcCrc Luma: - Yc' = (0.2627R + 0.6780G + 0.0593B)' - -B' - Yc' ≤ 0: - - Cbc = (B' - Yc') / 1.9404 - -B' - Yc' > 0: - - Cbc = (B' - Yc') / 1.5816 - -R' - Yc' ≤ 0: - - Crc = (R' - Y') / 1.7184 - -R' - Yc' > 0: - - Crc = (R' - Y') / 0.9936 +.. math:: + :nowrap: + + \begin{align*} + Yc' = (0.2627R + 0.6780G + 0.0593B)'& \\ + B' - Yc' \le 0:& \\ + &Cbc = (B' - Yc') / 1.9404 \\ + B' - Yc' > 0: & \\ + &Cbc = (B' - Yc') / 1.5816 \\ + R' - Yc' \le 0:& \\ + &Crc = (R' - Y') / 1.7184 \\ + R' - Yc' > 0:& \\ + &Crc = (R' - Y') / 0.9936 + \end{align*} Yc' is clamped to the range [0…1] and Cbc and Crc are clamped to the range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range.
@@ -598,11 +629,15 @@ is ``V4L2_XFER_FUNC_DCI_P3``. The default Y'CbCr encoding is Transfer function: - L' = L :sup:`1/2.6` +.. math:: + + L' = L^{\frac{1}{2.6}} Inverse Transfer function: - L = L' :sup:`2.6` +.. math:: + + L = L'^{(2.6)} Y'CbCr encoding is not specified. V4L2 defaults to Rec. 709.
@@ -672,19 +707,25 @@ These chromaticities are identical to the SMPTE 170M colorspace. Transfer function: - L' = 4L for 0 ≤ L < 0.0228 +.. math:: - L' = 1.1115L :sup:`0.45` - 0.1115 for 0.0228 ≤ L ≤ 1 + L' = 4L\text{, for } 0 \le L < 0.0228 + + L' = 1.1115L ^{0.45} - 0.1115\text{, for } 0.0228 \le L \le 1 Inverse Transfer function: - L = L' / 4 for 0 ≤ L' < 0.0913 +.. math:: - L = ((L' + 0.1115) / 1.1115) :sup:`1/0.45` for L' ≥ 0.0913 + L = \frac{L'}{4}\text{, for } 0 \le L' < 0.0913 + + L = \left( \frac{L' + 0.1115}{1.1115}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.0913 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_SMPTE240M`` encoding: +.. math:: + Y' = 0.2122R' + 0.7013G' + 0.0865B' Cb = -0.1161R' - 0.3839G' + 0.5B'
@@ -766,19 +807,25 @@ reference are: The transfer function was never properly defined for NTSC 1953. The Rec. 709 transfer function is recommended in the literature: - L' = 4.5L for 0 ≤ L < 0.018 +.. math:: - L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1 + L' = 4.5L\text{, for } 0 \le L < 0.018 + + L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1 Inverse Transfer function: - L = L' / 4.5 for L' < 0.081 +.. math:: - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \frac{L'}{4.5} \text{, for } L' < 0.081 + + L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: +.. math:: + Y' = 0.299R' + 0.587G' + 0.114B' Cb = -0.169R' - 0.331G' + 0.5B'
@@ -856,19 +903,25 @@ are: The transfer function was never properly defined for this colorspace. The Rec. 709 transfer function is recommended in the literature: - L' = 4.5L for 0 ≤ L < 0.018 +.. math:: - L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1 + L' = 4.5L\text{, for } 0 \le L < 0.018 + + L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1 Inverse Transfer function: - L = L' / 4.5 for L' < 0.081 +.. math:: - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \frac{L'}{4.5} \text{, for } L' < 0.081 + + L = \left(\frac{L' + 0.099}{1.099} \right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: +.. math:: + Y' = 0.299R' + 0.587G' + 0.114B' Cb = -0.169R' - 0.331G' + 0.5B'
Signature · 1 line
2.7.4
PATCH 6/9 docs-rst: get rid of code-block inside tables
In reply to Mauro Carvalho ChehabThere are two tables with a C code-block inside it. Unfortunately, that causes LaTeX output to break. Yet, there's nothing special there, so let's remove the code-block from them.
--- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 5 +---- Documentation/media/uapi/v4l/vidioc-querycap.rst | 12 +++--------- 2 files changed, 4 insertions(+), 13 deletions(-)
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +1 -4
@@ -105,11 +105,8 @@ one until ``EINVAL`` is returned. - :cspan:`2` - .. _v4l2-fourcc: - .. code-block:: c - - #define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) + ``#define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))`` Several image formats are already defined by this specification in :ref:`pixfmt`.
Documentation/media/uapi/v4l/vidioc-querycap.rst +3 -9
@@ -117,17 +117,11 @@ specification the ioctl returns an ``EINVAL`` error code. - :cspan:`2` + ``#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))`` - .. code-block:: c + ``__u32 version = KERNEL_VERSION(0, 8, 1);`` - #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) - - __u32 version = KERNEL_VERSION(0, 8, 1); - - printf ("Version: %u.%u.%u\\n", - (version >> 16) & 0xFF, - (version >> 8) & 0xFF, - version & 0xFF); + ``printf ("Version: %u.%u.%u\\n", (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);`` - .. row 6
Signature · 1 line
2.7.4
PATCH 7/9 pixfmt-packed-rgb.rst: rotate a big table
In reply to Mauro Carvalho ChehabRotates the big RGB packed table to landscape.
--- Documentation/conf.py | 3 +++ Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-)
Documentation/conf.py +3 -0
@@ -306,6 +306,9 @@ latex_elements = { \\setromanfont{DejaVu Sans} \\setmonofont{DejaVu Sans Mono} + % To allow adjusting table sizes + \\usepackage{adjustbox} + ''' }
Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst +8 -1
@@ -19,6 +19,10 @@ 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. +.. raw:: latex + + \begin{landscape} + \begin{adjustbox}{width=\columnwidth} .. _rgb-formats:
@@ -26,7 +30,6 @@ next to each other in memory. :header-rows: 2 :stub-columns: 0 - - .. row 1 - Identifier
@@ -942,6 +945,10 @@ next to each other in memory. - b\ :sub:`0` +.. raw:: latex + + \end{adjustbox} + \end{landscape} Bit 7 is the most significant bit.
Signature · 1 line
2.7.4
PATCH 8/9 vidioc-querycap.rst: Better format tables on PDF output
In reply to Mauro Carvalho ChehabBoth tables on this rst file were not shown right, as they miss the proper tag (tabularcolumns) to specify the column widths required for PDF and LaTeX output.
Also, the second table is too big to fit into one page. So, it should use the longtable class to allow it to be split into two pages.
--- Documentation/media/uapi/v4l/vidioc-querycap.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
Documentation/media/uapi/v4l/vidioc-querycap.rst +10 -4
@@ -43,11 +43,12 @@ specification the ioctl returns an ``EINVAL`` error code. .. _v4l2-capability: +.. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}| + .. flat-table:: struct v4l2_capability :header-rows: 0 :stub-columns: 0 - :widths: 1 1 2 - + :widths: 3 4 20 - .. row 1
@@ -121,7 +122,9 @@ specification the ioctl returns an ``EINVAL`` error code. ``__u32 version = KERNEL_VERSION(0, 8, 1);`` - ``printf ("Version: %u.%u.%u\\n", (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);`` + ``printf ("Version: %u.%u.%u\\n",`` + + ``(version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);`` - .. row 6
@@ -169,12 +172,15 @@ specification the ioctl returns an ``EINVAL`` error code. .. _device-capabilities: +.. tabularcolumns:: |p{6cm}|p{2.2cm}|p{8.8cm}| + +.. cssclass:: longtable + .. flat-table:: Device Capabilities Flags :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - .. row 1 - ``V4L2_CAP_VIDEO_CAPTURE``
Signature · 1 line
2.7.4
PATCH 9/9 docs-rst: add media documentation to PDF output
In reply to Mauro Carvalho ChehabNow that the build of PDF output on media got fixed, re-add it to the Sphinx PDF build.
Partially reverts 3eb6cd6834c3 ('Documentation: exclude media documentation from pdf generation').
--- Documentation/conf.py | 2 ++ 1 file changed, 2 insertions(+)
Documentation/conf.py +2 -0
@@ -320,6 +320,8 @@ latex_documents = [ 'The kernel development community', 'manual'), ('gpu/index', 'gpu.tex', 'Linux GPU Driver Developer\'s Guide', 'The kernel development community', 'manual'), + ('media/index', 'media.tex', 'Linux Media Subsystem Documentation', + 'The kernel development community', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of
Signature · 1 line
2.7.4