diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-08-27 10:45:23 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-08-27 10:45:23 +0200 |
commit | d44be0f8712ab8ffa0f01eaf26cc8f93e70ed5b5 (patch) | |
tree | b25255d421e9e43e9858e72c5f0e63d315cb59bb | |
parent | 49316dc21f806d0c22f231aefd37972caab652e2 (diff) |
v4l2-tpg.patch: add clamp_t define
Needed by v4l2-tpg.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | utils/common/v4l2-tpg.patch | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/common/v4l2-tpg.patch b/utils/common/v4l2-tpg.patch index 831c820e..df8fcd75 100644 --- a/utils/common/v4l2-tpg.patch +++ b/utils/common/v4l2-tpg.patch @@ -166,7 +166,7 @@ diff --git a/utils/common/v4l2-tpg.h b/utils/common/v4l2-tpg.h index 0b0ddb87..91da74ec 100644 --- a/utils/common/v4l2-tpg.h +++ b/utils/common/v4l2-tpg.h -@@ -8,13 +8,59 @@ +@@ -8,13 +8,61 @@ #ifndef _V4L2_TPG_H_ #define _V4L2_TPG_H_ @@ -223,6 +223,8 @@ index 0b0ddb87..91da74ec 100644 + __val = __val < __min ? __min: __val; \ + __val > __max ? __max: __val; }) + ++#define clamp_t(type, val, min, max) clamp((type)val, (type)min, (type)max) ++ +static inline u32 prandom_u32_max(u32 ep_ro) +{ + return rand() % ep_ro; |