Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kimageformats for openSUSE:Factory 
checked in at 2022-10-20 11:09:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kimageformats (Old)
 and      /work/SRC/openSUSE:Factory/.kimageformats.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kimageformats"

Thu Oct 20 11:09:46 2022 rev:113 rq:1029945 version:5.99.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kimageformats/kimageformats.changes      
2022-10-15 16:36:11.793971616 +0200
+++ /work/SRC/openSUSE:Factory/.kimageformats.new.2275/kimageformats.changes    
2022-10-20 11:09:48.419788162 +0200
@@ -1,0 +2,8 @@
+Wed Oct 19 09:50:52 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Add upstream changes:
+  * 0001-avif-return-false-in-canRead-when-imageIndex-imageCo.patch 
(kde#460085)
+  * 0001-avif-always-indicate-endless-loop.patch
+  * 0001-avif-revert-9ac923ad09316dcca0fc11e0be6b3dfc6cce6ca0.patch
+
+-------------------------------------------------------------------

New:
----
  0001-avif-always-indicate-endless-loop.patch
  0001-avif-return-false-in-canRead-when-imageIndex-imageCo.patch
  0001-avif-revert-9ac923ad09316dcca0fc11e0be6b3dfc6cce6ca0.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kimageformats.spec ++++++
--- /var/tmp/diff_new_pack.tzJyd7/_old  2022-10-20 11:09:48.999789337 +0200
+++ /var/tmp/diff_new_pack.tzJyd7/_new  2022-10-20 11:09:49.007789353 +0200
@@ -44,6 +44,11 @@
 Source1:        %{name}-%{version}.tar.xz.sig
 Source2:        frameworks.keyring
 %endif
+# PATCH-FIX-UPSTREAM -- Recommended patches for kimageformats 5.99
+Patch0:         0001-avif-return-false-in-canRead-when-imageIndex-imageCo.patch
+Patch1:         0001-avif-always-indicate-endless-loop.patch
+# PATCH-FIX-UPSTREAM
+Patch2:         0001-avif-revert-9ac923ad09316dcca0fc11e0be6b3dfc6cce6ca0.patch
 BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
 BuildRequires:  kf5-filesystem

++++++ 0001-avif-always-indicate-endless-loop.patch ++++++
>From 1190e53e9b69da6f9663ceb75c4813c5708b7cbd Mon Sep 17 00:00:00 2001
From: Fushan Wen <qydwhotm...@gmail.com>
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)
-- 
2.38.0


++++++ 0001-avif-return-false-in-canRead-when-imageIndex-imageCo.patch ++++++
>From 350ce1b990460cb2178f369f22fe80803f5645f3 Mon Sep 17 00:00:00 2001
From: Fushan Wen <qydwhotm...@gmail.com>
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;
-- 
2.38.0


++++++ 0001-avif-revert-9ac923ad09316dcca0fc11e0be6b3dfc6cce6ca0.patch ++++++
>From f475a4b24a166d7582163753bc2f4f254257daed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Novomesk=C3=BD?= <dnovome...@gmail.com>
Date: Tue, 11 Oct 2022 14:36:17 +0200
Subject: [PATCH] avif: revert 9ac923ad09316dcca0fc11e0be6b3dfc6cce6ca0 commit

Changes to libavif's avifImageRGBToYUV() API were reverted too.
---
 src/imageformats/avif.cpp | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp
index ccb4c56..7721c1b 100644
--- a/src/imageformats/avif.cpp
+++ b/src/imageformats/avif.cpp
@@ -336,7 +336,7 @@ bool QAVIFHandler::decode_one_frame()
         rgb.format = AVIF_RGB_FORMAT_ARGB;
 #endif
 
-#if (AVIF_VERSION >= 80400) && (AVIF_VERSION <= 100100)
+#if AVIF_VERSION >= 80400
         if (m_decoder->imageCount > 1) {
             /* accelerate animated AVIF */
             rgb.chromaUpsampling = AVIF_CHROMA_UPSAMPLING_FASTEST;
@@ -351,12 +351,7 @@ bool QAVIFHandler::decode_one_frame()
     rgb.rowBytes = result.bytesPerLine();
     rgb.pixels = result.bits();
 
-#if AVIF_VERSION >= 100101
-    // use faster decoding for animations
-    avifResult res = avifImageYUVToRGB(m_decoder->image, &rgb, 
(m_decoder->imageCount > 1) ? AVIF_CHROMA_UPSAMPLING_NEAREST : 
AVIF_YUV_TO_RGB_DEFAULT);
-#else
     avifResult res = avifImageYUVToRGB(m_decoder->image, &rgb);
-#endif
     if (res != AVIF_RESULT_OK) {
         qWarning("ERROR in avifImageYUVToRGB: %s", avifResultToString(res));
         return false;
@@ -782,11 +777,7 @@ bool QAVIFHandler::write(const QImage &image)
             }
         }
 
-#if AVIF_VERSION >= 100101
-        res = avifImageRGBToYUV(avif, &rgb, AVIF_RGB_TO_YUV_DEFAULT);
-#else
         res = avifImageRGBToYUV(avif, &rgb);
-#endif
         if (res != AVIF_RESULT_OK) {
             qWarning("ERROR in avifImageRGBToYUV: %s", 
avifResultToString(res));
             return false;
-- 
2.38.0

Reply via email to