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 9A21E4DC65 for ; Wed, 4 Jun 2025 11:00:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 81D5A68D132; Wed, 4 Jun 2025 14:00:48 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 8D4C568C3C3 for ; Wed, 4 Jun 2025 14:00:42 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D44B7432F9 for ; Wed, 4 Jun 2025 11:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1749034842; 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=iYgZaJuNMxwJP0xPTYTXCTqgtVjlcJiArj9YB9fMSt8=; b=k4038XdTlJxO8ZSrW9vHKThyKE6d6aIK6Vd1Vt3ZFrmfixyxzdaJrOeUnO8NL3u4SJz//n +Z0vUwZo/66WAcqp21ZZxQYC69l+/C2mFQa6ZaGoEWjF+zPSDdollAJA9m1So5hbsd6RHt evjFnCVkLHlPSd/1OvlcFTGqzu+6kbxtxekPXSuug17a2kMccnPU71ErddBt+bk3nbk0eW TTSpG57/8LmcwaNVTbs46euacToJNhRZ0ih6h+Z78PbaxRnNNgoQs+G/Lmw6HRQG2zufkO BOLN9t9LECVMRzluZFg7qv3t0ShW9bfh22/YstSVMXSsMdCl5IWXNGCyeWG1ZQ== Date: Wed, 4 Jun 2025 13:00:41 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250604110041.GQ29660@pb2> References: <20250514013954.2987037-1-michael@niedermayer.cc> <20250514013954.2987037-2-michael@niedermayer.cc> <20250530195254.GN29660@pb2> <20250530225130.GQ29660@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvtddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdeftddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeelkeeggfffiedufeejueffjeduhedttdduledtheevveevtdeiueelhfdtuedtkeenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 2/2] avcodec/sanm: avoid using k in left pxoff check X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============5161369110464868488==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5161369110464868488== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/3M4yvOp2yGuEOBn" Content-Disposition: inline --/3M4yvOp2yGuEOBn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 03, 2025 at 12:30:40PM +0200, Manuel Lauss wrote: > Servus Michael, >=20 > On Sat, May 31, 2025 at 12:51=E2=80=AFAM Michael Niedermayer > wrote: >=20 > > > > > /* smooth top and left block borders with neighbours= */ > > > > > - if (((pxoff - p + k) < 0) || ((pxoff - p + k) >=3D m= axpxo) > > > > > + if (((pxoff - p + 0) < 0) || ((pxoff - p + k) >=3D m= axpxo) > > > > > || ((pxoff + 3 * p) < 0) || ((pxoff + 3 * p) >= =3D maxpxo) > > > > > || (i =3D=3D 0) || (j =3D=3D 0)) > > > > > continue; > > > > > > Oops, yes, that change is correct. > > > > will apply > > > > > > > I think you should just rip the whole block-smoothing block out > > > entirely: it creates a "sawtooth" pattern > > > which is more annoying than the "blockiness" it tries to soften. > > > > probably, but i just wanted to fix the out of array access, > > ill leave improvment beyond that to others >=20 > Is it OK if I just remove this block entirely? I'd commit that along > with the other 2 sanm patches I have. i think you dont understand the bug my change is fixing Its an out of array access in: for (k =3D 0; k < 4; k++) *(dst + pxoff + k) =3D ((*(dst + pxoff + k) + *(dst + p= xoff - p + k)) >> 1) & 0x7f; The hunk: /* smooth top and left block borders with neighbours */ if (((pxoff - p + k) < 0) || ((pxoff - p + k) >=3D maxpxo) || ((pxoff + 3 * p) < 0) || ((pxoff + 3 * p) >=3D maxpxo) || (i =3D=3D 0) || (j =3D=3D 0)) continue; skips this code. If the hunk is removed and nothing else is changed its MORE buggy as there will be more out of array accesses thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB For a strong democracy, genuine criticism is necessary, allegations benefit noone, they just cause unnecessary conflicts. - Narendra Modi --/3M4yvOp2yGuEOBn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaEAnVQAKCRBhHseHBAsP q4EWAJ9POTVgVv1YzSeHIwkSdp73dAYAfQCeLhGaM+1q0vCGPbUVQGLbrvmDWT4= =+LNj -----END PGP SIGNATURE----- --/3M4yvOp2yGuEOBn-- --===============5161369110464868488== 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 https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============5161369110464868488==--