* [GIT PATCHES FOR 3.3] v4l: introduce selection API
@ 2011-11-14 16:08 Tomasz Stanislawski
2011-12-07 13:44 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Stanislawski @ 2011-11-14 16:08 UTC (permalink / raw)
To: linux-media@vger.kernel.org; +Cc: Mauro Carvalho Chehab
Hi Mauro,
This is the second 'pull-requested' version of the selection API. The
patch-set introduces new ioctls to V4L2 API for the configuration of the
selection rectangles like crop and compose areas.
Changelog:
- changed naming of constraints flags to form V4L2_SEL_FLAG_*
- changed naming of selection target to form V4L2_SEL_TGT_*
- size of PNG files in the documentation is greatly reduced
- fixes to handling of output queues for old cropping emulation
- VIDIOC_{S/G}_SELECTION for s5p-mixer accepts single- and multiplane
buffers as VIDIOC_{S/G}_CROP did
Best regards,
Tomasz Stanislawski
The following changes since commit e9eb0dadba932940f721f9d27544a7818b2fa1c5:
[media] V4L menu: add submenu for platform devices (2011-11-08
12:09:52 -0200)
are available in the git repository at:
git://git.infradead.org/users/kmpark/linux-samsung v4l-selection
Tomasz Stanislawski (5):
v4l: add support for selection api
doc: v4l: add binary images for selection API
doc: v4l: add documentation for selection API
v4l: emulate old crop API using extended crop/compose API
v4l: s5p-tv: mixer: add support for selection API
Documentation/DocBook/media/constraints.png.b64 | 59 ++++
Documentation/DocBook/media/selection.png.b64 | 206 ++++++++++++
Documentation/DocBook/media/v4l/common.xml | 2 +
Documentation/DocBook/media/v4l/compat.xml | 9 +
Documentation/DocBook/media/v4l/selection-api.xml | 327
+++++++++++++++++++
Documentation/DocBook/media/v4l/v4l2.xml | 1 +
.../DocBook/media/v4l/vidioc-g-selection.xml | 304
+++++++++++++++++
drivers/media/video/s5p-tv/mixer.h | 14 +-
drivers/media/video/s5p-tv/mixer_grp_layer.c | 157 +++++++--
drivers/media/video/s5p-tv/mixer_video.c | 342
+++++++++++++-------
drivers/media/video/s5p-tv/mixer_vp_layer.c | 108 ++++---
drivers/media/video/v4l2-compat-ioctl32.c | 2 +
drivers/media/video/v4l2-ioctl.c | 116 +++++++-
include/linux/videodev2.h | 46 +++
include/media/v4l2-ioctl.h | 4 +
15 files changed, 1495 insertions(+), 202 deletions(-)
create mode 100644 Documentation/DocBook/media/constraints.png.b64
create mode 100644 Documentation/DocBook/media/selection.png.b64
create mode 100644 Documentation/DocBook/media/v4l/selection-api.xml
create mode 100644 Documentation/DocBook/media/v4l/vidioc-g-selection.xml
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [GIT PATCHES FOR 3.3] v4l: introduce selection API
2011-11-14 16:08 [GIT PATCHES FOR 3.3] v4l: introduce selection API Tomasz Stanislawski
@ 2011-12-07 13:44 ` Mauro Carvalho Chehab
2011-12-14 10:42 ` [PATCH] doc: v4l: selection: choose pixels as units for selection rectangles Marek Szyprowski
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2011-12-07 13:44 UTC (permalink / raw)
To: Tomasz Stanislawski; +Cc: linux-media@vger.kernel.org
On 14-11-2011 14:08, Tomasz Stanislawski wrote:
> Hi Mauro,
>
> This is the second 'pull-requested' version of the selection API. The patch-set introduces new ioctls to V4L2 API for the configuration of the selection rectangles like crop and compose areas.
Tomasz,
A way better than the previous pull request. The only missing issue is related
to the scaling. As I told you on IRC, the scale for it should be decided
in advance, as a latter change would break binaries compiled with old Kernel
versions.
So, we need to decide if the scale for cropping will be pixels or sub-pixels,
or to add some flag that would allow userspace to decide between them.
PS.: As I've reviewed already the other patches, please add a new patch with the
incremental change for scaling, as this saves my time to review the patches that
are already ok.
Thanks,
Mauro
>
> Changelog:
>
> - changed naming of constraints flags to form V4L2_SEL_FLAG_*
> - changed naming of selection target to form V4L2_SEL_TGT_*
> - size of PNG files in the documentation is greatly reduced
> - fixes to handling of output queues for old cropping emulation
> - VIDIOC_{S/G}_SELECTION for s5p-mixer accepts single- and multiplane buffers as VIDIOC_{S/G}_CROP did
>
> Best regards,
> Tomasz Stanislawski
>
> The following changes since commit e9eb0dadba932940f721f9d27544a7818b2fa1c5:
>
> [media] V4L menu: add submenu for platform devices (2011-11-08 12:09:52 -0200)
>
> are available in the git repository at:
> git://git.infradead.org/users/kmpark/linux-samsung v4l-selection
>
> Tomasz Stanislawski (5):
> v4l: add support for selection api
> doc: v4l: add binary images for selection API
> doc: v4l: add documentation for selection API
> v4l: emulate old crop API using extended crop/compose API
> v4l: s5p-tv: mixer: add support for selection API
>
> Documentation/DocBook/media/constraints.png.b64 | 59 ++++
> Documentation/DocBook/media/selection.png.b64 | 206 ++++++++++++
> Documentation/DocBook/media/v4l/common.xml | 2 +
> Documentation/DocBook/media/v4l/compat.xml | 9 +
> Documentation/DocBook/media/v4l/selection-api.xml | 327 +++++++++++++++++++
> Documentation/DocBook/media/v4l/v4l2.xml | 1 +
> .../DocBook/media/v4l/vidioc-g-selection.xml | 304 +++++++++++++++++
> drivers/media/video/s5p-tv/mixer.h | 14 +-
> drivers/media/video/s5p-tv/mixer_grp_layer.c | 157 +++++++--
> drivers/media/video/s5p-tv/mixer_video.c | 342 +++++++++++++-------
> drivers/media/video/s5p-tv/mixer_vp_layer.c | 108 ++++---
> drivers/media/video/v4l2-compat-ioctl32.c | 2 +
> drivers/media/video/v4l2-ioctl.c | 116 +++++++-
> include/linux/videodev2.h | 46 +++
> include/media/v4l2-ioctl.h | 4 +
> 15 files changed, 1495 insertions(+), 202 deletions(-)
> create mode 100644 Documentation/DocBook/media/constraints.png.b64
> create mode 100644 Documentation/DocBook/media/selection.png.b64
> create mode 100644 Documentation/DocBook/media/v4l/selection-api.xml
> create mode 100644 Documentation/DocBook/media/v4l/vidioc-g-selection.xml
>
> --
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] doc: v4l: selection: choose pixels as units for selection rectangles
2011-12-07 13:44 ` Mauro Carvalho Chehab
@ 2011-12-14 10:42 ` Marek Szyprowski
0 siblings, 0 replies; 3+ messages in thread
From: Marek Szyprowski @ 2011-12-14 10:42 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Marek Szyprowski, Kyungmin Park, linux-media, Tomasz Stanislawski
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
Pixels were preferred units for selection rectangles over driver-dependent
units for almost all use cases. Therefore the units were fixed to pixels.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
Documentation/DocBook/media/v4l/selection-api.xml | 30 ++++++++------------
1 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
index 46cb47a..2f0bdb4 100644
--- a/Documentation/DocBook/media/v4l/selection-api.xml
+++ b/Documentation/DocBook/media/v4l/selection-api.xml
@@ -84,9 +84,7 @@ configure the cropping targets before to the composing targets.</para>
areas that can be sampled is given by the <constant> V4L2_SEL_TGT_CROP_BOUNDS
</constant> target. It is recommended for the driver developers to put the
top/left corner at position <constant> (0,0) </constant>. The rectangle's
-coordinates are expressed in driver dependant units, although the coordinate
-system guarantees that if sizes of the active cropping and the active composing
-rectangles are equal then no scaling is performed. </para>
+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
@@ -103,10 +101,10 @@ not later.</para>
<para>The composing targets refer to a memory buffer. The limits of composing
coordinates are obtained using <constant> V4L2_SEL_TGT_COMPOSE_BOUNDS
-</constant>. All coordinates are expressed in natural unit for given formats.
-Pixels are highly recommended. The rectangle's top/left corner must be located
-at position <constant> (0,0) </constant>. The width and height are equal to the
-image size set by <constant> VIDIOC_S_FMT </constant>.</para>
+</constant>. All coordinates are expressed in pixels. The rectangle's top/left
+corner must be located at position <constant> (0,0) </constant>. The width and
+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.
@@ -145,10 +143,9 @@ the cropping targets.</para>
<para>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 <constant> V4L2_SEL_TGT_CROP_BOUNDS </constant>.
-All coordinates are expressed in natural units for a given format. Pixels are
-highly recommended. The top/left corner is always point <constant> (0,0)
-</constant>. The width and height is equal to the image size specified using
-<constant> VIDIOC_S_FMT </constant> ioctl.</para>
+All coordinates are expressed in pixels. The top/left corner is always point
+<constant> (0,0) </constant>. The width and height is equal to the image size
+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
@@ -163,13 +160,10 @@ limitations.</para>
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 are expressed in driver
-dependant units. The only exception are digital outputs where the units are
-pixels. For other types of devices, the coordinate system guarantees that if
-sizes of the active cropping and the active composing rectangles are equal then
-no scaling is performed. The composing rectangle must lie completely inside
-the bounds rectangle. The driver must adjust the area to fit to the bounding
+inserted by the hardware is controlled by <constant>
+V4L2_SEL_TGT_COMPOSE_ACTIVE </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
hardware limitations. </para>
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-14 10:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14 16:08 [GIT PATCHES FOR 3.3] v4l: introduce selection API Tomasz Stanislawski
2011-12-07 13:44 ` Mauro Carvalho Chehab
2011-12-14 10:42 ` [PATCH] doc: v4l: selection: choose pixels as units for selection rectangles Marek Szyprowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox