]> git.pld-linux.org Git - packages/vmaf.git/commitdiff
- added x32 patch (fix asm build with x32 ABI) auto/th/vmaf-2.1.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 17 Jan 2021 06:50:51 +0000 (07:50 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 17 Jan 2021 06:50:51 +0000 (07:50 +0100)
- enable (runtime detected) avx512 code on archs supporting at least sse2

vmaf-x32.patch [new file with mode: 0644]
vmaf.spec

diff --git a/vmaf-x32.patch b/vmaf-x32.patch
new file mode 100644 (file)
index 0000000..026ee0e
--- /dev/null
@@ -0,0 +1,15 @@
+--- vmaf-2.1.0/libvmaf/src/meson.build.orig    2020-12-30 18:59:40.000000000 +0100
++++ vmaf-2.1.0/libvmaf/src/meson.build 2021-01-17 07:46:41.998356401 +0100
+@@ -76,7 +76,11 @@
+             nasm_format = 'elf'
+         endif
+         if host_machine.cpu_family() == 'x86_64'
+-            nasm_format += '64'
++          if cc.get_define('__ILP32__') == '1'
++                nasm_format += 'x32'
++          else
++              nasm_format += '64'
++            endif
+         else
+             nasm_format += '32'
+         endif
index b98146d302272c3202bc4ca94e5d843930055a82..15496910e2034d44b0d0ab8633af38273164e7f3 100644 (file)
--- a/vmaf.spec
+++ b/vmaf.spec
@@ -22,11 +22,12 @@ Group:              Libraries
 #Source0Download: https://github.com/Netflix/vmaf/releases
 Source0:       https://github.com/Netflix/vmaf/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: a65e105a67008796d566e9cc38e8e0fe
+Patch0:                %{name}-x32.patch
 URL:           https://github.com/Netflix/vmaf
 BuildRequires: libstdc++-devel >= 6:4.8
 BuildRequires: meson >= 0.47.0
 %ifarch %{ix86} %{x8664} x32
-BuildRequires: nasm
+BuildRequires: nasm >= 2.14
 %endif
 BuildRequires: ninja >= 1.7.1
 BuildRequires: python3 >= 1:3.6
@@ -83,6 +84,7 @@ Statyczna biblioteka Netflix VMAF.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %{__mv} libvmaf/README.md libvmaf/README.libvmaf.md
 
@@ -92,10 +94,16 @@ Statyczna biblioteka Netflix VMAF.
 
 %build
 %if %{with sse2}
+# SSE2 requires global support
 CFLAGS="%{rpmcflags} -msse2"
 CXXFLAGS="%{rpmcxxflags} -msse2"
 %endif
-%meson build-libvmaf libvmaf
+
+# AVX512 is (properly) runtime detected (but SSE2 is probably prerequisite)
+%meson build-libvmaf libvmaf \
+%if %{with sse2}
+       -Denable_avx512=true
+%endif
 
 %ninja_build -C build-libvmaf
 
This page took 0.167861 seconds and 4 git commands to generate.