aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/common/cv4l-helpers.h1
-rw-r--r--utils/common/v4l-helpers.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/utils/common/cv4l-helpers.h b/utils/common/cv4l-helpers.h
index 8de6794d..8ef9d1b7 100644
--- a/utils/common/cv4l-helpers.h
+++ b/utils/common/cv4l-helpers.h
@@ -706,6 +706,7 @@ public:
unsigned g_xfer_func() const { return v4l_format_g_xfer_func(this); }
void s_xfer_func(unsigned xfer_func) { v4l_format_s_xfer_func(this, xfer_func); }
unsigned g_ycbcr_enc() const { return v4l_format_g_ycbcr_enc(this); }
+ unsigned g_hsv_enc() const { return v4l_format_g_hsv_enc(this); }
void s_ycbcr_enc(unsigned ycbcr_enc) { v4l_format_s_ycbcr_enc(this, ycbcr_enc); }
unsigned g_quantization() const { return v4l_format_g_quantization(this); }
void s_quantization(unsigned quantization) { v4l_format_s_quantization(this, quantization); }
diff --git a/utils/common/v4l-helpers.h b/utils/common/v4l-helpers.h
index de186856..7c6d3204 100644
--- a/utils/common/v4l-helpers.h
+++ b/utils/common/v4l-helpers.h
@@ -862,6 +862,14 @@ v4l_format_g_ycbcr_enc(const struct v4l2_format *fmt)
}
}
+static inline unsigned
+v4l_format_g_hsv_enc(const struct v4l2_format *fmt)
+{
+ unsigned hsv_enc = v4l_format_g_ycbcr_enc(fmt);
+
+ return hsv_enc < V4L2_HSV_ENC_180 ? V4L2_HSV_ENC_180 : hsv_enc;
+}
+
static inline void v4l_format_s_quantization(struct v4l2_format *fmt,
unsigned quantization)
{

Privacy Policy