aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Ribalda <ricardo.ribalda@gmail.com>2016-11-15 13:05:58 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2016-11-25 12:53:46 +0100
commit981f01a0bf4606dd3911dd816641d8a3a3d999e7 (patch)
treef170ad1e6a62300aa4e14d77b334ed4ba7f76e89
parent90652b054f0f17211ae45791d831095bfb730d1a (diff)
qv4l2: Support for HSV encodings
Support set/get and override of HSV encodings. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> [hans: made some minor string changes] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/qv4l2/general-tab.cpp4
-rw-r--r--utils/qv4l2/qv4l2.cpp5
-rw-r--r--utils/qv4l2/tpg-tab.cpp4
3 files changed, 10 insertions, 3 deletions
diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp
index c7484793..344ca943 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("HSV with Hue 0-179", QVariant(V4L2_HSV_ENC_180));
+ m_ycbcrEnc->addItem("HSV with 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 4f0a52d9..35cc66d6 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, "HSV with Hue 0-179", V4L2_HSV_ENC_180);
+ addSubMenuItem(grp, menu, "HSV with 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 386509de..4e11eb2a 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("HSV with Hue 0-179", QVariant(V4L2_HSV_ENC_180));
+ m_tpgYCbCrEnc->addItem("HSV with Hue 0-255", QVariant(V4L2_HSV_ENC_256));
addWidget(grid, m_tpgYCbCrEnc);
connect(m_tpgYCbCrEnc, SIGNAL(activated(int)), SLOT(tpgColorspaceChanged()));

Privacy Policy