[FFmpeg-devel] [PATCH 1/2] Replace FFMIN/FFMAX by type specific macros

Rémi Denis-Courmont remi at remlab.net
Sat Jun 28 14:48:15 EEST 2025


Le sunnuntai 8. kesäkuuta 2025, 2.29.05 Itä-Euroopan kesäaika Michael 
Niedermayer a écrit :
> 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)

Sorry for the delay. If the new macros are to be internal anyway, we could use 
_Generic to have a single version for all floating point types rather than 
distinguish single and double, and risk accidentally down- or up-converting.

In any case, thanks for working on this.

-- 
Rémi Denis-Courmont
Tapio's place new town, former Finnish Republic of Uusimaa





More information about the ffmpeg-devel mailing list