From patchwork Tue Nov 15 12:29:14 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: 9429605 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 73F1160471 for ; Tue, 15 Nov 2016 12:29:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6028628BBE for ; Tue, 15 Nov 2016 12:29:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54DD128BDD; Tue, 15 Nov 2016 12:29:23 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 A290928BBE for ; Tue, 15 Nov 2016 12:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753274AbcKOM3S (ORCPT ); Tue, 15 Nov 2016 07:29:18 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35798 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbcKOM3R (ORCPT ); Tue, 15 Nov 2016 07:29:17 -0500 Received: by mail-qt0-f195.google.com with SMTP id m48so8098180qta.2 for ; Tue, 15 Nov 2016 04:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=oKQqvGZKz2Oz/DlipbFflqn1cB76Y5GxgaaQtEJWh2E=; b=JM/6wa44Tp7i3fI4VBQBKZSOvzORLHwSG+r0hsi8L95+sP5yz259xytqK+TzSiRmyJ Gdwo50g7nsNyvELPZLwpGRsyVezXY3/zhzskVJN9HpxbHw5CV6eFvkST1ewQGuwYhhLH x8SZsOmZQtht1u0NcAOAIuEyPm3qq9d1pF4Vzcx6Y121txJysMqPubnQSJo3dUEgzFyS 9JmSNsFWF9oX8oAgdHv6jHbOYumbvx07b1ByIi73lWd4AVqVAhQ2XP4aiN0/oB9E9qO0 q9v25v5+mAmIF3MV61MLV3c+A0ILKMbAEEVXlc+h+u1e5xFMKySSd/Tc9220I7R2LQsB leYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oKQqvGZKz2Oz/DlipbFflqn1cB76Y5GxgaaQtEJWh2E=; b=ibQARMEnt4rwx0T5NUyveFLFw+kJtW1ENN5ruVWX3DEBvT4ly4sIHgusTEr9mzqb3W lD/r2xM+CEmYTJ+WvPxQMVx+o60G++cDqNKIBGeURU3V7VKkr38CvPgQEpWF4/dhZ5Wt IgokdCYSp/s066yn1lHIsGV5PgE7KXzEPcpZgobeAAetNld2KVJtqFV8Ut64HmOP7gIR 8gujELmGhEE8YmkkCaishpLhfMKmWmrtIaf9BLginj9D9hDe+FbSLqdI13t8YHPil8/g hiSyOB3UMP/USVszmjOUCfMZlHiBBkh4GVnHTNWv2sMOgaQaGG/Uoc9fMrZYt4W2pR8N +AQQ== X-Gm-Message-State: ABUngvexNQ0jw5kEYuy8AqiWaI1qRDnVoWYcmEFU2yj0e4mbP49kWts6VfNm5N60RLffpw== X-Received: by 10.25.31.136 with SMTP id f130mr9724930lff.135.1479212956761; Tue, 15 Nov 2016 04:29:16 -0800 (PST) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id g24sm6407872ljg.1.2016.11.15.04.29.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Nov 2016 04:29:15 -0800 (PST) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH] v4l2-ctl: Show HSV encodings names Date: Tue, 15 Nov 2016 13:29:14 +0100 Message-Id: <20161115122914.19981-1-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.10.2 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 Add HSV encoding names to v4l2-ctl. I.e. Format Video Capture: Width/Height : 640/360 Pixel Format : 'HSV3' Field : None Bytes per Line : 1920 Size Image : 691200 Colorspace : sRGB Transfer Function : Default YCbCr/HSV Encoding: Hue 0 - 179 Quantization : Default Flags : Signed-off-by: Ricardo Ribalda Delgado --- utils/v4l2-ctl/v4l2-ctl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index 8a2b3e6d186e..fe398233e28c 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -451,6 +451,10 @@ static std::string ycbcr_enc2s(int val) return "BT.2020 Constant Luminance"; case V4L2_YCBCR_ENC_SMPTE240M: return "SMPTE 240M"; + case V4L2_HSV_ENC_180: + return "Hue 0 - 179"; + case V4L2_HSV_ENC_256: + return "Hue 0 - 255"; default: return "Unknown (" + num2s(val) + ")"; } @@ -532,7 +536,7 @@ void printfmt(const struct v4l2_format &vfmt) printf("\tSize Image : %u\n", vfmt.fmt.pix.sizeimage); printf("\tColorspace : %s\n", colorspace2s(vfmt.fmt.pix.colorspace).c_str()); printf("\tTransfer Function : %s\n", xfer_func2s(vfmt.fmt.pix.xfer_func).c_str()); - printf("\tYCbCr Encoding : %s\n", ycbcr_enc2s(vfmt.fmt.pix.ycbcr_enc).c_str()); + printf("\tYCbCr/HSV Encoding: %s\n", ycbcr_enc2s(vfmt.fmt.pix.ycbcr_enc).c_str()); printf("\tQuantization : %s\n", quantization2s(vfmt.fmt.pix.quantization).c_str()); if (vfmt.fmt.pix.priv == V4L2_PIX_FMT_PRIV_MAGIC) printf("\tFlags : %s\n", pixflags2s(vfmt.fmt.pix.flags).c_str());