From patchwork Tue Mar 29 08:19:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Jones X-Patchwork-Id: 6229 Return-path: Envelope-to: mchehab@pedra Delivery-date: Tue, 29 Mar 2011 08:41:45 -0300 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1Q4XIv-0001oj-8q for mchehab@pedra; Tue, 29 Mar 2011 08:41:45 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Tue, 29 Mar 2011 08:41:45 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Q4U9p-0005tC-4M; Tue, 29 Mar 2011 08:20:09 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223Ab1C2IUF (ORCPT + 1 other); Tue, 29 Mar 2011 04:20:05 -0400 Received: from mail1.matrix-vision.com ([78.47.19.71]:36051 "EHLO mail1.matrix-vision.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026Ab1C2IUD (ORCPT ); Tue, 29 Mar 2011 04:20:03 -0400 Received: from mail1.matrix-vision.com (localhost [127.0.0.1]) by mail1.matrix-vision.com (Postfix) with ESMTP id 40E9D7221E; Tue, 29 Mar 2011 10:20:02 +0200 (CEST) Received: from erinome (g2.matrix-vision.com [80.152.136.245]) by mail1.matrix-vision.com (Postfix) with ESMTPA id E21537220A; Tue, 29 Mar 2011 10:20:01 +0200 (CEST) Received: from erinome (localhost [127.0.0.1]) by erinome (Postfix) with ESMTP id 885196F8A; Tue, 29 Mar 2011 10:20:01 +0200 (CEST) Received: by erinome (Postfix, from userid 108) id 7DAE36F9C; Tue, 29 Mar 2011 10:20:01 +0200 (CEST) Received: from ap437-joe.intern.matrix-vision.de (host65-46.intern.matrix-vision.de [192.168.65.46]) by erinome (Postfix) with ESMTPA id 6D08F6F8A; Tue, 29 Mar 2011 10:20:01 +0200 (CEST) From: Michael Jones To: Laurent Pinchart , linux-media@vger.kernel.org Cc: Sakari Ailus Subject: [PATCH v4 1/4] v4l: add V4L2_PIX_FMT_Y12 format Date: Tue, 29 Mar 2011 10:19:06 +0200 Message-Id: <1301386749-17497-2-git-send-email-michael.jones@matrix-vision.de> X-Mailer: git-send-email 1.7.4.2 In-Reply-To: <1301386749-17497-1-git-send-email-michael.jones@matrix-vision.de> References: <1301386749-17497-1-git-send-email-michael.jones@matrix-vision.de> X-MV-Disclaimer: true (erinome) X-AV-Checked: ClamAV using ClamSMTP (erinome) X-AV-Checked: ClamAV using ClamSMTP (mail1) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Signed-off-by: Michael Jones --- Documentation/DocBook/media-entities.tmpl | 1 + Documentation/DocBook/v4l/pixfmt-y12.xml | 79 +++++++++++++++++++++++++++++ Documentation/DocBook/v4l/pixfmt.xml | 1 + include/linux/videodev2.h | 1 + 4 files changed, 82 insertions(+), 0 deletions(-) create mode 100644 Documentation/DocBook/v4l/pixfmt-y12.xml diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 157d147..fbd5b1b 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl @@ -287,6 +287,7 @@ + diff --git a/Documentation/DocBook/v4l/pixfmt-y12.xml b/Documentation/DocBook/v4l/pixfmt-y12.xml new file mode 100644 index 0000000..ff417b8 --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-y12.xml @@ -0,0 +1,79 @@ + + + V4L2_PIX_FMT_Y12 ('Y12 ') + &manvol; + + + V4L2_PIX_FMT_Y12 + Grey-scale image + + + Description + + This is a grey-scale image with a depth of 12 bits per pixel. Pixels +are stored in 16-bit words with unused high bits padded with 0. The least +significant byte is stored at lower memory addresses (little-endian). + + + <constant>V4L2_PIX_FMT_Y12</constant> 4 × 4 +pixel image + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + Y'00low + Y'00high + Y'01low + Y'01high + Y'02low + Y'02high + Y'03low + Y'03high + + + start + 8: + Y'10low + Y'10high + Y'11low + Y'11high + Y'12low + Y'12high + Y'13low + Y'13high + + + start + 16: + Y'20low + Y'20high + Y'21low + Y'21high + Y'22low + Y'22high + Y'23low + Y'23high + + + start + 24: + Y'30low + Y'30high + Y'31low + Y'31high + Y'32low + Y'32high + Y'33low + Y'33high + + + + + + + + + diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index cfffc88..426bd27 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-y12; &sub-y16; &sub-yuyv; &sub-uyvy; diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 02da9e7..6fac463 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_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ /* Palette formats */