commit 6b88bd954f0618f3cee4a11766e6655322e5188d Author: Adrian Schröter Date: Mon Oct 14 15:14:36 2024 +0200 Sync from SUSE:ALP:Source:Standard:1.0 libyuv revision 9a03bb04e5c53d25ca303366c4885540 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/Disable-static-library.patch b/Disable-static-library.patch new file mode 100644 index 0000000..3b45be7 --- /dev/null +++ b/Disable-static-library.patch @@ -0,0 +1,39 @@ +From: Peter Lemenkov +Date: Mon, 24 Sep 2018 15:08:45 +0200 +Subject: [PATCH] Disable static library + +Signed-off-by: Peter Lemenkov + +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 ) + diff --git a/Don-t-install-conversion-tool.patch b/Don-t-install-conversion-tool.patch new file mode 100644 index 0000000..2600db0 --- /dev/null +++ b/Don-t-install-conversion-tool.patch @@ -0,0 +1,38 @@ +From: Peter Lemenkov +Date: Mon, 24 Sep 2018 15:10:16 +0200 +Subject: [PATCH] Don't install conversion tool + +Signed-off-by: Peter Lemenkov + +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 diff --git a/Link-against-shared-library.patch b/Link-against-shared-library.patch new file mode 100644 index 0000000..e4f8f6a --- /dev/null +++ b/Link-against-shared-library.patch @@ -0,0 +1,28 @@ +From: Peter Lemenkov +Date: Fri, 21 Sep 2018 12:47:42 +0200 +Subject: [PATCH] Link against shared library + +Signed-off-by: Peter Lemenkov + +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) diff --git a/Link-main-library-against-libjpeg.patch b/Link-main-library-against-libjpeg.patch new file mode 100644 index 0000000..7bb05ed --- /dev/null +++ b/Link-main-library-against-libjpeg.patch @@ -0,0 +1,18 @@ +From: Peter Lemenkov +Date: Wed, 17 Apr 2019 12:39:42 +0300 +Subject: [PATCH] Link main library against libjpeg + +Signed-off-by: Peter Lemenkov + +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() + diff --git a/Use-a-proper-so-version.patch b/Use-a-proper-so-version.patch new file mode 100644 index 0000000..0146227 --- /dev/null +++ b/Use-a-proper-so-version.patch @@ -0,0 +1,20 @@ +From: Peter Lemenkov +Date: Fri, 21 Sep 2018 12:45:55 +0200 +Subject: [PATCH] Use a proper so-version + +Signed-off-by: Peter Lemenkov + +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} ) diff --git a/Use-library-suffix-during-installation.patch b/Use-library-suffix-during-installation.patch new file mode 100644 index 0000000..acb4a6f --- /dev/null +++ b/Use-library-suffix-during-installation.patch @@ -0,0 +1,19 @@ +From: Peter Lemenkov +Date: Mon, 24 Sep 2018 15:15:09 +0200 +Subject: [PATCH] Use library suffix during installation + +Signed-off-by: Peter Lemenkov + +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 diff --git a/_service b/_service new file mode 100644 index 0000000..53fa377 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + git + https://chromium.googlesource.com/libyuv/libyuv.git + f9fda6e7d819c07a684ba6bc97cbf0e257bbcb37 + %cd+%h + enable + + + + xz + *.tar + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..5e56cce --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://chromium.googlesource.com/libyuv/libyuv.git + f9fda6e7d819c07a684ba6bc97cbf0e257bbcb37 \ No newline at end of file diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..40f407e --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libyuv0 diff --git a/libyuv-20220920+f9fda6e.obscpio b/libyuv-20220920+f9fda6e.obscpio new file mode 100644 index 0000000..4e507af --- /dev/null +++ b/libyuv-20220920+f9fda6e.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad6c8c237cc55401724e44de2464fcee7bf2c69bf04a1e76a22ad095c4f0c670 +size 5390861 diff --git a/libyuv.changes b/libyuv.changes new file mode 100644 index 0000000..72004d4 --- /dev/null +++ b/libyuv.changes @@ -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 + +- Use YUV_VERSION for library VERSION and YUV_VER_MAJOR for + SOVERSION + +------------------------------------------------------------------- +Sun Sep 25 12:22:58 UTC 2022 - Callum Farmer + +- Fix quoting in pkgconfig file + +------------------------------------------------------------------- +Wed Aug 3 11:30:20 UTC 2022 - Callum Farmer + +- Add baselibs.conf for libyuv0 + +------------------------------------------------------------------- +Fri Jul 29 16:35:26 UTC 2022 - Callum Farmer + +- 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 + diff --git a/libyuv.obsinfo b/libyuv.obsinfo new file mode 100644 index 0000000..d105700 --- /dev/null +++ b/libyuv.obsinfo @@ -0,0 +1,4 @@ +name: libyuv +version: 20220920+f9fda6e +mtime: 1663715273 +commit: f9fda6e7d819c07a684ba6bc97cbf0e257bbcb37 diff --git a/libyuv.spec b/libyuv.spec new file mode 100644 index 0000000..f578a5c --- /dev/null +++ b/libyuv.spec @@ -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