Re: [RFC/PATCH 3/5] v4l: Add V4L2_CID_METERING_MODE camera control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/2011 05:27 PM, Sylwester Nawrocki wrote:
>>> +		 
>>> <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;
> };

Hmm, that won't work since there is no way to handle the min/max/step for
more than one value. Probably the selection API could be used for specifying
the metering rectangle, or just separate controls for x, y, width, height.
Since we need to specify only locations for some controls and a rectangle for
others, probably separate controls would be more suitable.

-- 
Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux