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 3CC634B6C6 for ; Tue, 11 Jun 2024 16:17:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C2A3968D886; Tue, 11 Jun 2024 19:17:21 +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 13B9668D882 for ; Tue, 11 Jun 2024 19:17:15 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6579340009 for ; Tue, 11 Jun 2024 16:17:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1718122634; 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=ShKUGxb+10LlckR+XpSzhH9KP1TMxV2tjuQC0p9sttw=; b=L4acmVwlgcAYaCl/e+QYHhGeizeVHPGhOKUkUvD9MhyCVfq4ZfYb+P+X1enpoHn+BUsi2u ecnsh0w20nTAoEB4Javpuh0ARsQPR+yIwmBg3Yf1uRLyjZF4lLZ0YzYM5IGnami1mociXj /5rPK8AcAkWOKhQprZsuebUEY65y6KuyAUGkaD38LDhSLOVcOfd3XFmRtOnO0G8Y/T/qKG y6UC+nhn0BqReUxrlHP6mEebNfbBI8gFmxBwnQ7qKS9YJYgfSVu4EbbkAPNYucaxa1DfXZ 0VvVhhqz8wIFYExAwBPq9GK5oRAzZdjzxKKbC/7F1vaVDmFP3NKYymk/eFvxyA== Date: Tue, 11 Jun 2024 18:17:13 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240611161713.GO2821752@pb2> References: <20240607181947.330026-1-remi@remlab.net> <20240611131519.GI2821752@pb2> <20240611155721.GL2821752@pb2> <4833017d-8fdf-4598-85b0-3fcb43a45ce4@gmail.com> MIME-Version: 1.0 In-Reply-To: <4833017d-8fdf-4598-85b0-3fcb43a45ce4@gmail.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavu/bswap: remove some inline assembler 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="===============5291971681630327882==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5291971681630327882== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ENdgHmmYeq4/Nm8G" Content-Disposition: inline --ENdgHmmYeq4/Nm8G Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 11, 2024 at 01:08:04PM -0300, James Almer wrote: > On 6/11/2024 12:57 PM, Michael Niedermayer wrote: > > On Tue, Jun 11, 2024 at 12:38:37PM -0300, James Almer wrote: > > > On 6/11/2024 10:15 AM, Michael Niedermayer wrote: > > > > On Fri, Jun 07, 2024 at 09:19:46PM +0300, R=E9mi Denis-Courmont wro= te: > > > > > C code or compiler built-ins are preferable over inline assembler= for > > > > > byte-swaps as it allows for better optimisations (e.g. instruction > > > > > scheduling) which would otherwise be impossible. > > > > >=20 > > > > > As with f64c2e710fa1a7b59753224e717f57c48462076f for x86 and Arm, > > > > > this removes the inline assembler on GCC (and Clang) since we now > > > > > require recent enough compiler versions (this indeed seems to wor= k on > > > > > AArch64). > > > > > --- > > > > > libavutil/aarch64/bswap.h | 56 -------------------------------= -------- > > > > > libavutil/avr32/bswap.h | 44 ------------------------------ > > > > > libavutil/bswap.h | 8 +----- > > > > > libavutil/sh4/bswap.h | 48 -------------------------------= -- > > > >=20 > > > > As you are writing that this preferrable for better optimisations > > > > Please provide benchmarks (for sh4, avr32) > > >=20 > > > This is a ridiculous request, considering nobody has such hardware at= all. > >=20 > > Then I think its a ridiculous claim that this optimizes the code > >=20 > > I mean, at some point there was hardware and these optimisations did im= prove > > speed. > >=20 > > This patch is not removing the code because its a rare (or dead) platfo= rm, it removes > > it with the claim that this would "allows for better optimisations" > > Iam sorry but i do not see why asking for the claim in the commit messa= ge > > to be backed up with facts being ridiculous > > The claim in the commit message may be ridiculous >=20 > Compilers have come a long way since 20 years ago when this code was adde= d. > See https://godbolt.org/z/jPose4rj3, where new GCC generates the same code > for sh4. And no inline assembly means instruction scheduling will take th= ese > functions into account. thanks for checking please add a note to the commit message that this was checked for sh-4 that resolves my concern about sh-4 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you drop bombs on a foreign country and kill a hundred thousand innocent people, expect your government to call the consequence "unprovoked inhuman terrorist attacks" and use it to justify dropping more bombs and killing more people. The technology changed, the idea is old. --ENdgHmmYeq4/Nm8G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZmh4iQAKCRBhHseHBAsP q66MAKCHpke5c7wSvc33ZSQpi7vvmebVagCfS/jYFsOOMfiUHM4lGWJD8c38p4A= =QTZM -----END PGP SIGNATURE----- --ENdgHmmYeq4/Nm8G-- --===============5291971681630327882== 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". --===============5291971681630327882==--