All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sylwester Nawrocki <snjw23@gmail.com>,
	linux-media@vger.kernel.org, sakari.ailus@iki.fi,
	hverkuil@xs4all.nl, riverful.kim@samsung.com
Subject: Re: [RFC/PATCH 3/5] v4l: Add V4L2_CID_METERING_MODE camera control
Date: Tue, 06 Dec 2011 17:27:09 +0100	[thread overview]
Message-ID: <4EDE425D.6020502@samsung.com> (raw)
In-Reply-To: <201112061332.40168.laurent.pinchart@ideasonboard.com>

Hi Laurent,

thanks for the comments.

On 12/06/2011 01:32 PM, Laurent Pinchart wrote:
> On Sunday 04 December 2011 16:16:14 Sylwester Nawrocki wrote:
>> The V4L2_CID_METERING_MODE control allows to determine what method
>> is used by the camera to measure the amount of light available for
>> automatic exposure control.
>>
>> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
>> ---
>>  Documentation/DocBook/media/v4l/controls.xml |   31
>> ++++++++++++++++++++++++++ drivers/media/video/v4l2-ctrls.c             | 
>>   2 +
>>  include/linux/videodev2.h                    |    7 ++++++
>>  3 files changed, 40 insertions(+), 0 deletions(-)
>>
>> diff --git a/Documentation/DocBook/media/v4l/controls.xml
>> b/Documentation/DocBook/media/v4l/controls.xml index 5ccb0b0..53d7c08
>> 100644
>> --- a/Documentation/DocBook/media/v4l/controls.xml
>> +++ b/Documentation/DocBook/media/v4l/controls.xml
>> @@ -2893,6 +2893,7 @@ mechanical obturation of the sensor and firmware
>> image processing, but the device is not restricted to these methods.
>> Devices that implement the privacy control must support read access and
>> may support write access.</entry> </row>
>> +	  <row><entry></entry></row>
>>
>>  	  <row>
>>  	    <entry
>> spanname="id"><constant>V4L2_CID_BAND_STOP_FILTER</constant>&nbsp;</entry>
>> @@ -2902,6 +2903,36 @@ camera sensor on or off, or specify its strength.
>> Such band-stop filters can be used, for example, to filter out the
>> fluorescent light component.</entry> </row>
>>  	  <row><entry></entry></row>
>> +
>> +	  <row id="v4l2-metering-mode">
>> +	    <entry
>> spanname="id"><constant>V4L2_CID_METERING_MODE</constant>&nbsp;</entry> +	
>>    <entry>enum&nbsp;v4l2_metering_mode</entry>
>> +	  </row><row><entry spanname="descr">Determines how the camera measures
>> +the amount of light available to expose a frame. Possible values
>> are:</entry> +	  </row>
>> +	  <row>
>> +	    <entrytbl spanname="descr" cols="2">
>> +	      <tbody valign="top">
>> +		<row>
>> +		  <entry><constant>V4L2_METERING_MODE_AVERAGE</constant>&nbsp;</entry>
>> +		  <entry>Use the light information coming from the entire scene
>> +and average giving no weighting to any particular portion of the metered
>> area. +		  </entry>
>> +		</row>
>> +		<row>
>> +		 
>> <entry><constant>V4L2_METERING_MODE_CENTER_WEIGHTED</constant>&nbsp;</entr
>> y> +		  <entry>Average the light information coming from the entire scene
>> +giving priority to the center of the metered area.</entry>
>> +		</row>
>> +		<row>
>> +		  <entry><constant>V4L2_METERING_MODE_SPOT</constant>&nbsp;</entry>
>> +		  <entry>Measure only very small area at the cent-re of the
>> scene.</entry> +		</row>
>> +	      </tbody>
> 
> For the last two cases, would it also make sense to specify the center of the 
> weighted area and the spot location ?

Yes, that's quite basic requirement as well.. A means to determine the 
location would be also needed for some auto focus algorithms.
 
Additionally for V4L2_METERING_MODE_CENTER_WEIGHTED it's also needed to
specify the size of the area (width/height).

What do you think about defining new control for passing pixel position,
i.e. modifying struct v4l2_ext_control to something like:

struct v4l2_ext_control {
	__u32 id;
	__u32 size;
	__u32 reserved2[1];
	union {
		__s32 value;
		__s64 value64;
		struct v4l2_point position;
		char *string;
	};
} __attribute__ ((packed));

where:

struct v4l2_point {
	__s32 x;
	__s32 y;
};


or should we rather use ioctls for things like that ?


-- 
Regards,
Sylwester

  reply	other threads:[~2011-12-06 16:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-04 15:16 [RFC/PATCH 0/5] v4l: New camera controls Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 1/5] v4l: Convert V4L2_CID_FOCUS_AUTO control to a menu control Sylwester Nawrocki
2011-12-06 12:31   ` Laurent Pinchart
2011-12-06 17:25     ` Sylwester Nawrocki
2011-12-10 10:33   ` Sakari Ailus
2011-12-10 14:42     ` Sylwester Nawrocki
2011-12-31 12:00       ` Sakari Ailus
2012-01-01 16:49         ` Sylwester Nawrocki
2012-01-02 11:16           ` Laurent Pinchart
2012-01-02 20:55             ` Sylwester Nawrocki
2012-01-03 13:55               ` Laurent Pinchart
2012-01-04 22:04                 ` Sylwester Nawrocki
2012-01-04 14:04               ` Sakari Ailus
2012-01-06 14:22                 ` Sylwester Nawrocki
2012-01-04 13:22           ` Sakari Ailus
2012-01-06 13:56             ` Sylwester Nawrocki
2011-12-11 16:18     ` Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 2/5] uvc: Adapt the driver to new type of V4L2_CID_FOCUS_AUTO control Sylwester Nawrocki
2011-12-06 12:26   ` Laurent Pinchart
2011-12-06 17:10     ` Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 3/5] v4l: Add V4L2_CID_METERING_MODE camera control Sylwester Nawrocki
2011-12-06 12:32   ` Laurent Pinchart
2011-12-06 16:27     ` Sylwester Nawrocki [this message]
2011-12-07 11:09       ` Sylwester Nawrocki
2011-12-10 10:44         ` Sakari Ailus
2011-12-10 14:14           ` Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 4/5] v4l: Add V4L2_CID_EXPOSURE_BIAS " Sylwester Nawrocki
2011-12-04 15:16 ` [RFC/PATCH 5/5] v4l: Add V4L2_CID_ISO and V4L2_CID_ISO_AUTO controls Sylwester Nawrocki
2011-12-06 12:34 ` [RFC/PATCH 0/5] v4l: New camera controls Laurent Pinchart
2011-12-07 10:32   ` Sylwester Nawrocki
2011-12-10 10:20     ` Sakari Ailus

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=4EDE425D.6020502@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=riverful.kim@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=snjw23@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.