Accepting request 753261 from home:darix:playground
This will allow us to add AVIF image support to darktable. OBS-URL: https://build.opensuse.org/request/show/753261 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libavif?expand=0&rev=1
This commit is contained in:
commit
8f4446d8f2
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
56
cbcf62c2200be83b85b48059c819ae708216ccec.patch
Normal file
56
cbcf62c2200be83b85b48059c819ae708216ccec.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From cbcf62c2200be83b85b48059c819ae708216ccec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
Date: Tue, 19 Nov 2019 16:35:03 +0100
|
||||||
|
Subject: [PATCH] codec: Support building with libaom 1.0.0
|
||||||
|
|
||||||
|
---
|
||||||
|
src/codec_aom.c | 10 +++++++++-
|
||||||
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/codec_aom.c b/src/codec_aom.c
|
||||||
|
index 090dbbd..b718551 100644
|
||||||
|
--- a/src/codec_aom.c
|
||||||
|
+++ b/src/codec_aom.c
|
||||||
|
@@ -126,7 +126,9 @@ static avifBool aomCodecGetNextImage(avifCodec * codec, avifImage * image)
|
||||||
|
break;
|
||||||
|
case AOM_IMG_FMT_YV12:
|
||||||
|
case AOM_IMG_FMT_AOMYV12:
|
||||||
|
+#ifdef AOM_IMG_FMT_YV1216
|
||||||
|
case AOM_IMG_FMT_YV1216:
|
||||||
|
+#endif
|
||||||
|
yuvFormat = AVIF_PIXEL_FORMAT_YV12;
|
||||||
|
break;
|
||||||
|
case AOM_IMG_FMT_NONE:
|
||||||
|
@@ -246,8 +248,11 @@ static avifBool aomCodecEncodeImage(avifCodec * codec, avifImage * image, avifEn
|
||||||
|
// Speed 8: RealTime CpuUsed 6
|
||||||
|
// Speed 9: RealTime CpuUsed 7
|
||||||
|
// Speed 10: RealTime CpuUsed 8
|
||||||
|
- unsigned int aomUsage = AOM_USAGE_GOOD_QUALITY;
|
||||||
|
+ unsigned int aomUsage = 0;
|
||||||
|
int aomCpuUsed = -1;
|
||||||
|
+
|
||||||
|
+#ifdef AOM_USAGE_GOOD_QUALITY
|
||||||
|
+ aomUsage = AOM_USAGE_GOOD_QUALITY;
|
||||||
|
if (encoder->speed != AVIF_SPEED_DEFAULT) {
|
||||||
|
if (encoder->speed < 8) {
|
||||||
|
aomUsage = AOM_USAGE_GOOD_QUALITY;
|
||||||
|
@@ -257,6 +262,7 @@ static avifBool aomCodecEncodeImage(avifCodec * codec, avifImage * image, avifEn
|
||||||
|
aomCpuUsed = AVIF_CLAMP(encoder->speed - 2, 6, 8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
int yShift = 0;
|
||||||
|
aom_img_fmt_t aomFormat = avifImageCalcAOMFmt(image, alpha, &yShift);
|
||||||
|
@@ -300,9 +306,11 @@ static avifBool aomCodecEncodeImage(avifCodec * codec, avifImage * image, avifEn
|
||||||
|
if (lossless) {
|
||||||
|
aom_codec_control(&aomEncoder, AV1E_SET_LOSSLESS, 1);
|
||||||
|
}
|
||||||
|
+#ifdef AOM_CTRL_AV1E_SET_ROW_MT
|
||||||
|
if (encoder->maxThreads > 1) {
|
||||||
|
aom_codec_control(&aomEncoder, AV1E_SET_ROW_MT, 1);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
if (encoder->tileRowsLog2 != 0) {
|
||||||
|
int tileRowsLog2 = AVIF_CLAMP(encoder->tileRowsLog2, 0, 6);
|
||||||
|
aom_codec_control(&aomEncoder, AV1E_SET_TILE_ROWS, tileRowsLog2);
|
3
libavif-0.5.2.tar.gz
Normal file
3
libavif-0.5.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:72262fc8e44031f2327a667532284c973abad8d05fcb1fab752c838be3e0f1c3
|
||||||
|
size 64745
|
30
libavif.changes
Normal file
30
libavif.changes
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 24 16:33:34 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- update to 0.5.2
|
||||||
|
https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.2
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 22 07:10:11 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- update to 0.5.1
|
||||||
|
https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.1
|
||||||
|
https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.0
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 20 14:00:20 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- support building with libaom 1.0.0
|
||||||
|
https://github.com/cryptomilk/libavif/commit/cbcf62c2200be83b85b48059c819ae708216ccec.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 20 13:51:36 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- update to 0.4.8
|
||||||
|
https://github.com/AOMediaCodec/libavif/releases/tag/v0.4.8
|
||||||
|
- drop libs.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 18 23:42:37 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- initial package
|
119
libavif.spec
Normal file
119
libavif.spec
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
#
|
||||||
|
# spec file for package libavif
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# 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 http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
%bcond_with aom
|
||||||
|
|
||||||
|
%define lib_name libavif0
|
||||||
|
|
||||||
|
Name: libavif
|
||||||
|
Version: 0.5.2
|
||||||
|
Release: 0
|
||||||
|
Summary: Library for encoding and decoding .avif files
|
||||||
|
License: BSD-2-Clause
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Url: https://github.com/AOMediaCodec/libavif
|
||||||
|
Source: %{name}-%{version}.tar.gz
|
||||||
|
Source99: series
|
||||||
|
Patch: https://github.com/cryptomilk/libavif/commit/cbcf62c2200be83b85b48059c819ae708216ccec.patch
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: nasm
|
||||||
|
BuildRequires: pkgconfig(dav1d)
|
||||||
|
%if %{with aom}
|
||||||
|
BuildRequires: pkgconfig(aom)
|
||||||
|
%endif
|
||||||
|
BuildRequires: pkgconfig(rav1e)
|
||||||
|
%description
|
||||||
|
This library aims to be a friendly, portable C implementation of the AV1 Image
|
||||||
|
File Format, as described here:
|
||||||
|
|
||||||
|
https://aomediacodec.github.io/av1-avif/
|
||||||
|
|
||||||
|
%package tools
|
||||||
|
Group: Productivity/Graphics/Convertors
|
||||||
|
#
|
||||||
|
Summary: Tools for libavif
|
||||||
|
%description tools
|
||||||
|
This library aims to be a friendly, portable C implementation of the AV1 Image
|
||||||
|
File Format, as described here:
|
||||||
|
|
||||||
|
https://aomediacodec.github.io/av1-avif/
|
||||||
|
|
||||||
|
This package holds the commandline tools for libavif.
|
||||||
|
|
||||||
|
%package -n %{lib_name}
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
#
|
||||||
|
Summary: Shared library from libavif
|
||||||
|
%description -n %{lib_name}
|
||||||
|
This library aims to be a friendly, portable C implementation of the AV1 Image
|
||||||
|
File Format, as described here:
|
||||||
|
|
||||||
|
https://aomediacodec.github.io/av1-avif/
|
||||||
|
|
||||||
|
This package holds the shared library for libavif.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{lib_name} = %{version}-%{release}
|
||||||
|
#
|
||||||
|
Summary: Development files for libavif
|
||||||
|
%description devel
|
||||||
|
This library aims to be a friendly, portable C implementation of the AV1 Image
|
||||||
|
File Format, as described here:
|
||||||
|
|
||||||
|
https://aomediacodec.github.io/av1-avif/
|
||||||
|
|
||||||
|
This package holds the development files for libavif.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake \
|
||||||
|
-DAVIF_CODEC_RAV1E:BOOL=ON \
|
||||||
|
-DAVIF_CODEC_DAV1D:BOOL=ON \
|
||||||
|
%if %{with aom}
|
||||||
|
-DAVIF_CODEC_AOM:BOOL=ON \
|
||||||
|
%endif
|
||||||
|
-DAVIF_BUILD_APPS:BOOL=ON \
|
||||||
|
-DAVIF_BUILD_EXAMPLES:BOOL=ON
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cmake_install
|
||||||
|
|
||||||
|
%post -n %{lib_name} -p /sbin/ldconfig
|
||||||
|
%postun -n %{lib_name} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files tools
|
||||||
|
%doc *.md
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/avifdec
|
||||||
|
%{_bindir}/avifenc
|
||||||
|
|
||||||
|
%files -n %{lib_name}
|
||||||
|
%license LICENSE
|
||||||
|
%{_libdir}/libavif.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%license LICENSE
|
||||||
|
%{_libdir}/libavif.so
|
||||||
|
%{_includedir}/avif/
|
||||||
|
%{_libdir}/cmake/libavif/
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user