From 009afaac4a66481a72551196e159987c78fac5f8 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Mon, 5 Nov 2018 18:00:35 +0000 Subject: [PATCH 01/23] Added the README --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..037ff0e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# vmaf + +The vmaf package \ No newline at end of file From 4d114d07470511f1b2320673ffd251d42055bfee Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 5 Nov 2018 19:37:23 +0100 Subject: [PATCH 02/23] Initial import --- .gitignore | 1 + sources | 1 + vmaf.spec | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 .gitignore create mode 100644 sources create mode 100644 vmaf.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cb8ad8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vmaf-*.tar.gz diff --git a/sources b/sources new file mode 100644 index 0000000..c76c7df --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (vmaf-a654f6f.tar.gz) = 37984568db2d86c996567f3d2b57bd93e5dfce1adf5233e2cf0c1f6a099e3b704c8b31ff20c8115f87d4d7d40bedaad198a033d3acd4b40b4710a9d7a64cd987 diff --git a/vmaf.spec b/vmaf.spec new file mode 100644 index 0000000..3329a07 --- /dev/null +++ b/vmaf.spec @@ -0,0 +1,138 @@ +%global commit0 a654f6f7f5998aedf2d6e2f6b3a9eece9753c3fb +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global commitdate0 20180914 + +Name: vmaf +Version: 1.3.9 +Release: 1.%{commitdate0}git%{shortcommit0}%{?dist} +Summary: Video Multi-Method Assessment Fusion + +License: ASL 2.0 +URL: https://github.com/netflix/vmaf/ +Source0: %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz +Patch0: 0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch +Patch1: 0002-Unbundle-pugixml.patch +Patch2: 0003-Drop-AVX-when-not-relevant.patch +Patch3: 0004-Use-better-FLAGS-for-ptools.patch +Patch4: 0005-Switch-pugixml-include.patch +Patch5: 0006-Switch-to-shared-library-for-libvmaf.patch +Patch6: 0007-Unbundle-libsvm.patch +Patch7: 0008-Add-pugixml-LIBS.patch +Patch8: 0009-Avoid-x86cpudetection-code-when-not-relevant.patch +Patch9: 0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch +Patch10: 0011-Add-msse2-for-i686.patch + +# This project relies on AVX +ExclusiveArch: x86_64 + +BuildRequires: gcc-c++ +BuildRequires: libsvm-devel +BuildRequires: pugixml-devel + +# Enforce our own build version for library +Requires: libvmaf%{?_isa} = %{version}-%{release} +# Upstream only provides a static library +# Packages using libvmaf must Requires this: +#%%{?libvmaf_version:Requires: libvmaf%%{?_isa} = %%{libvmaf_version}} + + +%description +VMAF is a perceptual video quality assessment algorithm developed by +Netflix. VMAF Development Kit (VDK) is a software package that contains +the VMAF algorithm implementation, as well as a set of tools that allows +a user to train and test a custom VMAF model. For an overview, read this +tech blog post, or this slide deck. + +https://github.com/Netflix/vmaf/blob/master/resource/doc/VMAF_ICIP17.pdf + + +%package -n libvmaf +Summary: Library for %{name} +#Some repo provides it +Provides: %{name}-static = %{version}-%{release} +Obsoletes: %{name}-static < %{version}-%{release} + +%description -n libvmaf +Library for %{name}. + +%package -n libvmaf-devel +Summary: Development files for %{name} +Requires: libvmaf%{?_isa} = %{version}-%{release} +#Some repo provides it +Provides: %{name}-devel = %{version}-%{release} +Obsoletes: %{name}-devel < %{version}-%{release} + +%description -n libvmaf-devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%autosetup -p1 -n %{name}-%{commit0} +# Unbundle +rm -rf wrapper/src/pugixml +rm -rf libsvm + +# Tweak libvmaf.pc +sed -i -e 's|/usr/local|%{_prefix}|g' wrapper/libvmaf.pc +sed -i -e 's|/usr/lib|%{_libdir}|g' wrapper/libvmaf.pc + + +%build +%ifarch i686 +export ASM_CFLAGS="-msse -msse2 -mavx" +%endif +%make_build CFLAGS_COMMON="%{optflags} ${ASM_CFLAGS} -fPIC" LDFLAGS="%{__global_ldflags}" V=1 + + +%install +%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} + +mv %{buildroot}%{_libdir}/libvmaf.so \ + %{buildroot}%{_libdir}/libvmaf.so.0.0.0 +ln -s libvmaf.so.0.0.0 \ + %{buildroot}%{_libdir}/libvmaf.so.0 +ln -s libvmaf.so.0 \ + %{buildroot}%{_libdir}/libvmaf.so + +# Install vmafossexec +mkdir -p %{buildroot}%{_bindir} +install -pm 0755 wrapper/vmafossexec \ + %{buildroot}%{_bindir} + +#RPM Macros support +mkdir -p %{buildroot}%{rpmmacrodir} +cat > %{buildroot}%{rpmmacrodir}/macros.%{name} << EOF +# libvmaf RPM Macros +%libvmaf_version %{version} +EOF +touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} + + +%ldconfig_scriptlets -n libvmaf + + +%files +%doc FAQ.md NOTICE.md README.md +%{_bindir}/vmafossexec +%{_datadir}/model/ + +%files -n libvmaf +%doc CHANGELOG.md +%license LICENSE +%{_libdir}/*.so.* + +%files -n libvmaf-devel +%doc CONTRIBUTING.md +%{rpmmacrodir}/macros.%{name} +%{_includedir}/libvmaf.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/libvmaf.pc + + +%changelog +* Fri Sep 21 2018 Nicolas Chauvet - 1.3.9-0.20180914gita654f6f +- Update to 1.3.9 up to 20180914 + +* Sat Apr 07 2018 Nicolas Chauvet - 1.3.3-1.20180407git510e257 +- Initial spec file From 78868b3cb583aba6e87eaf94e0d56e4f62a89eed Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 5 Nov 2018 20:07:35 +0100 Subject: [PATCH 03/23] Add patches --- ...IBDIR-build-variable-instead-of-cust.patch | 65 ++++++++++++++ 0002-Unbundle-pugixml.patch | 38 +++++++++ 0003-Drop-AVX-when-not-relevant.patch | 84 +++++++++++++++++++ 0004-Use-better-FLAGS-for-ptools.patch | 35 ++++++++ 0005-Switch-pugixml-include.patch | 26 ++++++ ...Switch-to-shared-library-for-libvmaf.patch | 58 +++++++++++++ 0007-Unbundle-libsvm.patch | 32 +++++++ 0008-Add-pugixml-LIBS.patch | 25 ++++++ ...6cpudetection-code-when-not-relevant.patch | 39 +++++++++ ...pc-to-use-Libs.private-for-pthread-m.patch | 30 +++++++ 0011-Add-msse2-for-i686.patch | 41 +++++++++ 11 files changed, 473 insertions(+) create mode 100644 0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch create mode 100644 0002-Unbundle-pugixml.patch create mode 100644 0003-Drop-AVX-when-not-relevant.patch create mode 100644 0004-Use-better-FLAGS-for-ptools.patch create mode 100644 0005-Switch-pugixml-include.patch create mode 100644 0006-Switch-to-shared-library-for-libvmaf.patch create mode 100644 0007-Unbundle-libsvm.patch create mode 100644 0008-Add-pugixml-LIBS.patch create mode 100644 0009-Avoid-x86cpudetection-code-when-not-relevant.patch create mode 100644 0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch create mode 100644 0011-Add-msse2-for-i686.patch diff --git a/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch b/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch new file mode 100644 index 0000000..2fef1ba --- /dev/null +++ b/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch @@ -0,0 +1,65 @@ +From 14f859ed0ee63774c3aa86cb31ae0d2b8f4941fd Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 12:32:54 +0200 +Subject: [PATCH 01/11] Use PREFIX and LIBDIR build variable instead of custom + ones + +--- + wrapper/Makefile | 29 +++++++++++++++-------------- + 1 file changed, 15 insertions(+), 14 deletions(-) + +diff --git a/wrapper/Makefile b/wrapper/Makefile +index 8658e83..6b02083 100644 +--- a/wrapper/Makefile ++++ b/wrapper/Makefile +@@ -8,7 +8,8 @@ SRCDIR = $(TOP)/src + OBJDIR = $(TOP)/obj + FEATURESRCDIR = $(TOP)/../feature/src + PTOOLSDIR = $(TOP)/../ptools +-INSTALL_PREFIX = /usr/local ++PREFIX ?= /usr/local ++LIBDIR ?= $(PREFIX)/lib + + OBJS = \ + $(OBJDIR)/alloc.o \ +@@ -170,24 +171,24 @@ vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) + + .PHONY: install + install: +- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib +- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/include +- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share +- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig +- cp $(LIBVMAF) $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF) +- cp src/libvmaf.h $(DESTDIR)$(INSTALL_PREFIX)/include/ +- cp -r ../model $(DESTDIR)$(INSTALL_PREFIX)/share/ +- cp libvmaf.pc $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/ ++ mkdir -p $(DESTDIR)$(LIBDIR) ++ mkdir -p $(DESTDIR)$(PREFIX)/include ++ mkdir -p $(DESTDIR)$(PREFIX)/share ++ mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig ++ cp $(LIBVMAF) $(DESTDIR)$(LIBDIR)/$(LIBVMAF) ++ cp src/libvmaf.h $(DESTDIR)$(PREFIX)/include/ ++ cp -r ../model $(DESTDIR)$(PREFIX)/share/ ++ cp libvmaf.pc $(DESTDIR)$(LIBDIR)/pkgconfig/ + + .PHONY: uninstall + uninstall: +- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF) +- rm -f $(DESTDIR)$(INSTALL_PREFIX)/include/libvmaf.h +- rm -fr $(DESTDIR)$(INSTALL_PREFIX)/share/model +- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/libvmaf.pc ++ rm -f $(DESTDIR)$(LIBDIR)/$(LIBVMAF) ++ rm -f $(DESTDIR)$(PREFIX)/include/libvmaf.h ++ rm -fr $(DESTDIR)$(PREFIX)/share/model ++ rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/libvmaf.pc + + testlib: $(SRCDIR)/main.cpp +- $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(INSTALL_PREFIX)/include -L$(DESTDIR)$(INSTALL_PREFIX)/lib -lvmaf -pthread ++ $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(PREFIX)/include -L$(DESTDIR)$(LIBDIR) -lvmaf -pthread + + .PHONY: clean + clean: +-- +2.17.1 + diff --git a/0002-Unbundle-pugixml.patch b/0002-Unbundle-pugixml.patch new file mode 100644 index 0000000..c4af166 --- /dev/null +++ b/0002-Unbundle-pugixml.patch @@ -0,0 +1,38 @@ +From 524c2dea1569cef1aaeb26c2afd9a64e11c06254 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 13:43:48 +0200 +Subject: [PATCH 02/11] Unbundle pugixml + +--- + wrapper/Makefile | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/wrapper/Makefile b/wrapper/Makefile +index 6b02083..985a30f 100644 +--- a/wrapper/Makefile ++++ b/wrapper/Makefile +@@ -42,9 +42,9 @@ OBJS = \ + $(OBJDIR)/vmaf.o \ + $(OBJDIR)/darray.o \ + $(OBJDIR)/libvmaf.o \ +- $(OBJDIR)/pugixml.o \ + $(OBJDIR)/blur_array.o \ +- $(OBJDIR)/cpu_info.o ++ $(OBJDIR)/cpu_info.o \ ++ $(NULL) + + AVX_OBJS := \ + $(OBJDIR)/convolution_avx.o \ +@@ -160,9 +160,6 @@ $(OBJDIR)/vmaf.o: $(SRCDIR)/vmaf.cpp + $(OBJDIR)/%.o: $(SRCDIR)/%.c + $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< + +-$(OBJDIR)/%.o: $(SRCDIR)/pugixml/%.cpp +- $(CXX) -c -o $@ $(CXXFLAGS) $(CPPFLAGS) $< +- + $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) + ar rcs $@ $^ + +-- +2.17.1 + diff --git a/0003-Drop-AVX-when-not-relevant.patch b/0003-Drop-AVX-when-not-relevant.patch new file mode 100644 index 0000000..5d68f52 --- /dev/null +++ b/0003-Drop-AVX-when-not-relevant.patch @@ -0,0 +1,84 @@ +From bd90f8e5d7bb1d323ec35d8326915ded41cce587 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 13:44:42 +0200 +Subject: [PATCH 03/11] Drop AVX when not relevant + +--- + feature/Makefile | 9 +++++++++ + wrapper/Makefile | 17 ++++++++++++++--- + 2 files changed, 23 insertions(+), 3 deletions(-) + +diff --git a/feature/Makefile b/feature/Makefile +index 111d07c..c786a27 100644 +--- a/feature/Makefile ++++ b/feature/Makefile +@@ -10,13 +10,22 @@ LIBVMAF = $(TOP)/../wrapper/libvmaf.a + CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic + # CFLAGS_COMMON = -g -O0 -fPIC -Wall -Wextra -pedantic + ++UNAME := $(shell uname -m) + CFLAGS := -std=c99 $(CFLAGS_COMMON) $(CFLAGS) + CXXFLAGS := -std=c++11 $(CFLAGS_COMMON) $(CXXFLAGS) + CPPFLAGS := $(CPPFLAGS) + LIBS := $(LIBS) -lm + LDFLAGS := $(LDFLAGS) + ++ifeq ($(UNAME), x86_64) ++ USE_AVX = 1 ++endif ++ifeq ($(UNAME), i386) ++ USE_AVX = 1 ++endif ++ifeq ($(USE_AVX), 1) + $(AVX_OBJS): EXTRA_CFLAGS := -mavx ++endif + + $(OBJDIR)/vmaf_main.o: $(SRCDIR)/vmaf_main.c + $(CC) $(EXTRA_CFLAGS) -c -o $@ $(CFLAGS) $(CPPFLAGS) $< +diff --git a/wrapper/Makefile b/wrapper/Makefile +index 985a30f..62bde27 100644 +--- a/wrapper/Makefile ++++ b/wrapper/Makefile +@@ -3,6 +3,7 @@ LIBVMAF = libvmaf.a + .PHONY: all + all: $(LIBVMAF) vmafossexec + ++UNAME := $(shell uname -m) + TOP = $(shell pwd) + SRCDIR = $(TOP)/src + OBJDIR = $(TOP)/obj +@@ -11,6 +12,18 @@ PTOOLSDIR = $(TOP)/../ptools + PREFIX ?= /usr/local + LIBDIR ?= $(PREFIX)/lib + ++ifeq ($(UNAME), x86_64) ++ USE_AVX = 1 ++endif ++ifeq ($(UNAME), i386) ++ USE_AVX = 1 ++endif ++ifeq ($(USE_AVX), 1) ++AVX_OBJS := \ ++ $(OBJDIR)/convolution_avx.o \ ++ ++endif ++ + OBJS = \ + $(OBJDIR)/alloc.o \ + $(OBJDIR)/alignment.o \ +@@ -44,11 +57,9 @@ OBJS = \ + $(OBJDIR)/libvmaf.o \ + $(OBJDIR)/blur_array.o \ + $(OBJDIR)/cpu_info.o \ ++ $(AVX_OBJS) \ + $(NULL) + +-AVX_OBJS := \ +- $(OBJDIR)/convolution_avx.o \ +- + CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic -D MULTI_THREADING + # CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic -D MULTI_THREADING -D PRINT_PROGRESS + # CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic +-- +2.17.1 + diff --git a/0004-Use-better-FLAGS-for-ptools.patch b/0004-Use-better-FLAGS-for-ptools.patch new file mode 100644 index 0000000..3f45ac5 --- /dev/null +++ b/0004-Use-better-FLAGS-for-ptools.patch @@ -0,0 +1,35 @@ +From 1f85e97f791709405d5b38981d1786727c229bc0 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 13:54:40 +0200 +Subject: [PATCH 04/11] Use better FLAGS for ptools + +--- + ptools/Makefile.Linux | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ptools/Makefile.Linux b/ptools/Makefile.Linux +index 73d8241..890141b 100644 +--- a/ptools/Makefile.Linux ++++ b/ptools/Makefile.Linux +@@ -10,7 +10,8 @@ CC = g++ + OC = ./opencontainers_1_8_4 + OCINC = $(OC)/include + +-CFLAGS = -Wall -Wextra -fpic -O -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT ++CFLAGS_COMMON = -Wall -Wextra -fpic -O ++CFLAGS = $(CFLAGS_COMMON) -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT + + ## How to build with OCString + ##CFLAGS = -Wall -O4 -DLINUX_ -DOC_USE_OC_STRING -DOC_USE_OC_EXCEPTIONS -DOC_ONLY_NEEDED_STL -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) +@@ -30,7 +31,7 @@ all: midasyeller_ex midastalker_ex midastalker_ex2 httpclient_ex midasserver_ex + $(CC) $(CFLAGS) -c $< + + libptools.so : $(COM_OBJS) +- $(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so ++ $(CC) $(CCFLAGS) $(COM_OBJS) $(LDFLAGS) -shared -Wl,-soname,libptools.so.0 -o libptools.so + + midasserver_ex : $(COM_OBJS) midasserver_ex.o + $(CC) $(CCFLAGS) $(COM_OBJS) midasserver_ex.o -pthread -o midasserver_ex +-- +2.17.1 + diff --git a/0005-Switch-pugixml-include.patch b/0005-Switch-pugixml-include.patch new file mode 100644 index 0000000..aae4b9d --- /dev/null +++ b/0005-Switch-pugixml-include.patch @@ -0,0 +1,26 @@ +From 6b8189523f590e0ec8bd67b15c58377d27fe63f7 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 13:57:00 +0200 +Subject: [PATCH 05/11] Switch pugixml include + +--- + wrapper/src/vmaf.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/wrapper/src/vmaf.cpp b/wrapper/src/vmaf.cpp +index bed3502..a776931 100644 +--- a/wrapper/src/vmaf.cpp ++++ b/wrapper/src/vmaf.cpp +@@ -28,7 +28,8 @@ + + #include "vmaf.h" + #include "combo.h" +-#include "pugixml/pugixml.hpp" ++#include "svm.h" ++#include + #include "timer.h" + #include "jsonprint.h" + #include "debug.h" +-- +2.17.1 + diff --git a/0006-Switch-to-shared-library-for-libvmaf.patch b/0006-Switch-to-shared-library-for-libvmaf.patch new file mode 100644 index 0000000..aee0af3 --- /dev/null +++ b/0006-Switch-to-shared-library-for-libvmaf.patch @@ -0,0 +1,58 @@ +From 26c58a87b63742412f8845318dbd27585a734ed1 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 14:33:30 +0200 +Subject: [PATCH 06/11] Switch to shared library for libvmaf + +--- + feature/Makefile | 2 +- + wrapper/.gitignore | 1 + + wrapper/Makefile | 4 ++-- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/feature/Makefile b/feature/Makefile +index c786a27..127faed 100644 +--- a/feature/Makefile ++++ b/feature/Makefile +@@ -5,7 +5,7 @@ TOP = $(shell pwd) + SRCDIR = $(TOP)/src + OBJDIR = $(TOP)/obj + TOOLDIR = $(TOP)/tool +-LIBVMAF = $(TOP)/../wrapper/libvmaf.a ++LIBVMAF = $(TOP)/../wrapper/libvmaf.so + + CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic + # CFLAGS_COMMON = -g -O0 -fPIC -Wall -Wextra -pedantic +diff --git a/wrapper/.gitignore b/wrapper/.gitignore +index b721ec4..16e4e57 100644 +--- a/wrapper/.gitignore ++++ b/wrapper/.gitignore +@@ -1,6 +1,7 @@ + *.o + vmafossexec + libvmaf.a ++libvmaf.so* + testlib + .cproject + .project +diff --git a/wrapper/Makefile b/wrapper/Makefile +index 62bde27..8644c49 100644 +--- a/wrapper/Makefile ++++ b/wrapper/Makefile +@@ -1,4 +1,4 @@ +-LIBVMAF = libvmaf.a ++LIBVMAF = libvmaf.so + + .PHONY: all + all: $(LIBVMAF) vmafossexec +@@ -172,7 +172,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c + $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< + + $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) +- ar rcs $@ $^ ++ $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -o $@ + + vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) + $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread +-- +2.17.1 + diff --git a/0007-Unbundle-libsvm.patch b/0007-Unbundle-libsvm.patch new file mode 100644 index 0000000..c152918 --- /dev/null +++ b/0007-Unbundle-libsvm.patch @@ -0,0 +1,32 @@ +From ee9ed1dfd1a41a30bf9c6a5e11cf0ae4f70a37ed Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 14:35:50 +0200 +Subject: [PATCH 07/11] Unbundle libsvm + +--- + Makefile | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 5a13baa..d2ba5cc 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,5 @@ + TARGETS = \ + ptools \ +- libsvm \ + wrapper \ + feature + +@@ -9,8 +8,6 @@ all: + cd $${dir}; $(MAKE); cd ..; \ + done + +- cd libsvm; $(MAKE) lib; cd ..; +- + clean: + -for dir in $(TARGETS); do \ + cd $${dir}; $(MAKE) clean; cd ..; \ +-- +2.17.1 + diff --git a/0008-Add-pugixml-LIBS.patch b/0008-Add-pugixml-LIBS.patch new file mode 100644 index 0000000..07ecb1f --- /dev/null +++ b/0008-Add-pugixml-LIBS.patch @@ -0,0 +1,25 @@ +From d3d9937d72928f8c98feb196caeccdde9bafa63e Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 14:43:21 +0200 +Subject: [PATCH 08/11] Add pugixml LIBS + +--- + wrapper/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wrapper/Makefile b/wrapper/Makefile +index 8644c49..ceba5dc 100644 +--- a/wrapper/Makefile ++++ b/wrapper/Makefile +@@ -172,7 +172,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c + $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< + + $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) +- $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -o $@ ++ $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -lpugixml -pthread -o $@ + + vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) + $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread +-- +2.17.1 + diff --git a/0009-Avoid-x86cpudetection-code-when-not-relevant.patch b/0009-Avoid-x86cpudetection-code-when-not-relevant.patch new file mode 100644 index 0000000..0a85ec8 --- /dev/null +++ b/0009-Avoid-x86cpudetection-code-when-not-relevant.patch @@ -0,0 +1,39 @@ +From 48f15b192920c283285276c01cf71331314d66a2 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 18:00:25 +0200 +Subject: [PATCH 09/11] Avoid x86cpudetection code when not relevant + +--- + feature/src/common/cpu.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/feature/src/common/cpu.c b/feature/src/common/cpu.c +index 4befea2..165488a 100644 +--- a/feature/src/common/cpu.c ++++ b/feature/src/common/cpu.c +@@ -16,9 +16,10 @@ + * + */ + +-#include "cpudetect.h" + #include "cpu.h" + ++#if defined(__i386__) || defined(__x86_64) ++#include "cpudetect.h" + + enum vmaf_cpu cpu_autodetect() + { +@@ -31,3 +32,10 @@ enum vmaf_cpu cpu_autodetect() + else + return VMAF_CPU_NONE; + } ++ ++#else ++enum vmaf_cpu cpu_autodetect() ++{ ++ return VMAF_CPU_NONE; ++} ++#endif +-- +2.17.1 + diff --git a/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch b/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch new file mode 100644 index 0000000..dfa992c --- /dev/null +++ b/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch @@ -0,0 +1,30 @@ +From 0a484f7a0af68364ce98d6b9a7f1389c08163a35 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 19:16:00 +0200 +Subject: [PATCH 10/11] Fix libvmaf.pc to use Libs.private for pthread m + +This avoid to link to pthread and m when not needed +Also avoid to link to a specitic libstdc++ +(as reported in https://github.com/Netflix/vmaf/issues/122) + +Signed-off-by: Nicolas Chauvet +--- + wrapper/libvmaf.pc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/wrapper/libvmaf.pc b/wrapper/libvmaf.pc +index 5d524f4..d025135 100644 +--- a/wrapper/libvmaf.pc ++++ b/wrapper/libvmaf.pc +@@ -10,6 +10,6 @@ URL: https://github.com/Netflix/vmaf + Requires: + Requires.private: + Conflicts: +-Libs: -L${libdir} -lvmaf -lstdc++ -lpthread -lm +-Libs.private: ++Libs: -L${libdir} -lvmaf ++Libs.private: -lpthread -lm + Cflags: -I${includedir} +-- +2.17.1 + diff --git a/0011-Add-msse2-for-i686.patch b/0011-Add-msse2-for-i686.patch new file mode 100644 index 0000000..e34b259 --- /dev/null +++ b/0011-Add-msse2-for-i686.patch @@ -0,0 +1,41 @@ +From c4af3c8270c8f498601d7dd68426c4bd52583006 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 7 Apr 2018 19:30:49 +0200 +Subject: [PATCH 11/11] Add -msse2 for i686 + +With x86_64 -msse2 is implicit, but not i686 +Both asm option needs to be enabled there + +Signed-off-by: Nicolas Chauvet +--- + wrapper/Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/wrapper/Makefile b/wrapper/Makefile +index ceba5dc..a38d35b 100644 +--- a/wrapper/Makefile ++++ b/wrapper/Makefile +@@ -14,9 +14,11 @@ LIBDIR ?= $(PREFIX)/lib + + ifeq ($(UNAME), x86_64) + USE_AVX = 1 ++ ASM_CFLAGS = -mavx + endif + ifeq ($(UNAME), i386) + USE_AVX = 1 ++ ASM_CFLAGS = -msse -msse2 -mavx + endif + ifeq ($(USE_AVX), 1) + AVX_OBJS := \ +@@ -70,7 +72,7 @@ CXXFLAGS := -std=c++11 $(CFLAGS_COMMON) $(CXXFLAGS) + CPPFLAGS := $(CPPFLAGS) + LDFLAGS := $(LDFLAGS) + +-$(AVX_OBJS): EXTRA_CFLAGS := -mavx ++$(AVX_OBJS): EXTRA_CFLAGS := $(ASM_CFLAGS) + + $(OBJDIR)/alloc.o: $(FEATURESRCDIR)/common/alloc.c + $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) $< +-- +2.17.1 + From 7a3a7146ac69b3e4d84d87f6e14466a9c20a1590 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 11:23:19 +0000 Subject: [PATCH 04/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vmaf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index 3329a07..93a0470 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -4,7 +4,7 @@ Name: vmaf Version: 1.3.9 -Release: 1.%{commitdate0}git%{shortcommit0}%{?dist} +Release: 2.%{commitdate0}git%{shortcommit0}%{?dist} Summary: Video Multi-Method Assessment Fusion License: ASL 2.0 @@ -131,6 +131,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 1.3.9-2.20180914gita654f6f +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Sep 21 2018 Nicolas Chauvet - 1.3.9-0.20180914gita654f6f - Update to 1.3.9 up to 20180914 From 5a040ff0a72f8dd4847d57d6b18b7bb32f7bdf59 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 6 Apr 2019 19:17:38 +0200 Subject: [PATCH 05/23] Update to 1.3.14 --- ...nd-LIBDIR-build-variable-instead-of-cust.patch | 15 +++++++-------- 0002-Unbundle-pugixml.patch | 12 ++++++------ 0005-Switch-pugixml-include.patch | 15 +++++++-------- 0006-Switch-to-shared-library-for-libvmaf.patch | 12 ++++++------ 0007-Unbundle-libsvm.patch | 6 +++--- 0008-Add-pugixml-LIBS.patch | 10 +++++----- ...d-x86cpudetection-code-when-not-relevant.patch | 8 ++++---- ...maf.pc-to-use-Libs.private-for-pthread-m.patch | 8 ++++---- sources | 2 +- vmaf.spec | 14 ++++++++------ 10 files changed, 51 insertions(+), 51 deletions(-) diff --git a/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch b/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch index 2fef1ba..f55eba3 100644 --- a/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch +++ b/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch @@ -1,15 +1,14 @@ -From 14f859ed0ee63774c3aa86cb31ae0d2b8f4941fd Mon Sep 17 00:00:00 2001 +From 870de42512805dcdd469ef0301476b3fc0e4bc95 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 12:32:54 +0200 -Subject: [PATCH 01/11] Use PREFIX and LIBDIR build variable instead of custom - ones +Subject: [PATCH] Use PREFIX and LIBDIR build variable instead of custom ones --- wrapper/Makefile | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/wrapper/Makefile b/wrapper/Makefile -index 8658e83..6b02083 100644 +index 9317515..868b13f 100644 --- a/wrapper/Makefile +++ b/wrapper/Makefile @@ -8,7 +8,8 @@ SRCDIR = $(TOP)/src @@ -19,10 +18,10 @@ index 8658e83..6b02083 100644 -INSTALL_PREFIX = /usr/local +PREFIX ?= /usr/local +LIBDIR ?= $(PREFIX)/lib + INCLUDES += -I$(TOP)/../feature/src + INCLUDES += -I$(TOP)/../feature/src/common - OBJS = \ - $(OBJDIR)/alloc.o \ -@@ -170,24 +171,24 @@ vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) +@@ -168,24 +169,24 @@ vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) .PHONY: install install: @@ -61,5 +60,5 @@ index 8658e83..6b02083 100644 .PHONY: clean clean: -- -2.17.1 +2.17.2 diff --git a/0002-Unbundle-pugixml.patch b/0002-Unbundle-pugixml.patch index c4af166..fd43ec2 100644 --- a/0002-Unbundle-pugixml.patch +++ b/0002-Unbundle-pugixml.patch @@ -1,17 +1,17 @@ -From 524c2dea1569cef1aaeb26c2afd9a64e11c06254 Mon Sep 17 00:00:00 2001 +From a6765396684ddd62fe660cb914e495e61a4dcab9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 13:43:48 +0200 -Subject: [PATCH 02/11] Unbundle pugixml +Subject: [PATCH] Unbundle pugixml --- wrapper/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wrapper/Makefile b/wrapper/Makefile -index 6b02083..985a30f 100644 +index 868b13f..4a891e1 100644 --- a/wrapper/Makefile +++ b/wrapper/Makefile -@@ -42,9 +42,9 @@ OBJS = \ +@@ -43,9 +43,9 @@ OBJS = \ $(OBJDIR)/vmaf.o \ $(OBJDIR)/darray.o \ $(OBJDIR)/libvmaf.o \ @@ -23,7 +23,7 @@ index 6b02083..985a30f 100644 AVX_OBJS := \ $(OBJDIR)/convolution_avx.o \ -@@ -160,9 +160,6 @@ $(OBJDIR)/vmaf.o: $(SRCDIR)/vmaf.cpp +@@ -158,9 +158,6 @@ $(OBJDIR)/vmaf.o: $(SRCDIR)/vmaf.cpp $(OBJDIR)/%.o: $(SRCDIR)/%.c $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< @@ -34,5 +34,5 @@ index 6b02083..985a30f 100644 ar rcs $@ $^ -- -2.17.1 +2.17.2 diff --git a/0005-Switch-pugixml-include.patch b/0005-Switch-pugixml-include.patch index aae4b9d..0eb5708 100644 --- a/0005-Switch-pugixml-include.patch +++ b/0005-Switch-pugixml-include.patch @@ -1,26 +1,25 @@ -From 6b8189523f590e0ec8bd67b15c58377d27fe63f7 Mon Sep 17 00:00:00 2001 +From 80053ca29abc26ff6129ea5cb5c7e7545519b625 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 13:57:00 +0200 -Subject: [PATCH 05/11] Switch pugixml include +Subject: [PATCH] Switch pugixml include --- - wrapper/src/vmaf.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + wrapper/src/vmaf.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper/src/vmaf.cpp b/wrapper/src/vmaf.cpp -index bed3502..a776931 100644 +index fa1dce9..3e193bc 100644 --- a/wrapper/src/vmaf.cpp +++ b/wrapper/src/vmaf.cpp -@@ -28,7 +28,8 @@ +@@ -29,7 +29,7 @@ #include "vmaf.h" #include "combo.h" -#include "pugixml/pugixml.hpp" -+#include "svm.h" +#include #include "timer.h" #include "jsonprint.h" #include "debug.h" -- -2.17.1 +2.17.2 diff --git a/0006-Switch-to-shared-library-for-libvmaf.patch b/0006-Switch-to-shared-library-for-libvmaf.patch index aee0af3..08a3293 100644 --- a/0006-Switch-to-shared-library-for-libvmaf.patch +++ b/0006-Switch-to-shared-library-for-libvmaf.patch @@ -1,7 +1,7 @@ -From 26c58a87b63742412f8845318dbd27585a734ed1 Mon Sep 17 00:00:00 2001 +From f3b0da9d64e0ad5e668abc97137635f3c5da2d8f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 14:33:30 +0200 -Subject: [PATCH 06/11] Switch to shared library for libvmaf +Subject: [PATCH] Switch to shared library for libvmaf --- feature/Makefile | 2 +- @@ -10,7 +10,7 @@ Subject: [PATCH 06/11] Switch to shared library for libvmaf 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/feature/Makefile b/feature/Makefile -index c786a27..127faed 100644 +index 111d07c..86ced7d 100644 --- a/feature/Makefile +++ b/feature/Makefile @@ -5,7 +5,7 @@ TOP = $(shell pwd) @@ -35,7 +35,7 @@ index b721ec4..16e4e57 100644 .cproject .project diff --git a/wrapper/Makefile b/wrapper/Makefile -index 62bde27..8644c49 100644 +index 4a891e1..2aeaf66 100644 --- a/wrapper/Makefile +++ b/wrapper/Makefile @@ -1,4 +1,4 @@ @@ -44,7 +44,7 @@ index 62bde27..8644c49 100644 .PHONY: all all: $(LIBVMAF) vmafossexec -@@ -172,7 +172,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c +@@ -159,7 +159,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) @@ -54,5 +54,5 @@ index 62bde27..8644c49 100644 vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread -- -2.17.1 +2.17.2 diff --git a/0007-Unbundle-libsvm.patch b/0007-Unbundle-libsvm.patch index c152918..c69f535 100644 --- a/0007-Unbundle-libsvm.patch +++ b/0007-Unbundle-libsvm.patch @@ -1,7 +1,7 @@ -From ee9ed1dfd1a41a30bf9c6a5e11cf0ae4f70a37ed Mon Sep 17 00:00:00 2001 +From 1b1b5db051e99bd7070fd996d46af4f88d030452 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 14:35:50 +0200 -Subject: [PATCH 07/11] Unbundle libsvm +Subject: [PATCH] Unbundle libsvm --- Makefile | 3 --- @@ -28,5 +28,5 @@ index 5a13baa..d2ba5cc 100644 -for dir in $(TARGETS); do \ cd $${dir}; $(MAKE) clean; cd ..; \ -- -2.17.1 +2.17.2 diff --git a/0008-Add-pugixml-LIBS.patch b/0008-Add-pugixml-LIBS.patch index 07ecb1f..30cb36e 100644 --- a/0008-Add-pugixml-LIBS.patch +++ b/0008-Add-pugixml-LIBS.patch @@ -1,17 +1,17 @@ -From d3d9937d72928f8c98feb196caeccdde9bafa63e Mon Sep 17 00:00:00 2001 +From b0fbd280173737102f1814e59452545c6d116cb1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 14:43:21 +0200 -Subject: [PATCH 08/11] Add pugixml LIBS +Subject: [PATCH] Add pugixml LIBS --- wrapper/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper/Makefile b/wrapper/Makefile -index 8644c49..ceba5dc 100644 +index 2aeaf66..ac6decc 100644 --- a/wrapper/Makefile +++ b/wrapper/Makefile -@@ -172,7 +172,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c +@@ -159,7 +159,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) @@ -21,5 +21,5 @@ index 8644c49..ceba5dc 100644 vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread -- -2.17.1 +2.17.2 diff --git a/0009-Avoid-x86cpudetection-code-when-not-relevant.patch b/0009-Avoid-x86cpudetection-code-when-not-relevant.patch index 0a85ec8..95e336d 100644 --- a/0009-Avoid-x86cpudetection-code-when-not-relevant.patch +++ b/0009-Avoid-x86cpudetection-code-when-not-relevant.patch @@ -1,14 +1,14 @@ -From 48f15b192920c283285276c01cf71331314d66a2 Mon Sep 17 00:00:00 2001 +From 02e035cfe70c8c89e7b0f7ac8e9dd0548cfcab56 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 18:00:25 +0200 -Subject: [PATCH 09/11] Avoid x86cpudetection code when not relevant +Subject: [PATCH] Avoid x86cpudetection code when not relevant --- feature/src/common/cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/feature/src/common/cpu.c b/feature/src/common/cpu.c -index 4befea2..165488a 100644 +index 85156f8..3d48dcd 100644 --- a/feature/src/common/cpu.c +++ b/feature/src/common/cpu.c @@ -16,9 +16,10 @@ @@ -35,5 +35,5 @@ index 4befea2..165488a 100644 +} +#endif -- -2.17.1 +2.17.2 diff --git a/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch b/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch index dfa992c..44ecab3 100644 --- a/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch +++ b/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch @@ -1,7 +1,7 @@ -From 0a484f7a0af68364ce98d6b9a7f1389c08163a35 Mon Sep 17 00:00:00 2001 +From 8b4d74a98a95aa12d58f9ebaded2c562b62111f7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 7 Apr 2018 19:16:00 +0200 -Subject: [PATCH 10/11] Fix libvmaf.pc to use Libs.private for pthread m +Subject: [PATCH] Fix libvmaf.pc to use Libs.private for pthread m This avoid to link to pthread and m when not needed Also avoid to link to a specitic libstdc++ @@ -13,7 +13,7 @@ Signed-off-by: Nicolas Chauvet 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapper/libvmaf.pc b/wrapper/libvmaf.pc -index 5d524f4..d025135 100644 +index e48d5a8..416d327 100644 --- a/wrapper/libvmaf.pc +++ b/wrapper/libvmaf.pc @@ -10,6 +10,6 @@ URL: https://github.com/Netflix/vmaf @@ -26,5 +26,5 @@ index 5d524f4..d025135 100644 +Libs.private: -lpthread -lm Cflags: -I${includedir} -- -2.17.1 +2.17.2 diff --git a/sources b/sources index c76c7df..020cb26 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vmaf-a654f6f.tar.gz) = 37984568db2d86c996567f3d2b57bd93e5dfce1adf5233e2cf0c1f6a099e3b704c8b31ff20c8115f87d4d7d40bedaad198a033d3acd4b40b4710a9d7a64cd987 +SHA512 (vmaf-8f41503.tar.gz) = 596b96d320a77da39b43b14c385866294ed3be09e3474f940f4bf768ad7e78478446ac42edd0547582839c914ddaf61b33cff493c4eae87b480bd1e0fa12ef7a diff --git a/vmaf.spec b/vmaf.spec index 93a0470..c466e6d 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,10 +1,10 @@ -%global commit0 a654f6f7f5998aedf2d6e2f6b3a9eece9753c3fb +%global commit0 8f41503605e6e55b34945e49cba864697e1ca683 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -%global commitdate0 20180914 +%global commitdate0 20190403 Name: vmaf -Version: 1.3.9 -Release: 2.%{commitdate0}git%{shortcommit0}%{?dist} +Version: 1.3.14 +Release: 1.%{commitdate0}git%{shortcommit0}%{?dist} Summary: Video Multi-Method Assessment Fusion License: ASL 2.0 @@ -12,7 +12,6 @@ URL: https://github.com/netflix/vmaf/ Source0: %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz Patch0: 0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch Patch1: 0002-Unbundle-pugixml.patch -Patch2: 0003-Drop-AVX-when-not-relevant.patch Patch3: 0004-Use-better-FLAGS-for-ptools.patch Patch4: 0005-Switch-pugixml-include.patch Patch5: 0006-Switch-to-shared-library-for-libvmaf.patch @@ -20,7 +19,6 @@ Patch6: 0007-Unbundle-libsvm.patch Patch7: 0008-Add-pugixml-LIBS.patch Patch8: 0009-Avoid-x86cpudetection-code-when-not-relevant.patch Patch9: 0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch -Patch10: 0011-Add-msse2-for-i686.patch # This project relies on AVX ExclusiveArch: x86_64 @@ -131,6 +129,10 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Sat Apr 06 2019 Nicolas Chauvet - 1.3.14-1.20190403git8f415036 +- Update to 1.13.4 +- Rebase patches + * Sun Feb 03 2019 Fedora Release Engineering - 1.3.9-2.20180914gita654f6f - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 745e4eed35c3171dc29e82920c0b0790202be84d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 03:06:29 +0000 Subject: [PATCH 06/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vmaf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index c466e6d..7998a17 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -4,7 +4,7 @@ Name: vmaf Version: 1.3.14 -Release: 1.%{commitdate0}git%{shortcommit0}%{?dist} +Release: 2.%{commitdate0}git%{shortcommit0}%{?dist} Summary: Video Multi-Method Assessment Fusion License: ASL 2.0 @@ -129,6 +129,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 1.3.14-2.20190403git8f41503 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Apr 06 2019 Nicolas Chauvet - 1.3.14-1.20190403git8f415036 - Update to 1.13.4 - Rebase patches From 92451d408d7caba79efffd9a75bb5e956e73e553 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Wed, 11 Sep 2019 09:25:49 +0100 Subject: [PATCH 07/23] Update to 1.3.15 --- sources | 2 +- vmaf.spec | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sources b/sources index 020cb26..e1d2544 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vmaf-8f41503.tar.gz) = 596b96d320a77da39b43b14c385866294ed3be09e3474f940f4bf768ad7e78478446ac42edd0547582839c914ddaf61b33cff493c4eae87b480bd1e0fa12ef7a +SHA512 (vmaf-1.3.15.tar.gz) = 48dd07e7cf0bca0133739d788e0dab016304cb3b33c72db5a2bc55a55768c3efac6b85c413e8471bfa362bf6ce3bd20994bf996af9cf09c37f2be977791c08c6 diff --git a/vmaf.spec b/vmaf.spec index 7998a17..22d4aa2 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,15 +1,11 @@ -%global commit0 8f41503605e6e55b34945e49cba864697e1ca683 -%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -%global commitdate0 20190403 - Name: vmaf -Version: 1.3.14 -Release: 2.%{commitdate0}git%{shortcommit0}%{?dist} +Version: 1.3.15 +Release: 1%{?dist} Summary: Video Multi-Method Assessment Fusion License: ASL 2.0 -URL: https://github.com/netflix/vmaf/ -Source0: %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz +URL: https://github.com/netflix/vmaf +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: 0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch Patch1: 0002-Unbundle-pugixml.patch Patch3: 0004-Use-better-FLAGS-for-ptools.patch @@ -66,7 +62,7 @@ developing applications that use %{name}. %prep -%autosetup -p1 -n %{name}-%{commit0} +%autosetup -p1 # Unbundle rm -rf wrapper/src/pugixml rm -rf libsvm @@ -129,11 +125,14 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Wed Sep 11 2019 Leigh Scott - 1.3.15-1 +- Update to 1.3.15 + * Sat Jul 27 2019 Fedora Release Engineering - 1.3.14-2.20190403git8f41503 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Apr 06 2019 Nicolas Chauvet - 1.3.14-1.20190403git8f415036 -- Update to 1.13.4 +- Update to 1.3.14 - Rebase patches * Sun Feb 03 2019 Fedora Release Engineering - 1.3.9-2.20180914gita654f6f From 760168065895f32dfca36529ac43ce9316dc3151 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 03:18:15 +0000 Subject: [PATCH 08/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vmaf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index 22d4aa2..932d039 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 1.3.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Video Multi-Method Assessment Fusion License: ASL 2.0 @@ -125,6 +125,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 1.3.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Sep 11 2019 Leigh Scott - 1.3.15-1 - Update to 1.3.15 From d299c8241a1635245a9a1b3597a6eca62269cdfd Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Wed, 4 Mar 2020 22:40:51 +0000 Subject: [PATCH 09/23] Update to 1.5.1 --- ...IBDIR-build-variable-instead-of-cust.patch | 64 -------------- ... => 0001-Use-better-FLAGS-for-ptools.patch | 22 ++--- 0002-Unbundle-pugixml.patch | 80 +++++++++++------- 0003-Drop-AVX-when-not-relevant.patch | 84 ------------------- 0003-Fix-soname.patch | 24 ++++++ ...6cpudetection-code-when-not-relevant.patch | 39 +++++++++ 0005-Switch-pugixml-include.patch | 25 ------ ...Switch-to-shared-library-for-libvmaf.patch | 58 ------------- 0007-Unbundle-libsvm.patch | 32 ------- 0008-Add-pugixml-LIBS.patch | 25 ------ ...6cpudetection-code-when-not-relevant.patch | 39 --------- ...pc-to-use-Libs.private-for-pthread-m.patch | 30 ------- 0011-Add-msse2-for-i686.patch | 41 --------- sources | 2 +- vmaf.spec | 55 +++++------- 15 files changed, 147 insertions(+), 473 deletions(-) delete mode 100644 0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch rename 0004-Use-better-FLAGS-for-ptools.patch => 0001-Use-better-FLAGS-for-ptools.patch (59%) delete mode 100644 0003-Drop-AVX-when-not-relevant.patch create mode 100644 0003-Fix-soname.patch create mode 100644 0004-Avoid-x86cpudetection-code-when-not-relevant.patch delete mode 100644 0005-Switch-pugixml-include.patch delete mode 100644 0006-Switch-to-shared-library-for-libvmaf.patch delete mode 100644 0007-Unbundle-libsvm.patch delete mode 100644 0008-Add-pugixml-LIBS.patch delete mode 100644 0009-Avoid-x86cpudetection-code-when-not-relevant.patch delete mode 100644 0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch delete mode 100644 0011-Add-msse2-for-i686.patch diff --git a/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch b/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch deleted file mode 100644 index f55eba3..0000000 --- a/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 870de42512805dcdd469ef0301476b3fc0e4bc95 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 12:32:54 +0200 -Subject: [PATCH] Use PREFIX and LIBDIR build variable instead of custom ones - ---- - wrapper/Makefile | 29 +++++++++++++++-------------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/wrapper/Makefile b/wrapper/Makefile -index 9317515..868b13f 100644 ---- a/wrapper/Makefile -+++ b/wrapper/Makefile -@@ -8,7 +8,8 @@ SRCDIR = $(TOP)/src - OBJDIR = $(TOP)/obj - FEATURESRCDIR = $(TOP)/../feature/src - PTOOLSDIR = $(TOP)/../ptools --INSTALL_PREFIX = /usr/local -+PREFIX ?= /usr/local -+LIBDIR ?= $(PREFIX)/lib - INCLUDES += -I$(TOP)/../feature/src - INCLUDES += -I$(TOP)/../feature/src/common - -@@ -168,24 +169,24 @@ vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) - - .PHONY: install - install: -- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib -- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/include -- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share -- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig -- cp $(LIBVMAF) $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF) -- cp src/libvmaf.h $(DESTDIR)$(INSTALL_PREFIX)/include/ -- cp -r ../model $(DESTDIR)$(INSTALL_PREFIX)/share/ -- cp libvmaf.pc $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/ -+ mkdir -p $(DESTDIR)$(LIBDIR) -+ mkdir -p $(DESTDIR)$(PREFIX)/include -+ mkdir -p $(DESTDIR)$(PREFIX)/share -+ mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig -+ cp $(LIBVMAF) $(DESTDIR)$(LIBDIR)/$(LIBVMAF) -+ cp src/libvmaf.h $(DESTDIR)$(PREFIX)/include/ -+ cp -r ../model $(DESTDIR)$(PREFIX)/share/ -+ cp libvmaf.pc $(DESTDIR)$(LIBDIR)/pkgconfig/ - - .PHONY: uninstall - uninstall: -- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF) -- rm -f $(DESTDIR)$(INSTALL_PREFIX)/include/libvmaf.h -- rm -fr $(DESTDIR)$(INSTALL_PREFIX)/share/model -- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/libvmaf.pc -+ rm -f $(DESTDIR)$(LIBDIR)/$(LIBVMAF) -+ rm -f $(DESTDIR)$(PREFIX)/include/libvmaf.h -+ rm -fr $(DESTDIR)$(PREFIX)/share/model -+ rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/libvmaf.pc - - testlib: $(SRCDIR)/main.cpp -- $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(INSTALL_PREFIX)/include -L$(DESTDIR)$(INSTALL_PREFIX)/lib -lvmaf -pthread -+ $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(PREFIX)/include -L$(DESTDIR)$(LIBDIR) -lvmaf -pthread - - .PHONY: clean - clean: --- -2.17.2 - diff --git a/0004-Use-better-FLAGS-for-ptools.patch b/0001-Use-better-FLAGS-for-ptools.patch similarity index 59% rename from 0004-Use-better-FLAGS-for-ptools.patch rename to 0001-Use-better-FLAGS-for-ptools.patch index 3f45ac5..cd6bd9b 100644 --- a/0004-Use-better-FLAGS-for-ptools.patch +++ b/0001-Use-better-FLAGS-for-ptools.patch @@ -1,23 +1,23 @@ -From 1f85e97f791709405d5b38981d1786727c229bc0 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 13:54:40 +0200 -Subject: [PATCH 04/11] Use better FLAGS for ptools +From 4adfd8064dbaad0e7d48e6668de322213ed621c8 Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Wed, 4 Mar 2020 21:43:41 +0000 +Subject: [PATCH 1/4] Use better FLAGS for ptools --- - ptools/Makefile.Linux | 5 +++-- + libvmaf/src/third_party/ptools/Makefile.Linux | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -diff --git a/ptools/Makefile.Linux b/ptools/Makefile.Linux -index 73d8241..890141b 100644 ---- a/ptools/Makefile.Linux -+++ b/ptools/Makefile.Linux +diff --git a/libvmaf/src/third_party/ptools/Makefile.Linux b/libvmaf/src/third_party/ptools/Makefile.Linux +index 73d8241..99d4e83 100644 +--- a/libvmaf/src/third_party/ptools/Makefile.Linux ++++ b/libvmaf/src/third_party/ptools/Makefile.Linux @@ -10,7 +10,8 @@ CC = g++ OC = ./opencontainers_1_8_4 OCINC = $(OC)/include -CFLAGS = -Wall -Wextra -fpic -O -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT +CFLAGS_COMMON = -Wall -Wextra -fpic -O -+CFLAGS = $(CFLAGS_COMMON) -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT ++CFLAGS = $(CFLAGS) -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT ## How to build with OCString ##CFLAGS = -Wall -O4 -DLINUX_ -DOC_USE_OC_STRING -DOC_USE_OC_EXCEPTIONS -DOC_ONLY_NEEDED_STL -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) @@ -31,5 +31,5 @@ index 73d8241..890141b 100644 midasserver_ex : $(COM_OBJS) midasserver_ex.o $(CC) $(CCFLAGS) $(COM_OBJS) midasserver_ex.o -pthread -o midasserver_ex -- -2.17.1 +2.24.1 diff --git a/0002-Unbundle-pugixml.patch b/0002-Unbundle-pugixml.patch index fd43ec2..ee469f3 100644 --- a/0002-Unbundle-pugixml.patch +++ b/0002-Unbundle-pugixml.patch @@ -1,38 +1,58 @@ -From a6765396684ddd62fe660cb914e495e61a4dcab9 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 13:43:48 +0200 -Subject: [PATCH] Unbundle pugixml +From 79d6313628216f9c5d6e758d8d113c97df152ad9 Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Wed, 4 Mar 2020 21:49:48 +0000 +Subject: [PATCH 2/4] Unbundle pugixml --- - wrapper/Makefile | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) + libvmaf/src/meson.build | 7 +++++-- + libvmaf/src/vmaf.cpp | 2 +- + 2 files changed, 6 insertions(+), 3 deletions(-) -diff --git a/wrapper/Makefile b/wrapper/Makefile -index 868b13f..4a891e1 100644 ---- a/wrapper/Makefile -+++ b/wrapper/Makefile -@@ -43,9 +43,9 @@ OBJS = \ - $(OBJDIR)/vmaf.o \ - $(OBJDIR)/darray.o \ - $(OBJDIR)/libvmaf.o \ -- $(OBJDIR)/pugixml.o \ - $(OBJDIR)/blur_array.o \ -- $(OBJDIR)/cpu_info.o -+ $(OBJDIR)/cpu_info.o \ -+ $(NULL) +diff --git a/libvmaf/src/meson.build b/libvmaf/src/meson.build +index 74047d2..9f723d8 100644 +--- a/libvmaf/src/meson.build ++++ b/libvmaf/src/meson.build +@@ -31,6 +31,7 @@ ptools_sources = [ + ] - AVX_OBJS := \ - $(OBJDIR)/convolution_avx.o \ -@@ -158,9 +158,6 @@ $(OBJDIR)/vmaf.o: $(SRCDIR)/vmaf.cpp - $(OBJDIR)/%.o: $(SRCDIR)/%.c - $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< + thread_lib = dependency('threads') ++pugixml_lib = dependency('pugixml') + math_lib = cc.find_library('m', required : false) --$(OBJDIR)/%.o: $(SRCDIR)/pugixml/%.cpp -- $(CXX) -c -o $@ $(CXXFLAGS) $(CPPFLAGS) $< -- - $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) - ar rcs $@ $^ + libptools = shared_library( +@@ -115,7 +116,6 @@ libvmaf_feature_static_lib = static_library( + ) + vmaf_sources = [ +- third_party_dir + 'pugixml/pugixml.cpp', + src_dir + 'mem.c', + src_dir + 'combo.c', + src_dir + 'cpu_info.c', +@@ -131,7 +131,10 @@ libvmaf = both_libraries( + include_directories : vmaf_include, + c_args : vmaf_cflags_common, + cpp_args : vmaf_cflags_common, +- dependencies : thread_lib, ++ dependencies : [ ++ thread_lib, ++ pugixml_lib, ++ ], + objects : [ + convolution_and_psnr_avx_static_lib.extract_all_objects(), + libptools.extract_all_objects(), +diff --git a/libvmaf/src/vmaf.cpp b/libvmaf/src/vmaf.cpp +index 64bcf5f..c9cab57 100644 +--- a/libvmaf/src/vmaf.cpp ++++ b/libvmaf/src/vmaf.cpp +@@ -28,7 +28,7 @@ + + #include "vmaf.h" + #include "combo.h" +-#include "third_party/pugixml/pugixml.hpp" ++#include + #include "timer.h" + #include "jsonprint.h" + #include "debug.h" -- -2.17.2 +2.24.1 diff --git a/0003-Drop-AVX-when-not-relevant.patch b/0003-Drop-AVX-when-not-relevant.patch deleted file mode 100644 index 5d68f52..0000000 --- a/0003-Drop-AVX-when-not-relevant.patch +++ /dev/null @@ -1,84 +0,0 @@ -From bd90f8e5d7bb1d323ec35d8326915ded41cce587 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 13:44:42 +0200 -Subject: [PATCH 03/11] Drop AVX when not relevant - ---- - feature/Makefile | 9 +++++++++ - wrapper/Makefile | 17 ++++++++++++++--- - 2 files changed, 23 insertions(+), 3 deletions(-) - -diff --git a/feature/Makefile b/feature/Makefile -index 111d07c..c786a27 100644 ---- a/feature/Makefile -+++ b/feature/Makefile -@@ -10,13 +10,22 @@ LIBVMAF = $(TOP)/../wrapper/libvmaf.a - CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic - # CFLAGS_COMMON = -g -O0 -fPIC -Wall -Wextra -pedantic - -+UNAME := $(shell uname -m) - CFLAGS := -std=c99 $(CFLAGS_COMMON) $(CFLAGS) - CXXFLAGS := -std=c++11 $(CFLAGS_COMMON) $(CXXFLAGS) - CPPFLAGS := $(CPPFLAGS) - LIBS := $(LIBS) -lm - LDFLAGS := $(LDFLAGS) - -+ifeq ($(UNAME), x86_64) -+ USE_AVX = 1 -+endif -+ifeq ($(UNAME), i386) -+ USE_AVX = 1 -+endif -+ifeq ($(USE_AVX), 1) - $(AVX_OBJS): EXTRA_CFLAGS := -mavx -+endif - - $(OBJDIR)/vmaf_main.o: $(SRCDIR)/vmaf_main.c - $(CC) $(EXTRA_CFLAGS) -c -o $@ $(CFLAGS) $(CPPFLAGS) $< -diff --git a/wrapper/Makefile b/wrapper/Makefile -index 985a30f..62bde27 100644 ---- a/wrapper/Makefile -+++ b/wrapper/Makefile -@@ -3,6 +3,7 @@ LIBVMAF = libvmaf.a - .PHONY: all - all: $(LIBVMAF) vmafossexec - -+UNAME := $(shell uname -m) - TOP = $(shell pwd) - SRCDIR = $(TOP)/src - OBJDIR = $(TOP)/obj -@@ -11,6 +12,18 @@ PTOOLSDIR = $(TOP)/../ptools - PREFIX ?= /usr/local - LIBDIR ?= $(PREFIX)/lib - -+ifeq ($(UNAME), x86_64) -+ USE_AVX = 1 -+endif -+ifeq ($(UNAME), i386) -+ USE_AVX = 1 -+endif -+ifeq ($(USE_AVX), 1) -+AVX_OBJS := \ -+ $(OBJDIR)/convolution_avx.o \ -+ -+endif -+ - OBJS = \ - $(OBJDIR)/alloc.o \ - $(OBJDIR)/alignment.o \ -@@ -44,11 +57,9 @@ OBJS = \ - $(OBJDIR)/libvmaf.o \ - $(OBJDIR)/blur_array.o \ - $(OBJDIR)/cpu_info.o \ -+ $(AVX_OBJS) \ - $(NULL) - --AVX_OBJS := \ -- $(OBJDIR)/convolution_avx.o \ -- - CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic -D MULTI_THREADING - # CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic -D MULTI_THREADING -D PRINT_PROGRESS - # CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic --- -2.17.1 - diff --git a/0003-Fix-soname.patch b/0003-Fix-soname.patch new file mode 100644 index 0000000..2196456 --- /dev/null +++ b/0003-Fix-soname.patch @@ -0,0 +1,24 @@ +From 564d4c50e35bbb7428cab8ae58d31313fdfe065b Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Wed, 4 Mar 2020 21:52:08 +0000 +Subject: [PATCH 3/4] Fix soname + +--- + libvmaf/src/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libvmaf/src/meson.build b/libvmaf/src/meson.build +index 9f723d8..1295b71 100644 +--- a/libvmaf/src/meson.build ++++ b/libvmaf/src/meson.build +@@ -129,6 +129,7 @@ libvmaf = both_libraries( + 'vmaf', + vmaf_sources, + include_directories : vmaf_include, ++ soversion: 0, + c_args : vmaf_cflags_common, + cpp_args : vmaf_cflags_common, + dependencies : [ +-- +2.24.1 + diff --git a/0004-Avoid-x86cpudetection-code-when-not-relevant.patch b/0004-Avoid-x86cpudetection-code-when-not-relevant.patch new file mode 100644 index 0000000..bbc3fe0 --- /dev/null +++ b/0004-Avoid-x86cpudetection-code-when-not-relevant.patch @@ -0,0 +1,39 @@ +From f6acf39e17ce3d1e607be243c263dffbac9cb862 Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Wed, 4 Mar 2020 22:06:51 +0000 +Subject: [PATCH 4/4] Avoid x86cpudetection code when not relevant + +--- + libvmaf/src/feature/common/cpu.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/libvmaf/src/feature/common/cpu.c b/libvmaf/src/feature/common/cpu.c +index ff96ddc..efcb8ec 100644 +--- a/libvmaf/src/feature/common/cpu.c ++++ b/libvmaf/src/feature/common/cpu.c +@@ -16,9 +16,10 @@ + * + */ + +-#include "cpudetect.h" + #include "cpu.h" + ++#if defined(__i386__) || defined(__x86_64) ++#include "cpudetect.h" + + enum vmaf_cpu cpu_autodetect() + { +@@ -31,3 +32,10 @@ enum vmaf_cpu cpu_autodetect() + else + return VMAF_CPU_NONE; + } ++ ++#else ++enum vmaf_cpu cpu_autodetect() ++{ ++ return VMAF_CPU_NONE; ++} ++#endif +-- +2.24.1 + diff --git a/0005-Switch-pugixml-include.patch b/0005-Switch-pugixml-include.patch deleted file mode 100644 index 0eb5708..0000000 --- a/0005-Switch-pugixml-include.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 80053ca29abc26ff6129ea5cb5c7e7545519b625 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 13:57:00 +0200 -Subject: [PATCH] Switch pugixml include - ---- - wrapper/src/vmaf.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/wrapper/src/vmaf.cpp b/wrapper/src/vmaf.cpp -index fa1dce9..3e193bc 100644 ---- a/wrapper/src/vmaf.cpp -+++ b/wrapper/src/vmaf.cpp -@@ -29,7 +29,7 @@ - - #include "vmaf.h" - #include "combo.h" --#include "pugixml/pugixml.hpp" -+#include - #include "timer.h" - #include "jsonprint.h" - #include "debug.h" --- -2.17.2 - diff --git a/0006-Switch-to-shared-library-for-libvmaf.patch b/0006-Switch-to-shared-library-for-libvmaf.patch deleted file mode 100644 index 08a3293..0000000 --- a/0006-Switch-to-shared-library-for-libvmaf.patch +++ /dev/null @@ -1,58 +0,0 @@ -From f3b0da9d64e0ad5e668abc97137635f3c5da2d8f Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 14:33:30 +0200 -Subject: [PATCH] Switch to shared library for libvmaf - ---- - feature/Makefile | 2 +- - wrapper/.gitignore | 1 + - wrapper/Makefile | 4 ++-- - 3 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/feature/Makefile b/feature/Makefile -index 111d07c..86ced7d 100644 ---- a/feature/Makefile -+++ b/feature/Makefile -@@ -5,7 +5,7 @@ TOP = $(shell pwd) - SRCDIR = $(TOP)/src - OBJDIR = $(TOP)/obj - TOOLDIR = $(TOP)/tool --LIBVMAF = $(TOP)/../wrapper/libvmaf.a -+LIBVMAF = $(TOP)/../wrapper/libvmaf.so - - CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic - # CFLAGS_COMMON = -g -O0 -fPIC -Wall -Wextra -pedantic -diff --git a/wrapper/.gitignore b/wrapper/.gitignore -index b721ec4..16e4e57 100644 ---- a/wrapper/.gitignore -+++ b/wrapper/.gitignore -@@ -1,6 +1,7 @@ - *.o - vmafossexec - libvmaf.a -+libvmaf.so* - testlib - .cproject - .project -diff --git a/wrapper/Makefile b/wrapper/Makefile -index 4a891e1..2aeaf66 100644 ---- a/wrapper/Makefile -+++ b/wrapper/Makefile -@@ -1,4 +1,4 @@ --LIBVMAF = libvmaf.a -+LIBVMAF = libvmaf.so - - .PHONY: all - all: $(LIBVMAF) vmafossexec -@@ -159,7 +159,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c - $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< - - $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) -- ar rcs $@ $^ -+ $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -o $@ - - vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) - $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread --- -2.17.2 - diff --git a/0007-Unbundle-libsvm.patch b/0007-Unbundle-libsvm.patch deleted file mode 100644 index c69f535..0000000 --- a/0007-Unbundle-libsvm.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1b1b5db051e99bd7070fd996d46af4f88d030452 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 14:35:50 +0200 -Subject: [PATCH] Unbundle libsvm - ---- - Makefile | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 5a13baa..d2ba5cc 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,5 @@ - TARGETS = \ - ptools \ -- libsvm \ - wrapper \ - feature - -@@ -9,8 +8,6 @@ all: - cd $${dir}; $(MAKE); cd ..; \ - done - -- cd libsvm; $(MAKE) lib; cd ..; -- - clean: - -for dir in $(TARGETS); do \ - cd $${dir}; $(MAKE) clean; cd ..; \ --- -2.17.2 - diff --git a/0008-Add-pugixml-LIBS.patch b/0008-Add-pugixml-LIBS.patch deleted file mode 100644 index 30cb36e..0000000 --- a/0008-Add-pugixml-LIBS.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b0fbd280173737102f1814e59452545c6d116cb1 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 14:43:21 +0200 -Subject: [PATCH] Add pugixml LIBS - ---- - wrapper/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/wrapper/Makefile b/wrapper/Makefile -index 2aeaf66..ac6decc 100644 ---- a/wrapper/Makefile -+++ b/wrapper/Makefile -@@ -159,7 +159,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c - $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $< - - $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o) -- $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -o $@ -+ $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -lpugixml -pthread -o $@ - - vmafossexec: $(OBJDIR)/main.o $(LIBVMAF) - $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread --- -2.17.2 - diff --git a/0009-Avoid-x86cpudetection-code-when-not-relevant.patch b/0009-Avoid-x86cpudetection-code-when-not-relevant.patch deleted file mode 100644 index 95e336d..0000000 --- a/0009-Avoid-x86cpudetection-code-when-not-relevant.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 02e035cfe70c8c89e7b0f7ac8e9dd0548cfcab56 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 18:00:25 +0200 -Subject: [PATCH] Avoid x86cpudetection code when not relevant - ---- - feature/src/common/cpu.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/feature/src/common/cpu.c b/feature/src/common/cpu.c -index 85156f8..3d48dcd 100644 ---- a/feature/src/common/cpu.c -+++ b/feature/src/common/cpu.c -@@ -16,9 +16,10 @@ - * - */ - --#include "cpudetect.h" - #include "cpu.h" - -+#if defined(__i386__) || defined(__x86_64) -+#include "cpudetect.h" - - enum vmaf_cpu cpu_autodetect() - { -@@ -31,3 +32,10 @@ enum vmaf_cpu cpu_autodetect() - else - return VMAF_CPU_NONE; - } -+ -+#else -+enum vmaf_cpu cpu_autodetect() -+{ -+ return VMAF_CPU_NONE; -+} -+#endif --- -2.17.2 - diff --git a/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch b/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch deleted file mode 100644 index 44ecab3..0000000 --- a/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8b4d74a98a95aa12d58f9ebaded2c562b62111f7 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 19:16:00 +0200 -Subject: [PATCH] Fix libvmaf.pc to use Libs.private for pthread m - -This avoid to link to pthread and m when not needed -Also avoid to link to a specitic libstdc++ -(as reported in https://github.com/Netflix/vmaf/issues/122) - -Signed-off-by: Nicolas Chauvet ---- - wrapper/libvmaf.pc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/wrapper/libvmaf.pc b/wrapper/libvmaf.pc -index e48d5a8..416d327 100644 ---- a/wrapper/libvmaf.pc -+++ b/wrapper/libvmaf.pc -@@ -10,6 +10,6 @@ URL: https://github.com/Netflix/vmaf - Requires: - Requires.private: - Conflicts: --Libs: -L${libdir} -lvmaf -lstdc++ -lpthread -lm --Libs.private: -+Libs: -L${libdir} -lvmaf -+Libs.private: -lpthread -lm - Cflags: -I${includedir} --- -2.17.2 - diff --git a/0011-Add-msse2-for-i686.patch b/0011-Add-msse2-for-i686.patch deleted file mode 100644 index e34b259..0000000 --- a/0011-Add-msse2-for-i686.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c4af3c8270c8f498601d7dd68426c4bd52583006 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Sat, 7 Apr 2018 19:30:49 +0200 -Subject: [PATCH 11/11] Add -msse2 for i686 - -With x86_64 -msse2 is implicit, but not i686 -Both asm option needs to be enabled there - -Signed-off-by: Nicolas Chauvet ---- - wrapper/Makefile | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/wrapper/Makefile b/wrapper/Makefile -index ceba5dc..a38d35b 100644 ---- a/wrapper/Makefile -+++ b/wrapper/Makefile -@@ -14,9 +14,11 @@ LIBDIR ?= $(PREFIX)/lib - - ifeq ($(UNAME), x86_64) - USE_AVX = 1 -+ ASM_CFLAGS = -mavx - endif - ifeq ($(UNAME), i386) - USE_AVX = 1 -+ ASM_CFLAGS = -msse -msse2 -mavx - endif - ifeq ($(USE_AVX), 1) - AVX_OBJS := \ -@@ -70,7 +72,7 @@ CXXFLAGS := -std=c++11 $(CFLAGS_COMMON) $(CXXFLAGS) - CPPFLAGS := $(CPPFLAGS) - LDFLAGS := $(LDFLAGS) - --$(AVX_OBJS): EXTRA_CFLAGS := -mavx -+$(AVX_OBJS): EXTRA_CFLAGS := $(ASM_CFLAGS) - - $(OBJDIR)/alloc.o: $(FEATURESRCDIR)/common/alloc.c - $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) $< --- -2.17.1 - diff --git a/sources b/sources index e1d2544..d6f9e45 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vmaf-1.3.15.tar.gz) = 48dd07e7cf0bca0133739d788e0dab016304cb3b33c72db5a2bc55a55768c3efac6b85c413e8471bfa362bf6ce3bd20994bf996af9cf09c37f2be977791c08c6 +SHA512 (vmaf-1.5.1.tar.gz) = f587c70fd830a491e9c75f65bc4f4bff137218c504aab7d3d4f2eba1affaac8a32eb6049ec00ad8db6a4f26079c555da3d5803f14f9dd01c199cc89df2e4a975 diff --git a/vmaf.spec b/vmaf.spec index 932d039..f2ea755 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,25 +1,21 @@ Name: vmaf -Version: 1.3.15 -Release: 2%{?dist} +Version: 1.5.1 +Release: 1%{?dist} Summary: Video Multi-Method Assessment Fusion -License: ASL 2.0 +License: BSD-2-Clause-Patent URL: https://github.com/netflix/vmaf Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: 0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch +Patch0: 0001-Use-better-FLAGS-for-ptools.patch Patch1: 0002-Unbundle-pugixml.patch -Patch3: 0004-Use-better-FLAGS-for-ptools.patch -Patch4: 0005-Switch-pugixml-include.patch -Patch5: 0006-Switch-to-shared-library-for-libvmaf.patch -Patch6: 0007-Unbundle-libsvm.patch -Patch7: 0008-Add-pugixml-LIBS.patch -Patch8: 0009-Avoid-x86cpudetection-code-when-not-relevant.patch -Patch9: 0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch +Patch3: 0003-Fix-soname.patch +Patch4: 0004-Avoid-x86cpudetection-code-when-not-relevant.patch # This project relies on AVX ExclusiveArch: x86_64 BuildRequires: gcc-c++ +BuildRequires: meson BuildRequires: libsvm-devel BuildRequires: pugixml-devel @@ -64,35 +60,25 @@ developing applications that use %{name}. %prep %autosetup -p1 # Unbundle -rm -rf wrapper/src/pugixml -rm -rf libsvm - -# Tweak libvmaf.pc -sed -i -e 's|/usr/local|%{_prefix}|g' wrapper/libvmaf.pc -sed -i -e 's|/usr/lib|%{_libdir}|g' wrapper/libvmaf.pc - +rm -rf libvmaf/src/third_party/pugixml +rm -rf third_party/libsvm %build -%ifarch i686 -export ASM_CFLAGS="-msse -msse2 -mavx" -%endif -%make_build CFLAGS_COMMON="%{optflags} ${ASM_CFLAGS} -fPIC" LDFLAGS="%{__global_ldflags}" V=1 - +pushd libvmaf +%meson +%meson_build +popd %install -%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} +pushd libvmaf +%meson_install +popd -mv %{buildroot}%{_libdir}/libvmaf.so \ +mv %{buildroot}%{_libdir}/libvmaf.so.0 \ %{buildroot}%{_libdir}/libvmaf.so.0.0.0 ln -s libvmaf.so.0.0.0 \ %{buildroot}%{_libdir}/libvmaf.so.0 -ln -s libvmaf.so.0 \ - %{buildroot}%{_libdir}/libvmaf.so - -# Install vmafossexec -mkdir -p %{buildroot}%{_bindir} -install -pm 0755 wrapper/vmafossexec \ - %{buildroot}%{_bindir} +rm -f %{buildroot}%{_libdir}/libvmaf.a #RPM Macros support mkdir -p %{buildroot}%{rpmmacrodir} @@ -119,12 +105,15 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %files -n libvmaf-devel %doc CONTRIBUTING.md %{rpmmacrodir}/macros.%{name} -%{_includedir}/libvmaf.h +%{_includedir}/libvmaf/ %{_libdir}/*.so %{_libdir}/pkgconfig/libvmaf.pc %changelog +* Tue Mar 03 2020 Leigh Scott - 1.5.1-1 +- Update to 1.5.1 + * Fri Jan 31 2020 Fedora Release Engineering - 1.3.15-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 294ab733f451f7a2d47d9930dac8b3b9005fdc53 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Wed, 4 Mar 2020 23:21:25 +0000 Subject: [PATCH 10/23] Use shared for vmafossexec --- 0005-Use-shared-for-vmafossexec.patch | 25 +++++++++++++++++++++++++ vmaf.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0005-Use-shared-for-vmafossexec.patch diff --git a/0005-Use-shared-for-vmafossexec.patch b/0005-Use-shared-for-vmafossexec.patch new file mode 100644 index 0000000..775a14a --- /dev/null +++ b/0005-Use-shared-for-vmafossexec.patch @@ -0,0 +1,25 @@ +From 0e9e6df1542583a74a0d30b81b0872d95b11a6fc Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Wed, 4 Mar 2020 23:18:20 +0000 +Subject: [PATCH 5/5] Use shared for vmafossexec + +--- + libvmaf/tools/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libvmaf/tools/meson.build b/libvmaf/tools/meson.build +index 2550f29..117bad0 100644 +--- a/libvmaf/tools/meson.build ++++ b/libvmaf/tools/meson.build +@@ -8,7 +8,7 @@ vmafossexec = executable( + include_directories : libvmaf_inc, + c_args : vmaf_cflags_common, + cpp_args : vmaf_cflags_common, +- link_with : libvmaf.get_static_lib(), ++ link_with : libvmaf, + install : true, + ) + +-- +2.24.1 + diff --git a/vmaf.spec b/vmaf.spec index f2ea755..e68eb1d 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 1.5.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -10,6 +10,7 @@ Patch0: 0001-Use-better-FLAGS-for-ptools.patch Patch1: 0002-Unbundle-pugixml.patch Patch3: 0003-Fix-soname.patch Patch4: 0004-Avoid-x86cpudetection-code-when-not-relevant.patch +Patch5: 0005-Use-shared-for-vmafossexec.patch # This project relies on AVX ExclusiveArch: x86_64 @@ -111,6 +112,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Wed Mar 04 2020 Leigh Scott - 1.5.1-2 +- Use shared for vmafossexec + * Tue Mar 03 2020 Leigh Scott - 1.5.1-1 - Update to 1.5.1 From 257d4167cb3267ccd65277c892ffbf9b8882f0ea Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sat, 23 May 2020 11:47:01 +0100 Subject: [PATCH 11/23] Fix pkconfig version --- vmaf.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index e68eb1d..3f29473 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 1.5.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -63,6 +63,7 @@ developing applications that use %{name}. # Unbundle rm -rf libvmaf/src/third_party/pugixml rm -rf third_party/libsvm +sed -i -e 's@1.3.16@%{version}@g' libvmaf/meson.build %build pushd libvmaf @@ -112,6 +113,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Sat May 23 2020 Leigh Scott - 1.5.1-3 +- Fix pkconfig version + * Wed Mar 04 2020 Leigh Scott - 1.5.1-2 - Use shared for vmafossexec From bf2b96e85d0b71ad8671705567c0060bc9800a13 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Wed, 24 Jun 2020 07:59:29 +0100 Subject: [PATCH 12/23] Add upstream commit to mark ABI as C --- mark_abi_c.patch | 30 ++++++++++++++++++++++++++++++ vmaf.spec | 6 +++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 mark_abi_c.patch diff --git a/mark_abi_c.patch b/mark_abi_c.patch new file mode 100644 index 0000000..d63d327 --- /dev/null +++ b/mark_abi_c.patch @@ -0,0 +1,30 @@ +From ea25229433f7f8ff087c63db9509156c01a8e291 Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Sat, 29 Feb 2020 15:12:09 +0000 +Subject: [PATCH] libvmaf: mark ABI as C after 82a86e040371 + +--- + libvmaf/include/libvmaf/libvmaf.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libvmaf/include/libvmaf/libvmaf.h b/libvmaf/include/libvmaf/libvmaf.h +index ef32e069..2fbb3599 100644 +--- a/libvmaf/include/libvmaf/libvmaf.h ++++ b/libvmaf/include/libvmaf/libvmaf.h +@@ -19,8 +19,16 @@ + #ifndef LIBVMAF_H_ + #define LIBVMAF_H_ + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + int compute_vmaf(double* vmaf_score, char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), + void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, + int do_ssim, int do_ms_ssim, char *pool_method, int n_thread, int n_subsample, int enable_conf_interval); + ++#ifdef __cplusplus ++} ++#endif ++ + #endif /* _LIBVMAF_H */ diff --git a/vmaf.spec b/vmaf.spec index 3f29473..33f3bfd 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 1.5.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -11,6 +11,7 @@ Patch1: 0002-Unbundle-pugixml.patch Patch3: 0003-Fix-soname.patch Patch4: 0004-Avoid-x86cpudetection-code-when-not-relevant.patch Patch5: 0005-Use-shared-for-vmafossexec.patch +Patch6: %{url}/commit/ea25229433f7f8ff087c63db9509156c01a8e291.patch#/mark_abi_c.patch # This project relies on AVX ExclusiveArch: x86_64 @@ -113,6 +114,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Wed Jun 24 2020 Leigh Scott - 1.5.1-4 +- Add upstream commit to mark ABI as C + * Sat May 23 2020 Leigh Scott - 1.5.1-3 - Fix pkconfig version From 7704eed4041bbfe42b48b7eb01e332d51b09dd88 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:49:32 +0000 Subject: [PATCH 13/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vmaf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index 33f3bfd..03d577f 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 1.5.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -114,6 +114,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.5.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jun 24 2020 Leigh Scott - 1.5.1-4 - Add upstream commit to mark ABI as C From 8475e0505f79b9264339873eec403f46920d4b68 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Thu, 31 Dec 2020 14:48:47 +0000 Subject: [PATCH 14/23] Update to 1.5.3 --- 0002-Unbundle-pugixml.patch | 31 +++------------ 0003-Fix-soname.patch | 24 ------------ ...6cpudetection-code-when-not-relevant.patch | 39 ------------------- 0005-Use-shared-for-vmafossexec.patch | 2 +- mark_abi_c.patch | 30 -------------- sources | 2 +- vmaf.spec | 21 +++++----- 7 files changed, 18 insertions(+), 131 deletions(-) delete mode 100644 0003-Fix-soname.patch delete mode 100644 0004-Avoid-x86cpudetection-code-when-not-relevant.patch delete mode 100644 mark_abi_c.patch diff --git a/0002-Unbundle-pugixml.patch b/0002-Unbundle-pugixml.patch index ee469f3..2a49bc9 100644 --- a/0002-Unbundle-pugixml.patch +++ b/0002-Unbundle-pugixml.patch @@ -1,18 +1,6 @@ -From 79d6313628216f9c5d6e758d8d113c97df152ad9 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Wed, 4 Mar 2020 21:49:48 +0000 -Subject: [PATCH 2/4] Unbundle pugixml - ---- - libvmaf/src/meson.build | 7 +++++-- - libvmaf/src/vmaf.cpp | 2 +- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/libvmaf/src/meson.build b/libvmaf/src/meson.build -index 74047d2..9f723d8 100644 --- a/libvmaf/src/meson.build +++ b/libvmaf/src/meson.build -@@ -31,6 +31,7 @@ ptools_sources = [ +@@ -187,6 +187,7 @@ ptools_sources = [ ] thread_lib = dependency('threads') @@ -20,7 +8,7 @@ index 74047d2..9f723d8 100644 math_lib = cc.find_library('m', required : false) libptools = shared_library( -@@ -115,7 +116,6 @@ libvmaf_feature_static_lib = static_library( +@@ -241,7 +242,6 @@ libvmaf_feature_static_lib = static_libr ) vmaf_sources = [ @@ -28,20 +16,15 @@ index 74047d2..9f723d8 100644 src_dir + 'mem.c', src_dir + 'combo.c', src_dir + 'cpu_info.c', -@@ -131,7 +131,10 @@ libvmaf = both_libraries( +@@ -257,7 +257,7 @@ libvmaf = both_libraries( include_directories : vmaf_include, c_args : vmaf_cflags_common, cpp_args : vmaf_cflags_common, -- dependencies : thread_lib, -+ dependencies : [ -+ thread_lib, -+ pugixml_lib, -+ ], +- dependencies : [thread_lib, stdatomic_dependency], ++ dependencies : [thread_lib, pugixml_lib, stdatomic_dependency], objects : [ - convolution_and_psnr_avx_static_lib.extract_all_objects(), + platform_specific_cpu_objects, libptools.extract_all_objects(), -diff --git a/libvmaf/src/vmaf.cpp b/libvmaf/src/vmaf.cpp -index 64bcf5f..c9cab57 100644 --- a/libvmaf/src/vmaf.cpp +++ b/libvmaf/src/vmaf.cpp @@ -28,7 +28,7 @@ @@ -53,6 +36,4 @@ index 64bcf5f..c9cab57 100644 #include "timer.h" #include "jsonprint.h" #include "debug.h" --- -2.24.1 diff --git a/0003-Fix-soname.patch b/0003-Fix-soname.patch deleted file mode 100644 index 2196456..0000000 --- a/0003-Fix-soname.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 564d4c50e35bbb7428cab8ae58d31313fdfe065b Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Wed, 4 Mar 2020 21:52:08 +0000 -Subject: [PATCH 3/4] Fix soname - ---- - libvmaf/src/meson.build | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libvmaf/src/meson.build b/libvmaf/src/meson.build -index 9f723d8..1295b71 100644 ---- a/libvmaf/src/meson.build -+++ b/libvmaf/src/meson.build -@@ -129,6 +129,7 @@ libvmaf = both_libraries( - 'vmaf', - vmaf_sources, - include_directories : vmaf_include, -+ soversion: 0, - c_args : vmaf_cflags_common, - cpp_args : vmaf_cflags_common, - dependencies : [ --- -2.24.1 - diff --git a/0004-Avoid-x86cpudetection-code-when-not-relevant.patch b/0004-Avoid-x86cpudetection-code-when-not-relevant.patch deleted file mode 100644 index bbc3fe0..0000000 --- a/0004-Avoid-x86cpudetection-code-when-not-relevant.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f6acf39e17ce3d1e607be243c263dffbac9cb862 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Wed, 4 Mar 2020 22:06:51 +0000 -Subject: [PATCH 4/4] Avoid x86cpudetection code when not relevant - ---- - libvmaf/src/feature/common/cpu.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/libvmaf/src/feature/common/cpu.c b/libvmaf/src/feature/common/cpu.c -index ff96ddc..efcb8ec 100644 ---- a/libvmaf/src/feature/common/cpu.c -+++ b/libvmaf/src/feature/common/cpu.c -@@ -16,9 +16,10 @@ - * - */ - --#include "cpudetect.h" - #include "cpu.h" - -+#if defined(__i386__) || defined(__x86_64) -+#include "cpudetect.h" - - enum vmaf_cpu cpu_autodetect() - { -@@ -31,3 +32,10 @@ enum vmaf_cpu cpu_autodetect() - else - return VMAF_CPU_NONE; - } -+ -+#else -+enum vmaf_cpu cpu_autodetect() -+{ -+ return VMAF_CPU_NONE; -+} -+#endif --- -2.24.1 - diff --git a/0005-Use-shared-for-vmafossexec.patch b/0005-Use-shared-for-vmafossexec.patch index 775a14a..2e5d51d 100644 --- a/0005-Use-shared-for-vmafossexec.patch +++ b/0005-Use-shared-for-vmafossexec.patch @@ -12,7 +12,7 @@ index 2550f29..117bad0 100644 --- a/libvmaf/tools/meson.build +++ b/libvmaf/tools/meson.build @@ -8,7 +8,7 @@ vmafossexec = executable( - include_directories : libvmaf_inc, + dependencies: [stdatomic_dependency], c_args : vmaf_cflags_common, cpp_args : vmaf_cflags_common, - link_with : libvmaf.get_static_lib(), diff --git a/mark_abi_c.patch b/mark_abi_c.patch deleted file mode 100644 index d63d327..0000000 --- a/mark_abi_c.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ea25229433f7f8ff087c63db9509156c01a8e291 Mon Sep 17 00:00:00 2001 -From: Jan Beich -Date: Sat, 29 Feb 2020 15:12:09 +0000 -Subject: [PATCH] libvmaf: mark ABI as C after 82a86e040371 - ---- - libvmaf/include/libvmaf/libvmaf.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/libvmaf/include/libvmaf/libvmaf.h b/libvmaf/include/libvmaf/libvmaf.h -index ef32e069..2fbb3599 100644 ---- a/libvmaf/include/libvmaf/libvmaf.h -+++ b/libvmaf/include/libvmaf/libvmaf.h -@@ -19,8 +19,16 @@ - #ifndef LIBVMAF_H_ - #define LIBVMAF_H_ - -+#ifdef __cplusplus -+extern "C" { -+#endif -+ - int compute_vmaf(double* vmaf_score, char* fmt, int width, int height, int (*read_frame)(float *ref_data, float *main_data, float *temp_data, int stride_byte, void *user_data), - void *user_data, char *model_path, char *log_path, char *log_fmt, int disable_clip, int disable_avx, int enable_transform, int phone_model, int do_psnr, - int do_ssim, int do_ms_ssim, char *pool_method, int n_thread, int n_subsample, int enable_conf_interval); - -+#ifdef __cplusplus -+} -+#endif -+ - #endif /* _LIBVMAF_H */ diff --git a/sources b/sources index d6f9e45..22d226d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vmaf-1.5.1.tar.gz) = f587c70fd830a491e9c75f65bc4f4bff137218c504aab7d3d4f2eba1affaac8a32eb6049ec00ad8db6a4f26079c555da3d5803f14f9dd01c199cc89df2e4a975 +SHA512 (vmaf-1.5.3.tar.gz) = 8d8420c72a6575669e88506e47a381c39b66b087b60aef359fb073cd2a54a8fdf48d2664e03e60612afc437b404bfab9d92b9f2441304a612e8d07a2d6947ba5 diff --git a/vmaf.spec b/vmaf.spec index 03d577f..22308ee 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf -Version: 1.5.1 -Release: 5%{?dist} +Version: 1.5.3 +Release: 1%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -8,10 +8,7 @@ URL: https://github.com/netflix/vmaf Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: 0001-Use-better-FLAGS-for-ptools.patch Patch1: 0002-Unbundle-pugixml.patch -Patch3: 0003-Fix-soname.patch -Patch4: 0004-Avoid-x86cpudetection-code-when-not-relevant.patch -Patch5: 0005-Use-shared-for-vmafossexec.patch -Patch6: %{url}/commit/ea25229433f7f8ff087c63db9509156c01a8e291.patch#/mark_abi_c.patch +Patch2: 0005-Use-shared-for-vmafossexec.patch # This project relies on AVX ExclusiveArch: x86_64 @@ -64,7 +61,6 @@ developing applications that use %{name}. # Unbundle rm -rf libvmaf/src/third_party/pugixml rm -rf third_party/libsvm -sed -i -e 's@1.3.16@%{version}@g' libvmaf/meson.build %build pushd libvmaf @@ -77,10 +73,10 @@ pushd libvmaf %meson_install popd -mv %{buildroot}%{_libdir}/libvmaf.so.0 \ - %{buildroot}%{_libdir}/libvmaf.so.0.0.0 -ln -s libvmaf.so.0.0.0 \ - %{buildroot}%{_libdir}/libvmaf.so.0 +#mv %{buildroot}%{_libdir}/libvmaf.so.0 \ +# %{buildroot}%{_libdir}/libvmaf.so.0.0.0 +#ln -s libvmaf.so.0.0.0 \ +# %{buildroot}%{_libdir}/libvmaf.so.0 rm -f %{buildroot}%{_libdir}/libvmaf.a #RPM Macros support @@ -114,6 +110,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Thu Dec 31 2020 Leigh Scott - 1.5.3-1 +- Update to 1.5.3 + * Wed Jul 29 2020 Fedora Release Engineering - 1.5.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 146b7f9e5352160cf0564f0ae2198ce274d41e74 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Thu, 31 Dec 2020 14:55:18 +0000 Subject: [PATCH 15/23] Add build requires nasm --- vmaf.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vmaf.spec b/vmaf.spec index 22308ee..f327483 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -15,6 +15,7 @@ ExclusiveArch: x86_64 BuildRequires: gcc-c++ BuildRequires: meson +BuildRequires: nasm BuildRequires: libsvm-devel BuildRequires: pugixml-devel From e78720d818e08a3481435b88df81492fedd67f03 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:11:09 +0000 Subject: [PATCH 16/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vmaf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index f327483..74e86be 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 1.5.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -111,6 +111,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.5.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Dec 31 2020 Leigh Scott - 1.5.3-1 - Update to 1.5.3 From fab4ac4b55d602e05b0bcdb61f0c768670cb23ba Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Wed, 10 Mar 2021 20:38:57 +0000 Subject: [PATCH 17/23] Update to 2.1.1 --- 0001-Use-better-FLAGS-for-ptools.patch | 35 ----------------------- 0002-Unbundle-pugixml.patch | 39 -------------------------- 0005-Use-shared-for-vmafossexec.patch | 25 ----------------- sources | 2 +- vmaf.spec | 38 ++++++++++++------------- 5 files changed, 19 insertions(+), 120 deletions(-) delete mode 100644 0001-Use-better-FLAGS-for-ptools.patch delete mode 100644 0002-Unbundle-pugixml.patch delete mode 100644 0005-Use-shared-for-vmafossexec.patch diff --git a/0001-Use-better-FLAGS-for-ptools.patch b/0001-Use-better-FLAGS-for-ptools.patch deleted file mode 100644 index cd6bd9b..0000000 --- a/0001-Use-better-FLAGS-for-ptools.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4adfd8064dbaad0e7d48e6668de322213ed621c8 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Wed, 4 Mar 2020 21:43:41 +0000 -Subject: [PATCH 1/4] Use better FLAGS for ptools - ---- - libvmaf/src/third_party/ptools/Makefile.Linux | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/libvmaf/src/third_party/ptools/Makefile.Linux b/libvmaf/src/third_party/ptools/Makefile.Linux -index 73d8241..99d4e83 100644 ---- a/libvmaf/src/third_party/ptools/Makefile.Linux -+++ b/libvmaf/src/third_party/ptools/Makefile.Linux -@@ -10,7 +10,8 @@ CC = g++ - OC = ./opencontainers_1_8_4 - OCINC = $(OC)/include - --CFLAGS = -Wall -Wextra -fpic -O -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT -+CFLAGS_COMMON = -Wall -Wextra -fpic -O -+CFLAGS = $(CFLAGS) -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT - - ## How to build with OCString - ##CFLAGS = -Wall -O4 -DLINUX_ -DOC_USE_OC_STRING -DOC_USE_OC_EXCEPTIONS -DOC_ONLY_NEEDED_STL -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -@@ -30,7 +31,7 @@ all: midasyeller_ex midastalker_ex midastalker_ex2 httpclient_ex midasserver_ex - $(CC) $(CFLAGS) -c $< - - libptools.so : $(COM_OBJS) -- $(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so -+ $(CC) $(CCFLAGS) $(COM_OBJS) $(LDFLAGS) -shared -Wl,-soname,libptools.so.0 -o libptools.so - - midasserver_ex : $(COM_OBJS) midasserver_ex.o - $(CC) $(CCFLAGS) $(COM_OBJS) midasserver_ex.o -pthread -o midasserver_ex --- -2.24.1 - diff --git a/0002-Unbundle-pugixml.patch b/0002-Unbundle-pugixml.patch deleted file mode 100644 index 2a49bc9..0000000 --- a/0002-Unbundle-pugixml.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/libvmaf/src/meson.build -+++ b/libvmaf/src/meson.build -@@ -187,6 +187,7 @@ ptools_sources = [ - ] - - thread_lib = dependency('threads') -+pugixml_lib = dependency('pugixml') - math_lib = cc.find_library('m', required : false) - - libptools = shared_library( -@@ -241,7 +242,6 @@ libvmaf_feature_static_lib = static_libr - ) - - vmaf_sources = [ -- third_party_dir + 'pugixml/pugixml.cpp', - src_dir + 'mem.c', - src_dir + 'combo.c', - src_dir + 'cpu_info.c', -@@ -257,7 +257,7 @@ libvmaf = both_libraries( - include_directories : vmaf_include, - c_args : vmaf_cflags_common, - cpp_args : vmaf_cflags_common, -- dependencies : [thread_lib, stdatomic_dependency], -+ dependencies : [thread_lib, pugixml_lib, stdatomic_dependency], - objects : [ - platform_specific_cpu_objects, - libptools.extract_all_objects(), ---- a/libvmaf/src/vmaf.cpp -+++ b/libvmaf/src/vmaf.cpp -@@ -28,7 +28,7 @@ - - #include "vmaf.h" - #include "combo.h" --#include "third_party/pugixml/pugixml.hpp" -+#include - #include "timer.h" - #include "jsonprint.h" - #include "debug.h" - diff --git a/0005-Use-shared-for-vmafossexec.patch b/0005-Use-shared-for-vmafossexec.patch deleted file mode 100644 index 2e5d51d..0000000 --- a/0005-Use-shared-for-vmafossexec.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0e9e6df1542583a74a0d30b81b0872d95b11a6fc Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Wed, 4 Mar 2020 23:18:20 +0000 -Subject: [PATCH 5/5] Use shared for vmafossexec - ---- - libvmaf/tools/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libvmaf/tools/meson.build b/libvmaf/tools/meson.build -index 2550f29..117bad0 100644 ---- a/libvmaf/tools/meson.build -+++ b/libvmaf/tools/meson.build -@@ -8,7 +8,7 @@ vmafossexec = executable( - dependencies: [stdatomic_dependency], - c_args : vmaf_cflags_common, - cpp_args : vmaf_cflags_common, -- link_with : libvmaf.get_static_lib(), -+ link_with : libvmaf, - install : true, - ) - --- -2.24.1 - diff --git a/sources b/sources index 22d226d..d4bdcbd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vmaf-1.5.3.tar.gz) = 8d8420c72a6575669e88506e47a381c39b66b087b60aef359fb073cd2a54a8fdf48d2664e03e60612afc437b404bfab9d92b9f2441304a612e8d07a2d6947ba5 +SHA512 (vmaf-2.1.1.tar.gz) = 82582b695ad5f0813a4e9080ac2195fcc6f4f8b29d68e5749b5a0585d5c02eaebcff7d7de47d4caf12bf658b236c13890aaca1e508383d96c6a2418909d91529 diff --git a/vmaf.spec b/vmaf.spec index 74e86be..e1548ae 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,14 +1,11 @@ Name: vmaf -Version: 1.5.3 -Release: 2%{?dist} +Version: 2.1.1 +Release: 1%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent URL: https://github.com/netflix/vmaf Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: 0001-Use-better-FLAGS-for-ptools.patch -Patch1: 0002-Unbundle-pugixml.patch -Patch2: 0005-Use-shared-for-vmafossexec.patch # This project relies on AVX ExclusiveArch: x86_64 @@ -16,8 +13,8 @@ ExclusiveArch: x86_64 BuildRequires: gcc-c++ BuildRequires: meson BuildRequires: nasm -BuildRequires: libsvm-devel -BuildRequires: pugixml-devel +BuildRequires: vim-common + # Enforce our own build version for library Requires: libvmaf%{?_isa} = %{version}-%{release} @@ -38,6 +35,7 @@ https://github.com/Netflix/vmaf/blob/master/resource/doc/VMAF_ICIP17.pdf %package -n libvmaf Summary: Library for %{name} +Provides: bundled(libsvm) = 3.24 #Some repo provides it Provides: %{name}-static = %{version}-%{release} Obsoletes: %{name}-static < %{version}-%{release} @@ -60,12 +58,12 @@ developing applications that use %{name}. %prep %autosetup -p1 # Unbundle -rm -rf libvmaf/src/third_party/pugixml -rm -rf third_party/libsvm +rm -rf third_party/ %build pushd libvmaf -%meson +%meson \ + -Ddefault_library=shared %meson_build popd @@ -74,12 +72,6 @@ pushd libvmaf %meson_install popd -#mv %{buildroot}%{_libdir}/libvmaf.so.0 \ -# %{buildroot}%{_libdir}/libvmaf.so.0.0.0 -#ln -s libvmaf.so.0.0.0 \ -# %{buildroot}%{_libdir}/libvmaf.so.0 -rm -f %{buildroot}%{_libdir}/libvmaf.a - #RPM Macros support mkdir -p %{buildroot}%{rpmmacrodir} cat > %{buildroot}%{rpmmacrodir}/macros.%{name} << EOF @@ -88,19 +80,22 @@ cat > %{buildroot}%{rpmmacrodir}/macros.%{name} << EOF EOF touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} +%check +pushd libvmaf +ninja -vC %{_vpath_builddir} test +popd %ldconfig_scriptlets -n libvmaf %files -%doc FAQ.md NOTICE.md README.md -%{_bindir}/vmafossexec -%{_datadir}/model/ +%doc FAQ.md README.md +%{_bindir}/vmaf %files -n libvmaf %doc CHANGELOG.md %license LICENSE -%{_libdir}/*.so.* +%{_libdir}/*.so.1* %files -n libvmaf-devel %doc CONTRIBUTING.md @@ -111,6 +106,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Wed Mar 10 2021 Leigh Scott - 2.1.1-1 +- Update to 2.1.1 + * Wed Jan 27 2021 Fedora Release Engineering - 1.5.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 3190caedc1674deeb77a47530290d5dc172afa3f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:36:05 +0000 Subject: [PATCH 18/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vmaf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index e1548ae..bc23bbb 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 2.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -106,6 +106,9 @@ popd %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Mar 10 2021 Leigh Scott - 2.1.1-1 - Update to 2.1.1 From 9f88e69ed1862c56c91e47ee6f1a8a23842ae1b2 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Fri, 10 Dec 2021 13:12:27 +0000 Subject: [PATCH 19/23] Update to 2.3.0 --- sources | 2 +- vmaf.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index d4bdcbd..0ff83f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vmaf-2.1.1.tar.gz) = 82582b695ad5f0813a4e9080ac2195fcc6f4f8b29d68e5749b5a0585d5c02eaebcff7d7de47d4caf12bf658b236c13890aaca1e508383d96c6a2418909d91529 +SHA512 (vmaf-2.3.0.tar.gz) = 10f0af2b1e868d9780a2766c6c06451ea79f4a8cd8f6c546473382587011f9a7c8c5bf80952021980ede62e2188bcb388337c8903a906d50c739be7cdbb8f61b diff --git a/vmaf.spec b/vmaf.spec index bc23bbb..0110de6 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf -Version: 2.1.1 -Release: 2%{?dist} +Version: 2.3.0 +Release: 1%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -89,7 +89,7 @@ popd %files -%doc FAQ.md README.md +%doc README.md %{_bindir}/vmaf %files -n libvmaf @@ -106,6 +106,9 @@ popd %changelog +* Fri Dec 10 2021 Leigh Scott - 2.3.0-1 +- Update to 2.3.0 + * Fri Jul 23 2021 Fedora Release Engineering - 2.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 2de682f62825ef836740aa088b23c2a103bb66c3 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Fri, 10 Dec 2021 16:04:47 +0000 Subject: [PATCH 20/23] Add model file for legacy apps that can't use the builtin models --- vmaf.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vmaf.spec b/vmaf.spec index 0110de6..53a22ff 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -54,6 +54,12 @@ Obsoletes: %{name}-devel < %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package models +Summary: Model files for %{name} + +%description models +The %{name}-models package contains model files. +These are needed for apps that can't use the builtin models. %prep %autosetup -p1 @@ -80,6 +86,9 @@ cat > %{buildroot}%{rpmmacrodir}/macros.%{name} << EOF EOF touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} +mkdir -p %{buildroot}%{_datadir}/model/ +cp -Rp model/* %{buildroot}%{_datadir}/model/ + %check pushd libvmaf ninja -vC %{_vpath_builddir} test @@ -92,6 +101,9 @@ popd %doc README.md %{_bindir}/vmaf +%files models +%{_datadir}/model/ + %files -n libvmaf %doc CHANGELOG.md %license LICENSE From fb6e41827de1063962c5355d3311833e27da4505 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sat, 11 Dec 2021 12:56:05 +0000 Subject: [PATCH 21/23] fix sub-package arch --- vmaf.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vmaf.spec b/vmaf.spec index 53a22ff..e44c893 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -54,10 +54,12 @@ Obsoletes: %{name}-devel < %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%package models -Summary: Model files for %{name} +%package models +Summary: Model files for %{name} +Requires: libvmaf = %{version}-%{release} +BuildArch: noarch -%description models +%description models The %{name}-models package contains model files. These are needed for apps that can't use the builtin models. @@ -82,7 +84,7 @@ popd mkdir -p %{buildroot}%{rpmmacrodir} cat > %{buildroot}%{rpmmacrodir}/macros.%{name} << EOF # libvmaf RPM Macros -%libvmaf_version %{version} +%libvmaf_version %{version} EOF touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} From b6a547567a5be0b6118773822781ffeaf644523b Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sat, 11 Dec 2021 13:01:56 +0000 Subject: [PATCH 22/23] Bump changelog --- vmaf.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmaf.spec b/vmaf.spec index e44c893..ed916fc 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,6 +1,6 @@ Name: vmaf Version: 2.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent @@ -120,6 +120,9 @@ popd %changelog +* Sat Dec 11 2021 Leigh Scott - 2.3.0-2 +- Add models sub-package + * Fri Dec 10 2021 Leigh Scott - 2.3.0-1 - Update to 2.3.0 From d84e25de8245628626844bbce701f28604c12b65 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Tue, 31 Oct 2023 00:27:01 +0300 Subject: [PATCH 23/23] Remove unnecessary files --- README.md | 3 --- sources | 1 - 2 files changed, 4 deletions(-) delete mode 100644 README.md delete mode 100644 sources diff --git a/README.md b/README.md deleted file mode 100644 index 037ff0e..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# vmaf - -The vmaf package \ No newline at end of file diff --git a/sources b/sources deleted file mode 100644 index 0ff83f3..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (vmaf-2.3.0.tar.gz) = 10f0af2b1e868d9780a2766c6c06451ea79f4a8cd8f6c546473382587011f9a7c8c5bf80952021980ede62e2188bcb388337c8903a906d50c739be7cdbb8f61b