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 ESMTP id 709864AFBE for ; Tue, 25 Jun 2024 20:09:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 76B1468D406; Tue, 25 Jun 2024 23:09:31 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6BB768CF1F for ; Tue, 25 Jun 2024 23:09:24 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id EFAB5240002 for ; Tue, 25 Jun 2024 20:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1719346164; 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=WPBucykODez4KXNHExFChO943x3EXEUHZdeJnRJ6+hc=; b=UQFF6IcET+M9WaXabl2gukR0Yc+1FDoGM0YruW5aM94Rbn2Hx64I0FVijVzIq025jmz/He cA2Chp5vC2wC7tLYXT9ysdxydoBw/lCo32Ar2D+1TvJMRQzMJyudxDLlOWnLzZa3rG6Buq OJeQwQ4XWHkwwP3SSdj2EobAWgJ3oYW4LENBBqee6hIqzGSUXy4WUOL+rM03y2EXaWpqFo 5ha8YgzRR8DqL3owaHNeGvW5jcnAybqilrLsiE2O9V7mScqof717fYO/+o+gIZXLKROL4r L6G3vTfGSFDlbc1n3kzuWSJ0gR+nV6n+i+Jpxx9eAb+eXZTFO0Nt+6RiEnxDGQ== Date: Tue, 25 Jun 2024 22:09:23 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240625200923.GN4991@pb2> References: MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] libswscale/x86/yuv2rgb: Add missing EMMS 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="===============3141903643633041558==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3141903643633041558== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dngyMJhgXGAL5Gb8" Content-Disposition: inline --dngyMJhgXGAL5Gb8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 11, 2024 at 05:19:06PM +0000, Mario Hros wrote: > Ping? >=20 > Not including EMMS causes the FPU to become unusable (as the IE and SF bi= ts are set in the status word). This breaks code which, for instance, calls= fmod() and is compiled by GCC with the -O3 flag enabled. In that scenario,= GCC implements fmod using the FPREM FPU instruction, but because FPU is in= the invalid state at that point, the result is NaN. >=20 > This must to breaking other code using FPU also. The original code with i= nline assembly used EMMS at the end. > ________________________________ > From: Mario Hros > Sent: Wednesday, June 5, 2024 7:35 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Mario Hros > Subject: [PATCH] libswscale/x86/yuv2rgb: Add missing EMMS >=20 > Previous rewrite from inline assembly into nasm (commit e934194) missed t= he required EMMS instruction to bring the x87 FPU back into usable state. >=20 > Signed-off-by: Mario Hros > --- > libswscale/x86/yuv_2_rgb.asm | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm > index e3470fd9ad..7a247797e4 100644 > --- a/libswscale/x86/yuv_2_rgb.asm > +++ b/libswscale/x86/yuv_2_rgb.asm > @@ -353,6 +353,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, param= eters > add imageq, 8 * depth * time_num > add indexq, 4 * time_num > js .loop0 > +emms >=20 this feels like its missing a %if mmsize =3D=3D 8 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are too smart to engage in politics are punished by being governed by those who are dumber. -- Plato=20 --dngyMJhgXGAL5Gb8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZnsj8wAKCRBhHseHBAsP q0WZAJsHsjcCOubkgD06Eq9u5IysQB23xQCeKg2I6BIv0XmAyaamqAekb3nBmAU= =n3hM -----END PGP SIGNATURE----- --dngyMJhgXGAL5Gb8-- --===============3141903643633041558== 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". --===============3141903643633041558==--