From patchwork Tue Jul 31 13:44:02 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: 1259631 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 63DA23FC1A for ; Tue, 31 Jul 2012 13:29:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752876Ab2GaN3P (ORCPT ); Tue, 31 Jul 2012 09:29:15 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:30845 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213Ab2GaN3N (ORCPT ); Tue, 31 Jul 2012 09:29:13 -0400 Received: from epcpsbgm1.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8100AGL1FG2Q80@mailout1.samsung.com> for linux-media@vger.kernel.org; Tue, 31 Jul 2012 22:28:44 +0900 (KST) X-AuditID: cbfee61a-b7f616d000004b7e-0b-5017dd8c2286 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id DA.E4.19326.C8DD7105; Tue, 31 Jul 2012 22:28:44 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8100ALP1FF8G60@mmp1.samsung.com> for linux-media@vger.kernel.org; Tue, 31 Jul 2012 22:28:44 +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, hverkuil@xs4all.nl, alim.akhtar@gmail.com, prashanth.g@samsung.com, joshi@samsung.com, shaik.samsung@gmail.com, shaik.ameer@samsung.com Subject: [PATCH v5 1/5] v4l: Add new YVU420 multi planar fourcc definition Date: Tue, 31 Jul 2012 19:14:02 +0530 Message-id: <1343742246-27579-2-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1343742246-27579-1-git-send-email-shaik.ameer@samsung.com> References: <1343742246-27579-1-git-send-email-shaik.ameer@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jAd2eu+IBBodmc1v0bNjK6sDo8XmT XABjFJdNSmpOZllqkb5dAlfGszkHWAquWVZ8bF/A3MC4W7eLkZNDQsBEYn7fRmYIW0ziwr31 bF2MXBxCAosYJc7MPc4O4Sxnkth89SY7SBWbgKHE9ntXWEFsEQF5iSe9N8A6mAWOMUkcPNnF BpIQFvCSOHq+lRHEZhFQldjeMglsBa+Au8SXrdOh1ilItC47BDaUU8BD4uzVd2C2EFDNvqOH mCcw8i5gZFjFKJpakFxQnJSea6hXnJhbXJqXrpecn7uJEez1Z1I7GFc2WBxiFOBgVOLh9Tgp FiDEmlhWXJl7iFGCg1lJhJd1hXiAEG9KYmVValF+fFFpTmrxIUZpDhYlcV5j76/+QgLpiSWp 2ampBalFMFkmDk6pBkbFVzZrszyVq8+b3HmaP0v8+esKo+XP6xWNQg1d2MPbRaXD98w7yb7s tObEnYye9aILSt9ybWOL+LHzxS42NzOb1vn/TXSqKt4ujb/0vtVzxtmiAFWB50fPfdz+5sTp h0s/eVUdCkuyetrkFWZzuUqw0r8i6uzJxxMNUznzZ8uEl3g973ncXqXEUpyRaKjFXFScCAAt L6Ss9gEAAA== 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 - 'YM21' Signed-off-by: Shaik Ameer Basha --- Documentation/DocBook/media/v4l/pixfmt-yvu420m.xml | 154 ++++++++++++++++++++ Documentation/DocBook/media/v4l/pixfmt.xml | 1 + include/linux/videodev2.h | 1 + 3 files changed, 156 insertions(+), 0 deletions(-) create mode 100644 Documentation/DocBook/media/v4l/pixfmt-yvu420m.xml diff --git a/Documentation/DocBook/media/v4l/pixfmt-yvu420m.xml b/Documentation/DocBook/media/v4l/pixfmt-yvu420m.xml new file mode 100644 index 0000000..2330667 --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-yvu420m.xml @@ -0,0 +1,154 @@ + + + V4L2_PIX_FMT_YVU420M ('YM21') + &manvol; + + + V4L2_PIX_FMT_YVU420M + Variation of V4L2_PIX_FMT_YVU420 + with planes non contiguous in memory. + + + + Description + + This is a multi-planar format, as opposed to a packed format. +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 Cr data +constitutes the second plane which is half the width and half +the height of the Y plane (and of the image). Each Cr belongs to four +pixels, a two-by-two square of the image. For example, +Cr0 belongs to Y'00, +Y'01, Y'10, and +Y'11. The Cb data, just like the Cr plane, constitutes +the third plane. + + If the Y plane has pad bytes after each row, then the Cr +and Cb 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 +(including padding). + + V4L2_PIX_FMT_YVU420M is 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 + + + Byte Order. + 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. + + + + + + + 01 + 23 + + + 0 + YY + YY + + + + C + C + + + 1 + YY + YY + + + + + + 2 + YY + YY + + + + C + C + + + 3 + YY + YY + + + + + + + + + diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index e58934c..1ddbfab 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -708,6 +708,7 @@ information. &sub-y41p; &sub-yuv420; &sub-yuv420m; + &sub-yvu420m; &sub-yuv410; &sub-yuv422p; &sub-yuv411p; diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 7a147c8..3f17e82 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -368,6 +368,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', 'M', '2', '1') /* 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.. */