From patchwork Thu Feb 20 07:12:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edgar Thier X-Patchwork-Id: 3684911 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1CD11BF13A for ; Thu, 20 Feb 2014 07:19:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3045520166 for ; Thu, 20 Feb 2014 07:19:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE38320155 for ; Thu, 20 Feb 2014 07:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751873AbaBTHTZ (ORCPT ); Thu, 20 Feb 2014 02:19:25 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:48730 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbaBTHTZ (ORCPT ); Thu, 20 Feb 2014 02:19:25 -0500 X-Greylist: delayed 391 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Feb 2014 02:19:25 EST Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 442CB644 for ; Thu, 20 Feb 2014 02:12:54 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 20 Feb 2014 02:12:54 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:content-type:content-transfer-encoding; s=smtpout; bh=E RDwJ18F/rJAELZhRB5AuphKf3o=; b=Fhw+9KWRl6q7QfH4/v+pgotrym3MYFoMF ntm9xD4tkh50sP+PL84GGMI+Iz2us3xGYa2ppPHLUiL63g86cVIL72nR1ck4JlYS RykxdPMw7ydLt+1h8vFarz+HnmJ8BZ9G7xNJGn6gQR5CVsZqw4Q3OOa1ZImHe+mw DUrCc578Kg= X-Sasl-enc: 7yH2HgFxIbGEKz1Gh39+biSEE+/Du6SRBLX+lGrGJKHF 1392880373 Received: from [192.168.0.195] (unknown [80.148.22.226]) by mail.messagingengine.com (Postfix) with ESMTPA id 04DAE680156; Thu, 20 Feb 2014 02:12:52 -0500 (EST) Message-ID: <5305AAF3.50206@edgarthier.net> Date: Thu, 20 Feb 2014 08:12:51 +0100 From: Edgar Thier User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.3.0 MIME-Version: 1.0 To: linux-media@vger.kernel.org Subject: [PATCH] uvcvideo: Add bayer 8-bit patterns to uvcvideo Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add bayer 8-bit GUIDs to uvcvideo and associated them with the corresponding V4L2 pixel formats. Signed-off-by: Edgar Thier --- drivers/media/usb/uvc/uvc_driver.c | 22 +++++++++++++++++++++- drivers/media/usb/uvc/uvcvideo.h | 12 ++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index c3bb250..84da426 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -108,11 +108,31 @@ static struct uvc_format_desc uvc_fmts[] = { .fcc = V4L2_PIX_FMT_Y16, }, { - .name = "RGB Bayer", + .name = "RGB Bayer (bggr)", .guid = UVC_GUID_FORMAT_BY8, .fcc = V4L2_PIX_FMT_SBGGR8, }, { + .name = "RGB Bayer (bggr)", + .guid = UVC_GUID_FORMAT_BY8_BA81, + .fcc = V4L2_PIX_FMT_SBGGR8, + }, + { + .name = "RGB Bayer (grbg)", + .guid = UVC_GUID_FORMAT_BY8_GRBG, + .fcc = V4L2_PIX_FMT_SGRBG8, + }, + { + .name = "RGB Bayer (gbrg)", + .guid = UVC_GUID_FORMAT_BY8_GBRG, + .fcc = V4L2_PIX_FMT_SGBRG8, + }, + { + .name = "RGB Bayer (rggb)", + .guid = UVC_GUID_FORMAT_BY8_RGGB, + .fcc = V4L2_PIX_FMT_SRGGB8, + }, + { .name = "RGB565", .guid = UVC_GUID_FORMAT_RGBP, .fcc = V4L2_PIX_FMT_RGB565, diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 9e35982..57357d9 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -94,6 +94,18 @@ #define UVC_GUID_FORMAT_BY8 \ { 'B', 'Y', '8', ' ', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_BY8_BA81 \ + { 'B', 'A', '8', '1', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_BY8_GRBG \ + { 'G', 'R', 'B', 'G', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_BY8_GBRG \ + { 'G', 'B', 'R', 'G', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_BY8_RGGB \ + { 'R', 'G', 'G', 'B', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} #define UVC_GUID_FORMAT_RGBP \ { 'R', 'G', 'B', 'P', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}