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 4FEB34D34C for ; Sat, 31 May 2025 13:39:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 204BB68DDEA; Sat, 31 May 2025 16:39:15 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 360E068DD83 for ; Sat, 31 May 2025 16:39:08 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 91EF21F433 for ; Sat, 31 May 2025 13:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1748698747; 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=DVjclgFyJMeN+TrPwyPFKvyi27yny/DKBbW51CEwM1w=; b=NRmghi5qYsQGL3Qkp6GHF7W4vVQhwI0eTurKYiQubcPrezdHZBqtVRmbZQyT8797R9vSgM cg0mXDH1vRCCpWhrs8Z+sx4IETXVe1hnbBz+chrDCrcv09xO8BITO23u9nOvU0rfe1nZ06 0YlrN1WdPXHDWcR+aVY8f6HkJHzuOZNbV36Gt2S/qy4L2vsKnHQdNkE72kR0N2oQLEfIwj e3KiM0HcVfQYzM8kfhQnkjHqyk8B89quOFEuDBulJMiuI4BzI3jzM4u70EyyumkkHaEtlw 7QyKR5KPWNBeK7T95KXUHQI5jP2rL0wdMB8PJoV/Iy2AvRcNnzFg3+N2qYwRQQ== Date: Sat, 31 May 2025 15:39:06 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250531133906.GT29660@pb2> References: <20250521061750.54882-1-jiawei@iscas.ac.cn> <49f0532f-444c-4881-982a-26ed53e5e4b0@frankplowman.com> <09d91570-6c20-49a7-aada-ceb18d77c6c3@iscas.ac.cn> <3356719.44csPzL39Z@basile.remlab.net> <20250525213708.GO29660@pb2> <20250530004605.GF29660@pb2> <10EEC0E3-14D3-44D3-B93E-41523918FA88@remlab.net> MIME-Version: 1.0 In-Reply-To: <10EEC0E3-14D3-44D3-B93E-41523918FA88@remlab.net> X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdefvddtgeculddtuddrgeefvddrtddtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepleekgefgffeiudefjeeuffejudehtddtudeltdehveevvedtieeulefhtdeutdeknecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] gcc: Remove auto-vectorization limitation. 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="===============0047640934220837808==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0047640934220837808== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6R15UivsCI7PIH1t" Content-Disposition: inline --6R15UivsCI7PIH1t Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Remi On Fri, May 30, 2025 at 09:58:48AM +0300, R=C3=A9mi Denis-Courmont wrote: >=20 >=20 > Le 30 mai 2025 03:46:05 GMT+03:00, Michael Niedermayer a =C3=A9crit=C2=A0: > >On Mon, May 26, 2025 at 11:43:15AM +0300, R=C3=A9mi Denis-Courmont wrote: > >>=20 > >>=20 > >> Le 26 mai 2025 00:37:08 GMT+03:00, Michael Niedermayer a =C3=A9crit=C2=A0: > >> >Hi R=C3=A9mi > >> > > >> >On Sat, May 24, 2025 at 07:10:57PM +0300, R=C3=A9mi Denis-Courmont wr= ote: > >> >> Le torstaina 22. toukokuuta 2025, 9.32.18 It=C3=A4-Euroopan kes=C3= =A4aika Jiawei a =C3=A9crit=20 > >> >> : > >> >> > > The RISC-V autovectorised output looks like it has a warning "O= dd > >> >> > > rotation angle" which is not present in the non-autovectorised = output. > >> >> >=20 > >> >> > I found this occured when using '-ffast-math' in RISC-V, also occ= ur in > >> >> > -O3 -ffast-math -fno-tree-vectorize case(much slower due to the > >> >> > -ffast-math)=EF=BC=8Csupplementary more comparison results here: > >> >>=20 > >> > > >> >> Unfortunately, the FFmpeg code is written with x87 semantics in min= d. > >> > > >> >I dont remember ever writing code intentionally with x87 semantics. A= nd i > >> >have doubts other people did. > >>=20 > >> It doesn't have to be intentional. FFmpeg was started and mostly devel= oped with x86-32 then x86-64 in mind. It's entirely possible that this happ= ened innocently. > >>=20 > >> Specifically, FFmpeg uses open-code for minimum, maximum, absolute val= ue and so on (see FFMIN, FFMAX, FFABS). They work nicely for integer maths.= They also work nicely on x87 with the current set of FPU optimisations, bu= t they differ from IEEE semantics because of NaNs, negative zeros and such. > >>=20 > >> Because of that the compiler will *not* use the native FPU instruction= s on platforms with native IEEE floats. > > > >replace all FFMIN with fminf() / fmin() where the arguments are float or > >double, assuming that has no ill performance effects >=20 > That will harm performance on x87, whence fminf() and co are function cal= ls rather than single instructions. What we actually should do is define se= parate macros for integer vs float vs double. ok >=20 > But there are hundreds of use sites to patch. To be bluntly honest, I don= 't have the motivation to carry that tedious repetitive work out in my free= time. ok, can you review my patch ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope --6R15UivsCI7PIH1t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaDsGdgAKCRBhHseHBAsP q5T5AJ43b4RgL560XCTVNMQHp1Ttzu+Z0wCeNqMKeruStHvszs4WL+vW6I4w+XA= =tWjM -----END PGP SIGNATURE----- --6R15UivsCI7PIH1t-- --===============0047640934220837808== 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". --===============0047640934220837808==--