From patchwork Wed Jul 25 12:26:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaik Ameer Basha X-Patchwork-Id: 1237081 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A7D30DFFCD for ; Wed, 25 Jul 2012 12:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756628Ab2GYMLb (ORCPT ); Wed, 25 Jul 2012 08:11:31 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:47766 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756529Ab2GYMLa (ORCPT ); Wed, 25 Jul 2012 08:11:30 -0400 Received: from epcpsbgm2.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M7P009ODTUXR1I0@mailout3.samsung.com> for linux-media@vger.kernel.org; Wed, 25 Jul 2012 21:11:29 +0900 (KST) X-AuditID: cbfee61b-b7f566d000005c8a-2f-500fe2713efc Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B3.BA.23690.172EF005; Wed, 25 Jul 2012 21:11:29 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M7P003GLTUULT60@mmp2.samsung.com> for linux-media@vger.kernel.org; Wed, 25 Jul 2012 21:11:29 +0900 (KST) From: Shaik Ameer Basha To: linux-media@vger.kernel.org Cc: sungchun.kang@samsung.com, khw0178.kim@samsung.com, mchehab@infradead.org, laurent.pinchart@ideasonboard.com, sy0816.kang@samsung.com, s.nawrocki@samsung.com, posciak@google.com, alim.akhtar@gmail.com, prashanth.g@samsung.com, joshi@samsung.com, shaik.samsung@gmail.com, shaik.ameer@samsung.com Subject: [PATCH v3 1/5] v4l: Add new YVU420 multi planar fourcc definition Date: Wed, 25 Jul 2012 17:56:27 +0530 Message-id: <1343219191-3969-2-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1343219191-3969-1-git-send-email-shaik.ameer@samsung.com> References: <1343219191-3969-1-git-send-email-shaik.ameer@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQd3CR/wBBi2veS16NmxldWD0+LxJ LoAxissmJTUnsyy1SN8ugStj07lDrAUrTCv2nLvC3MA4T7uLkZNDQsBE4tbNd+wQtpjEhXvr 2boYuTiEBKYzSlzbsIkFwlnOJPFr7hSwKjYBQ4nt966wgtgiAvIST3pvsIHYzAKbmCTer3cH sYUFvCTmrbrCDGKzCKhKNK65zgJi8wq4SSw8t4MFYpuCROuyQ2AzOQXcJVa8Xww2Rwio5nvT JLYJjLwLGBlWMYqmFiQXFCel5xrpFSfmFpfmpesl5+duYgT7/Jn0DsZVDRaHGAU4GJV4eFe8 5AsQYk0sK67MPcQowcGsJML7+AZ/gBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFeE++v/kIC6Ykl qdmpqQWpRTBZJg5OqQZGnvborSfz2VgWtEwX17eb+eqLllmz4T2LaIm4FWo8ryPPqSofV6q7 cfcul3urv6mAaZFga7rT/JlnJfyeB53azCTSOuGgSnHrzAu//92xfPZbOIzb34OJ+1OLHpvD 9Zg1u5eGWHGztMtmpHyzbGTa2vQoXa1bKeU/X73f/3N9uUXlii9O3lViKc5INNRiLipOBABZ AFFK9QEAAA== X-TM-AS-MML: No Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patch adds the following new fourcc definition. For multiplanar YCrCb - V4L2_PIX_FMT_YVU420M - 'YVUM' Signed-off-by: Shaik Ameer Basha --- Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml | 97 +++++++++++++++++--- include/linux/videodev2.h | 1 + 2 files changed, 84 insertions(+), 14 deletions(-) diff --git a/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml b/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml index 60308f1..9fc9a2e 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-yuv420m.xml @@ -1,12 +1,14 @@ - + - V4L2_PIX_FMT_YUV420M ('YM12') + V4L2_PIX_FMT_YUV420M ('YM12'), V4L2_PIX_FMT_YVU420M ('YMUM') &manvol; - V4L2_PIX_FMT_YUV420M - Variation of V4L2_PIX_FMT_YUV420 - with planes non contiguous in memory. + V4L2_PIX_FMT_YUV420M + V4L2_PIX_FMT_YVU420M + Variation of V4L2_PIX_FMT_YUV420, + V4L2_PIX_FMT_YVU420 respectively with planes non contiguous in memory. + @@ -16,29 +18,34 @@ The three components are separated into three sub- images or planes. The Y plane is first. The Y plane has one byte per pixel. The Cb data -constitutes the second plane which is half the width and half -the height of the Y plane (and of the image). Each Cb belongs to four +constitutes the second plane for V4L2_PIX_FMT_YUV420M format +and the third plane for V4L2_PIX_FMT_YVU420M format, +which is half the width and half the height of the Y plane (and of the image). +Each Cb belongs to four pixels, a two-by-two square of the image. For example, Cb0 belongs to Y'00, Y'01, Y'10, and -Y'11. The Cr data, just like the Cb plane, is -in the third plane. +Y'11. The Cr data, just like the Cb data, constitutes +the third plane for V4L2_PIX_FMT_YUV420M format and +the second plane for V4L2_PIX_FMT_YVU420M format. If the Y plane has pad bytes after each row, then the Cb and Cr planes have half as many pad bytes after their rows. In other -words, two Cx rows (including padding) is exactly as long as one Y row +words, two Cx rows (including padding) are exactly as long as one Y row (including padding). - V4L2_PIX_FMT_NV12M is intended to be + V4L2_PIX_FMT_YUV420M, +V4L2_PIX_FMT_YVU420M are intended to be used only in drivers and applications that support the multi-planar API, described in . - <constant>V4L2_PIX_FMT_YVU420M</constant> 4 × 4 -pixel image + <constant>V4L2_PIX_FMT_YUV420M</constant>, + <constant>V4L2_PIX_FMT_YVU420M</constant> 4 × 4 + pixel image - Byte Order. + Byte Order for V4L2_PIX_FMT_YUV420M. Each cell is one byte. @@ -101,6 +108,68 @@ pixel image + Byte Order for V4L2_PIX_FMT_YVU420M. + Each cell is one byte. + + + + + + start0 + 0: + Y'00 + Y'01 + Y'02 + Y'03 + + + start0 + 4: + Y'10 + Y'11 + Y'12 + Y'13 + + + start0 + 8: + Y'20 + Y'21 + Y'22 + Y'23 + + + start0 + 12: + Y'30 + Y'31 + Y'32 + Y'33 + + + + start1 + 0: + Cr00 + Cr01 + + + start1 + 2: + Cr10 + Cr11 + + + + start2 + 0: + Cb00 + Cb01 + + + start2 + 2: + Cb10 + Cb11 + + + + + + + Color Sample Location. diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index dbf9d3a..80962b8 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -365,6 +365,7 @@ struct v4l2_pix_format { /* three non contiguous planes - Y, Cb, Cr */ #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ +#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'V', 'U', 'M') /* 12 YVU420 planar */ /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */