diff --git a/0e56801f98db3e363c974fca794fa06022d40ee4.patch b/0e56801f98db3e363c974fca794fa06022d40ee4.patch index 3489e12..674f3ba 100644 --- a/0e56801f98db3e363c974fca794fa06022d40ee4.patch +++ b/0e56801f98db3e363c974fca794fa06022d40ee4.patch @@ -1,12 +1,23 @@ -diff -up a/src/zimg/colorspace/x86/operation_impl_x86.cpp b/src/zimg/colorspace/x86/operation_impl_x86.cpp +From 0e56801f98db3e363c974fca794fa06022d40ee4 Mon Sep 17 00:00:00 2001 +From: sekrit-twc +Date: Sat, 26 Jul 2025 11:00:28 -0700 +Subject: [PATCH] colorspace: fix AVX2 check + +Fix #226 +--- + src/zimg/colorspace/x86/operation_impl_x86.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/zimg/colorspace/x86/operation_impl_x86.cpp b/src/zimg/colorspace/x86/operation_impl_x86.cpp +index f4ff8f6c..bb43dee2 100644 --- a/src/zimg/colorspace/x86/operation_impl_x86.cpp +++ b/src/zimg/colorspace/x86/operation_impl_x86.cpp -@@ -19,7 +19,7 @@ std::unique_ptr create_matrix +@@ -16,7 +16,7 @@ std::unique_ptr create_matrix_operation_x86(const Matrix3x3 &m, CPUCl + if (cpu_is_autodetect(cpu)) { if (!ret && cpu == CPUClass::AUTO_64B && caps.avx512f) ret = create_matrix_operation_avx512(m); - #endif -- if (!ret && caps.avx && !cpu_has_slow_avx(caps)) -+ if (!ret && caps.avx2 && !cpu_has_slow_avx(caps)) - ret = create_matrix_operation_avx(m); - if (!ret && caps.sse) - ret = create_matrix_operation_sse(m); +- if (!ret && caps.avx) ++ if (!ret && caps.avx2) + ret = create_matrix_operation_avx2(m); + } else { + if (!ret && cpu >= CPUClass::X86_AVX512) diff --git a/zimg.spec b/zimg.spec index 274317b..5a35824 100644 --- a/zimg.spec +++ b/zimg.spec @@ -6,10 +6,8 @@ License: WTFPL URL: https://github.com/sekrit-twc/zimg Source0: %{url}/archive/release-%{version}/%{name}-%{version}.tar.gz - -# Rebased from master on top of 3.0.6, should be removed in the next update -Patch0: b013c7b006e6bee05b7964162f3a00402168e77f.patch -Patch1: 0e56801f98db3e363c974fca794fa06022d40ee4.patch +Patch0: https://github.com/sekrit-twc/zimg/commit/b013c7b006e6bee05b7964162f3a00402168e77f.patch +Patch1: https://github.com/sekrit-twc/zimg/commit/0e56801f98db3e363c974fca794fa06022d40ee4.patch BuildRequires: autoconf BuildRequires: automake @@ -59,13 +57,9 @@ rm -fr %{buildroot}%{_docdir}/%{name} %{_libdir}/lib%{name}.so.2.0.0 %{_libdir}/lib%{name}.so.2 -%check -./testapp cpuinfo - %files devel %{_bindir}/testapp -%{_includedir}/zimg.h -%{_includedir}/zimg++.hpp +%{_includedir}/* %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc