Sync from SUSE:SLFO:Main libyuv revision 9a03bb04e5c53d25ca303366c4885540

This commit is contained in:
Adrian Schröter 2024-05-03 16:14:09 +02:00
commit 43da1d4472
14 changed files with 374 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,39 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Mon, 24 Sep 2018 15:08:45 +0200
Subject: [PATCH] Disable static library
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bff03e88..1832ad42 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,6 @@ SET ( ly_src_dir ${ly_base_dir}/source )
SET ( ly_inc_dir ${ly_base_dir}/include )
SET ( ly_tst_dir ${ly_base_dir}/unit_test )
SET ( ly_lib_name yuv )
-SET ( ly_lib_static ${ly_lib_name} )
SET ( ly_lib_shared ${ly_lib_name}_shared )
FILE ( GLOB_RECURSE ly_source_files ${ly_src_dir}/*.cc )
@@ -22,9 +21,6 @@ LIST ( SORT ly_unittest_sources )
ADD_DEFINITIONS ( -D_CRT_SECURE_NO_WARNINGS )
endif()
-# this creates the static library (.a)
-ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} )
-
# this creates the shared library (.so)
ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} )
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" )
@@ -82,9 +78,8 @@ if(TEST)
endif()
-# install the conversion tool, .so, .a, and all the header files
+# install the conversion tool, .so, and all the header files
INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )
-INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib )
INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin )
INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include )

View File

@ -0,0 +1,38 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Mon, 24 Sep 2018 15:10:16 +0200
Subject: [PATCH] Don't install conversion tool
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1832ad42..854aea7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,15 +28,9 @@ SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" )
INCLUDE ( CM_linux_packages.cmake )
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES VERSION ${YUV_VERSION} SOVERSION ${YUV_VER_MAJOR} )
-# this creates the conversion tool
-ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
-TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_shared} )
-
-
INCLUDE ( FindJPEG )
if (JPEG_FOUND)
include_directories( ${JPEG_INCLUDE_DIR} )
- target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
add_definitions( -DHAVE_JPEG )
endif()
@@ -78,9 +72,8 @@ if(TEST)
endif()
-# install the conversion tool, .so, and all the header files
-INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )
-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin )
+# install .so, and all the header files
+INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib )
INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include )
# create the .deb and .rpm packages using cpack

View File

@ -0,0 +1,28 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 21 Sep 2018 12:47:42 +0200
Subject: [PATCH] Link against shared library
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1f87062..bff03e88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,7 @@ SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES VERSION "0.0.0" SOVERSION 0
# this creates the conversion tool
ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
-TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
+TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_shared} )
INCLUDE ( FindJPEG )
@@ -61,7 +61,7 @@ if(TEST)
endif()
add_executable(libyuv_unittest ${ly_unittest_sources})
- target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY})
+ target_link_libraries(libyuv_unittest ${ly_lib_shared} ${GTEST_LIBRARY})
find_library(PTHREAD_LIBRARY pthread)
if(NOT PTHREAD_LIBRARY STREQUAL "PTHREAD_LIBRARY-NOTFOUND")
target_link_libraries(libyuv_unittest pthread)

View File

@ -0,0 +1,18 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Wed, 17 Apr 2019 12:39:42 +0300
Subject: [PATCH] Link main library against libjpeg
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb12ab4f..856cc975 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,7 @@ SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES VERSION "0.0.0" SOVERSION 0
INCLUDE ( FindJPEG )
if (JPEG_FOUND)
include_directories( ${JPEG_INCLUDE_DIR} )
+ target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} )
add_definitions( -DHAVE_JPEG )
endif()

View File

@ -0,0 +1,20 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 21 Sep 2018 12:45:55 +0200
Subject: [PATCH] Use a proper so-version
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed4948f0..e1f87062 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,9 @@
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" )
endif()
+INCLUDE ( CM_linux_packages.cmake )
+SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES VERSION ${YUV_VERSION} SOVERSION ${YUV_VER_MAJOR} )
+
# this creates the conversion tool
ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )

View File

@ -0,0 +1,19 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Mon, 24 Sep 2018 15:15:09 +0200
Subject: [PATCH] Use library suffix during installation
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 854aea7f..eb12ab4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,7 @@ endif()
# install .so, and all the header files
-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib )
+INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib${LIB_SUFFIX} )
INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include )
# create the .deb and .rpm packages using cpack

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://chromium.googlesource.com/libyuv/libyuv.git</param>
<param name="revision">f9fda6e7d819c07a684ba6bc97cbf0e257bbcb37</param>
<param name="versionformat">%cd+%h</param>
<param name="changesgenerate">enable</param>
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="manual"/>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://chromium.googlesource.com/libyuv/libyuv.git</param>
<param name="changesrevision">f9fda6e7d819c07a684ba6bc97cbf0e257bbcb37</param></service></servicedata>

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libyuv0

BIN
libyuv-20220920+f9fda6e.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

60
libyuv.changes Normal file
View File

@ -0,0 +1,60 @@
-------------------------------------------------------------------
Thu Oct 27 14:35:19 UTC 2022 - gmbr3@opensuse.org
- Update to version 20220920+f9fda6e:
* Fix shift amount for SSSE3 assembly for I012 format conversions
* 10/12 bit YUV replicate upper bits to low bits before converting to RGB
* Fix immediate offsets for row_neon build on gcc
-------------------------------------------------------------------
Thu Oct 20 11:29:30 UTC 2022 - gmbr3@opensuse.org
- Update to version 20220920+248172e:
* I422ToRGB24, I422ToRAW, I422ToRGB24MatrixFilter conversion functions added.
* Remove include resource.h for Fuchsia build
* I420ToRGB24MatrixFilter function added
* SSE2 MM21->YUY2 conversion
* MM21ToYUY2 and ABGRToJ420 conversion
* AB64ToARGB fix for inplace conversion
* Bump up version to 1838
* Add I422ToRGB565Matrix
* RAWToJ400 require multiple of 16 pixels for NEON
* row_neon*: Explicitly initialize pad in RgbConstants
* Fix MSVC warnings by adding casts
* Define _CRT_SECURE_NO_WARNINGS if MSVC CRT is used
* Reduce cmake verbosity and update min version
* Set IMPORT_PREFIX to "lib" on Windows
* Android.bp: Remove reference to LICENSE_THIRD_PARTY
* Fix SSE2 version of ScalePlaneUp2_16_Bilinear
* Disable bilinear 16 bit scale up for SSE2
* Add .vpython3 to libyuv.
* Switch from python to python3.
-------------------------------------------------------------------
Sat Oct 1 13:03:58 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Use YUV_VERSION for library VERSION and YUV_VER_MAJOR for
SOVERSION
-------------------------------------------------------------------
Sun Sep 25 12:22:58 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Fix quoting in pkgconfig file
-------------------------------------------------------------------
Wed Aug 3 11:30:20 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Add baselibs.conf for libyuv0
-------------------------------------------------------------------
Fri Jul 29 16:35:26 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Initial packaging version 20220713+d248929c
- Add required patches:
* Use-a-proper-so-version.patch
* Link-against-shared-library.patch
* Disable-static-library.patch
* Don-t-install-conversion-tool.patch
* Use-library-suffix-during-installation.patch
* Link-main-library-against-libjpeg.patch

4
libyuv.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: libyuv
version: 20220920+f9fda6e
mtime: 1663715273
commit: f9fda6e7d819c07a684ba6bc97cbf0e257bbcb37

102
libyuv.spec Normal file
View File

@ -0,0 +1,102 @@
#
# spec file for package libyuv
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: libyuv
Version: 20220920+f9fda6e
Release: 0
Summary: YUV scaling and conversion library
License: BSD-3-Clause
Group: Productivity/Multimedia/Other
URL: https://chromium.googlesource.com/libyuv/libyuv/
Source0: %{name}-%{version}.tar.xz
Source99: baselibs.conf
# from Fedora
Patch0: Use-a-proper-so-version.patch
Patch1: Link-against-shared-library.patch
Patch2: Disable-static-library.patch
Patch3: Don-t-install-conversion-tool.patch
Patch4: Use-library-suffix-during-installation.patch
Patch5: Link-main-library-against-libjpeg.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libjpeg)
%description
libyuv is an open source project that includes YUV scaling and conversion functionality.
- Scale YUV to prepare content for compression, with point, bilinear or box filter.
- Convert to YUV from webcam formats for compression.
- Convert to RGB formats for rendering/effects.
- Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.
- Optimized for SSSE3/AVX2 on x86/x64.
- Optimized for Neon on Arm.
- Optimized for MSA on Mips.
%package -n libyuv0
Summary: YUV scaling and conversion library
Group: System/Libraries
%description -n libyuv0
libyuv is an open source project that includes YUV scaling and conversion functionality.
%package devel
Summary: Development files for the YUV scaling and conversion library
Group: Development/Libraries/C and C++
Requires: libyuv0 = %{version}
%description devel
This package contains the development files
for the YUV scaling and conversion library
%prep
%autosetup -p1
%build
rversion=`grep --perl-regex --only-matching "(?<=LIBYUV_VERSION )[0-9]+" include/libyuv/version.h`
cat > %{name}.pc << EOF
prefix=%{_prefix}
exec_prefix=\${prefix}
includedir=%{_includedir}
libdir=%{_libdir}
Name: %{name}
Description: %{summary}
Version: ${rversion}
Libs: -lyuv
EOF
%cmake
%cmake_build
%install
%cmake_install
install -Dm0644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
%ldconfig_scriptlets -n libyuv0
%files -n libyuv0
%{_libdir}/libyuv.so.*
%files devel
%license LICENSE
%{_libdir}/libyuv.so
%{_includedir}/%{name}
%{_includedir}/%{name}.h
%{_libdir}/pkgconfig/%{name}.pc
%changelog