From patchwork Tue Nov 15 12:05:58 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: 9429535 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 C76516047D for ; Tue, 15 Nov 2016 12:06:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0FD128BB4 for ; Tue, 15 Nov 2016 12:06:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3ED628BB7; Tue, 15 Nov 2016 12:06:10 +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 4147028BB4 for ; Tue, 15 Nov 2016 12:06:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932164AbcKOMGH (ORCPT ); Tue, 15 Nov 2016 07:06:07 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32832 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753507AbcKOMGF (ORCPT ); Tue, 15 Nov 2016 07:06:05 -0500 Received: by mail-wm0-f65.google.com with SMTP id u144so25074049wmu.0 for ; Tue, 15 Nov 2016 04:06:05 -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:in-reply-to:references; bh=kR0FdBLybKQi5uWPbf++t1mc5nL9PJn1Rg4TZ2F2IC0=; b=JLvX9yPTA+/7kgOw0p40pX/+14Wiu0xpzJyFhDu1FKnUJYLGf1D3JRTh5tskexxMh/ qmOhAd9JSmejgTzzGykCMGs/WhWdj7SMppznyj2R7YrYEVNqtzBFMvJcdLjfkZKxTxAS khIvAbgX2CrUZrBVBXkxq3yFdwCL3156F78UFwblJXsbdHMpeB3lpxcCpr5MQPlAdCzm cwThHemiowh8VFoQP5Lishh98kAry9Wjm5/1h5y8PaGFJvDoVsLs+WB6xEH6A/xhkh54 wFeiSqVOON4ma8oYTTeSvNOlDDRmAkmXA2C6ZiAi1p5S7zbTQwCfDFMFLi6XiWBHHYCE 8Irw== 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:in-reply-to :references; bh=kR0FdBLybKQi5uWPbf++t1mc5nL9PJn1Rg4TZ2F2IC0=; b=UAc4jWEix10kr0pYFW9p7Vf2pfYA3w89CvhUahyY610KK9TUObO4PfQCZs9R5M51lK 2SPvCyLQ1fjzIU2hOnX6G3VJIZaJltHomR81coLWTNXgz3qyi3qJ5pFqD79mCymxNndo wevwqLFb01x+tlqiNp2OCVJWSu2LUvq7E/E+0ypxznHsHQBcDoRHXoFZRKIMJ/jGr0fE Jyk432j2iqtNYDxGIIz0LlyZ4APV3EU45jqrOk+4/o7iTmYKRSnenkivbMaOYhVXWgsX Yu6JlbS6pjGrsy7wFutCQAlf7RCTqJNL1Vngz80GV/br7rlFO7YZigsPXGRF1sylYp5D OXcg== X-Gm-Message-State: ABUngvdLOYBDfuM0+cItUlWEjBpCbDsyCJU9O/LEixIMNKaiZDCmqSgTpVqXipT+vZLyqQ== X-Received: by 10.25.76.194 with SMTP id z185mr6341470lfa.182.1479211564147; Tue, 15 Nov 2016 04:06:04 -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 v26sm5746263lja.30.2016.11.15.04.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Nov 2016 04:06:03 -0800 (PST) From: Ricardo Ribalda Delgado To: Hans Verkuil , Hans de Goede , linux-media@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 3/3] qv4l2: Support for HSV encodings Date: Tue, 15 Nov 2016 13:05:58 +0100 Message-Id: <20161115120558.2872-3-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161115120558.2872-1-ricardo.ribalda@gmail.com> References: <20161115120558.2872-1-ricardo.ribalda@gmail.com> 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 Support set/get and override of HSV encodings. Signed-off-by: Ricardo Ribalda Delgado --- utils/qv4l2/general-tab.cpp | 4 +++- utils/qv4l2/qv4l2.cpp | 5 ++++- utils/qv4l2/tpg-tab.cpp | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp index c74847935194..0d98d6569c49 100644 --- a/utils/qv4l2/general-tab.cpp +++ b/utils/qv4l2/general-tab.cpp @@ -780,8 +780,10 @@ void GeneralTab::formatSection(v4l2_fmtdesc fmt) m_ycbcrEnc->addItem("BT.2020", QVariant(V4L2_YCBCR_ENC_BT2020)); m_ycbcrEnc->addItem("BT.2020 Constant Luminance", QVariant(V4L2_YCBCR_ENC_BT2020_CONST_LUM)); m_ycbcrEnc->addItem("SMPTE 240M", QVariant(V4L2_YCBCR_ENC_SMPTE240M)); + m_ycbcrEnc->addItem("Hue 0 - 179", QVariant(V4L2_HSV_ENC_180)); + m_ycbcrEnc->addItem("Hue 0 - 255", QVariant(V4L2_HSV_ENC_256)); - addLabel("Y'CbCr Encoding"); + addLabel("Y'CbCr / HSV Encoding"); addWidget(m_ycbcrEnc); connect(m_ycbcrEnc, SIGNAL(activated(int)), SLOT(ycbcrEncChanged(int))); diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp index 4f0a52d96d39..a093fbf48913 100644 --- a/utils/qv4l2/qv4l2.cpp +++ b/utils/qv4l2/qv4l2.cpp @@ -213,7 +213,7 @@ ApplicationWindow::ApplicationWindow() : connect(grp, SIGNAL(triggered(QAction *)), this, SLOT(overrideXferFuncChanged(QAction *))); m_overrideYCbCrEnc = -1; - menu = new QMenu("Override Y'CbCr Encoding"); + menu = new QMenu("Override Y'CbCr / HSV Encoding"); m_overrideYCbCrEncMenu = menu; grp = new QActionGroup(menu); addSubMenuItem(grp, menu, "No Override", -1)->setChecked(true); @@ -224,6 +224,9 @@ ApplicationWindow::ApplicationWindow() : addSubMenuItem(grp, menu, "BT.2020", V4L2_YCBCR_ENC_BT2020); addSubMenuItem(grp, menu, "BT.2020 Constant Luminance", V4L2_YCBCR_ENC_BT2020_CONST_LUM); addSubMenuItem(grp, menu, "SMPTE 240M", V4L2_YCBCR_ENC_SMPTE240M); + addSubMenuItem(grp, menu, "Hue 0 - 179", V4L2_HSV_ENC_180); + addSubMenuItem(grp, menu, "Hue 0 - 255", V4L2_HSV_ENC_256); + connect(grp, SIGNAL(triggered(QAction *)), this, SLOT(overrideYCbCrEncChanged(QAction *))); m_overrideQuantization = -1; diff --git a/utils/qv4l2/tpg-tab.cpp b/utils/qv4l2/tpg-tab.cpp index 386509de986b..e234b7dbfa1c 100644 --- a/utils/qv4l2/tpg-tab.cpp +++ b/utils/qv4l2/tpg-tab.cpp @@ -177,7 +177,7 @@ void ApplicationWindow::addTpgTab(int m_winWidth) addWidget(grid, m_tpgXferFunc); connect(m_tpgXferFunc, SIGNAL(activated(int)), SLOT(tpgXferFuncChanged())); - addLabel(grid, "Y'CbCr Encoding"); + addLabel(grid, "Y'CbCr / HSV Encoding"); m_tpgYCbCrEnc = new QComboBox(w); m_tpgYCbCrEnc->addItem("Use Format", QVariant(V4L2_YCBCR_ENC_DEFAULT)); m_tpgYCbCrEnc->addItem("ITU-R 601", QVariant(V4L2_YCBCR_ENC_601)); @@ -187,6 +187,8 @@ void ApplicationWindow::addTpgTab(int m_winWidth) m_tpgYCbCrEnc->addItem("BT.2020", QVariant(V4L2_YCBCR_ENC_BT2020)); m_tpgYCbCrEnc->addItem("BT.2020 Constant Luminance", QVariant(V4L2_YCBCR_ENC_BT2020_CONST_LUM)); m_tpgYCbCrEnc->addItem("SMPTE 240M", QVariant(V4L2_YCBCR_ENC_SMPTE240M)); + m_tpgYCbCrEnc->addItem("Hue 0 - 179", QVariant(V4L2_HSV_ENC_180)); + m_tpgYCbCrEnc->addItem("Hue 0 - 255", QVariant(V4L2_HSV_ENC_256)); addWidget(grid, m_tpgYCbCrEnc); connect(m_tpgYCbCrEnc, SIGNAL(activated(int)), SLOT(tpgColorspaceChanged()));