From patchwork Tue Jul 31 12:12:29 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: 1259361 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 13ECA3FC71 for ; Tue, 31 Jul 2012 11:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756038Ab2GaL5I (ORCPT ); Tue, 31 Jul 2012 07:57:08 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:30402 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756006Ab2GaL5G (ORCPT ); Tue, 31 Jul 2012 07:57:06 -0400 Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8000D8HX74Q5W0@mailout4.samsung.com> for linux-media@vger.kernel.org; Tue, 31 Jul 2012 20:57:04 +0900 (KST) X-AuditID: cbfee61b-b7f566d000005c8a-68-5017c810125c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 0B.13.23690.018C7105; Tue, 31 Jul 2012 20:57:04 +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 <0M8000CIRX6VNU20@mmp2.samsung.com> for linux-media@vger.kernel.org; Tue, 31 Jul 2012 20:57:04 +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 v4 1/5] v4l: Add new YVU420 multi planar fourcc definition Date: Tue, 31 Jul 2012 17:42:29 +0530 Message-id: <1343736753-18454-2-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1343736753-18454-1-git-send-email-shaik.ameer@samsung.com> References: <1343736753-18454-1-git-send-email-shaik.ameer@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jQV2BE+IBBpv+q1j0bNjK6sDo8XmT XABjFJdNSmpOZllqkb5dAldGQ/NetoJrlhVHv3xiamDcrdvFyMkhIWAiceXfGhYIW0ziwr31 bCC2kMB0RonZW9S6GLmA7OVMErMO7mIFSbAJGEpsv3cFzBYRkJd40nsDrIFZYBOTxPv17iC2 sICXxI0ld5lAbBYBVYnL+xrA6nkF3CX+TtgEtUxBonXZIXYQm1PAQ2LXi5fMEIvdJeYv2ss+ gZF3ASPDKkbR1ILkguKk9FwjveLE3OLSvHS95PzcTYxgjz+T3sG4qsHiEKMAB6MSD6/HSbEA IdbEsuLK3EOMEhzMSiK8rCvEA4R4UxIrq1KL8uOLSnNSiw8xSnOwKInzmnh/9RcSSE8sSc1O TS1ILYLJMnFwSjUw5glz7Fqo+inl0E/HomsNL1a79m6VVpVU5HNQMQrmyRd1/PUxKrR23pk/ vxxqlnCcS09VbMtjcGfKcb61tfbl85qp6xj8VkfeeqIiMkXunnOj4Capvu8z0gN+TXXSSXh1 rWTT9LhP0/m1D65kaJ4Tkl9k++x86drnVibvdiZ5T+ua3/RRtZNHiaU4I9FQi7moOBEA19oF FPQBAAA= 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 dbf9d3a..e7c2662 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', '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.. */