All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	linux-media@vger.kernel.org, m.szyprowski@samsung.com,
	sw0312.kim@samsung.com, Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 10/23] V4L: Add auto focus targets to the selections API
Date: Sun, 4 Nov 2012 19:29:58 +0200	[thread overview]
Message-ID: <20121104172957.GB25623@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <508F067B.7030301@gmail.com>

Hi Sylwester,

Thanks  for the update!

On Mon, Oct 29, 2012 at 11:43:07PM +0100, Sylwester Nawrocki wrote:
> Hi Sakari,
> 
> On 10/29/2012 09:00 PM, Sakari Ailus wrote:
> > On Thu, May 10, 2012 at 12:30:45PM +0200, Sylwester Nawrocki wrote:
> >> The camera automatic focus algorithms may require setting up
> >> a spot or rectangle coordinates or multiple such parameters.
> >>
> >> The automatic focus selection targets are introduced in order
> >> to allow applications to query and set such coordinates. Those
> >> selections are intended to be used together with the automatic
> >> focus controls available in the camera control class.
> >>
> >> Signed-off-by: Sylwester Nawrocki<s.nawrocki@samsung.com>
> >> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
> >> ---
> >>   Documentation/DocBook/media/v4l/selection-api.xml  |   33 +++++++++++++++++++-
> >>   .../DocBook/media/v4l/vidioc-g-selection.xml       |   11 +++++++
> >>   include/linux/videodev2.h                          |    5 +++
> >>   3 files changed, 48 insertions(+), 1 deletion(-)
> > 
> > What's the status of this patch? May I ask if you have plans to continue
> > with it?
> 
> Thanks for reminding about it. I'd like to make this ready for v3.8, if 
> possible. I've done some minor improvements of the related 
> V4L2_CID_AUTO_FOCUS_AREA control and we use this patch internally. We would 
> like to see how all this can be used for auto focus feature of the s5c73m3 
> camera. I hope to have these patches posted next week.

I'm looking forward to that!

> > Speaking of multiple AF windows --- I originally thought we could just have
> > multiple selection targets for them. I'm not sure which one would be better;
> > multiple selection targets or another field telling the window ID. In case
> > of the former we'd leave a largish gap for additional window IDs.
> > 
> > I think I'm leaning towards using one reserved field for the purpose.
> 
> That also as my preference. I imagine the ID field could be reused for
> other future or existing selection targets anyway. I recall someone already
> asked about multiple ROI support for image cropping [1], perhaps the ID 
> field could be used also for that.

I wonder how that would make sense with a single stream.

Selections could also be used on the event interface: they fit exactly to
the union there. One of the applications is passing face tracking
information to the user space.

> > Another question I had was that which of the selection rectangles would the
> > AF rectangle be related to? Is it the compose bounds rectangle, or the crop
> > bounds rectangle, for example? I thought it might make sense to use another
> > field to tell that, since I think which one this really is related to is
> > purely hardware specific.
> 
> It's indeed very hardware specific. I've seen sensors that allow to define
> bounds for the auto focus rectangle entirely independent from the output 
> format, crop or compose rectangle. It may look strange, but some sensor 
> firmwares just accept rectangle/point coordinates with bounds rectangle 
> corresponding to video display area (so it is easy, e.g. to use coordinates 
> coming directly from a touchscreen) and then perform required calculations 
> to map/scale it onto e.g. sensor crop or output rectangle.
> 
> I guess your question is related to how to determine in what stage of 
> video pipeline the AF selections would be and what the configuration 
> order should be from the user space side ?

How to determine what the coordinates are related to. Only that, and inside
a single subdev, actually. The rest is already well visible to the user.

The targets defined up to now are well defined in relation to the other
targets in the documentation. About the configuration order --- the AF
window target could likely be configured after the related target has been
configured.

Perhaps this information should actually come from
VIDIOC_(SUBDEV_,)QUERY_SELECTION. :-) I think this can well be done later
on.

Kind regards,

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

  reply	other threads:[~2012-11-04 17:30 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 [this message]
2012-05-10 10:30 ` [PATCH 11/23] V4L: Add auto focus targets to the subdev " Sylwester Nawrocki
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=20121104172957.GB25623@valkosipuli.retiisi.org.uk \
    --to=sakari.ailus@iki.fi \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sw0312.kim@samsung.com \
    --cc=sylvester.nawrocki@gmail.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.