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

Rémi Denis-Courmont remi at remlab.net
Sun Jun 29 17:31:51 EEST 2025


Le sunnuntai 29. kesäkuuta 2025, 14.04.38 Itä-Euroopan kesäaika Kacper 
Michajlow a écrit :
> I made a quick experiment and while there are things to improve/fix, I
> don't see _Generic being one of those issues.
> https://code.ffmpeg.org/kasper93/FFmpeg/commit/0cf27668aa3496bb7e5f45c08e88a
> 037988550cd

I didn't separate the macros for the literal case like you did, so it's like 
comparing apples and oranges.

> I'm testing with clang 21.0.0 and gcc 14.2.0, this is what I have
> locally. If the problem is with other versions, let me know, this
> information also has been elusive.
> 
> > I don't know what else I can add.
> 
> Ok, let me ask straight then. Can you push your code somewhere, so we
> can validate your claim that it is not feasible to use C11 generics
> here?

I never said that it was not feasible with generics. I said that, all other 
things being equal, it needs nesting, and that some compilers don't seem to 
handle that well.

If you think you can solve this, go ahead. You're most likely better off not 
looking at what I did, but rather coming up with fresh ideas.

-- 
ヅニ-クーモン・レミ
Villeneuve de Tapiola, ex-République finlandaise d´Uusimaa





More information about the ffmpeg-devel mailing list