Skip to content

Commit f36b34a

Browse files
committed
addpkg(main/libavif): 1.3.0
- A user has requested `libavif` enablement in `python-pillow`. - Other existing packages can also be built with `libavif`.
1 parent 578804d commit f36b34a

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

packages/libavif/build.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
TERMUX_PKG_HOMEPAGE=https://github.com/AOMediaCodec/libavif
2+
TERMUX_PKG_DESCRIPTION="Library for encoding and decoding .avif files"
3+
TERMUX_PKG_LICENSE="custom"
4+
TERMUX_PKG_LICENSE_FILE="LICENSE"
5+
TERMUX_PKG_MAINTAINER="@termux"
6+
TERMUX_PKG_VERSION="1.3.0"
7+
TERMUX_PKG_SRCURL="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz"
8+
TERMUX_PKG_SHA256=0a545e953cc049bf5bcf4ee467306a2f113a75110edf59e61248873101cd26c1
9+
TERMUX_PKG_AUTO_UPDATE=true
10+
TERMUX_PKG_DEPENDS="libaom, libc++, libdav1d, libjpeg-turbo, libpng, libwebp, librav1e, svt-av1"
11+
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
12+
-DAVIF_BUILD_APPS=ON
13+
-DAVIF_BUILD_MAN_PAGES=ON
14+
-DAVIF_BUILD_GDK_PIXBUF=ON
15+
-DAVIF_CODEC_AOM=SYSTEM
16+
-DAVIF_CODEC_DAV1D=SYSTEM
17+
-DAVIF_CODEC_RAV1E=SYSTEM
18+
-DAVIF_CODEC_SVT=SYSTEM
19+
-DAVIF_LIBYUV=LOCAL
20+
"

packages/libavif/svt-av1-4.0.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 34a14decb6732c8abf01e6135a9a1dd55b58e33a Mon Sep 17 00:00:00 2001
2+
From: Brad Smith <brad@comstyle.com>
3+
Date: Sat, 24 Jan 2026 22:05:01 -0500
4+
Subject: [PATCH] fix(svt): Fix building with SVT-AV1 4.0
5+
6+
---
7+
src/codec_svt.c | 4 ++++
8+
1 file changed, 4 insertions(+)
9+
10+
diff --git a/src/codec_svt.c b/src/codec_svt.c
11+
index 3c7751333a..e81b30cf3c 100644
12+
--- a/src/codec_svt.c
13+
+++ b/src/codec_svt.c
14+
@@ -170,7 +170,11 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
15+
#else
16+
svt_config->logical_processors = encoder->maxThreads;
17+
#endif
18+
+#if SVT_AV1_CHECK_VERSION(4, 0, 0)
19+
+ svt_config->aq_mode = 2;
20+
+#else
21+
svt_config->enable_adaptive_quantization = 2;
22+
+#endif
23+
// disable 2-pass
24+
#if SVT_AV1_CHECK_VERSION(0, 9, 0)
25+
svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 };

0 commit comments

Comments
 (0)