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@xxxxxxxxx> >> --- >> 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> </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> </entry> + >> <entry>enum 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> </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> </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> </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 -- 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