diff options
author | Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | 2012-05-20 18:17:12 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-07 03:13:30 +0400 |
commit | c133482300113b3b71fa4a1fd2118531e765b36a (patch) | |
tree | 795edef9f10d5016c64edf1e7959669b26d7bf51 /Documentation/DocBook/media/v4l | |
parent | 936148a71e5e55a301b274e98b0ad8b246a6f11b (diff) | |
download | linux-c133482300113b3b71fa4a1fd2118531e765b36a.tar.xz |
[media] V4L: Remove "_ACTIVE" from the selection target name definitions
This patch drops the _ACTIVE part from the selection target names
as a prerequisite to unify the selection target names across the subdev
and regular video node API.
The meaning of V4L2_SEL_TGT_*_ACTIVE and V4L2_SUBDEV_SEL_TGT_*_ACTUAL
selection targets is logically the same. Different names add to confusion
where both APIs are used in a single driver or an application. For some
system configurations different names may lead to interoperability issues.
For backwards compatibility V4L2_SEL_TGT_CROP_ACTIVE and
V4L2_SEL_TGT_COMPOSE_ACTIVE are defined as aliases to V4L2_SEL_TGT_CROP
and V4L2_SEL_TGT_COMPOSE. These aliases will be removed after deprecation
period, according to Documentation/feature-removal-schedule.txt.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/DocBook/media/v4l')
-rw-r--r-- | Documentation/DocBook/media/v4l/selection-api.xml | 24 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-g-selection.xml | 15 |
2 files changed, 20 insertions, 19 deletions
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml index b299e4779354..ac013e50e0bd 100644 --- a/Documentation/DocBook/media/v4l/selection-api.xml +++ b/Documentation/DocBook/media/v4l/selection-api.xml @@ -91,7 +91,7 @@ top/left corner at position <constant> (0,0) </constant>. The rectangle's coordinates are expressed in pixels.</para> <para>The top left corner, width and height of the source rectangle, that is -the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP_ACTIVE +the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP </constant> target. It uses the same coordinate system as <constant> V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie completely inside the capture boundaries. The driver may further adjust the @@ -111,7 +111,7 @@ height are equal to the image size set by <constant> VIDIOC_S_FMT </constant>. </para> <para>The part of a buffer into which the image is inserted by the hardware is -controlled by the <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target. +controlled by the <constant> V4L2_SEL_TGT_COMPOSE </constant> 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 @@ -125,7 +125,7 @@ bounding rectangle.</para> <para>The part of a buffer that is modified by the hardware is given by <constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels -defined using <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> plus all +defined using <constant> V4L2_SEL_TGT_COMPOSE </constant> plus all padding data modified by hardware during insertion process. All pixels outside this rectangle <emphasis>must not</emphasis> be changed by the hardware. The content of pixels that lie inside the padded area but outside active area is @@ -153,7 +153,7 @@ specified using <constant> VIDIOC_S_FMT </constant> ioctl.</para> <para>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 -<constant> V4L2_SEL_TGT_CROP_ACTIVE </constant>. Its coordinates are expressed +<constant> V4L2_SEL_TGT_CROP </constant>. 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 @@ -165,7 +165,7 @@ bounding rectangle.</para> <para>The part of a video signal or graphics display where the image is inserted by the hardware is controlled by <constant> -V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target. The rectangle's coordinates +V4L2_SEL_TGT_COMPOSE </constant> 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 @@ -184,7 +184,7 @@ 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 <constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant> identifier. It must contain all pixels from the <constant> -V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para> +V4L2_SEL_TGT_COMPOSE </constant> target.</para> </section> @@ -193,8 +193,8 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para> <title>Scaling control</title> <para>An application can detect if scaling is performed by comparing the width -and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE -</constant> and <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> targets. If +and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP +</constant> and <constant> V4L2_SEL_TGT_COMPOSE </constant> targets. If these are not equal then the scaling is applied. The application can compute the scaling ratios using these values.</para> @@ -252,7 +252,7 @@ area)</para> ret = ioctl(fd, &VIDIOC-G-SELECTION;, &sel); if (ret) exit(-1); - sel.target = V4L2_SEL_TGT_CROP_ACTIVE; + sel.target = V4L2_SEL_TGT_CROP; ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); if (ret) exit(-1); @@ -281,7 +281,7 @@ area)</para> r.left = sel.r.width / 4; r.top = sel.r.height / 4; sel.r = r; - sel.target = V4L2_SEL_TGT_COMPOSE_ACTIVE; + sel.target = V4L2_SEL_TGT_COMPOSE; sel.flags = V4L2_SEL_FLAG_LE; ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); if (ret) @@ -298,11 +298,11 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> for other devices</para> &v4l2-selection; compose = { .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, - .target = V4L2_SEL_TGT_COMPOSE_ACTIVE, + .target = V4L2_SEL_TGT_COMPOSE, }; &v4l2-selection; crop = { .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, - .target = V4L2_SEL_TGT_CROP_ACTIVE, + .target = V4L2_SEL_TGT_CROP, }; double hscale, vscale; diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml index bb04eff75f45..6376e57ff576 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml @@ -65,8 +65,8 @@ Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is setting the value of &v4l2-selection; <structfield>target</structfield> field -to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> -V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref +to <constant> V4L2_SEL_TGT_CROP </constant> (<constant> +V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional targets. The <structfield>flags</structfield> and <structfield>reserved </structfield> fields of &v4l2-selection; are ignored and they must be filled @@ -86,8 +86,8 @@ use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is setting the value of &v4l2-selection; <structfield>target</structfield> to -<constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant> -V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref +<constant>V4L2_SEL_TGT_CROP</constant> (<constant> +V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be set to the desired active area. Field &v4l2-selection; <structfield> reserved @@ -161,7 +161,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> &cs-def; <tbody valign="top"> <row> - <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry> + <entry><constant>V4L2_SEL_TGT_CROP</constant></entry> <entry>0x0000</entry> <entry>The area that is currently cropped by hardware.</entry> </row> @@ -176,7 +176,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> <entry>Limits for the cropping rectangle.</entry> </row> <row> - <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry> + <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry> <entry>0x0100</entry> <entry>The area to which data is composed by hardware.</entry> </row> @@ -193,7 +193,8 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> <row> <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> <entry>0x0103</entry> - <entry>The active area and all padding pixels that are inserted or modified by hardware.</entry> + <entry>The active area and all padding pixels that are inserted or + modified by hardware.</entry> </row> </tbody> </tgroup> |