[FFmpeg-devel] [PATCH 1/2] Replace FFMIN/FFMAX by type specific macros
Michael Niedermayer
michael at niedermayer.cc
Sun Jun 8 02:29:05 EEST 2025
Hi
On Wed, Jun 04, 2025 at 03:05:12AM +0200, Michael Niedermayer wrote:
[...]
> > > #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
> >
> > 1. I don't like that you change the common case (namely the integer one)
> > and thereby making the name longer (and making this patch huge).
>
> I can just rename FFMINI/MAXI to FFMIN/MAX if preferred
are there any objections to FFMIND / FFMINF / FFMAXD / FFMAXF ?
if not i intend to apply these in the next days (unless i forget)
>
>
> > 2. This is supposed to be used to provide optimized platform-specific
> > floating-point min and max functions. How is this supposed to be done
> > with your approach? Would macros.h get internal plattform-specific
> > headers like intreadwrite.h that are only included when building FFmpeg
> > to override the ordinary macros?
>
> I just intended to do the work that noone else wanted to do,
> which was replacing the macros with type specific ones.
>
> These can then be moved to whatever is the best place when optimizations
> are introduced or replaced by a static inline function where thats possible
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250608/bad927a6/attachment.sig>
More information about the ffmpeg-devel
mailing list