[FFmpeg-devel] [PATCH 1/2] lavu/bswap: remove some inline assembler

Tomas Härdin git at haerdin.se
Tue Jun 11 18:50:35 EEST 2024


tis 2024-06-11 klockan 12:38 -0300 skrev James Almer:
> On 6/11/2024 10:15 AM, Michael Niedermayer wrote:
> > On Fri, Jun 07, 2024 at 09:19:46PM +0300, Rémi Denis-Courmont
> > wrote:
> > > 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.
> > > 
> > > 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
> > > work on
> > > AArch64).
> > > ---
> > >   libavutil/aarch64/bswap.h | 56 --------------------------------
> > > -------
> > >   libavutil/avr32/bswap.h   | 44 ------------------------------
> > >   libavutil/bswap.h         |  8 +-----
> > >   libavutil/sh4/bswap.h     | 48 --------------------------------
> > > -
> > 
> > As you are writing that this preferrable for better optimisations
> > Please provide benchmarks (for sh4, avr32)
> 
> This is a ridiculous request, considering nobody has such hardware at
> all.

Maybe Måns has? He's the one who added the AVR32 code. The SH4 code was
added all the way back in 2003 in 0c6bd2ea by someone who goes by BERO.

Perhaps we should demand platforms for which we have asm also have FATE
instances?

/Tomas


More information about the ffmpeg-devel mailing list