legacy package [release 0.11.1-2mamba;Sat Sep 09 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 03:50:31 +01:00
parent 59aa81839c
commit fce5d6788f
3 changed files with 204 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# libavif15 # libavif15
Library for encoding and decoding .avif files .

View File

@ -0,0 +1,77 @@
From 74a21444397e323a088fa1f274c9fc942ee7a870 Mon Sep 17 00:00:00 2001
From: Jamaika1 <lukaszcz18@wp.pl>
Date: Wed, 26 Jan 2022 18:24:31 +0100
Subject: [PATCH] Change function in SVT-AV1 0.9.0 (#807)
---
CHANGELOG.md | 1 +
ext/svt.cmd | 2 +-
ext/svt.sh | 2 +-
src/codec_svt.c | 6 ++++++
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b3416169..583d3092 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* - speed 8-9: re-test and re-adjust speed according to your app needs
* Update aom.cmd: v3.2.0
* Update dav1d.cmd: 0.9.2
+* Update svt-av1.cmd: v0.9.0
* Pass TestCase's minQuantizer, maxQuantizer, speed to encoder.
* Regenerate tests.json
* Disable JSON-based tests for now, the metrics are inconsistent/unreliable
diff --git a/ext/svt.cmd b/ext/svt.cmd
index e97de2be..03485b83 100755
--- a/ext/svt.cmd
+++ b/ext/svt.cmd
@@ -11,7 +11,7 @@
: # If you're running this on Windows, be sure you've already run this (from your VC2019 install dir):
: # "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
-git clone -b v0.8.7 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git
+git clone -b v0.9.0 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git
cd SVT-AV1
cd Build/windows
diff --git a/ext/svt.sh b/ext/svt.sh
index 049bed80..8e3b0f9b 100644
--- a/ext/svt.sh
+++ b/ext/svt.sh
@@ -2,7 +2,7 @@
# then enable CMake's AVIF_CODEC_SVT and AVIF_LOCAL_SVT options.
# cmake and ninja must be in your PATH.
-git clone -b v0.8.7 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git
+git clone -b v0.9.0 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git
cd SVT-AV1
cd Build/linux
diff --git a/src/codec_svt.c b/src/codec_svt.c
index dfd085a7..3c84defc 100644
--- a/src/codec_svt.c
+++ b/src/codec_svt.c
@@ -92,7 +92,9 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
}
svt_config->encoder_color_format = color_format;
svt_config->encoder_bit_depth = (uint8_t)image->depth;
+#if !SVT_AV1_CHECK_VERSION(0, 9, 0)
svt_config->is_16bit_pipeline = image->depth > 8;
+#endif
// Follow comment in svt header: set if input is HDR10 BT2020 using SMPTE ST2084.
svt_config->high_dynamic_range_input = (image->depth == 10 && image->colorPrimaries == AVIF_COLOR_PRIMARIES_BT2020 &&
@@ -104,8 +106,12 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
svt_config->logical_processors = encoder->maxThreads;
svt_config->enable_adaptive_quantization = AVIF_FALSE;
// disable 2-pass
+#if SVT_AV1_CHECK_VERSION(0, 9, 0)
+ svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 };
+#else
svt_config->rc_firstpass_stats_out = AVIF_FALSE;
svt_config->rc_twopass_stats_in = (SvtAv1FixedBuf) { NULL, 0 };
+#endif
if (alpha) {
svt_config->min_qp_allowed = AVIF_CLAMP(encoder->minQuantizerAlpha, 0, 63);

125
libavif15.spec Normal file
View File

@ -0,0 +1,125 @@
Name: libavif15
Version: 0.11.1
Release: 2mamba
Summary: Library for encoding and decoding .avif files
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/AOMediaCodec/libavif/
Source: https://github.com/AOMediaCodec/libavif.git/v%{version}/libavif-%{version}.tar.bz2
Patch0: libavif-0.9.3-libsvt-av1-0.9.1.patch
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libaom-devel
BuildRequires: libdav1d-devel
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libglib-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libsvt-av1-devel
%ifnarch aarch64
BuildRequires: libyuv-devel
%endif
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
%ifnarch %ix86
BuildRequires: libsvt-av1-devel >= 1.0.0
%endif
%description
Library for encoding and decoding .avif files .
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: pkg-config
%description devel
This package contains libraries and header files for developing applications that use %{name}.
%package tools
Group: Applications/Graphics
Summary: Utility applications for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description tools
This package contains utility applications for %{name}.
%debug_package
%prep
%setup -q -n libavif-%{version}
#%patch0 -p1 -b .libsvt-av1-0.9.1
%build
%cmake -d build \
\
-DAVIF_CODEC_SVT=ON \
-DAVIF_CODEC_AOM=ON \
-DAVIF_CODEC_DAV1D=ON \
-DAVIF_BUILD_APPS=OFF \
-DAVIF_BUILD_GDK_PIXBUF=OFF
# TODO:
# -DAVIF_CODEC_RAV1E=ON \
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libavif.so.*
%doc LICENSE
%files devel
%defattr(-,root,root)
%dir %{_includedir}/avif
%{_includedir}/avif/avif.h
%dir %{_libdir}/cmake/libavif
%{_libdir}/libavif.so
%{_libdir}/cmake/libavif/libavif-config*.cmake
%{_libdir}/pkgconfig/libavif.pc
%doc README.md
#%files tools
#%defattr(-,root,root)
#%{_bindir}/avifdec
#%{_bindir}/avifenc
%changelog
* Sat Sep 09 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 0.11.1-2mamba
- legacy package
* Fri Oct 21 2022 Automatic Build System <autodist@mambasoft.it> 0.11.1-1mamba
- automatic version update by autodist
* Sun Oct 16 2022 Automatic Build System <autodist@mambasoft.it> 0.11.0-1mamba
- automatic version update by autodist
* Wed May 04 2022 Automatic Build System <autodist@mambasoft.it> 0.10.1-1mamba
- automatic version update by autodist
* Sat Apr 30 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3-4mamba
- rebuilt with libsvt-av1 1.0.0
* Thu Mar 24 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3-3mamba
- rebuilt with libdav1d and libaom
* Thu Mar 24 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3-2mamba
- rebuilt with libyuv, libsvt-av1 and tools
* Thu Mar 24 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3-1mamba
- package created using the webbuild interface