Commit d58083c9 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] V4L: Add camera exposure bias control

The camera may in some conditions incorrectly determine the exposure,
and a manual automatic exposure correction may be needed. This patch
adds V4L2_CID_AUTO_EXPOSURE_BIAS control which allows to add some
offset in the automatic exposure control loop, to compensate for
frame under- or over-exposure.
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 515f3287
...@@ -2848,6 +2848,22 @@ remain constant.</entry> ...@@ -2848,6 +2848,22 @@ remain constant.</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row>
<entry spanname="id"><constant>V4L2_CID_EXPOSURE_BIAS</constant>&nbsp;</entry>
<entry>integer menu</entry>
</row><row><entry spanname="descr"> Determines the automatic
exposure compensation, it is effective only when <constant>V4L2_CID_EXPOSURE_AUTO</constant>
control is set to <constant>AUTO</constant>, <constant>SHUTTER_PRIORITY </constant>
or <constant>APERTURE_PRIORITY</constant>.
It is expressed in terms of EV, drivers should interpret the values as 0.001 EV
units, where the value 1000 stands for +1 EV.
<para>Increasing the exposure compensation value is equivalent to decreasing
the exposure value (EV) and will increase the amount of light at the image
sensor. The camera performs the exposure compensation by adjusting absolute
exposure time and/or aperture.</para></entry>
</row>
<row><entry></entry></row>
<row> <row>
<entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry>
<entry>integer</entry> <entry>integer</entry>
......
...@@ -604,6 +604,7 @@ const char *v4l2_ctrl_get_name(u32 id) ...@@ -604,6 +604,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_PRIVACY: return "Privacy"; case V4L2_CID_PRIVACY: return "Privacy";
case V4L2_CID_IRIS_ABSOLUTE: return "Iris, Absolute"; case V4L2_CID_IRIS_ABSOLUTE: return "Iris, Absolute";
case V4L2_CID_IRIS_RELATIVE: return "Iris, Relative"; case V4L2_CID_IRIS_RELATIVE: return "Iris, Relative";
case V4L2_CID_AUTO_EXPOSURE_BIAS: return "Auto Exposure, Bias";
/* FM Radio Modulator control */ /* FM Radio Modulator control */
/* Keep the order of the 'case's the same as in videodev2.h! */ /* Keep the order of the 'case's the same as in videodev2.h! */
...@@ -760,6 +761,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, ...@@ -760,6 +761,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_RDS_TX_RADIO_TEXT: case V4L2_CID_RDS_TX_RADIO_TEXT:
*type = V4L2_CTRL_TYPE_STRING; *type = V4L2_CTRL_TYPE_STRING;
break; break;
case V4L2_CID_AUTO_EXPOSURE_BIAS:
*type = V4L2_CTRL_TYPE_INTEGER_MENU;
break;
case V4L2_CID_USER_CLASS: case V4L2_CID_USER_CLASS:
case V4L2_CID_CAMERA_CLASS: case V4L2_CID_CAMERA_CLASS:
case V4L2_CID_MPEG_CLASS: case V4L2_CID_MPEG_CLASS:
......
...@@ -1707,6 +1707,8 @@ enum v4l2_exposure_auto_type { ...@@ -1707,6 +1707,8 @@ enum v4l2_exposure_auto_type {
#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) #define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) #define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
#define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19)
/* FM Modulator class control IDs */ /* FM Modulator class control IDs */
#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment