Skip to content

Commit

Permalink
avfilter/tonmapx: disable avx for windows
Browse files Browse the repository at this point in the history
gcc-mingw compiles this badly on windows
  • Loading branch information
gnattu committed Jun 26, 2024
1 parent d346887 commit 600ca65
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion debian/patches/0080-add-tonemapx-filter.patch
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Index: FFmpeg/libavfilter/vf_tonemapx.c
===================================================================
--- /dev/null
+++ FFmpeg/libavfilter/vf_tonemapx.c
@@ -0,0 +1,2579 @@
@@ -0,0 +1,2585 @@
+/*
+ * This file is part of FFmpeg.
+ *
Expand Down Expand Up @@ -181,6 +181,10 @@ Index: FFmpeg/libavfilter/vf_tonemapx.c
+# endif // (__GNUC__ >= 11) || (__clang_major__ >= 12)
+#endif // defined(__GNUC__) || defined(__clang__)
+
+#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
+#define OS_WIN
+#endif
+
+enum TonemapAlgorithm {
+ TONEMAP_NONE,
+ TONEMAP_LINEAR,
Expand Down Expand Up @@ -2594,11 +2598,13 @@ Index: FFmpeg/libavfilter/vf_tonemapx.c
+ s->tonemap_frame_p01x_2_nv12 = tonemap_frame_p016_p010_2_nv12_sse;
+ s->tonemap_frame_p01x_2_p01x = tonemap_frame_p016_p010_2_p016_p010_sse;
+ }
+#ifndef OS_WIN
+ if (X86_AVX2(cpu_flags) && X86_FMA3(cpu_flags)) {
+ s->tonemap_frame_p01x_2_nv12 = tonemap_frame_p016_p010_2_nv12_avx;
+ s->tonemap_frame_p01x_2_p01x = tonemap_frame_p016_p010_2_p016_p010_avx;
+ }
+#endif
+#endif
+
+ if (!s->tonemap_frame_p01x_2_nv12) {
+ s->tonemap_frame_p01x_2_nv12 = tonemap_frame_p016_p010_2_nv12;
Expand Down

0 comments on commit 600ca65

Please sign in to comment.