From patchwork Tue Feb 1 12:52:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 522541 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p11Crv8w017232 for ; Tue, 1 Feb 2011 12:53:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756771Ab1BAMxg (ORCPT ); Tue, 1 Feb 2011 07:53:36 -0500 Received: from smtp204.alice.it ([82.57.200.100]:44229 "EHLO smtp204.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751640Ab1BAMxf (ORCPT ); Tue, 1 Feb 2011 07:53:35 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 01 Feb 2011 12:53:58 +0000 (UTC) X-Greylist: delayed 3944 seconds by postgrey-1.27 at vger.kernel.org; Tue, 01 Feb 2011 07:53:35 EST Received: from jcn (82.61.82.22) by smtp204.alice.it (8.5.124.08) id 4C88E33B0BE2F956; Tue, 1 Feb 2011 13:53:02 +0100 Received: from ao2 by jcn with local (Exim 4.72) (envelope-from ) id 1PkFj9-0003yO-Hs; Tue, 01 Feb 2011 13:52:59 +0100 From: Antonio Ospite To: linux-media@vger.kernel.org Cc: Antonio Ospite , openkinect@googlegroups.com, Steven Toth , Randy Dunlap , Mauro Carvalho Chehab , Guennadi Liakhovetski , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Xiaolin Zhang , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] Add a 10 bpp packed greyscale format. Date: Tue, 1 Feb 2011 13:52:52 +0100 Message-Id: <1296564773-15245-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1295038598-8548-1-git-send-email-ospite@studenti.unina.it> References: <1295038598-8548-1-git-send-email-ospite@studenti.unina.it> X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index be34dcb..2b18de5 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl @@ -253,6 +253,7 @@ + diff --git a/Documentation/DocBook/v4l/pixfmt-y10p.xml b/Documentation/DocBook/v4l/pixfmt-y10p.xml new file mode 100644 index 0000000..5323ffe --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-y10p.xml @@ -0,0 +1,43 @@ + + + V4L2_PIX_FMT_Y10P ('Y10P') + &manvol; + + + V4L2_PIX_FMT_Y10P + Grey-scale image as a packed array + + + Description + + This is a packed grey-scale image format with a depth of 10 bits per + pixel. Pixels are stored in a packed array of 10bit bits per pixel, with + no padding between them and with the most significant bits coming first + from the left. + + + <constant>V4L2_PIX_FMT_Y10P</constant> 4 pixel data stream taking 5 bytes + + + Packed representation + pixels cross the byte boundary and have a ratio of 5 bytes for each 4 + pixels. + + + + + + Y'00[9:2] + Y'00[1:0]Y'01[9:4] + Y'01[3:0]Y'02[9:6] + Y'02[5:0]Y'03[9:8] + Y'03[7:0] + + + + + + + + + diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index d7c4671..3682701 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml @@ -592,6 +592,7 @@ information. &sub-packed-yuv; &sub-grey; &sub-y10; + &sub-y10p; &sub-y16; &sub-yuyv; &sub-uyvy; diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml index 325b23b..eb39f6b 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml @@ -289,6 +289,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ +#define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale as a packed array */ #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ /* Palette formats */ diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5f6f470..7682581 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -288,6 +288,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ +#define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale as a packed array */ #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ /* Palette formats */