#2 Update to version 0.8.5
Merged 3 years ago by eclipseo. Opened 3 years ago by asn.
rpms/ asn/svt-av1 master  into  master

file added
+190
@@ -0,0 +1,190 @@ 

+ 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/

file modified
+19 -25
@@ -6,7 +6,7 @@ 

  

  Name:           svt-av1

  Version:        0.8.5

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Scalable Video Technology for AV1 Encoder

  

  # Main library: BSD-2-Clause-Patent
@@ -17,9 +17,12 @@ 

  # Source/Lib/Common/ASM_SSE2/x86inc.asm: ISC

  # Source/App/DecApp/EbMD5Utility.*: PublicDomain

  License:        BSD-2-Clause-Patent and BSD and MIT and ISC and Public Domain

- URL:            https://github.com/OpenVisualCloud/SVT-AV1

+ URL:            https://github.com/AOMediaCodec

  Source0:        %url/archive/v%{version}/%{name}-%{version}.tar.gz

- 

+ #

+ # https://github.com/AOMediaCodec/SVT-AV1/pull/1568

+ Patch0:         1568-backport.patch

+ #

  # 64Bits, 5th Generation Intel® Core™ processor only

  ExclusiveArch:  x86_64

  
@@ -65,40 +68,28 @@ 

  -e "/svtav1enc_dep =/d" -e 's|, svtav1enc_dep||' -e "s|svtav1enc_dep.found()|true|" -i gstreamer-plugin/meson.build

  

  %build

- # https://github.com/OpenVisualCloud/SVT-AV1/issues/999

- # Use -fcommon until all the global variables are fixed upstream

- export CFLAGS="%build_cflags -fcommon"

- export CXXFLAGS="%build_cxxflags -fcommon"

- %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \

-        -DCMAKE_INSTALL_PREFIX=%{_prefix} \

-        -DCMAKE_INSTALL_LIBDIR=%{_lib} \

-        -DCMAKE_ASM_NASM_COMPILER=yasm \

-        -DCMAKE_SKIP_INSTALL_RPATH=ON \

-        -DBUILD_SHARED_LIBS=ON \

-        -DBUILD_TESTING=OFF \

-        -DNATIVE=OFF \

-        ..

+ %cmake \

+     -DCMAKE_BUILD_TYPE=RelWithDebInfo

  %cmake_build

  

- cd gstreamer-plugin

- export LIBRARY_PATH="$PWD/../Bin/RelWithDebInfo:$LIBRARY_PATH"

+ export LIBRARY_PATH="$LIBRARY_PATH:$(pwd)/Bin/RelWithDebInfo"

+ pushd gstreamer-plugin

  %meson

  %meson_build

+ popd

  

  %install

  %cmake_install

  rm -f %{buildroot}%{_libdir}/*.{a,la}

  

- pushd %{_vpath_builddir}

- mkdir -p %{buildroot}/%{_mandir}/man1

- export PATH=$PATH:%{buildroot}%{_bindir}

+ install -d -m0755 %{buildroot}/%{_mandir}/man1

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}

- help2man -N --help-option=-help --version-string=%{version} SvtAv1DecApp > %{buildroot}%{_mandir}/man1/SvtAv1DecApp.1

- help2man -N --help-option=-help --no-discard-stderr --version-string=%{version} SvtAv1EncApp > %{buildroot}%{_mandir}/man1/SvtAv1EncApp.1

- popd

+ help2man -N --help-option=-help --version-string=%{version} %{buildroot}%{_bindir}/SvtAv1DecApp > %{buildroot}%{_mandir}/man1/SvtAv1DecApp.1

+ help2man -N --help-option=-help --no-discard-stderr --version-string=%{version} %{buildroot}%{_bindir}/SvtAv1EncApp > %{buildroot}%{_mandir}/man1/SvtAv1EncApp.1

  

- cd gstreamer-plugin

+ pushd gstreamer-plugin

  %meson_install

+ popd

  

  %files

  %{_bindir}/SvtAv1DecApp
@@ -123,6 +114,9 @@ 

  %{_libdir}/gstreamer-1.0/libgstsvtav1enc.so

  

  %changelog

+ * Tue Nov 10 2020 Andreas Schneider <asn@redhat.com> - 0.8.5-2

+ - Add patch to fix building on modern Linux system

+ 

  * Tue Nov 10 11:38:19 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.8.5-1

  - Update to 0.8.5

  - Close: rhbz#1876641

This updates to the latest version and cleans up the spec file.

We crossed stream, I was doing my update, I'll try to rebase

rebased onto 1bd0720

3 years ago

Pull-Request has been merged by eclipseo

3 years ago