Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306358
b: refs/heads/master
c: e40a057
h: refs/heads/master
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 275074e commit dbab166
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d58083c949b3d76aba225be9f303ab5dab585064
refs/heads/master: e40a05736d4503950ec303610a51f838bd59cdc1
70 changes: 70 additions & 0 deletions trunk/Documentation/DocBook/media/v4l/controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3022,6 +3022,76 @@ 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-auto-n-preset-white-balance">
<entry spanname="id"><constant>V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_auto_n_preset_white_balance</entry>
</row><row><entry spanname="descr">Sets white balance to automatic,
manual or a preset. The presets determine color temperature of the light as
a hint to the camera for white balance adjustments resulting in most accurate
color representation. The following white balance presets are listed in order
of increasing color temperature.</entry>
</row>
<row>
<entrytbl spanname="descr" cols="2">
<tbody valign="top">
<row>
<entry><constant>V4L2_WHITE_BALANCE_MANUAL</constant>&nbsp;</entry>
<entry>Manual white balance.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_AUTO</constant>&nbsp;</entry>
<entry>Automatic white balance adjustments.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_INCANDESCENT</constant>&nbsp;</entry>
<entry>White balance setting for incandescent (tungsten) lighting.
It generally cools down the colors and corresponds approximately to 2500...3500 K
color temperature range.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT</constant>&nbsp;</entry>
<entry>White balance preset for fluorescent lighting.
It corresponds approximately to 4000...5000 K color temperature.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT_H</constant>&nbsp;</entry>
<entry>With this setting the camera will compensate for
fluorescent H lighting.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_HORIZON</constant>&nbsp;</entry>
<entry>White balance setting for horizon daylight.
It corresponds approximately to 5000 K color temperature.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_DAYLIGHT</constant>&nbsp;</entry>
<entry>White balance preset for daylight (with clear sky).
It corresponds approximately to 5000...6500 K color temperature.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_FLASH</constant>&nbsp;</entry>
<entry>With this setting the camera will compensate for the flash
light. It slightly warms up the colors and corresponds roughly to 5000...5500 K
color temperature.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_CLOUDY</constant>&nbsp;</entry>
<entry>White balance preset for moderately overcast sky.
This option corresponds approximately to 6500...8000 K color temperature
range.</entry>
</row>
<row>
<entry><constant>V4L2_WHITE_BALANCE_SHADE</constant>&nbsp;</entry>
<entry>White balance preset for shade or heavily overcast
sky. It corresponds approximately to 9000...10000 K color temperature.
</entry>
</row>
</tbody>
</entrytbl>
</row>
<row><entry></entry></row>

</tbody>
</tgroup>
</table>
Expand Down
17 changes: 17 additions & 0 deletions trunk/drivers/media/video/v4l2-ctrls.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,19 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
"Set Cb/Cr",
NULL
};
static const char * const auto_n_preset_white_balance[] = {
"Manual",
"Auto",
"Incandescent",
"Fluorescent",
"Fluorescent H",
"Horizon",
"Daylight",
"Flash",
"Cloudy",
"Shade",
NULL,
};
static const char * const tune_preemphasis[] = {
"No Preemphasis",
"50 Microseconds",
Expand Down Expand Up @@ -418,6 +431,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
return camera_exposure_auto;
case V4L2_CID_COLORFX:
return colorfx;
case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE:
return auto_n_preset_white_balance;
case V4L2_CID_TUNE_PREEMPHASIS:
return tune_preemphasis;
case V4L2_CID_FLASH_LED_MODE:
Expand Down Expand Up @@ -605,6 +620,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_IRIS_ABSOLUTE: return "Iris, Absolute";
case V4L2_CID_IRIS_RELATIVE: return "Iris, Relative";
case V4L2_CID_AUTO_EXPOSURE_BIAS: return "Auto Exposure, Bias";
case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE: return "White Balance, Auto & Preset";

/* FM Radio Modulator control */
/* Keep the order of the 'case's the same as in videodev2.h! */
Expand Down Expand Up @@ -739,6 +755,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_MPEG_STREAM_VBI_FMT:
case V4L2_CID_EXPOSURE_AUTO:
case V4L2_CID_COLORFX:
case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE:
case V4L2_CID_TUNE_PREEMPHASIS:
case V4L2_CID_FLASH_LED_MODE:
case V4L2_CID_FLASH_STROBE_SOURCE:
Expand Down
14 changes: 14 additions & 0 deletions trunk/include/linux/videodev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1709,6 +1709,20 @@ enum v4l2_exposure_auto_type {

#define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19)

#define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE+20)
enum v4l2_auto_n_preset_white_balance {
V4L2_WHITE_BALANCE_MANUAL = 0,
V4L2_WHITE_BALANCE_AUTO = 1,
V4L2_WHITE_BALANCE_INCANDESCENT = 2,
V4L2_WHITE_BALANCE_FLUORESCENT = 3,
V4L2_WHITE_BALANCE_FLUORESCENT_H = 4,
V4L2_WHITE_BALANCE_HORIZON = 5,
V4L2_WHITE_BALANCE_DAYLIGHT = 6,
V4L2_WHITE_BALANCE_FLASH = 7,
V4L2_WHITE_BALANCE_CLOUDY = 8,
V4L2_WHITE_BALANCE_SHADE = 9,
};

/* FM Modulator class control IDs */
#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)
Expand Down

0 comments on commit dbab166

Please sign in to comment.