--- zzzz-none-000/linux-3.10.107/Documentation/DocBook/media/v4l/selection-api.xml 2017-06-27 09:49:32.000000000 +0000
+++ scorpion-7490-727/linux-3.10.107/Documentation/DocBook/media/v4l/selection-api.xml 2021-02-04 17:41:59.000000000 +0000
@@ -86,47 +86,47 @@
configure the cropping targets before to the composing targets.
The range of coordinates of the top left corner, width and height of
-areas that can be sampled is given by the V4L2_SEL_TGT_CROP_BOUNDS
- target. It is recommended for the driver developers to put the
-top/left corner at position (0,0) . The rectangle's
+areas that can be sampled is given by the V4L2_SEL_TGT_CROP_BOUNDS
+target. It is recommended for the driver developers to put the
+top/left corner at position (0,0). The rectangle's
coordinates are expressed in pixels.The top left corner, width and height of the source rectangle, that is
-the area actually sampled, is given by the V4L2_SEL_TGT_CROP
- target. It uses the same coordinate system as
-V4L2_SEL_TGT_CROP_BOUNDS . The active cropping area must lie
-completely inside the capture boundaries. The driver may further adjust the
-requested size and/or position according to hardware limitations.
+the area actually sampled, is given by the V4L2_SEL_TGT_CROP
+target. It uses the same coordinate system as V4L2_SEL_TGT_CROP_BOUNDS.
+The active cropping area must lie completely inside the capture boundaries. The
+driver may further adjust the requested size and/or position according to hardware
+limitations.
Each capture device has a default source rectangle, given by the
- V4L2_SEL_TGT_CROP_DEFAULT target. This rectangle shall
+V4L2_SEL_TGT_CROP_DEFAULT target. This rectangle shall
over what the driver writer considers the complete picture. Drivers shall set
the active crop rectangle to the default when the driver is first loaded, but
not later.The composing targets refer to a memory buffer. The limits of composing
-coordinates are obtained using V4L2_SEL_TGT_COMPOSE_BOUNDS
-. All coordinates are expressed in pixels. The rectangle's top/left
-corner must be located at position (0,0) . The width and
-height are equal to the image size set by VIDIOC_S_FMT .
+coordinates are obtained using V4L2_SEL_TGT_COMPOSE_BOUNDS.
+All coordinates are expressed in pixels. The rectangle's top/left
+corner must be located at position (0,0). The width and
+height are equal to the image size set by VIDIOC_S_FMT.
The part of a buffer into which the image is inserted by the hardware is
-controlled by the V4L2_SEL_TGT_COMPOSE target.
+controlled by the V4L2_SEL_TGT_COMPOSE target.
The rectangle's coordinates are also expressed in the same coordinate system as
the bounds rectangle. The composing rectangle must lie completely inside bounds
rectangle. The driver must adjust the composing rectangle to fit to the
bounding limits. Moreover, the driver can perform other adjustments according
to hardware limitations. The application can control rounding behaviour using
- constraint flags .
+ constraint flags.
For capture devices the default composing rectangle is queried using
- V4L2_SEL_TGT_COMPOSE_DEFAULT . It is usually equal to the
+V4L2_SEL_TGT_COMPOSE_DEFAULT. It is usually equal to the
bounding rectangle.The part of a buffer that is modified by the hardware is given by
- V4L2_SEL_TGT_COMPOSE_PADDED . It contains all pixels
-defined using V4L2_SEL_TGT_COMPOSE plus all
+V4L2_SEL_TGT_COMPOSE_PADDED. It contains all pixels
+defined using V4L2_SEL_TGT_COMPOSE plus all
padding data modified by hardware during insertion process. All pixels outside
this rectangle must not be changed by the hardware. The
content of pixels that lie inside the padded area but outside active area is
@@ -140,52 +140,51 @@
Configuration of video outputFor output devices targets and ioctls are used similarly to the video
-capture case. The composing rectangle refers to the
+capture case. The composing rectangle refers to the
insertion of an image into a video signal. The cropping rectangles refer to a
memory buffer. It is recommended to configure the composing targets before to
the cropping targets.The cropping targets refer to the memory buffer that contains an image to
be inserted into a video signal or graphical screen. The limits of cropping
-coordinates are obtained using V4L2_SEL_TGT_CROP_BOUNDS .
+coordinates are obtained using V4L2_SEL_TGT_CROP_BOUNDS.
All coordinates are expressed in pixels. The top/left corner is always point
- (0,0) . The width and height is equal to the image size
-specified using VIDIOC_S_FMT ioctl.
+(0,0). The width and height is equal to the image size
+specified using VIDIOC_S_FMT ioctl.The top left corner, width and height of the source rectangle, that is
the area from which image date are processed by the hardware, is given by the
- V4L2_SEL_TGT_CROP . Its coordinates are expressed
+V4L2_SEL_TGT_CROP. Its coordinates are expressed
in in the same coordinate system as the bounds rectangle. The active cropping
area must lie completely inside the crop boundaries and the driver may further
adjust the requested size and/or position according to hardware
limitations.For output devices the default cropping rectangle is queried using
- V4L2_SEL_TGT_CROP_DEFAULT . It is usually equal to the
+V4L2_SEL_TGT_CROP_DEFAULT. It is usually equal to the
bounding rectangle.The part of a video signal or graphics display where the image is
-inserted by the hardware is controlled by
-V4L2_SEL_TGT_COMPOSE target. The rectangle's coordinates
-are expressed in pixels. The composing rectangle must lie completely inside the
-bounds rectangle. The driver must adjust the area to fit to the bounding
-limits. Moreover, the driver can perform other adjustments according to
-hardware limitations.
+inserted by the hardware is controlled by V4L2_SEL_TGT_COMPOSE
+target. The rectangle's coordinates are expressed in pixels. The composing
+rectangle must lie completely inside the bounds rectangle. The driver must
+adjust the area to fit to the bounding limits. Moreover, the driver can
+perform other adjustments according to hardware limitations.
-The device has a default composing rectangle, given by the
-V4L2_SEL_TGT_COMPOSE_DEFAULT target. This rectangle shall cover what
+The device has a default composing rectangle, given by the
+V4L2_SEL_TGT_COMPOSE_DEFAULT target. This rectangle shall cover what
the driver writer considers the complete picture. It is recommended for the
-driver developers to put the top/left corner at position (0,0)
-. Drivers shall set the active composing rectangle to the default
+driver developers to put the top/left corner at position (0,0).
+Drivers shall set the active composing rectangle to the default
one when the driver is first loaded.The devices may introduce additional content to video signal other than
an image from memory buffers. It includes borders around an image. However,
such a padded area is driver-dependent feature not covered by this document.
Driver developers are encouraged to keep padded rectangle equal to active one.
-The padded target is accessed by the V4L2_SEL_TGT_COMPOSE_PADDED
- identifier. It must contain all pixels from the
-V4L2_SEL_TGT_COMPOSE target.
+The padded target is accessed by the V4L2_SEL_TGT_COMPOSE_PADDED
+identifier. It must contain all pixels from the V4L2_SEL_TGT_COMPOSE
+target.
@@ -194,8 +193,8 @@
Scaling controlAn application can detect if scaling is performed by comparing the width
-and the height of rectangles obtained using V4L2_SEL_TGT_CROP
- and V4L2_SEL_TGT_COMPOSE targets. If
+and the height of rectangles obtained using V4L2_SEL_TGT_CROP
+and V4L2_SEL_TGT_COMPOSE targets. If
these are not equal then the scaling is applied. The application can compute
the scaling ratios using these values.
@@ -208,7 +207,7 @@
Comparison with old cropping APIThe selection API was introduced to cope with deficiencies of previous
- API , that was designed to control simple capture
+ API, that was designed to control simple capture
devices. Later the cropping API was adopted by video output drivers. The ioctls
are used to select a part of the display were the video signal is inserted. It
should be considered as an API abuse because the described operation is
@@ -220,7 +219,7 @@
one is achieved by setting the field
&v4l2-pix-format;::bytesperline. Introducing an image offsets
could be done by modifying field &v4l2-buffer;::m_userptr
-before calling VIDIOC_QBUF . Those
+before calling VIDIOC_QBUF. Those
operations should be avoided because they are not portable (endianness), and do
not work for macroblock and Bayer formats and mmap buffers. The selection API
deals with configuration of buffer cropping/composing in a clear, intuitive and
@@ -229,7 +228,7 @@
have no reserved fields. Therefore there is no way to extend their functionality.
The new &v4l2-selection; provides a lot of place for future
extensions. Driver developers are encouraged to implement only selection API.
-The former cropping API would be simulated using the new one.
+The former cropping API would be simulated using the new one.
@@ -238,9 +237,9 @@
Resetting the cropping parameters
- (A video capture device is assumed; change
-V4L2_BUF_TYPE_VIDEO_CAPTURE for other devices; change target to
- V4L2_SEL_TGT_COMPOSE_* family to configure composing
+ (A video capture device is assumed; change
+V4L2_BUF_TYPE_VIDEO_CAPTURE for other devices; change target to
+V4L2_SEL_TGT_COMPOSE_* family to configure composing
area)
@@ -292,8 +291,8 @@
Querying for scaling factors
- A video output device is assumed; change
-V4L2_BUF_TYPE_VIDEO_OUTPUT for other devices
+ A video output device is assumed; change
+V4L2_BUF_TYPE_VIDEO_OUTPUT for other devices
&v4l2-selection; compose = {