From patchwork Fri Jan 14 20:56:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 480471 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 p0EKuqc8002605 for ; Fri, 14 Jan 2011 20:56:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751913Ab1ANU4u (ORCPT ); Fri, 14 Jan 2011 15:56:50 -0500 Received: from smtp208.alice.it ([82.57.200.104]:42083 "EHLO smtp208.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467Ab1ANU4u (ORCPT ); Fri, 14 Jan 2011 15:56:50 -0500 Received: from jcn (82.61.85.219) by smtp208.alice.it (8.5.124.08) id 4C1A27160F39BDAD; Fri, 14 Jan 2011 21:56:48 +0100 Received: from ao2 by jcn with local (Exim 4.72) (envelope-from ) id 1PdqhS-0002EN-TF; Fri, 14 Jan 2011 21:56:46 +0100 From: Antonio Ospite To: linux-media@vger.kernel.org Cc: Antonio Ospite , openkinect@googlegroups.com, Steven Toth Subject: [PATCH] Add a 10 bpp packed greyscale format. Date: Fri, 14 Jan 2011 21:56:38 +0100 Message-Id: <1295038598-8548-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <20101228123756.e95dc546.ospite@studenti.unina.it> References: <20101228123756.e95dc546.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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 14 Jan 2011 20:57:09 +0000 (UTC) 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..773496c 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 */