public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Troy Dawson <tdawson@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libavif] epel9-next: Merge branch 'epel10' into epel9-next
Date: Mon, 20 Jul 2026 16:38:03 GMT	[thread overview]
Message-ID: <178456548327.1.9605323097293619834.rpms-libavif-7891c2c82003@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/libavif
Branch : epel9-next
Commit : 7891c2c82003ea98b7df91d5cb71fdf220216e6e
Author : Troy Dawson <tdawson@redhat.com>
Date   : 2026-07-14T14:46:31-07:00
Stats  : +135/-35 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/libavif/c/7891c2c82003ea98b7df91d5cb71fdf220216e6e?branch=epel9-next

Log:
Merge branch 'epel10' into epel9-next

---
diff --git a/.gitignore b/.gitignore
index bc59470..51eaeea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,3 @@
-/libavif-0.5.7.tar.gz
-/libavif-0.7.1.tar.gz
-/libavif-0.7.2.tar.gz
-/libavif-0.7.3.tar.gz
-/libavif-0.8.0.tar.gz
-/libavif-0.8.1.tar.gz
-/libavif-0.8.2.tar.gz
-/libavif-0.8.4.tar.gz
-/libavif-0.9.0.tar.gz
-/libavif-0.9.1.tar.gz
-/libavif-0.9.2.tar.gz
-/libavif-0.9.3.tar.gz
-/libavif-0.10.1.tar.gz
-/libavif-0.11.1.tar.gz
+/libavif-*.tar.gz
+/results_*
+/*.rpm

diff --git a/b10d2697e9ed2fb09cb722335ff4342c353612b8.patch b/b10d2697e9ed2fb09cb722335ff4342c353612b8.patch
new file mode 100644
index 0000000..eda87e2
--- /dev/null
+++ b/b10d2697e9ed2fb09cb722335ff4342c353612b8.patch
@@ -0,0 +1,88 @@
+From b10d2697e9ed2fb09cb722335ff4342c353612b8 Mon Sep 17 00:00:00 2001
+From: Yannis Guyon <yguyon@google.com>
+Date: Mon, 12 Feb 2024 10:29:02 +0000
+Subject: [PATCH] Encode alpha as 4:2:0 with SVT (#2004)
+
+---
+ src/codec_svt.c | 32 ++++++++++++++++++++++++++++++--
+ 1 file changed, 30 insertions(+), 2 deletions(-)
+
+diff --git a/src/codec_svt.c b/src/codec_svt.c
+index 58a92cdce..ea9efc2b5 100644
+--- a/src/codec_svt.c
++++ b/src/codec_svt.c
+@@ -7,6 +7,7 @@
+ 
+ #include "svt-av1/EbSvtAv1Enc.h"
+ 
++#include <stdint.h>
+ #include <string.h>
+ 
+ // The SVT_AV1_VERSION_MAJOR, SVT_AV1_VERSION_MINOR, SVT_AV1_VERSION_PATCHLEVEL, and
+@@ -76,6 +77,7 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
+ 
+     avifResult result = AVIF_RESULT_UNKNOWN_ERROR;
+     EbColorFormat color_format = EB_YUV420;
++    uint8_t * uvPlanes = NULL; // 4:2:0 U and V placeholder for alpha because SVT-AV1 does not support 4:0:0.
+     EbBufferHeaderType * input_buffer = NULL;
+     EbErrorType res = EB_ErrorNone;
+ 
+@@ -98,6 +100,7 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
+                 y_shift = 1;
+                 break;
+             case AVIF_PIXEL_FORMAT_YUV400:
++                // Setting color_format = EB_YUV400; results in "Svt[error]: Instance 1: Only support 420 now".
+             case AVIF_PIXEL_FORMAT_NONE:
+             case AVIF_PIXEL_FORMAT_COUNT:
+             default:
+@@ -198,16 +201,38 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
+     }
+     EbSvtIOFormat * input_picture_buffer = (EbSvtIOFormat *)input_buffer->p_buffer;
+ 
+-    int bytesPerPixel = image->depth > 8 ? 2 : 1;
++    const uint32_t bytesPerPixel = image->depth > 8 ? 2 : 1;
++    const uint32_t uvHeight = (image->height + y_shift) >> y_shift;
+     if (alpha) {
+         input_picture_buffer->y_stride = image->alphaRowBytes / bytesPerPixel;
+         input_picture_buffer->luma = image->alphaPlane;
+         input_buffer->n_filled_len = image->alphaRowBytes * image->height;
++
++#if SVT_AV1_CHECK_VERSION(1, 8, 0)
++        // Simulate 4:2:0 UV planes. SVT-AV1 does not support 4:0:0 samples.
++        const uint32_t uvWidth = (image->width + y_shift) >> y_shift;
++        const uint32_t uvRowBytes = uvWidth * bytesPerPixel;
++        const uint32_t uvSize = uvRowBytes * uvHeight;
++        uvPlanes = avifAlloc(uvSize);
++        if (uvPlanes == NULL) {
++            goto cleanup;
++        }
++        memset(uvPlanes, 0, uvSize);
++        input_picture_buffer->cb = uvPlanes;
++        input_buffer->n_filled_len += uvSize;
++        input_picture_buffer->cr = uvPlanes;
++        input_buffer->n_filled_len += uvSize;
++        input_picture_buffer->cb_stride = uvWidth;
++        input_picture_buffer->cr_stride = uvWidth;
++#else
++        // This workaround was not needed before SVT-AV1 1.8.0.
++        // See https://github.com/AOMediaCodec/libavif/issues/1992.
++        (void)uvPlanes;
++#endif
+     } else {
+         input_picture_buffer->y_stride = image->yuvRowBytes[0] / bytesPerPixel;
+         input_picture_buffer->luma = image->yuvPlanes[0];
+         input_buffer->n_filled_len = image->yuvRowBytes[0] * image->height;
+-        uint32_t uvHeight = (image->height + y_shift) >> y_shift;
+         input_picture_buffer->cb = image->yuvPlanes[1];
+         input_buffer->n_filled_len += image->yuvRowBytes[1] * uvHeight;
+         input_picture_buffer->cr = image->yuvPlanes[2];
+@@ -232,6 +257,9 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
+ 
+     result = dequeue_frame(codec, output, AVIF_FALSE);
+ cleanup:
++    if (uvPlanes) {
++        avifFree(uvPlanes);
++    }
+     if (input_buffer) {
+         if (input_buffer->p_buffer) {
+             avifFree(input_buffer->p_buffer);

diff --git a/libavif.spec b/libavif.spec
index 313822e..b8c99ac 100644
--- a/libavif.spec
+++ b/libavif.spec
@@ -1,33 +1,50 @@
+# Break dependency cycles by disabling certain optional dependencies.
+%bcond bootstrap 0
+
+# Break aom dependency cycle:
+#   vmaf → aom → avif
+%if %{with bootstrap}
+# Build without aom
+%bcond aom 0
+# Build without SVT-AV1
+%bcond svt 0
+%else
 # Build with aom
-%bcond_without aom
+%bcond aom 1
 # Build SVT-AV1
-%ifarch x86_64
-%bcond_without svt
+%bcond svt 1
+%endif
+
+%if (0%{?rhel} && 0%{?rhel} < 9) || 0%{?rhel} >= 10
+%bcond rav1e 0
+%else
+%bcond rav1e 1
 %endif
-%if 0%{?rhel} && 0%{?rhel} < 9
-%bcond_with rav1e
+%if 0%{?rhel} >= 10
+%bcond gtest 0
 %else
-%bcond_without rav1e
+%bcond gtest 1
 %endif
+%bcond check 0
 
 Name:           libavif
-Version:        0.11.1
+Version:        1.1.1
 Release:        %autorelease
 Summary:        Library for encoding and decoding .avif files
 
-License:        BSD
+License:        BSD-2-Clause
 URL:            https://github.com/AOMediaCodec/libavif
-Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
 
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
+%{?with_check:%{?with_gtest:BuildRequires:  gtest-devel}}
 BuildRequires:  nasm
-%if %{with aom}
-BuildRequires:  pkgconfig(aom)
-%endif
+%{?with_aom:BuildRequires:  pkgconfig(aom)}
 BuildRequires:  pkgconfig(dav1d)
 BuildRequires:  pkgconfig(libjpeg)
 BuildRequires:  pkgconfig(libpng)
+BuildRequires:  pkgconfig(libyuv)
 %{?with_rav1e:BuildRequires:  pkgconfig(rav1e)}
 %{?with_svt:BuildRequires:  pkgconfig(SvtAv1Enc)}
 BuildRequires:  pkgconfig(zlib)
@@ -59,7 +76,7 @@ This package holds the commandline tools to encode and decode AVIF files.
 %package     -n avif-pixbuf-loader
 Summary:        AVIF image loader for GTK+ applications
 BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
-Requires:       gdk-pixbuf2
+Requires:       gdk-pixbuf2%{?_isa}
 
 %description -n avif-pixbuf-loader
 Avif-pixbuf-loader contains a plugin to load AVIF images in GTK+ applications.
@@ -70,21 +87,27 @@ Avif-pixbuf-loader contains a plugin to load AVIF images in GTK+ applications.
 %build
 %cmake \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-    %{?with_aom:-DAVIF_CODEC_AOM=1} \
-    -DAVIF_CODEC_DAV1D=1 \
-    %{?with_rav1e:-DAVIF_CODEC_RAV1E=1} \
-    %{?with_svt:-DAVIF_CODEC_SVT=1} \
+    %{?with_aom:-DAVIF_CODEC_AOM=SYSTEM} \
+    -DAVIF_CODEC_DAV1D=SYSTEM \
+    %{?with_rav1e:-DAVIF_CODEC_RAV1E=SYSTEM} \
+    %{?with_svt:-DAVIF_CODEC_SVT=SYSTEM} \
     -DAVIF_BUILD_APPS=1 \
-    -DAVIF_BUILD_GDK_PIXBUF=1
+    -DAVIF_BUILD_GDK_PIXBUF=1 \
+    %{?with_check:-DAVIF_BUILD_TESTS=1 %{?with_gtest:-DAVIF_GTEST=SYSTEM}}
 %cmake_build
 
 %install
 %cmake_install
 
+%if %{with check}
+%check
+%ctest
+%endif
+
 %files
 %license LICENSE
 # Do not glob the soname
-%{_libdir}/libavif.so.15*
+%{_libdir}/libavif.so.16*
 %{_datadir}/thumbnailers/avif.thumbnailer
 
 %files devel

diff --git a/sources b/sources
index c25654b..233e401 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (libavif-0.11.1.tar.gz) = 4a9e2711fccddf35c477db6e2fa2f76c0648aafaa98b4e3f34df62c0fbd02ddcd57762f1f8149822da4f1bc3757ee75ec1d9ced5e56a54dbe9d0b43265aacd4c
+SHA512 (libavif-1.1.1.tar.gz) = ba72b8d02b098f361643a073361fccafd22eaac14e46dd06378d5e7acd9853538c5d166473e1de0b020de62dac25be83e42bd57ba51f675d11e2ddf155fbfa21

diff --git a/libavif.spec b/libavif.spec
index a6c0b9b..b8c99ac 100644
--- a/libavif.spec
+++ b/libavif.spec
@@ -25,7 +25,7 @@
 %else
 %bcond gtest 1
 %endif
-%bcond check 1
+%bcond check 0
 
 Name:           libavif
 Version:        1.1.1

                 reply	other threads:[~2026-07-20 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178456548327.1.9605323097293619834.rpms-libavif-7891c2c82003@fedoraproject.org \
    --to=tdawson@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox