From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mailout1.w1.samsung.com ([210.118.77.11]:11061 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759939Ab2D0JxQ (ORCPT ); Fri, 27 Apr 2012 05:53:16 -0400 Received: from euspt1 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M3400ARFU28UP@mailout1.w1.samsung.com> for linux-media@vger.kernel.org; Fri, 27 Apr 2012 10:51:44 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M3400JZMU4LNO@spt1.w1.samsung.com> for linux-media@vger.kernel.org; Fri, 27 Apr 2012 10:53:14 +0100 (BST) Date: Fri, 27 Apr 2012 11:52:54 +0200 From: Sylwester Nawrocki Subject: [PATCH 01/13] V4L: Extend V4L2_CID_COLORFX with more image effects In-reply-to: <1335520386-20835-1-git-send-email-s.nawrocki@samsung.com> To: linux-media@vger.kernel.org Cc: m.szyprowski@samsung.com, kyungmin.park@samsung.com, riverful.kim@samsung.com, sw0312.kim@samsung.com, sungchun.kang@samsung.com, subash.ramaswamy@linaro.org, s.nawrocki@samsung.com Message-id: <1335520386-20835-2-git-send-email-s.nawrocki@samsung.com> MIME-version: 1.0 Content-type: TEXT/PLAIN Content-transfer-encoding: 7BIT References: <1335520386-20835-1-git-send-email-s.nawrocki@samsung.com> Sender: linux-media-owner@vger.kernel.org List-ID: This patch adds definition of additional color effects: - V4L2_COLORFX_AQUA, - V4L2_COLORFX_ART_FREEZE, - V4L2_COLORFX_SILHOUETTE, - V4L2_COLORFX_SOLARIZATION, - V4L2_COLORFX_ANTIQUE, - V4L2_COLORFX_ARBITRARY_CBCR. The control's type in the documentation is changed from 'enum' to 'menu' - V4L2_CID_COLORFX has always been a menu, not an integer type control. The V4L2_COLORFX_ARBITRARY_CBCR option enables custom color effects, which are impossible or impractical to define as menu items. The V4L2_CID_BLUE_BALANCE and V4L2_CID_RED_BALANCE controls allow in this case to configure the Cb, Cr coefficients. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- Documentation/DocBook/media/v4l/compat.xml | 10 +++ Documentation/DocBook/media/v4l/controls.xml | 92 ++++++++++++++++++++++---- Documentation/DocBook/media/v4l/v4l2.xml | 5 +- drivers/media/video/v4l2-ctrls.c | 6 ++ include/linux/videodev2.h | 26 +++++--- 5 files changed, 114 insertions(+), 25 deletions(-) diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 87339b2..a6a9c5c 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml @@ -2422,6 +2422,16 @@ details. &VIDIOC-SUBDEV-G-SELECTION; and &VIDIOC-SUBDEV-S-SELECTION;. + + Added V4L2_COLORFX_ANTIQUE, + V4L2_COLORFX_ART_FREEZE, + V4L2_COLORFX_AQUA, + V4L2_COLORFX_SILHOUETTE, + V4L2_COLORFX_SOLARIZATION, + V4L2_COLORFX_VIVID and + V4L2_COLORFX_ARBITRARY_CBCR menu items +to the V4L2_CID_COLORFX control. + diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 5038a3a..8b604b0 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -284,19 +284,85 @@ minimum value disables backlight compensation. V4L2_CID_COLORFX - enum - Selects a color effect. Possible values for -enum v4l2_colorfx are: -V4L2_COLORFX_NONE (0), -V4L2_COLORFX_BW (1), -V4L2_COLORFX_SEPIA (2), -V4L2_COLORFX_NEGATIVE (3), -V4L2_COLORFX_EMBOSS (4), -V4L2_COLORFX_SKETCH (5), -V4L2_COLORFX_SKY_BLUE (6), -V4L2_COLORFX_GRASS_GREEN (7), -V4L2_COLORFX_SKIN_WHITEN (8) and -V4L2_COLORFX_VIVID (9). + menu + Selects a color effect. The following values are defined: + + + + + + + + V4L2_COLORFX_NONE  + Color effect is disabled. + + + V4L2_COLORFX_ANTIQUE  + An aging (old photo) effect. + + + V4L2_COLORFX_ART_FREEZE  + Frost color effect. + + + V4L2_COLORFX_AQUA  + Water color, cool tone. + + + V4L2_COLORFX_BW  + Black and white. + + + V4L2_COLORFX_EMBOSS  + Emboss, the highlights and shadows replace light/dark boundaries + and low contrast areas are set to a gray background. + + + V4L2_COLORFX_GRASS_GREEN  + Grass green. + + + V4L2_COLORFX_NEGATIVE  + Negative. + + + V4L2_COLORFX_SEPIA  + Sepia tone. + + + V4L2_COLORFX_SKETCH  + Sketch. + + + V4L2_COLORFX_SKIN_WHITEN  + Skin whiten. + + + V4L2_COLORFX_SKY_BLUE  + Sky blue. + + + V4L2_COLORFX_SOLARIZATION  + Solarization, the image is partially reversed in tone, + only color values above or below a certain threshold are inverted. + + + + V4L2_COLORFX_SILHOUETTE  + Silhouette (outline). + + + V4L2_COLORFX_VIVID  + Vivid colors. + + + V4L2_COLORFX_ARBITRARY_CBCR  + Arbitrary chroma components. The Cb, Cr coefficients +are determined by V4L2_CID_BLUE_BALANCE and +V4L2_CID_RED_BALANCE control respectively. + + + V4L2_CID_ROTATE diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index fbf808d..e4e65d0 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -141,9 +141,10 @@ applications. --> 3.5 2012-04-02 - sa + sa, sn Added V4L2_CTRL_TYPE_INTEGER_MENU and V4L2 subdev - selections API. + selections API. Corrected and extended the V4L2_CID_COLORFX + control description. diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index c93a979..25132ec 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) "Grass Green", "Skin Whiten", "Vivid", + "Aqua", + "Art Freeze", + "Silhouette", + "Solarization", + "Antique", + "Arbitrary Cb/Cr", NULL }; static const char * const tune_preemphasis[] = { diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5a09ac3..764f300 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1241,16 +1241,22 @@ enum v4l2_power_line_frequency { #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) #define V4L2_CID_COLORFX (V4L2_CID_BASE+31) enum v4l2_colorfx { - V4L2_COLORFX_NONE = 0, - V4L2_COLORFX_BW = 1, - V4L2_COLORFX_SEPIA = 2, - V4L2_COLORFX_NEGATIVE = 3, - V4L2_COLORFX_EMBOSS = 4, - V4L2_COLORFX_SKETCH = 5, - V4L2_COLORFX_SKY_BLUE = 6, - V4L2_COLORFX_GRASS_GREEN = 7, - V4L2_COLORFX_SKIN_WHITEN = 8, - V4L2_COLORFX_VIVID = 9, + V4L2_COLORFX_NONE = 0, + V4L2_COLORFX_BW = 1, + V4L2_COLORFX_SEPIA = 2, + V4L2_COLORFX_NEGATIVE = 3, + V4L2_COLORFX_EMBOSS = 4, + V4L2_COLORFX_SKETCH = 5, + V4L2_COLORFX_SKY_BLUE = 6, + V4L2_COLORFX_GRASS_GREEN = 7, + V4L2_COLORFX_SKIN_WHITEN = 8, + V4L2_COLORFX_VIVID = 9, + V4L2_COLORFX_AQUA = 10, + V4L2_COLORFX_ART_FREEZE = 11, + V4L2_COLORFX_SILHOUETTE = 12, + V4L2_COLORFX_SOLARIZATION = 13, + V4L2_COLORFX_ANTIQUE = 14, + V4L2_COLORFX_ARBITRARY_CBCR = 15, }; #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) -- 1.7.10