aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-09-10 01:49:48 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-09-10 11:05:03 +0200
commit7e8b5ce6318d6ba59a6947d0070d568c90afdf80 (patch)
tree4e82e98a156be82f14a18823759cf687d181796e
parent4b97a54ce65f5fa9d534c9a49de1e429aeebeae9 (diff)
v4l-helpers: don't mix enum type with int
warning: enumeral and non-enumeral type in conditional expression return hsv_enc < V4L2_HSV_ENC_180 ? V4L2_HSV_ENC_180 : hsv_enc; Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/common/v4l-helpers.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/common/v4l-helpers.h b/utils/common/v4l-helpers.h
index e093e717..c09cd987 100644
--- a/utils/common/v4l-helpers.h
+++ b/utils/common/v4l-helpers.h
@@ -876,8 +876,10 @@ static inline unsigned
v4l_format_g_hsv_enc(const struct v4l2_format *fmt)
{
unsigned hsv_enc = v4l_format_g_ycbcr_enc(fmt);
+ if (hsv_enc == V4L2_HSV_ENC_180)
+ return V4L2_HSV_ENC_180;
- return hsv_enc < V4L2_HSV_ENC_180 ? V4L2_HSV_ENC_180 : hsv_enc;
+ return hsv_enc;
}
static inline void v4l_format_s_quantization(struct v4l2_format *fmt,

Privacy Policy