Skip to content

Instantly share code, notes, and snippets.

@rcombs

rcombs/stdin Secret

Created December 20, 2021 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcombs/499380d8ea03a86fc89eb48803ff7b2e to your computer and use it in GitHub Desktop.
Save rcombs/499380d8ea03a86fc89eb48803ff7b2e to your computer and use it in GitHub Desktop.
diff --git a/libavfilter/metal/vf_yadif_videotoolbox.metal b/libavfilter/metal/vf_yadif_videotoolbox.metal
index 50783f2ffe..71328a9e5c 100644
--- a/libavfilter/metal/vf_yadif_videotoolbox.metal
+++ b/libavfilter/metal/vf_yadif_videotoolbox.metal
@@ -26,6 +26,15 @@
using namespace metal;
+/*
+ * Shims
+ */
+
+#if __METAL_VERSION__ < 210
+#define max3(x, y, z) max(x, max(y, z))
+#define min3(x, y, z) min(x, min(y, z))
+#endif
+
/*
* Parameters
*/
@@ -44,7 +53,7 @@ struct deintParams {
*/
#define accesstype access::sample
-const sampler s(coord::pixel);
+constexpr sampler s(coord::pixel);
template <typename T>
T tex2D(texture2d<float, access::sample> tex, uint x, uint y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment