diff options
-rw-r--r-- | Documentation/DocBook/media/v4l/compat.xml | 13 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/controls.xml | 98 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/v4l2.xml | 5 | ||||
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 7 | ||||
-rw-r--r-- | include/linux/videodev2.h | 29 |
5 files changed, 127 insertions, 25 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 87339b2aad78..149f65dfaa72 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2422,6 +2422,19 @@ details.</para> | |||
2422 | &VIDIOC-SUBDEV-G-SELECTION; and | 2422 | &VIDIOC-SUBDEV-G-SELECTION; and |
2423 | &VIDIOC-SUBDEV-S-SELECTION;.</para> | 2423 | &VIDIOC-SUBDEV-S-SELECTION;.</para> |
2424 | </listitem> | 2424 | </listitem> |
2425 | <listitem> | ||
2426 | <para> Added <constant>V4L2_COLORFX_ANTIQUE</constant>, | ||
2427 | <constant>V4L2_COLORFX_ART_FREEZE</constant>, | ||
2428 | <constant>V4L2_COLORFX_AQUA</constant>, | ||
2429 | <constant>V4L2_COLORFX_SILHOUETTE</constant>, | ||
2430 | <constant>V4L2_COLORFX_SOLARIZATION</constant>, | ||
2431 | <constant>V4L2_COLORFX_VIVID</constant> and | ||
2432 | <constant>V4L2_COLORFX_ARBITRARY_CBCR</constant> menu items | ||
2433 | to the <constant>V4L2_CID_COLORFX</constant> control.</para> | ||
2434 | </listitem> | ||
2435 | <listitem> | ||
2436 | <para> Added <constant>V4L2_CID_COLORFX_CBCR</constant> control.</para> | ||
2437 | </listitem> | ||
2425 | </orderedlist> | 2438 | </orderedlist> |
2426 | </section> | 2439 | </section> |
2427 | 2440 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 662127447aa6..e2ff0f98f08d 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -285,18 +285,92 @@ minimum value disables backlight compensation.</entry> | |||
285 | <row id="v4l2-colorfx"> | 285 | <row id="v4l2-colorfx"> |
286 | <entry><constant>V4L2_CID_COLORFX</constant></entry> | 286 | <entry><constant>V4L2_CID_COLORFX</constant></entry> |
287 | <entry>enum</entry> | 287 | <entry>enum</entry> |
288 | <entry>Selects a color effect. Possible values for | 288 | <entry>Selects a color effect. The following values are defined: |
289 | <constant>enum v4l2_colorfx</constant> are: | 289 | </entry> |
290 | <constant>V4L2_COLORFX_NONE</constant> (0), | 290 | </row><row> |
291 | <constant>V4L2_COLORFX_BW</constant> (1), | 291 | <entry></entry> |
292 | <constant>V4L2_COLORFX_SEPIA</constant> (2), | 292 | <entry></entry> |
293 | <constant>V4L2_COLORFX_NEGATIVE</constant> (3), | 293 | <entrytbl spanname="descr" cols="2"> |
294 | <constant>V4L2_COLORFX_EMBOSS</constant> (4), | 294 | <tbody valign="top"> |
295 | <constant>V4L2_COLORFX_SKETCH</constant> (5), | 295 | <row> |
296 | <constant>V4L2_COLORFX_SKY_BLUE</constant> (6), | 296 | <entry><constant>V4L2_COLORFX_NONE</constant> </entry> |
297 | <constant>V4L2_COLORFX_GRASS_GREEN</constant> (7), | 297 | <entry>Color effect is disabled.</entry> |
298 | <constant>V4L2_COLORFX_SKIN_WHITEN</constant> (8) and | 298 | </row> |
299 | <constant>V4L2_COLORFX_VIVID</constant> (9).</entry> | 299 | <row> |
300 | <entry><constant>V4L2_COLORFX_ANTIQUE</constant> </entry> | ||
301 | <entry>An aging (old photo) effect.</entry> | ||
302 | </row> | ||
303 | <row> | ||
304 | <entry><constant>V4L2_COLORFX_ART_FREEZE</constant> </entry> | ||
305 | <entry>Frost color effect.</entry> | ||
306 | </row> | ||
307 | <row> | ||
308 | <entry><constant>V4L2_COLORFX_AQUA</constant> </entry> | ||
309 | <entry>Water color, cool tone.</entry> | ||
310 | </row> | ||
311 | <row> | ||
312 | <entry><constant>V4L2_COLORFX_BW</constant> </entry> | ||
313 | <entry>Black and white.</entry> | ||
314 | </row> | ||
315 | <row> | ||
316 | <entry><constant>V4L2_COLORFX_EMBOSS</constant> </entry> | ||
317 | <entry>Emboss, the highlights and shadows replace light/dark boundaries | ||
318 | and low contrast areas are set to a gray background.</entry> | ||
319 | </row> | ||
320 | <row> | ||
321 | <entry><constant>V4L2_COLORFX_GRASS_GREEN</constant> </entry> | ||
322 | <entry>Grass green.</entry> | ||
323 | </row> | ||
324 | <row> | ||
325 | <entry><constant>V4L2_COLORFX_NEGATIVE</constant> </entry> | ||
326 | <entry>Negative.</entry> | ||
327 | </row> | ||
328 | <row> | ||
329 | <entry><constant>V4L2_COLORFX_SEPIA</constant> </entry> | ||
330 | <entry>Sepia tone.</entry> | ||
331 | </row> | ||
332 | <row> | ||
333 | <entry><constant>V4L2_COLORFX_SKETCH</constant> </entry> | ||
334 | <entry>Sketch.</entry> | ||
335 | </row> | ||
336 | <row> | ||
337 | <entry><constant>V4L2_COLORFX_SKIN_WHITEN</constant> </entry> | ||
338 | <entry>Skin whiten.</entry> | ||
339 | </row> | ||
340 | <row> | ||
341 | <entry><constant>V4L2_COLORFX_SKY_BLUE</constant> </entry> | ||
342 | <entry>Sky blue.</entry> | ||
343 | </row> | ||
344 | <row> | ||
345 | <entry><constant>V4L2_COLORFX_SOLARIZATION</constant> </entry> | ||
346 | <entry>Solarization, the image is partially reversed in tone, | ||
347 | only color values above or below a certain threshold are inverted. | ||
348 | </entry> | ||
349 | </row> | ||
350 | <row> | ||
351 | <entry><constant>V4L2_COLORFX_SILHOUETTE</constant> </entry> | ||
352 | <entry>Silhouette (outline).</entry> | ||
353 | </row> | ||
354 | <row> | ||
355 | <entry><constant>V4L2_COLORFX_VIVID</constant> </entry> | ||
356 | <entry>Vivid colors.</entry> | ||
357 | </row> | ||
358 | <row> | ||
359 | <entry><constant>V4L2_COLORFX_SET_CBCR</constant> </entry> | ||
360 | <entry>The Cb and Cr chroma components are replaced by fixed | ||
361 | coefficients determined by <constant>V4L2_CID_COLORFX_CBCR</constant> | ||
362 | control.</entry> | ||
363 | </row> | ||
364 | </tbody> | ||
365 | </entrytbl> | ||
366 | </row> | ||
367 | <row> | ||
368 | <entry><constant>V4L2_CID_COLORFX_CBCR</constant></entry> | ||
369 | <entry>integer</entry> | ||
370 | <entry>Determines the Cb and Cr coefficients for <constant>V4L2_COLORFX_SET_CBCR</constant> | ||
371 | color effect. Bits [7:0] of the supplied 32 bit value are interpreted as | ||
372 | Cr component, bits [15:8] as Cb component and bits [31:16] must be zero. | ||
373 | </entry> | ||
300 | </row> | 374 | </row> |
301 | <row> | 375 | <row> |
302 | <entry><constant>V4L2_CID_ROTATE</constant></entry> | 376 | <entry><constant>V4L2_CID_ROTATE</constant></entry> |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index fbf808d242f7..63242e2adc02 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -141,9 +141,10 @@ applications. --> | |||
141 | <revision> | 141 | <revision> |
142 | <revnumber>3.5</revnumber> | 142 | <revnumber>3.5</revnumber> |
143 | <date>2012-04-02</date> | 143 | <date>2012-04-02</date> |
144 | <authorinitials>sa</authorinitials> | 144 | <authorinitials>sa, sn</authorinitials> |
145 | <revremark>Added V4L2_CTRL_TYPE_INTEGER_MENU and V4L2 subdev | 145 | <revremark>Added V4L2_CTRL_TYPE_INTEGER_MENU and V4L2 subdev |
146 | selections API. | 146 | selections API. Improved the description of V4L2_CID_COLORFX |
147 | control, added V4L2_CID_COLORFX_CBCR control. | ||
147 | </revremark> | 148 | </revremark> |
148 | </revision> | 149 | </revision> |
149 | 150 | ||
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index e5531ace5ee7..9bd8a92419e1 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c | |||
@@ -241,6 +241,12 @@ const char * const *v4l2_ctrl_get_menu(u32 id) | |||
241 | "Grass Green", | 241 | "Grass Green", |
242 | "Skin Whiten", | 242 | "Skin Whiten", |
243 | "Vivid", | 243 | "Vivid", |
244 | "Aqua", | ||
245 | "Art Freeze", | ||
246 | "Silhouette", | ||
247 | "Solarization", | ||
248 | "Antique", | ||
249 | "Set Cb/Cr", | ||
244 | NULL | 250 | NULL |
245 | }; | 251 | }; |
246 | static const char * const tune_preemphasis[] = { | 252 | static const char * const tune_preemphasis[] = { |
@@ -493,6 +499,7 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
493 | case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: return "Min Number of Capture Buffers"; | 499 | case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: return "Min Number of Capture Buffers"; |
494 | case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Min Number of Output Buffers"; | 500 | case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Min Number of Output Buffers"; |
495 | case V4L2_CID_ALPHA_COMPONENT: return "Alpha Component"; | 501 | case V4L2_CID_ALPHA_COMPONENT: return "Alpha Component"; |
502 | case V4L2_CID_COLORFX_CBCR: return "Color Effects, CbCr"; | ||
496 | 503 | ||
497 | /* MPEG controls */ | 504 | /* MPEG controls */ |
498 | /* Keep the order of the 'case's the same as in videodev2.h! */ | 505 | /* Keep the order of the 'case's the same as in videodev2.h! */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 7f75846a4a0c..07bce86f3548 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1248,16 +1248,22 @@ enum v4l2_power_line_frequency { | |||
1248 | #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) | 1248 | #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) |
1249 | #define V4L2_CID_COLORFX (V4L2_CID_BASE+31) | 1249 | #define V4L2_CID_COLORFX (V4L2_CID_BASE+31) |
1250 | enum v4l2_colorfx { | 1250 | enum v4l2_colorfx { |
1251 | V4L2_COLORFX_NONE = 0, | 1251 | V4L2_COLORFX_NONE = 0, |
1252 | V4L2_COLORFX_BW = 1, | 1252 | V4L2_COLORFX_BW = 1, |
1253 | V4L2_COLORFX_SEPIA = 2, | 1253 | V4L2_COLORFX_SEPIA = 2, |
1254 | V4L2_COLORFX_NEGATIVE = 3, | 1254 | V4L2_COLORFX_NEGATIVE = 3, |
1255 | V4L2_COLORFX_EMBOSS = 4, | 1255 | V4L2_COLORFX_EMBOSS = 4, |
1256 | V4L2_COLORFX_SKETCH = 5, | 1256 | V4L2_COLORFX_SKETCH = 5, |
1257 | V4L2_COLORFX_SKY_BLUE = 6, | 1257 | V4L2_COLORFX_SKY_BLUE = 6, |
1258 | V4L2_COLORFX_GRASS_GREEN = 7, | 1258 | V4L2_COLORFX_GRASS_GREEN = 7, |
1259 | V4L2_COLORFX_SKIN_WHITEN = 8, | 1259 | V4L2_COLORFX_SKIN_WHITEN = 8, |
1260 | V4L2_COLORFX_VIVID = 9, | 1260 | V4L2_COLORFX_VIVID = 9, |
1261 | V4L2_COLORFX_AQUA = 10, | ||
1262 | V4L2_COLORFX_ART_FREEZE = 11, | ||
1263 | V4L2_COLORFX_SILHOUETTE = 12, | ||
1264 | V4L2_COLORFX_SOLARIZATION = 13, | ||
1265 | V4L2_COLORFX_ANTIQUE = 14, | ||
1266 | V4L2_COLORFX_SET_CBCR = 15, | ||
1261 | }; | 1267 | }; |
1262 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | 1268 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) |
1263 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | 1269 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) |
@@ -1274,9 +1280,10 @@ enum v4l2_colorfx { | |||
1274 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) | 1280 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) |
1275 | 1281 | ||
1276 | #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) | 1282 | #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) |
1283 | #define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42) | ||
1277 | 1284 | ||
1278 | /* last CID + 1 */ | 1285 | /* last CID + 1 */ |
1279 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+42) | 1286 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+43) |
1280 | 1287 | ||
1281 | /* MPEG-class control IDs defined by V4L2 */ | 1288 | /* MPEG-class control IDs defined by V4L2 */ |
1282 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1289 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |