From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 40C12158020 for ; Sun, 16 Oct 2022 09:25:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E4C2E0863; Sun, 16 Oct 2022 09:25:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2070FE0863 for ; Sun, 16 Oct 2022 09:25:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D221E340F2E for ; Sun, 16 Oct 2022 09:25:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 179E2599 for ; Sun, 16 Oct 2022 09:25:53 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1665912330.485029605884aedb0776bcff066b87a90b896b5b.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kimageformats/files/, kde-frameworks/kimageformats/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-1.patch kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-2.patch kde-frameworks/kimageformats/kimageformats-5.99.0-r1.ebuild X-VCS-Directories: kde-frameworks/kimageformats/ kde-frameworks/kimageformats/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 485029605884aedb0776bcff066b87a90b896b5b X-VCS-Branch: master Date: Sun, 16 Oct 2022 09:25:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6cc4edea-aa15-4ba3-b1bf-ce27a8e941ef X-Archives-Hash: 0f0c0cdce57b4a0b373c31412d0dec62 commit: 485029605884aedb0776bcff066b87a90b896b5b Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Oct 16 09:25:04 2022 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Oct 16 09:25:30 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48502960 kde-frameworks/kimageformats: Fix AVIF performance See also: https://mail.kde.org/pipermail/distributions/2022-October/001309.html Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/kimageformats-5.99.0-avif-perf-1.patch | 34 +++++++++++++++++ .../files/kimageformats-5.99.0-avif-perf-2.patch | 32 ++++++++++++++++ .../kimageformats/kimageformats-5.99.0-r1.ebuild | 44 ++++++++++++++++++++++ 3 files changed, 110 insertions(+) diff --git a/kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-1.patch b/kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-1.patch new file mode 100644 index 000000000000..326ce2fd9e47 --- /dev/null +++ b/kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-1.patch @@ -0,0 +1,34 @@ +From 350ce1b990460cb2178f369f22fe80803f5645f3 Mon Sep 17 00:00:00 2001 +From: Fushan Wen +Date: Sat, 15 Oct 2022 11:40:41 +0800 +Subject: [PATCH] avif: return `false` in `canRead()` when `imageIndex >= + imageCount` + +Otherwise when `cache: false` is set in AnimatedImage, QMovie will try +to read the image forever. + +BUG: 460085 +FIXED-IN: 5.100 +--- + src/imageformats/avif.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp +index 2865a4e..c4f7a0f 100644 +--- a/src/imageformats/avif.cpp ++++ b/src/imageformats/avif.cpp +@@ -42,6 +42,11 @@ bool QAVIFHandler::canRead() const + + if (m_parseState != ParseAvifError) { + setFormat("avif"); ++ ++ if (m_parseState == ParseAvifSuccess && m_decoder->imageIndex >= m_decoder->imageCount - 1) { ++ return false; ++ } ++ + return true; + } + return false; +-- +GitLab + diff --git a/kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-2.patch b/kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-2.patch new file mode 100644 index 000000000000..8e7763b2c580 --- /dev/null +++ b/kde-frameworks/kimageformats/files/kimageformats-5.99.0-avif-perf-2.patch @@ -0,0 +1,32 @@ +From 1190e53e9b69da6f9663ceb75c4813c5708b7cbd Mon Sep 17 00:00:00 2001 +From: Fushan Wen +Date: Sat, 15 Oct 2022 14:11:56 +0800 +Subject: [PATCH] avif: always indicate endless loop + +avif does not support loops but endless loop was the behavior before +460085 was fixed, so a workaround is added. + +See also: https://github.com/AOMediaCodec/libavif/issues/347 + +CCBUG: 460085 +--- + src/imageformats/avif.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp +index c4f7a0f..24aec84 100644 +--- a/src/imageformats/avif.cpp ++++ b/src/imageformats/avif.cpp +@@ -1024,7 +1024,8 @@ int QAVIFHandler::loopCount() const + return 0; + } + +- return 1; ++ // Endless loop to work around https://github.com/AOMediaCodec/libavif/issues/347 ++ return -1; + } + + QPointF QAVIFHandler::CompatibleChromacity(qreal chrX, qreal chrY) +-- +GitLab + diff --git a/kde-frameworks/kimageformats/kimageformats-5.99.0-r1.ebuild b/kde-frameworks/kimageformats/kimageformats-5.99.0-r1.ebuild new file mode 100644 index 000000000000..776f0af5e0b7 --- /dev/null +++ b/kde-frameworks/kimageformats/kimageformats-5.99.0-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_QTHELP="false" +PVCUT=$(ver_cut 1-2) +QTMIN=5.15.5 +VIRTUALX_REQUIRED="test" +inherit ecm frameworks.kde.org + +DESCRIPTION="Framework providing additional format plugins for Qt's image I/O system" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="avif eps heif jpegxl openexr raw" + +DEPEND=" + >=dev-qt/qtgui-${QTMIN}:5 + =kde-frameworks/karchive-${PVCUT}*:5 + avif? ( >=media-libs/libavif-0.8.2:= ) + eps? ( >=dev-qt/qtprintsupport-${QTMIN}:5 ) + heif? ( >=media-libs/libheif-1.10.0:= ) + jpegxl? ( media-libs/libjxl ) + openexr? ( >=media-libs/openexr-3:= ) + raw? ( media-libs/libraw:= ) +" +RDEPEND="${DEPEND}" + +DOCS=( src/imageformats/AUTHORS ) + +PATCHES=( "${FILESDIR}"/${P}-avif-perf-{1,2}.patch ) + +src_configure() { + local mycmakeargs=( + -DKIMAGEFORMATS_JXL=$(usex jpegxl) + $(cmake_use_find_package avif libavif) + $(cmake_use_find_package eps Qt5PrintSupport) + -DKIMAGEFORMATS_HEIF=$(usex heif) + $(cmake_use_find_package openexr OpenEXR) + $(cmake_use_find_package raw LibRaw) + ) + ecm_src_configure +}