From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mailout4.w1.samsung.com ([210.118.77.14]:35963 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340Ab2EJKbL (ORCPT ); Thu, 10 May 2012 06:31:11 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from euspt1 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M3S008ZYYK5CW40@mailout4.w1.samsung.com> for linux-media@vger.kernel.org; Thu, 10 May 2012 11:31:17 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M3S007H4YJSFC@spt1.w1.samsung.com> for linux-media@vger.kernel.org; Thu, 10 May 2012 11:31:05 +0100 (BST) Date: Thu, 10 May 2012 12:30:46 +0200 From: Sylwester Nawrocki Subject: [PATCH 11/23] V4L: Add auto focus targets to the subdev selections API In-reply-to: <1336645858-30366-1-git-send-email-s.nawrocki@samsung.com> To: linux-media@vger.kernel.org Cc: m.szyprowski@samsung.com, riverful.kim@samsung.com, sw0312.kim@samsung.com, s.nawrocki@samsung.com, Kyungmin Park Message-id: <1336645858-30366-12-git-send-email-s.nawrocki@samsung.com> References: <1336645858-30366-1-git-send-email-s.nawrocki@samsung.com> Sender: linux-media-owner@vger.kernel.org List-ID: Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- Documentation/DocBook/media/v4l/dev-subdev.xml | 27 +++++++++++++++++++- .../media/v4l/vidioc-subdev-g-selection.xml | 14 ++++++++-- include/linux/v4l2-subdev.h | 4 +++ 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml index 4afcbbe..8a212c4 100644 --- a/Documentation/DocBook/media/v4l/dev-subdev.xml +++ b/Documentation/DocBook/media/v4l/dev-subdev.xml @@ -277,7 +277,7 @@
- Selections: cropping, scaling and composition + Selections - cropping, scaling and composition Many sub-devices support cropping frames on their input or output pads (or possible even on both). Cropping is used to select the area of @@ -330,6 +330,31 @@
+ Selections - regions of interest +
+ Automatic focus + + The camera automatic focus algorithms may require configuration + of a region or multiple regions of interest in form of rectangle or spot + coordinates. + + A single rectangle of interest is represented in &v4l2-rect; + by the coordinates of the top left corner and the rectangle size. Both + the coordinates and sizes are expressed in pixels. When the + width and height fields of + &v4l2-rect; are set to 0 the selection determines spot coordinates, + rather than a rectangle. + + Auto focus rectangles are reset to their default values when the + output image format is modified. Drivers should use the output image size + as the auto focus rectangle default value, but hardware requirements may + prevent this. + + The auto focus selections on input pads are not defined. +
+
+ +
Types of selection targets
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml index 208e9f0..c4ccae5 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml @@ -57,8 +57,8 @@ The selections are used to configure various image processing functionality performed by the subdevs which affect the - image size. This currently includes cropping, scaling and - composition. + image size. This currently includes cropping, scaling, composition + and automatic focus regions of interest. The selection API replaces the old subdev crop API. All @@ -114,6 +114,16 @@ 0x0102 Bounds of the compose rectangle. + + V4L2_SUBDEV_SEL_TGT_AUTO_FOCUS_BOUNDS + 0x1000 + Bounds of the automatic focus region of interest. + + + V4L2_SUBDEV_SEL_TGT_AUTO_FOCUS_ACTUAL + 0x1001 + Actual automatic focus rectangle or spot coordinates. + diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h index 812019e..49b1f14 100644 --- a/include/linux/v4l2-subdev.h +++ b/include/linux/v4l2-subdev.h @@ -136,6 +136,10 @@ struct v4l2_subdev_frame_interval_enum { /* composing bounds */ #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS 0x0102 +/* auto focus region of interest */ +#define V4L2_SUBDEV_SEL_TGT_AUTO_FOCUS_ACTUAL 0x1000 +/* auto focus region (spot coordinates) bounds */ +#define V4L2_SUBDEV_SEL_TGT_AUTO_FOCUS_BOUNDS 0x1001 /** * struct v4l2_subdev_selection - selection info -- 1.7.10