From patchwork Sat Jul 16 14:32:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 9233231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF0606075E for ; Sat, 16 Jul 2016 14:33:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D01E42223E for ; Sat, 16 Jul 2016 14:33:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4900223A5; Sat, 16 Jul 2016 14:33:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 636822223E for ; Sat, 16 Jul 2016 14:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbcGPOc6 (ORCPT ); Sat, 16 Jul 2016 10:32:58 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36100 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbcGPOc5 (ORCPT ); Sat, 16 Jul 2016 10:32:57 -0400 Received: by mail-wm0-f65.google.com with SMTP id x83so5929066wma.3; Sat, 16 Jul 2016 07:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bYQE6Dq0uLRLXBtDArNMhBu+XcEq1cblxgZyAFzNYZE=; b=nrTpZxKjrquXLuTfxe83EepmptFX9RNrln8NLf1ho3RwuilNdxi+R+GKikVfPXAncJ reZAF7xW6ZgbvjkFTACQCR0eRbskS2DQbugasItG99EZnMiYXsmIpf6fMQdrN37CKWRN HOFNKl0XyMZt3ZRSTNOM5SdHG4L0u4kOgBj1jd7XP1Qxhptz3Pk/Tfwxb8+vX8J9Ol9v EO/ibvxPg8COaR5pigh6dL2SkIqQ8+r0cvOdAuOBWPK1zBtQEFZvRZrNEyN1P5gu656H 3hfK8iOm5WzttmKMHtSSOl6/6fSskdqGjLF40A935aoXnbdHu3xEN1bdbM0nLL10w9Fc KMlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bYQE6Dq0uLRLXBtDArNMhBu+XcEq1cblxgZyAFzNYZE=; b=UMV+R6DtONzkTBNVQbbjdZY5gLda9wh2Os+kuDUHUgfvR4e3jKZnldCP2Mdcau1xPr VSWwvr+8sOSNGa9O+zURf/6Nk4VJ40p2MxPZ3WCQZBr+IBgMklOYAS6/DTtlBP3KPNmg KlsElkWqs1AdyCmrEFU5VCpfST8bhPEABbFmLVXHZMLYH61TymJc3maY5pJh6Tq3PkJT C/Eoi0BxLzbsVYW+vFtDayQAbG0g6j4bDHZ2YYvdajNAGFae4BNdhIG6hYWXViQV0E/O RbE/tYBXhzuxqC3K6dQIpDIoSXPPOXYJjXH3o5awr6QEKYg9t07ELPqKAAOJKyIrF9e0 +oVw== X-Gm-Message-State: ALyK8tLZEF4TySkvdkoTVeMf0PTmggVcH7K2Ip0Mvu+bNje4Yt2x1lZ66EVrGR4AYvLThj+1a9VBP0IHuZprsw== X-Received: by 10.28.19.134 with SMTP id 128mr3937225wmt.40.1468679574640; Sat, 16 Jul 2016 07:32:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.139.148 with HTTP; Sat, 16 Jul 2016 07:32:35 -0700 (PDT) In-Reply-To: <13000259.LGWzqn8rdl@avalon> References: <1468599199-5902-1-git-send-email-ricardo.ribalda@gmail.com> <1704928.3gI88ec2Bn@avalon> <13000259.LGWzqn8rdl@avalon> From: Ricardo Ribalda Delgado Date: Sat, 16 Jul 2016 16:32:35 +0200 Message-ID: Subject: Re: [PATCH v2 2/6] [media] Documentation: Add HSV format To: Laurent Pinchart Cc: Hans Verkuil , Mauro Carvalho Chehab , Laurent Pinchart , Sakari Ailus , Antti Palosaari , Guennadi Liakhovetski , Helen Mae Koike Fornazier , Philipp Zabel , Shuah Khan , linux-media , LKML Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi On Sat, Jul 16, 2016 at 4:12 PM, Laurent Pinchart wrote: > I'd still like to know about it for my personal information :-) Maybe it is just a very cheap gamma. > >> Anyway, I am inclined to use ycbcr_enc as well. > > I'm glad we agree. > Are you thinking about something like this: v4l2_rgb_encoding */ + }; __u32 quantization; /* enum v4l2_quantization */ __u32 xfer_func; /* enum v4l2_xfer_func */ }; @@ -1988,7 +2002,11 @@ struct v4l2_pix_format_mplane { struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; __u8 num_planes; __u8 flags; - __u8 ycbcr_enc; + union { + __u8 ycbcr_enc; /* enum v4l2_ycbcr_encoding */ + __u8 hsv_enc; /* enum v4l2_hsv_encoding */ + __u8 rgb_enc; /* enum v4l2_rgb_encoding */ + }; __u8 quantization; __u8 xfer_func; __u8 reserved[7]; > -- Best regards! diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index c7fb760386cf..3e613fba1b20 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -330,6 +330,16 @@ enum v4l2_ycbcr_encoding { V4L2_YCBCR_ENC_SMPTE240M = 8, }; +enum v4l2_hsv_encoding { + V4L2_HSV_ENC_180 = 16, + V4L2_HSV_ENC_256 = 17, +}; + +enum v4l2_rgb_encoding { + V4L2_RGB_ENC_FULL = 32, + V4L2_HSV_ENC_16_235 = 33, +}; + /* * Determine how YCBCR_ENC_DEFAULT should map to a proper Y'CbCr encoding. * This depends on the colorspace. @@ -455,7 +465,11 @@ struct v4l2_pix_format { __u32 colorspace; /* enum v4l2_colorspace */ __u32 priv; /* private data, depends on pixelformat */ __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */ - __u32 ycbcr_enc; /* enum v4l2_ycbcr_encoding */ + union { + __u32 ycbcr_enc; /* enum v4l2_ycbcr_encoding */ + __u32 hsv_enc; /* enum v4l2_hsv_encoding */ + __u32 rgb_enc; /* enum