All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <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 <kyungmin.park@samsung.com>
Subject: [PATCH 11/23] V4L: Add auto focus targets to the subdev selections API
Date: Thu, 10 May 2012 12:30:46 +0200	[thread overview]
Message-ID: <1336645858-30366-12-git-send-email-s.nawrocki@samsung.com> (raw)
In-Reply-To: <1336645858-30366-1-git-send-email-s.nawrocki@samsung.com>

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 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 @@
     </section>
 
     <section>
-      <title>Selections: cropping, scaling and composition</title>
+      <title>Selections - cropping, scaling and composition</title>
 
       <para>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 @@
     </section>
 
     <section>
+      <title>Selections - regions of interest</title>
+    <section>
+      <title>Automatic focus</title>
+
+      <para>The camera automatic focus algorithms may require configuration
+      of a region or multiple regions of interest in form of rectangle or spot
+      coordinates.</para>
+
+      <para>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 <structfield>
+      width</structfield> and <structfield>height</structfield> fields of
+      &v4l2-rect; are set to 0 the selection determines spot coordinates,
+      rather than a rectangle.</para>
+
+      <para>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.
+      </para>
+      <para>The auto focus selections on input pads are not defined.</para>
+    </section>
+    </section>
+
+    <section>
       <title>Types of selection targets</title>
 
       <section>
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 @@
 
     <para>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.</para>
+    image size. This currently includes cropping, scaling, composition
+    and automatic focus regions of interest.</para>
 
     <para>The selection API replaces <link
     linkend="vidioc-subdev-g-crop">the old subdev crop API</link>. All
@@ -114,6 +114,16 @@
 	    <entry>0x0102</entry>
 	    <entry>Bounds of the compose rectangle.</entry>
 	  </row>
+	  <row>
+	    <entry><constant>V4L2_SUBDEV_SEL_TGT_AUTO_FOCUS_BOUNDS</constant></entry>
+	    <entry>0x1000</entry>
+	    <entry>Bounds of the automatic focus region of interest.</entry>
+	  </row>
+	  <row>
+	    <entry><constant>V4L2_SUBDEV_SEL_TGT_AUTO_FOCUS_ACTUAL</constant></entry>
+	    <entry>0x1001</entry>
+	    <entry>Actual automatic focus rectangle or spot coordinates.</entry>
+	  </row>
 	</tbody>
       </tgroup>
     </table>
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


  parent reply	other threads:[~2012-05-10 10:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 10:30 [PATCH v5 00/23] V4L: camera control enhancements Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 01/23] V4L: Add helper function for standard integer menu controls Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 02/23] V4L: Add camera exposure bias control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 03/23] V4L: Add an extended camera white balance control Sylwester Nawrocki
2012-05-14  0:02   ` Sakari Ailus
2012-05-15 21:28     ` Sylwester Nawrocki
2012-05-16  6:57       ` Sakari Ailus
2012-05-16  9:34         ` Sylwester Nawrocki
2012-05-17 22:37           ` Sakari Ailus
2012-05-15 21:53     ` [PATCH] V4L: DocBook: Improve V4L2_AUTO_N_WHITE_BALANCE control description Sylwester Nawrocki
2012-05-19 20:27       ` [PATCH v3] V4L: DocBook: Improve V4L2_CID_AUTO_N_WHITE_BALANCE " Sylwester Nawrocki
2012-05-15 22:05     ` [PATCH v2] " Sylwester Nawrocki
2012-05-17 22:42       ` Sakari Ailus
2012-05-10 10:30 ` [PATCH 04/23] V4L: Add camera wide dynamic range control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 05/23] V4L: Add camera image stabilization control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 06/23] V4L: Add camera ISO sensitivity controls Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 07/23] V4L: Add camera exposure metering control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 08/23] V4L: Add camera scene mode control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 09/23] V4L: Add camera 3A lock control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 10/23] V4L: Add auto focus targets to the selections API Sylwester Nawrocki
2012-10-29 20:00   ` Sakari Ailus
2012-10-29 22:43     ` Sylwester Nawrocki
2012-11-04 17:29       ` Sakari Ailus
2012-05-10 10:30 ` Sylwester Nawrocki [this message]
2012-05-10 10:30 ` [PATCH 12/23] V4L: Add camera auto focus controls Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 13/23] m5mols: Convert macros to inline functions Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 14/23] m5mols: Refactored controls handling Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 15/23] m5mols: Use proper sensor mode for the controls Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 16/23] m5mols: Add ISO sensitivity controls Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 17/23] m5mols: Add auto and preset white balance control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 18/23] m5mols: Add exposure bias control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 19/23] m5mols: Add wide dynamic range control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 20/23] m5mols: Add image stabilization control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 21/23] m5mols: Add exposure metering control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 22/23] m5mols: Add JPEG compression quality control Sylwester Nawrocki
2012-05-10 10:30 ` [PATCH 23/23] m5mols: Add 3A lock control Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336645858-30366-12-git-send-email-s.nawrocki@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=riverful.kim@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.