linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	g.liakhovetski@gmx.de, hdegoede@redhat.com, moinejf@free.fr,
	m.szyprowski@samsung.com, riverful.kim@samsung.com,
	sw0312.kim@samsung.com, Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 10/15] V4L: Add camera 3A lock control
Date: Sun, 29 Apr 2012 11:27:05 +0200	[thread overview]
Message-ID: <4F9D0969.1080806@gmail.com> (raw)
In-Reply-To: <4F971435.10608@iki.fi>

Hi Sakari,

On 04/24/2012 10:59 PM, Sakari Ailus wrote:
> Dzien dobry Sylwester,
> 
> (I hope it's not too wrong time of the day for that! ;))

No, it's never too wrong;)

> Sylwester Nawrocki wrote:
>> On 04/23/2012 07:47 AM, Sakari Ailus wrote:
>>> Sylwester Nawrocki wrote:
>>>> On 04/17/2012 06:09 PM, Sakari Ailus wrote:
>>>>> On Tue, Apr 17, 2012 at 12:09:51PM +0200, Sylwester Nawrocki wrote:
...
>>> I was thinking how does the situation really differ from disabling the
>>> corresponding automatic algorithm. There may be subtle differences in
>>> practice albeit in principle the two are no different. And if some of 
>>> the
>>> sensors implement it as lock, then I guess it gives us few options 
>>> for the
>>> user space interface.
>>
>> Can you anticipate any any possible issues such diversity might bring to
>> applications ? I imagine such control can be quite useful for snapshot,
>> and with current control API design and the drivers' behaviour 
>> applications
>> cannot be sure what settings a device ends up with after switching from
>> "auto" to "manual" - last auto settings or the manual values. Usually its
>> just the previous manual values.
> 
> On software controlled digital cameras, depending on what the manual 
> configuration actually means, you either get the same than by locking 
> the automatic control or the previous manual configuration. If the means 
> for manual configuration are the same than what the automatic algorithm 
> uses then it's the first case. However, I have a feeling that such low 
> level controls might often not work the best for manual control: for 
> white balance users seldom wish to fiddle with SRGB matrix or gamma 
> tables directly. Colour balance might just do mostly the same and be 
> more convenient, with the automatic algorithm still doing some work to 
> configure the underlying low-level configuration.

I was thinking more along the lines of currently available V4L2 
controls. And with cameras with I2C control interface there is often
a device specific user interface of which characteristics are slightly 
different that what we would have implemented directly in software in 
user space. 

> Perhaps it would make sense to suggest that the control algorithm locks 
> should be implemented even in cases where the lock would mean exactly 
> the same than just disabling the algorithm. What do you think?

IMHO a driver should expose the control only if hardware supports 
locking. Once we have clear semantics for the lock control, it should
be up to the driver's author to decide whether such functionality 
should be exposed or not. I believe the locking and disabling/enabling 
automatic settings will differ in most cases, there may be different
latencies involved, etc. 

Also I think the lock control should have top priority, .e.g when
the user sets V4L2_CID_AUTO_FOCUS_START control nothing should 
happen, unless V4L2_LOCK_FOCUS is set to 0. What do you think ?

BTW, I've changed names of the individual lock bits an removed 
"_3A" prefix from them. It seems to look better that way:

#define V4L2_CID_3A_LOCK	(V4L2_CID_CAMERA_CLASS_BASE+27)
#define V4L2_LOCK_EXPOSURE	(1 << 0)
#define V4L2_LOCK_WHITE_BALANCE	(1 << 1)
#define V4L2_LOCK_FOCUS		(1 << 2)

Or must we abide the rule that individual option names are created 
by only removing the "_CID" part from the control name and appending
the option's name ?

> Shouldn't the lock be related to contiguous focus only btw.? Regular 
> autofocus is typically a one-time operation, the lens ending up on a 
> position where the AF algorithm left it.

Perhaps, it would make sense mostly for continuous auto focus. 
However, I'm inclined to not limit it to continuous auto focus only. 
I think regardless of the focus mode the lock should freeze focusing,
so still image capture is not disturbed.


--

Regards,
Sylwester

  reply	other threads:[~2012-04-29  9:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 10:09 [PATCH 00/15] V4L camera control enhancements Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 01/15] V4L: Extend V4L2_CID_COLORFX with more image effects Sylwester Nawrocki
2012-04-17 10:51   ` Rémi Denis-Courmont
2012-04-17 11:28     ` Sylwester Nawrocki
2012-04-22 16:00       ` Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 02/15] V4L: Add helper function for standard integer menu controls Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 03/15] V4L: Add camera exposure bias control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 04/15] V4L: Add camera white balance preset control Sylwester Nawrocki
2012-04-17 13:23   ` Hans de Goede
2012-04-18  8:46     ` Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 05/15] V4L: Add camera wide dynamic range control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 06/15] V4L: Add camera image stabilization control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 07/15] V4L: Add camera ISO sensitivity controls Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 08/15] V4L: Add camera exposure metering control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 09/15] V4L: Add camera scene mode control Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 10/15] V4L: Add camera 3A lock control Sylwester Nawrocki
2012-04-17 16:09   ` Sakari Ailus
2012-04-18  9:01     ` Sylwester Nawrocki
2012-04-23  5:47       ` Sakari Ailus
2012-04-24 20:12         ` Sylwester Nawrocki
2012-04-24 20:59           ` Sakari Ailus
2012-04-29  9:27             ` Sylwester Nawrocki [this message]
2012-04-17 10:09 ` [PATCH 11/15] V4L: Add auto focus targets to the selections API Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 12/15] V4L: Add auto focus targets to the subdev " Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 13/15] V4L: Add camera auto focus controls Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 14/15] V4L: Add S5C73M3 sensor sub-device driver Sylwester Nawrocki
2012-04-17 10:09 ` [PATCH 15/15] vivi: Add controls 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=4F9D0969.1080806@gmail.com \
    --to=snjw23@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hdegoede@redhat.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=moinejf@free.fr \
    --cc=riverful.kim@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).