提交 8fa1bb50 编写于 作者: M Mauro Carvalho Chehab 提交者: Jonathan Corbet

docs-rst: Don't use explicit Makefile rules to build SVG and DOT files

Now that we have an extension to handle images, use it.
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 db6ccf23
# Rules to convert DOT and SVG to Sphinx images
SRC_DIR=$(srctree)/Documentation/media
DOTS = \
uapi/v4l/pipeline.dot \
IMAGES = \
typical_media_device.svg \
uapi/dvb/dvbstb.svg \
uapi/v4l/bayer.svg \
uapi/v4l/constraints.svg \
uapi/v4l/crop.svg \
uapi/v4l/fieldseq_bt.svg \
uapi/v4l/fieldseq_tb.svg \
uapi/v4l/nv12mt.svg \
uapi/v4l/nv12mt_example.svg \
uapi/v4l/pipeline.svg \
uapi/v4l/selection.svg \
uapi/v4l/subdev-image-processing-full.svg \
uapi/v4l/subdev-image-processing-scaling-multi-source.svg \
uapi/v4l/subdev-image-processing-crop.svg \
uapi/v4l/vbi_525.svg \
uapi/v4l/vbi_625.svg \
uapi/v4l/vbi_hsync.svg \
DOTTGT := $(patsubst %.dot,%.svg,$(DOTS))
IMGDOT := $(patsubst %,$(SRC_DIR)/%,$(DOTTGT))
IMGTGT := $(patsubst %.svg,%.pdf,$(IMAGES))
IMGPDF := $(patsubst %,$(SRC_DIR)/%,$(IMGTGT))
cmd = $(echo-cmd) $(cmd_$(1))
quiet_cmd_genpdf = GENPDF $2
cmd_genpdf = convert $2 $3
quiet_cmd_gendot = DOT $2
cmd_gendot = dot -Tsvg $2 > $3 || { rm -f $3; exit 1; }
%.pdf: %.svg
@$(call cmd,genpdf,$<,$@)
%.svg: %.dot
@$(call cmd,gendot,$<,$@)
# Rules to convert a .h file to inline RST documentation # Rules to convert a .h file to inline RST documentation
SRC_DIR=$(srctree)/Documentation/media
PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
UAPI = $(srctree)/include/uapi/linux UAPI = $(srctree)/include/uapi/linux
KAPI = $(srctree)/include/linux KAPI = $(srctree)/include/linux
......
...@@ -13,8 +13,8 @@ A typical media device hardware is shown at :ref:`typical_media_device`. ...@@ -13,8 +13,8 @@ A typical media device hardware is shown at :ref:`typical_media_device`.
.. _typical_media_device: .. _typical_media_device:
.. figure:: typical_media_device.* .. kernel-figure:: typical_media_device.svg
:alt: typical_media_device.pdf / typical_media_device.svg :alt: typical_media_device.svg
:align: center :align: center
Typical Media Device Typical Media Device
......
...@@ -55,8 +55,8 @@ Overview ...@@ -55,8 +55,8 @@ Overview
.. _stb_components: .. _stb_components:
.. figure:: dvbstb.* .. kernel-figure:: dvbstb.svg
:alt: dvbstb.pdf / dvbstb.svg :alt: dvbstb.svg
:align: center :align: center
Components of a DVB card/STB Components of a DVB card/STB
......
...@@ -53,8 +53,8 @@ Cropping Structures ...@@ -53,8 +53,8 @@ Cropping Structures
.. _crop-scale: .. _crop-scale:
.. figure:: crop.* .. kernel-figure:: crop.svg
:alt: crop.pdf / crop.svg :alt: crop.svg
:align: center :align: center
Image Cropping, Insertion and Scaling Image Cropping, Insertion and Scaling
......
...@@ -221,8 +221,8 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does ...@@ -221,8 +221,8 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
.. _vbi-hsync: .. _vbi-hsync:
.. figure:: vbi_hsync.* .. kernel-figure:: vbi_hsync.svg
:alt: vbi_hsync.pdf / vbi_hsync.svg :alt: vbi_hsync.svg
:align: center :align: center
**Figure 4.1. Line synchronization** **Figure 4.1. Line synchronization**
...@@ -230,24 +230,20 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does ...@@ -230,24 +230,20 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
.. _vbi-525: .. _vbi-525:
.. figure:: vbi_525.* .. kernel-figure:: vbi_525.svg
:alt: vbi_525.pdf / vbi_525.svg :alt: vbi_525.svg
:align: center :align: center
**Figure 4.2. ITU-R 525 line numbering (M/NTSC and M/PAL)** **Figure 4.2. ITU-R 525 line numbering (M/NTSC and M/PAL)**
.. _vbi-625: .. _vbi-625:
.. figure:: vbi_625.* .. kernel-figure:: vbi_625.svg
:alt: vbi_625.pdf / vbi_625.svg :alt: vbi_625.svg
:align: center :align: center
**Figure 4.3. ITU-R 625 line numbering** **Figure 4.3. ITU-R 625 line numbering**
Remember the VBI image format depends on the selected video standard, Remember the VBI image format depends on the selected video standard,
therefore the application must choose a new standard or query the therefore the application must choose a new standard or query the
current standard first. Attempts to read or write data ahead of format current standard first. Attempts to read or write data ahead of format
......
...@@ -99,8 +99,8 @@ the video sensor and the host image processing hardware. ...@@ -99,8 +99,8 @@ the video sensor and the host image processing hardware.
.. _pipeline-scaling: .. _pipeline-scaling:
.. figure:: pipeline.* .. kernel-figure:: pipeline.dot
:alt: pipeline.pdf / pipeline.svg :alt: pipeline.dot
:align: center :align: center
Image Format Negotiation on Pipelines Image Format Negotiation on Pipelines
...@@ -404,8 +404,8 @@ selection will refer to the sink pad format dimensions instead. ...@@ -404,8 +404,8 @@ selection will refer to the sink pad format dimensions instead.
.. _subdev-image-processing-crop: .. _subdev-image-processing-crop:
.. figure:: subdev-image-processing-crop.* .. kernel-figure:: subdev-image-processing-crop.svg
:alt: subdev-image-processing-crop.pdf / subdev-image-processing-crop.svg :alt: subdev-image-processing-crop.svg
:align: center :align: center
**Figure 4.5. Image processing in subdevs: simple crop example** **Figure 4.5. Image processing in subdevs: simple crop example**
...@@ -421,8 +421,8 @@ pad. ...@@ -421,8 +421,8 @@ pad.
.. _subdev-image-processing-scaling-multi-source: .. _subdev-image-processing-scaling-multi-source:
.. figure:: subdev-image-processing-scaling-multi-source.* .. kernel-figure:: subdev-image-processing-scaling-multi-source.svg
:alt: subdev-image-processing-scaling-multi-source.pdf / subdev-image-processing-scaling-multi-source.svg :alt: subdev-image-processing-scaling-multi-source.svg
:align: center :align: center
**Figure 4.6. Image processing in subdevs: scaling with multiple sources** **Figure 4.6. Image processing in subdevs: scaling with multiple sources**
...@@ -437,8 +437,8 @@ an area at location specified by the source crop rectangle from it. ...@@ -437,8 +437,8 @@ an area at location specified by the source crop rectangle from it.
.. _subdev-image-processing-full: .. _subdev-image-processing-full:
.. figure:: subdev-image-processing-full.* .. kernel-figure:: subdev-image-processing-full.svg
:alt: subdev-image-processing-full.pdf / subdev-image-processing-full.svg :alt: subdev-image-processing-full.svg
:align: center :align: center
**Figure 4.7. Image processing in subdevs: scaling and composition with multiple sinks and sources** **Figure 4.7. Image processing in subdevs: scaling and composition with multiple sinks and sources**
......
...@@ -141,17 +141,20 @@ enum v4l2_field ...@@ -141,17 +141,20 @@ enum v4l2_field
Field Order, Top Field First Transmitted Field Order, Top Field First Transmitted
======================================== ========================================
.. figure:: fieldseq_tb.* .. kernel-figure:: fieldseq_tb.svg
:alt: fieldseq_tb.pdf / fieldseq_tb.svg :alt: fieldseq_tb.svg
:align: center :align: center
Field Order, Top Field First Transmitted
.. _fieldseq-bt: .. _fieldseq-bt:
Field Order, Bottom Field First Transmitted Field Order, Bottom Field First Transmitted
=========================================== ===========================================
.. figure:: fieldseq_bt.* .. kernel-figure:: fieldseq_bt.svg
:alt: fieldseq_bt.pdf / fieldseq_bt.svg :alt: fieldseq_bt.svg
:align: center :align: center
Field Order, Bottom Field First Transmitted
...@@ -33,8 +33,8 @@ Layout of macroblocks in memory is presented in the following figure. ...@@ -33,8 +33,8 @@ Layout of macroblocks in memory is presented in the following figure.
.. _nv12mt: .. _nv12mt:
.. figure:: nv12mt.* .. kernel-figure:: nv12mt.svg
:alt: nv12mt.pdf / nv12mt.svg :alt: nv12mt.svg
:align: center :align: center
V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout
...@@ -50,8 +50,8 @@ interleaved. Height of the buffer is aligned to 32. ...@@ -50,8 +50,8 @@ interleaved. Height of the buffer is aligned to 32.
.. _nv12mt_ex: .. _nv12mt_ex:
.. figure:: nv12mt_example.* .. kernel-figure:: nv12mt_example.svg
:alt: nv12mt_example.pdf / nv12mt_example.svg :alt: nv12mt_example.svg
:align: center :align: center
Example V4L2_PIX_FMT_NV12MT memory layout of macroblocks Example V4L2_PIX_FMT_NV12MT memory layout of macroblocks
......
...@@ -7,8 +7,8 @@ Selection targets ...@@ -7,8 +7,8 @@ Selection targets
.. _sel-targets-capture: .. _sel-targets-capture:
.. figure:: selection.* .. kernel-figure:: selection.svg
:alt: selection.pdf / selection.svg :alt: selection.svg
:align: center :align: center
Cropping and composing targets Cropping and composing targets
......
...@@ -1514,8 +1514,8 @@ be named ``MEDIA_BUS_FMT_SRGGB10_2X8_PADHI_LE``. ...@@ -1514,8 +1514,8 @@ be named ``MEDIA_BUS_FMT_SRGGB10_2X8_PADHI_LE``.
.. _bayer-patterns: .. _bayer-patterns:
.. figure:: bayer.* .. kernel-figure:: bayer.svg
:alt: bayer.pdf / bayer.svg :alt: bayer.svg
:align: center :align: center
**Figure 4.8 Bayer Patterns** **Figure 4.8 Bayer Patterns**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册