[Scummvm-git-logs] scummvm master -> af862c743e8323099aa61d1a91053688c458ff09

whoozle noreply at scummvm.org
Sat Jul 18 20:28:08 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
af862c743e IMAGE: GIF: Do not deinterlace image if building against giflib version 5 or later


Commit: af862c743e8323099aa61d1a91053688c458ff09
    https://github.com/scummvm/scummvm/commit/af862c743e8323099aa61d1a91053688c458ff09
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-18T21:27:39+01:00

Commit Message:
IMAGE: GIF: Do not deinterlace image if building against giflib version 5 or later

giflib 5.0.0 onward: DGifSlurp deinterlaces internally

Changed paths:
    image/gif.cpp


diff --git a/image/gif.cpp b/image/gif.cpp
index d09730546f3..f5b63224474 100644
--- a/image/gif.cpp
+++ b/image/gif.cpp
@@ -105,7 +105,13 @@ bool GIFDecoder::loadStream(Common::SeekableReadStream &stream) {
 	_outputSurface->create(width, height, format);
 	const uint8 *in = (const uint8 *)gifImage->RasterBits;
 	uint8 *pixelPtr = (uint8 *)_outputSurface->getBasePtr(0, 0);
-	if (gif->Image.Interlace) {
+#if GIFLIB_MAJOR < 5
+	const bool deinterlace = gif->Image.Interlace;
+#else
+	// Starting from giflib 5.0, DGifSlurp deinterlaces pixel data.
+	const bool deinterlace = false;
+#endif
+	if (deinterlace) {
 		const int interlacedOffset[] = {0, 4, 2, 1};
 		const int interlacedJumps[] = {8, 8, 4, 2};
 		for (int i = 0; i < 4; ++i) {




More information about the Scummvm-git-logs mailing list