@@ -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)));
@@ -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;
@@ -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()));
Support set/get and override of HSV encodings. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> --- utils/qv4l2/general-tab.cpp | 4 +++- utils/qv4l2/qv4l2.cpp | 5 ++++- utils/qv4l2/tpg-tab.cpp | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-)