SHA256
1
0
forked from pool/SVT-AV1

Accepting request 895949 from home:jengelh:branches:multimedia:libs

- Update to release 0.8.7

OBS-URL: https://build.opensuse.org/request/show/895949
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/SVT-AV1?expand=0&rev=22
This commit is contained in:
Takashi Iwai 2021-05-28 10:10:49 +00:00 committed by Git OBS Bridge
parent 9dd3c49a00
commit e63c504924
5 changed files with 29 additions and 211 deletions

View File

@ -1,190 +0,0 @@
From 2e581b16cecd767d5596052b10c70acc681a8b45 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Tue, 10 Nov 2020 10:34:30 +0100
Subject: [PATCH 1/3] cmake: Use CheckCSourceCompiles
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
---
CMakeLists.txt | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Index: SVT-AV1-0.8.5/CMakeLists.txt
===================================================================
--- SVT-AV1-0.8.5.orig/CMakeLists.txt 2020-09-07 09:09:35.000000000 +0200
+++ SVT-AV1-0.8.5/CMakeLists.txt 2020-11-10 11:29:38.547034342 +0100
@@ -29,19 +29,17 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message(WARNING "32-bit is not supported")
endif()
-file(WRITE ${CMAKE_BINARY_DIR}/conftest.c "
+include(CheckCSourceCompiles)
+
+check_c_source_compiles("
#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__)
#else
#error \"Non-x86\"
#endif
-int main() {}
-")
-
-try_compile(X86 ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/conftest.c)
-
-message(STATUS "x86 detected: ${X86}")
+int main(void) {}
+" HAVE_X86_PLATFORM)
-if(X86)
+if(HAVE_X86_PLATFORM)
find_program(YASM_EXE yasm)
option(ENABLE_NASM "Use nasm if available (Uses yasm by default if found)" OFF)
if(YASM_EXE AND NOT CMAKE_ASM_NASM_COMPILER MATCHES "yasm" AND NOT ENABLE_NASM)
@@ -110,12 +108,13 @@ if(UNIX)
endif()
endif()
+# Always build with -fPIC/-fPIE
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
set(flags_to_test
-Wextra
-Wformat
- -Wformat-security
- -fPIE
- -fPIC)
+ -Wformat-security)
if(MSVC)
list(INSERT flags_to_test 0 /W3)
list(APPEND flags_to_test /MP)
@@ -230,6 +229,10 @@ macro(ASM_COMPILE_TO_TARGET target)
endif()
endmacro()
+# Find out if we have threading available
+set(CMAKE_THREAD_PREFER_PTHREADS ON)
+find_package(Threads)
+
# Add Subdirectories
add_subdirectory(Source/Lib/Common)
if(BUILD_ENC)
Index: SVT-AV1-0.8.5/Source/Lib/Decoder/CMakeLists.txt
===================================================================
--- SVT-AV1-0.8.5.orig/Source/Lib/Decoder/CMakeLists.txt 2020-09-07 09:09:35.000000000 +0200
+++ SVT-AV1-0.8.5/Source/Lib/Decoder/CMakeLists.txt 2020-11-10 11:09:55.382045862 +0100
@@ -18,10 +18,11 @@ set(DEC_VERSION ${DEC_VERSION_MAJOR}.${D
if(UNIX)
if(NOT APPLE)
- find_library(M_LIB name m)
+ find_library(M_LIB NAMES m)
if(M_LIB)
list(APPEND PLATFORM_LIBS m)
endif()
+ list(APPEND PLATFORM_LIBS ${CMAKE_THREAD_LIBS_INIT})
endif()
set(LIBS_PRIVATE "-lpthread -lm")
endif()
@@ -45,7 +46,7 @@ link_directories(${PROJECT_SOURCE_DIR}/S
${PROJECT_SOURCE_DIR}/Source/Lib/Decoder/Codec/
${PROJECT_SOURCE_DIR}/third_party/fastfeat/)
-if(X86)
+if(HAVE_X86_PLATFORM)
# Include Decoder Subdirectories
include_directories(${PROJECT_SOURCE_DIR}/Source/Lib/Common/ASM_SSE2/
${PROJECT_SOURCE_DIR}/Source/Lib/Common/ASM_SSSE3/
@@ -75,7 +76,7 @@ if(common_lib_source)
endif()
# Decoder Lib Source Files
-if(X86)
+if(HAVE_X86_PLATFORM)
add_library(SvtAv1Dec
${all_files}
$<TARGET_OBJECTS:COMMON_CODEC>
Index: SVT-AV1-0.8.5/Source/Lib/Encoder/CMakeLists.txt
===================================================================
--- SVT-AV1-0.8.5.orig/Source/Lib/Encoder/CMakeLists.txt 2020-09-07 09:09:35.000000000 +0200
+++ SVT-AV1-0.8.5/Source/Lib/Encoder/CMakeLists.txt 2020-11-10 11:09:55.382045862 +0100
@@ -19,10 +19,11 @@ set(ENC_VERSION ${ENC_VERSION_MAJOR}.${E
if(UNIX)
if(NOT APPLE)
- find_library(M_LIB name m)
+ find_library(M_LIB NAMES m)
if(M_LIB)
list(APPEND PLATFORM_LIBS m)
endif()
+ list(APPEND PLATFORM_LIBS ${CMAKE_THREAD_LIBS_INIT})
endif()
set(LIBS_PRIVATE "-lpthread -lm")
endif()
@@ -49,7 +50,7 @@ link_directories(${PROJECT_SOURCE_DIR}/S
add_subdirectory(C_DEFAULT)
add_subdirectory(Codec)
add_subdirectory(Globals)
-if(X86)
+if(HAVE_X86_PLATFORM)
# Include Encoder Subdirectories
include_directories(${PROJECT_SOURCE_DIR}/Source/Lib/Common/ASM_SSE2/
${PROJECT_SOURCE_DIR}/Source/Lib/Common/ASM_SSSE3/
@@ -96,7 +97,7 @@ if(common_lib_source)
endif()
# Encoder Lib Source Files
-if(X86)
+if(HAVE_X86_PLATFORM)
add_library(SvtAv1Enc
${all_files}
$<TARGET_OBJECTS:COMMON_CODEC>
Index: SVT-AV1-0.8.5/Source/Lib/Common/CMakeLists.txt
===================================================================
--- SVT-AV1-0.8.5.orig/Source/Lib/Common/CMakeLists.txt 2020-09-07 09:09:35.000000000 +0200
+++ SVT-AV1-0.8.5/Source/Lib/Common/CMakeLists.txt 2020-11-10 11:09:55.382045862 +0100
@@ -30,7 +30,7 @@ add_library(common_lib INTERFACE)
add_subdirectory(Codec)
add_subdirectory(C_DEFAULT)
-if(X86)
+if(HAVE_X86_PLATFORM)
add_subdirectory(ASM_SSE2)
add_subdirectory(ASM_SSSE3)
add_subdirectory(ASM_SSE4_1)
Index: SVT-AV1-0.8.5/Source/Lib/Common/Codec/CMakeLists.txt
===================================================================
--- SVT-AV1-0.8.5.orig/Source/Lib/Common/Codec/CMakeLists.txt 2020-09-07 09:09:35.000000000 +0200
+++ SVT-AV1-0.8.5/Source/Lib/Common/Codec/CMakeLists.txt 2020-11-10 11:09:55.382045862 +0100
@@ -21,7 +21,7 @@ add_custom_target(EbVersionHeaderGen
COMMENT "Generating version header"
VERBATIM)
-if(X86)
+if(HAVE_X86_PLATFORM)
# Include Encoder Subdirectories
include_directories(${PROJECT_SOURCE_DIR}/Source/API/
${PROJECT_SOURCE_DIR}/Source/Lib/Common/Codec/
Index: SVT-AV1-0.8.5/Source/Lib/Encoder/Codec/CMakeLists.txt
===================================================================
--- SVT-AV1-0.8.5.orig/Source/Lib/Encoder/Codec/CMakeLists.txt 2020-09-07 09:09:35.000000000 +0200
+++ SVT-AV1-0.8.5/Source/Lib/Encoder/Codec/CMakeLists.txt 2020-11-10 11:09:55.382045862 +0100
@@ -19,7 +19,7 @@ include_directories(../../../API
${PROJECT_SOURCE_DIR}/Source/Lib/Encoder/Globals/
)
-if(X86)
+if(HAVE_X86_PLATFORM)
# Include Encoder Subdirectories
include_directories(
${PROJECT_SOURCE_DIR}/Source/Lib/Encoder/ASM_SSE2/
Index: SVT-AV1-0.8.5/Source/Lib/Encoder/Globals/CMakeLists.txt
===================================================================
--- SVT-AV1-0.8.5.orig/Source/Lib/Encoder/Globals/CMakeLists.txt 2020-09-07 09:09:35.000000000 +0200
+++ SVT-AV1-0.8.5/Source/Lib/Encoder/Globals/CMakeLists.txt 2020-11-10 11:10:05.322095098 +0100
@@ -19,7 +19,7 @@ include_directories(../../../API
${PROJECT_SOURCE_DIR}/third_party/fastfeat/
)
-if(X86)
+if(HAVE_X86_PLATFORM)
# Include Encoder Subdirectories
include_directories(
${PROJECT_SOURCE_DIR}/Source/Lib/Common/ASM_SSE2/

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8ce94359ea9450745c17c12d4cc054d45f6b2498e63e2ebaa5a5273bb36f6f95
size 6319601

3
SVT-AV1-v0.8.7.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de24e4a6c557498b2e8caf9cca438411db5f837d232b9390dc3899d974fec16f
size 6396358

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Fri May 28 09:52:23 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 0.8.7
* Feature optimizations: creating new mode decision /
encode-decode feature levels allowing better speed / quality
trade-off granularity.
* Preset repositioning after adopting new levels.
* Preset 8 achieving similar speed levels to that of x265
medium in the VOD (shot-based encoding) use-case while
maintaining quality gains.
* New 1-pass and 2-pass VBR implementation ported from libaom
and adapted to the SVT architecture.
- Drop 1568-backport.patch (no longer applies)
- Remove wrong Obsoletes/Provides
-------------------------------------------------------------------
Tue Nov 10 11:04:19 UTC 2020 - Andreas Schneider <asn@cryptomilk.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package SVT-AV1
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,24 +18,20 @@
%define sover 0
Name: SVT-AV1
Version: 0.8.5
Version: 0.8.7
Release: 0
Summary: An AV1 decoder/encoder for video streams
License: BSD-2-Clause-Patent
Group: Productivity/Multimedia/Other
URL: https://github.com/AOMediaCodec/SVT-AV1
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
URL: https://gitlab.com/AOMediaCodec/SVT-AV1
Source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v%{version}/SVT-AV1-v%{version}.tar.gz
Source9: %{name}-rpmlintrc
#
# https://github.com/AOMediaCodec/SVT-AV1/pull/1568
Patch0: 1568-backport.patch
#
BuildRequires: cmake
BuildRequires: help2man
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: help2man
BuildRequires: pkg-config
BuildRequires: yasm
ExclusiveArch: x86_64
%description
@ -48,8 +44,6 @@ is targeting future codec research activities.
%package -n libSvtAv1Dec%{sover}
Summary: An AV1 decoder/encoder for video streams
Group: System/Libraries
Obsoletes: libSvtAv1Dec-suse1 < %{version}
Provides: libSvtAv1Dec-suse1 = %{version}
%description -n libSvtAv1Dec%{sover}
The Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder) is an
@ -61,8 +55,6 @@ is targeting future codec research activities.
%package -n libSvtAv1Enc%{sover}
Summary: An AV1 decoder/encoder for video streams
Group: System/Libraries
Obsoletes: libSvtAv1Enc-suse1 < %{version}
Provides: libSvtAv1Enc-suse1 = %{version}
%description -n libSvtAv1Enc%{sover}
The Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder) is an
@ -83,11 +75,10 @@ An AV1 encoder for video streams from Intel.
This package contains the header files for svt-av1.
%prep
%autosetup -p1
%autosetup -p1 -n %{name}-v%{version}
%build
%cmake
%cmake_build
%install
@ -102,9 +93,10 @@ help2man -N --help-option=-help --version-string=%{version} %{buildroot}%{_bindi
LD_LIBRARY_PATH="%{buildroot}%{_libdir}" \
help2man -N --help-option=-help --version-string=%{version} --no-discard-stderr %{buildroot}%{_bindir}/SvtAv1EncApp > %{buildroot}%{_mandir}/man1/SvtAv1EncApp.1
%fdupes %{buildroot}/%{_prefix}
%post -n libSvtAv1Dec%{sover} -p /sbin/ldconfig
%postun -n libSvtAv1Dec%{sover} -p /sbin/ldconfig
%post -n libSvtAv1Enc%{sover} -p /sbin/ldconfig
%postun -n libSvtAv1Enc%{sover} -p /sbin/ldconfig