From patchwork Tue Feb 3 06:30:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hardik Shah X-Patchwork-Id: 479 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 03 Feb 2009 06:30:31 +0000 Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1LUEnn-0002Bn-FI for mchehab@infradead.org; Tue, 03 Feb 2009 06:30:31 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751493AbZBCGa3 (ORCPT ); Tue, 3 Feb 2009 01:30:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751495AbZBCGa3 (ORCPT ); Tue, 3 Feb 2009 01:30:29 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:39601 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbZBCGa2 (ORCPT ); Tue, 3 Feb 2009 01:30:28 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n136UJDC003380 for ; Tue, 3 Feb 2009 00:30:25 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id n136UEnV000961; Tue, 3 Feb 2009 12:00:15 +0530 (IST) From: Hardik Shah To: linux-media@vger.kernel.org Cc: Hardik Shah , Brijesh Jadav , Hari Nagalla , Vaibhav Hiremath Subject: [PATCH] Documentation update for New V4L2 ioctls for OMAP Date: Tue, 3 Feb 2009 12:00:14 +0530 Message-Id: <1233642614-30879-1-git-send-email-hardik.shah@ti.com> X-Mailer: git-send-email 1.5.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 1. Added documentation for VIDIOC_COLOR_S_SPACE_CONV and VIDIOC_G_COLOR_SPACE_CONV 2. Added documentation for new CID V4L2_CID_ROTATION and V4L2_CID_BG_COLOR Signed-off-by: Brijesh Jadav Signed-off-by: Hari Nagalla Signed-off-by: Hardik Shah Signed-off-by: Vaibhav Hiremath --- Makefile | 4 + controls.sgml | 12 +++- v4l2.sgml | 1 + vidioc-g-color-space-conv.sgml | 182 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 198 insertions(+), 1 deletions(-) create mode 100644 vidioc-g-color-space-conv.sgml -- 1.5.6 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index 9a13c91..b76b4a7 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,7 @@ SGMLS = \ vidioc-g-audio.sgml \ vidioc-g-audioout.sgml \ vidioc-dbg-g-chip-ident.sgml \ + vidioc-g-color-space-conv.sgml \ vidioc-g-crop.sgml \ vidioc-g-ctrl.sgml \ vidioc-g-enc-index.sgml \ @@ -156,6 +157,7 @@ IOCTLS = \ VIDIOC_ENUM_FRAMESIZES \ VIDIOC_G_AUDIO \ VIDIOC_G_AUDOUT \ + VIDIOC_G_COLOR_SPACE_CONV \ VIDIOC_G_CROP \ VIDIOC_G_CTRL \ VIDIOC_G_ENC_INDEX \ @@ -186,6 +188,7 @@ IOCTLS = \ VIDIOC_STREAMON \ VIDIOC_S_AUDIO \ VIDIOC_S_AUDOUT \ + VIDIOC_S_COLOR_SPACE_CONV \ VIDIOC_S_CROP \ VIDIOC_S_CTRL \ VIDIOC_S_EXT_CTRLS \ @@ -249,6 +252,7 @@ STRUCTS = \ v4l2_capability \ v4l2_captureparm \ v4l2_clip \ + v4l2_color_space_conv \ v4l2_control \ v4l2_crop \ v4l2_cropcap \ diff --git a/controls.sgml b/controls.sgml index 0df57dc..c9ef5e8 100644 --- a/controls.sgml +++ b/controls.sgml @@ -272,10 +272,20 @@ minimum value disables backlight compensation. Enable the color killer (&ie; force a black & white image in case of a weak video signal). + V4L2_CID_ROTATION + integer + Rotates the image by specified angle. + + + V4L2_CID_BG_COLOR + integer + Sets the background color on the current output device + + V4L2_CID_LASTP1 End of the predefined control IDs (currently -V4L2_CID_COLOR_KILLER + 1). +V4L2_CID_BG_COLOR + 1). V4L2_CID_PRIVATE_BASE diff --git a/v4l2.sgml b/v4l2.sgml index 9f43b6d..f9f0986 100644 --- a/v4l2.sgml +++ b/v4l2.sgml @@ -435,6 +435,7 @@ available here: + + ioctl VIDIOC_S_COLOR_SPACE_CONV, VIDIOC_G_COLOR_SPACE_CONV + &manvol; + + + + VIDIOC_S_COLOR_SPACE_CONV + VIDIOC_G_COLOR_SPACE_CONV + Get or Set the color space conversion matrix + + + + + + int ioctl + int fd + int request + struct v4l2_color_space_conv +*argp + + + + + + Arguments + + + + fd + + &fd; + + + + request + + VIDIOC_G_COLOR_SPACE_CONV, VIDIOC_S_COLOR_SPACE_CONV + + + + argp + + + + + + + + + Description + + This ioctl is used to set the color space conversion matrix. +Few Video hardware has a programmable color space conversion matrix which +converts the data from one color space to other color space +typically from YUV or UYVY to RGB and vice versa. Normally hardware has +default value for the conversion matrix but application may need to tune that. + + Typical color conversion matrix looks like + + + Typical color space conversion matrix equation. + + + + + + + | + O0 + | + + + + | + C0,0 + C0,1 + C0,2 + | + + | + Of0 + | + + + | + O1 + | + + = + K + | + C1,0 + C1,1 + C1,2 + | + * + | + Of1 + | + + + | + O2 + | + + + + | + C2,0 + C2,1 + C2,2 + | + + | + Of2 + | + + + + + + + + Where Ci,j are the coefficients, K is the constant factor and +Ofi is the offsets. All the hardware may not allow modifying +all of these parameters. + + To set values for the color conversion matrix, applications call +VIDIOC_S_COLOR_SPACE_CONV with the pointer to a +v4l2_color_space_conv structure. Driver +checks and updates the parameters in the hardware. To get the values +applications call VIDIOC_G_COLOR_SPACE_CONV with a pointer +to v4l2_color_space_conv and driver will fill the +structure with appropriate values. + + + struct <structname>v4l2_color_space_conv</structname> + + &cs-str; + + + __s32 + coefficients + Conversion Matrix coefficeints. It is a array of 3X3. + + + __s32 + const_factor + Constant to be multiplied with the conversion matrix. + + + __s32 + offsets + Offset for the each entry in color conversion matrix. + + + +
+
+ + + &return-value; + + + + EINVAL + + The hardware doesn't supports color space conversion. + + + + + + +