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 2F1A643FA1 for ; Tue, 23 Aug 2022 15:42:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0682268B990; Tue, 23 Aug 2022 18:42:23 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5454D68B8E0 for ; Tue, 23 Aug 2022 18:42:17 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 59AB160006 for ; Tue, 23 Aug 2022 15:42:16 +0000 (UTC) Date: Tue, 23 Aug 2022 17:42:15 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220823154215.GJ2088045@pb2> References: MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] swscale/x86/rgb2_rgb: Empty MMX state in ff_shuffle_bytes_2103_mmxext 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="===============1953749914794097791==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1953749914794097791== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4cXE7lVpOAUQvDc2" Content-Disposition: inline --4cXE7lVpOAUQvDc2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 22, 2022 at 11:59:17PM +0200, Andreas Rheinhardt wrote: > Andreas Rheinhardt: > > Fixes FATE-failures with the the filter-2xbr filter-3xbr filter-4xbr > > filter-ep2x filter-ep3x filter-hq2x filter-hq3x filter-hq4x > > filter-paletteuse-bayer filter-paletteuse-bayer0 > > filter-paletteuse-nodither and filter-paletteuse-sierra2_4a tests > > when using 32bit x86 with CPUFLAGS ranging from "mmx+mmxext" to > > "mmx+mmxext+sse+sse2+sse3" (the relevant function is only overwritten > > when using SSSE3). > >=20 > > Signed-off-by: Andreas Rheinhardt > > --- > > libswscale/x86/rgb_2_rgb.asm | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/libswscale/x86/rgb_2_rgb.asm b/libswscale/x86/rgb_2_rgb.asm > > index c695c61d5c..76ca1eec03 100644 > > --- a/libswscale/x86/rgb_2_rgb.asm > > +++ b/libswscale/x86/rgb_2_rgb.asm > > @@ -104,6 +104,7 @@ jge .end > > jl .loop_simd > > =20 > > .end: > > + emms > > RET > > =20 > > ;---------------------------------------------------------------------= --------- >=20 > I'd really love if someone with x86 assembly skills could look over this > trivial patch and confirm whether it is indeed correct. All I currently > know is that is works for me. emms needs to be called between MMX and float code, as far outside of loops as possible that would suggest outside the for() loops in rgbToRgbWrapper() and any other code using it.=20 thats what we did and what is most efficient. One can make an argument that emms must be called before returning to C code when its needed. That though would imply also that all uses of emms_c() are wrong Above assumes iam not missing something thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart than the original author, trying to rewrite it will not make it better. --4cXE7lVpOAUQvDc2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYwT1UwAKCRBhHseHBAsP q7NpAJ92Qct4G2wAnskH/PTzh6q1xqswjgCeP3qndEiPVhCOeg6BOubUEDjDb+Q= =KLcx -----END PGP SIGNATURE----- --4cXE7lVpOAUQvDc2-- --===============1953749914794097791== 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". --===============1953749914794097791==--