From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 82C664E3BE for ; Thu, 1 May 2025 23:45:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 72E6168AF2B; Fri, 2 May 2025 02:45:08 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9B89F687D57 for ; Fri, 2 May 2025 02:45:01 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 007744318E for ; Thu, 1 May 2025 23:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1746143101; 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=LGgA61117+b0zz8aQ1qPI4FHEDzXNqOKNDA46RDHKtg=; b=cLbkVWYaRQGrQ2POM2nH7qWRmEwQrtC4TGJsorGjXoe4021KXRrC7y3AuZjR/d3kyB0Mmj gTdrx5MSOTBm/AFo/2PgoJs/mxj0EhVtOt5TW97jCU1bID1ObbR6nO+T8EyGxcoyfWUzgK wSo5y+QRn78WY/BB0fIiYt6UUkMCekLxcmscgHxI/FAHUwUyDPyTWEwMfhz1YmhR5Z8ZsT luu++zJE/aVQRUF+6HyduwS09W4eBbMwHqJohGZZGuMehyOL1C2XozGtF2HtKdgkbuRouE +fOyRQXUHIh9fhRpE5XGMbnKA5qDXSMfGFnT0pa28CykZ0qbc7ONhqEXVVccXQ== Date: Fri, 2 May 2025 01:45:00 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250501234500.GW4991@pb2> References: MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjedtleefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] postproc/postprocess_template: Fix left shift of negative numbers 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="===============5950410511998727998==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5950410511998727998== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="T4Wgg0T+yIh7PnFZ" Content-Disposition: inline --T4Wgg0T+yIh7PnFZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 30, 2025 at 08:36:01PM +0200, Andreas Rheinhardt wrote: > Patch attached. >=20 > - Andreas > postprocess_template.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > 805bee95b493f276f7802afbd7180c0f096ea52a 0001-postproc-postprocess_templ= ate-Fix-left-shift-of-nega.patch > From 54ceac12363b666ad8005f282f6f9f08b6334b21 Mon Sep 17 00:00:00 2001 > From: Andreas Rheinhardt > Date: Wed, 30 Apr 2025 20:30:53 +0200 > Subject: [PATCH] postproc/postprocess_template: Fix left shift of negative > numbers >=20 > Affects the blocktest test tool. >=20 > Signed-off-by: Andreas Rheinhardt > --- > libpostproc/postprocess_template.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess= _template.c > index 0531e39477..fd8a4760af 100644 > --- a/libpostproc/postprocess_template.c > +++ b/libpostproc/postprocess_template.c > @@ -1060,8 +1060,8 @@ DERING_CORE((%0, %1, 8) ,(%%FF_REGd, %1, 4),%= %mm2,%%mm4,%%mm0,%%mm3,%%mm5, > if(src[stride*y + 8] > avg) t+=3D 256; > if(!rightborder && src[stride*y + 9] > avg) t+=3D 512; > =20 > - t |=3D (~t)<<16; > - t &=3D (t<<1) & (t>>1); > + t |=3D (~t) * (1 << 16); > + t &=3D (t * 2) & (t>>1); > s[y] =3D t; making t unsigned instead would keep the code more symmetric thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator --T4Wgg0T+yIh7PnFZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaBQHdQAKCRBhHseHBAsP q+BsAJ4wRxFfxtfTc5GD/u9VfueZjrTlZQCfYxJpJdvRcRqeBw/r+I9vtVFbAW0= =I2Jl -----END PGP SIGNATURE----- --T4Wgg0T+yIh7PnFZ-- --===============5950410511998727998== 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". --===============5950410511998727998==--