From patchwork Wed Sep 2 12:33:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 45185 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n82CXWgQ013749 for ; Wed, 2 Sep 2009 12:33:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbZIBMdc (ORCPT ); Wed, 2 Sep 2009 08:33:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751587AbZIBMdc (ORCPT ); Wed, 2 Sep 2009 08:33:32 -0400 Received: from mail.gmx.net ([213.165.64.20]:41103 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751422AbZIBMdb (ORCPT ); Wed, 2 Sep 2009 08:33:31 -0400 Received: (qmail invoked by alias); 02 Sep 2009 12:33:32 -0000 Received: from p57BD1761.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.23.97] by mail.gmx.net (mp044) with SMTP; 02 Sep 2009 14:33:32 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1+q42djq+mql8nOVgC72MqTZ4Ao/2NFnbaY+2QIRr i7qePPK7LgAmYb Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1Mip1x-0001lO-IK; Wed, 02 Sep 2009 14:33:41 +0200 Date: Wed, 2 Sep 2009 14:33:41 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List cc: Hans Verkuil , Paulius Zaleckas , Robert Jarzmik , Kuninori Morimoto , Laurent Pinchart , "Karicheri, Muralidharan" Subject: [PATCH 1/3] v4l: Add a 10-bit monochrome and missing 8- and 10-bit Bayer fourcc codes In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The 16-bit monochrome fourcc code has been previously abused for a 10-bit format, add a new 10-bit code instead. Also add missing 8- and 10-bit Bayer fourcc codes for completeness. Signed-off-by: Guennadi Liakhovetski --- Indeed, this is not directly related to the image-bus API, but I'd like to have these codes available for completeness and also to stop abusing 16-bit codes for 10-bit formats. include/linux/videodev2.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 9d9a615..ffea559 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -293,6 +293,7 @@ struct v4l2_pix_format { /* Grey formats */ #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ +#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ /* Palette formats */ @@ -328,7 +329,11 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10bit raw bayer */ +#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */ +#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ +#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ +#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ /* 10bit raw bayer DPCM compressed to 8 bits */ #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') /*