From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 1333F4DD61 for ; Mon, 5 Jan 2026 16:13:18 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'920he7LUGU6kqSsupDfJNWS1anKjTTAWtp+MaAOMm/Y=', expected b'CjtvZ3SZqUKwGF8NjmoyVXCW8KHubPf04ov97Ap0Rjs=')) header.d=niedermayer.cc header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767629589; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : from; bh=upKfsQHReYYU4YpYBv/wDgg38h8L0WMn1d0eRw3OeOM=; b=XKemWbp/Daaj87s+8lciSgK8FA2wfum+DVyz9KNjGaj/M4t/u30lnSHbPhSV0LlmRqItc VLb2N3J+Q3kCN1W4p781kBA7cdTCj3nQhIA6XwyptheOgBgwp7DWvYSwRQ2aaK6O4mbBabL yYXsFk236/1oyLVeeYKSAv7/uGbyA8+7G8Fb5vMFQnlKB+DJQdTIGUhoOlWCXfu861sVKxo 52ebIz5u86v/a8Af6NuYxtSpGS+4myPa5LSc03P0dLgMZHin8rJZ6TEosKmUVWcwAXpYRTz e0b1XGrfXwNlaKBEQGgVQ8DQSuOhq35aPmZdKpTkb4ymK6fkhaHBHAW2H1wQ== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 76D76690D22; Mon, 5 Jan 2026 18:13:09 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1767629571; b=neX5BPqSy30k7UOzXd/ZFD5nSP9zE8v9KbHxPGOX6rDHSQYYbuI61XKrSrzia4PDOGw7a q0trAllFhPsj4aE0BvCybmRbRDsv+Sr9F4kn6T4EgWAL+SN8LuM0Inmj2nfEFBGTh678zsq hJDAPHg2ayRcjXgWkpYSLkV0GialcJeY18RaVdZ/cmTFJkN5LRYBgtbsAum5MHt+k6C/eUc aD0HbuSlZ3i13D/1ZpD8gjEj3RA28ulxbQSruH9Aj9qa6rT6yTVqyRQPbEaBdJPa8amnM/i +ioWIB0Wdc65b6DZJHbJapIw84EbsWxVGDtEBU16c8y/oKGoY3lXYqiar7Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1767629571; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=920he7LUGU6kqSsupDfJNWS1anKjTTAWtp+MaAOMm/Y=; b=YvBDFRAA3sOAy55hwBqqvuwm7n6jGz3lpw9rQLvDqrFcL8oSINTcbvxXv4P426Tvfm2W8 j/YOwbvuvsRsAzXs6VyvpCoZlOj+GX1h8PIbotS7HRIi1jjqSu21sFP0mpS5aJv9FSVimgt 8CgS6WFRSnljFMTrj7ehrWCtgVzOCFr1wTfC6ALUJUBmPylZ3zC9C+b4U2R3qCJr3kX6KD2 4lo1+TPWV3XoiCxVo7nYDkytzDNwisgtDxcO8mqh8FDfum5y3QbVgtMN/YXmqH3KTK0Zqpo 13rR/Dxk8rBbfr5qeA7Re6CMPyzEWLiDDTOTsPhZZcTLe+DjSEihOU6cXYPw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none (Message is not ARC signed); dmarc=none Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 4C02368FCCD for ; Mon, 5 Jan 2026 18:12:38 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 582D743FC8 for ; Mon, 5 Jan 2026 16:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1767629557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CjtvZ3SZqUKwGF8NjmoyVXCW8KHubPf04ov97Ap0Rjs=; b=Y5DEW9QWOqq1hawdhDRja6F8UzVli07KjKpmMfpjKxHv5C2IeiEHwaRgcuCjZnaUIPX3mx XUeKqAbnWGym4P1G7zzkaW7kFtAX8F4lq/m2TDsyfx850h7XS9zdBfgRazoJo3dJp1VPz2 hZeowK6FUoGm//+fX1PQFl5s045J3GuZ9DFjOd1e+xtjRuD4gDq6xUZd97jVKgyJo4SOLr nMFOqJfCPy213ZEOoOgCxDxl1Iizn4ypZbb7N2qp3U0/dtPqwCwzbizAWWlcNYJpttX4sV 45ikmbfnBS1IKc2lX48GKnV7xcyLt4EcllzVN9ZT19Y5bmWbzd/ZoyG5gmR3mg== Date: Mon, 5 Jan 2026 17:12:36 +0100 To: FFmpeg development discussions and patches Message-ID: References: <20260102112935.1842-1-hassanhanyrashad@gmail.com> MIME-Version: 1.0 In-Reply-To: <20260102112935.1842-1-hassanhanyrashad@gmail.com> X-GND-Sasl: michael@niedermayer.cc X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeljeejhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeiiedrhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieeirdehtddphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhqihgupeehkedvffejgeefhfevkedpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh Message-ID-Hash: BYLTBBNCQUZDDI2FDH3MHFFJCNRJ26RD X-Message-ID-Hash: BYLTBBNCQUZDDI2FDH3MHFFJCNRJ26RD X-MailFrom: SRS0=fJqU=7K=niedermayer.cc=michael@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PATCH] apng: fix rgb24 blending bug for non-alpha frames List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michael Niedermayer via ffmpeg-devel Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============3977124600449826605==" Archived-At: List-Archive: List-Post: --===============3977124600449826605== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ge1+NVVh3K7UuzD+" Content-Disposition: inline --ge1+NVVh3K7UuzD+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 02, 2026 at 01:29:32PM +0200, Hassan Hany via ffmpeg-devel wrot= e: > From: "U-DESKTOP-70DF2U5\\GIGABYT" >=20 > Delta frame optimization in APNG encoder caused gray bars for RGB24 frame= s. > This patch disables delta optimization for non-alpha frames, ensuring cor= rect > rendering. Delta optimization is preserved for RGBA frames. >=20 > Fixes: trac Ticket #9602 >=20 > Signed-off-by: U-DESKTOP-70DF2U5\GIGABYT > --- > This bug caused visible artifacts such as gray bars in non-alpha=20 > pixel formats such as RGB24 or GRAY. This patch disabled delta frame > optimization only for non alpha channels. the output size increased > from 512kb to 1.1mb on the test sample but correctness was restored > and the relevant APNG FATE tests were ran and no regression occurred > libavcodec/pngenc.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) >=20 > diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c > index e627bf83fc..3e46363b00 100644 > --- a/libavcodec/pngenc.c > +++ b/libavcodec/pngenc.c > @@ -39,7 +39,7 @@ > #include "libavutil/opt.h" > #include "libavutil/rational.h" > #include "libavutil/stereo3d.h" > - > +#include "libavutil/pixdesc.h" > #include > =20 > #define IOBUF_SIZE 4096 > @@ -894,6 +894,19 @@ static int apng_encode_frame(AVCodecContext *avctx, = const AVFrame *pict, > best_fctl_chunk->blend_op =3D APNG_BLEND_OP_SOURCE; > return encode_frame(avctx, pict); > } > + =20 > + const AVPixFmtDescriptor *desc =3D av_pix_fmt_desc_get(pict->format); > + =20 > + if(!(desc->flags & AV_PIX_FMT_FLAG_ALPHA)){ > + best_fctl_chunk->width =3D pict->width; > + best_fctl_chunk->height =3D pict->height; > + best_fctl_chunk->x_offset =3D 0; > + best_fctl_chunk->y_offset =3D 0; > + best_fctl_chunk->blend_op =3D APNG_BLEND_OP_SOURCE; > + best_fctl_chunk->dispose_op =3D APNG_DISPOSE_OP_NONE; > + return encode_frame(avctx, pict); > + }=20 > + =20 This looks like a hack not like a bugfix besides the indention is wrong and there are tabs thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If the United States is serious about tackling the national security threat= s=20 related to an insecure 5G network, it needs to rethink the extent to which = it values corporate profits and government espionage over security.-Bruce Schn= eier --ge1+NVVh3K7UuzD+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaVvi8AAKCRBhHseHBAsP qw5hAJwLuyabBy7SkZYNdT5t4B8ZEUVKDwCeKalqjtlbtbyMFC33HP4E6qyVdNs= =aQpm -----END PGP SIGNATURE----- --ge1+NVVh3K7UuzD+-- --===============3977124600449826605== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org --===============3977124600449826605==--