From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:41102 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101Ab2GYUnY (ORCPT ); Wed, 25 Jul 2012 16:43:24 -0400 Received: by bkwj10 with SMTP id j10so819452bkw.19 for ; Wed, 25 Jul 2012 13:43:22 -0700 (PDT) Message-ID: <50105A67.9010709@gmail.com> Date: Wed, 25 Jul 2012 22:43:19 +0200 From: Sylwester Nawrocki MIME-Version: 1.0 To: Shaik Ameer Basha CC: linux-media@vger.kernel.org, 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 Subject: Re: [PATCH v3 1/5] v4l: Add new YVU420 multi planar fourcc definition References: <1343219191-3969-1-git-send-email-shaik.ameer@samsung.com> <1343219191-3969-2-git-send-email-shaik.ameer@samsung.com> In-Reply-To: <1343219191-3969-2-git-send-email-shaik.ameer@samsung.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Hi Shaik, On 07/25/2012 02:26 PM, Shaik Ameer Basha wrote: > 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 +++++++++++++++++--- Can you please add a new xml file for this new format, rather than modifying this one ? I think it would be more clear this way. > 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 ofV4L2_PIX_FMT_YUV420 > - with planes non contiguous in memory. > + V4L2_PIX_FMT_YUV420M > + V4L2_PIX_FMT_YVU420M > + Variation ofV4L2_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 forV4L2_PIX_FMT_YUV420M format > +and the third plane forV4L2_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 forV4L2_PIX_FMT_YUV420M format and > +the second plane forV4L2_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.. */ -- Thanks, Sylwester