This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: (c)v4l-helpers: add g_hsv_enc() support
Author:  Hans Verkuil <hans.verk...@cisco.com>
Date:    Sat Aug 11 13:35:29 2018 +0200

Add g_hsv_enc() helper support: these helpers will return a
valid HSV encoding instead of returning 0 (default) which
isn't useful for HSV.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>

 utils/common/cv4l-helpers.h | 1 +
 utils/common/v4l-helpers.h  | 8 ++++++++
 2 files changed, 9 insertions(+)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=83062bda386de80f6bcf86da83ec490678b66081
diff --git a/utils/common/cv4l-helpers.h b/utils/common/cv4l-helpers.h
index 8de6794d9f9c..8ef9d1b74d0b 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 de1868567af8..7c6d320438b3 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)
 {

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to