diff --git a/pkg.info b/pkg.info index 12d290f..78ec624 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: libheif description: HEIF and AVIF file format decoder and encoder version: 1.21.2 -revision: 3 +revision: 4 url: https://github.com/strukturag/libheif license: LGPL3-or-later maintainers: diff --git a/source-files/svt-av1-4.0-fix.patch b/source-files/svt-av1-4.0-fix.patch index 1b948d2..4041977 100644 --- a/source-files/svt-av1-4.0-fix.patch +++ b/source-files/svt-av1-4.0-fix.patch @@ -1,7 +1,7 @@ From 61923302d12f80e2a5c945a3903d1009cf67778f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sat, 24 Jan 2026 17:30:35 +0100 -Subject: [PATCH 1/2] Set SVT-AV1's avif option for v4.0.0 or later +Subject: [PATCH 1/3] Set SVT-AV1's avif option for v4.0.0 or later --- libheif/plugins/encoder_svt.cc | 7 ++++--- @@ -29,7 +29,7 @@ index 03d87ca1ae..7993e3959a 100644 From f9919e34868920000ddba13c55e1bf3731b1e64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sat, 24 Jan 2026 18:18:46 +0100 -Subject: [PATCH 2/2] Use PredStructure values from definitions.h instead of +Subject: [PATCH 2/3] Use PredStructure values from definitions.h instead of removed SvtAv1PredStructure for v4.0.0 or later --- @@ -79,3 +79,38 @@ index 7993e3959a..393748e997 100644 * svt_av1_enc_get_packet() hangs on the second call. As a workaround, we can leave the * loop when we got the image: */ + +From 9c9d839132f8846652ecadceaa8dcf23d1ff3e4c Mon Sep 17 00:00:00 2001 +From: Joachim Bauch +Date: Wed, 8 Apr 2026 10:23:34 +0200 +Subject: [PATCH 3/3] Add patch to fix building against SVT-AV1 4.1.0 + +--- + libheif/plugins/encoder_svt.cc | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/libheif/plugins/encoder_svt.cc b/libheif/plugins/encoder_svt.cc +index 393748e997..3e614908fe 100644 +--- a/libheif/plugins/encoder_svt.cc ++++ b/libheif/plugins/encoder_svt.cc +@@ -838,7 +838,19 @@ static heif_error svt_start_sequence_encoding_intern(void* encoder_raw, const he + // svt_config.force_key_frames = true; TODO: this does not seem to work (see all [1]) + + #if 1 +-#if SVT_AV1_CHECK_VERSION(4, 0, 0) ++#if SVT_AV1_CHECK_VERSION(4, 1, 0) ++ switch (options->gop_structure) { ++ case heif_sequence_gop_structure_intra_only: ++ //svt_config.pred_structure = 1; // LOW_DELAY ++ break; ++ case heif_sequence_gop_structure_lowdelay: ++ //svt_config.pred_structure = 1; // LOW_DELAY ++ break; ++ case heif_sequence_gop_structure_unrestricted: ++ svt_config.pred_structure = PredStructure::RANDOM_ACCESS; ++ break; ++ } ++#elif SVT_AV1_CHECK_VERSION(4, 0, 0) + switch (options->gop_structure) { + case heif_sequence_gop_structure_intra_only: + //svt_config.pred_structure = 1; // LOW_DELAY