[vlc-devel] [VLC 3.x 2/2] codec: dav1d: do not use VLC_CLIP

Rémi Denis-Courmont remi at remlab.net
Wed Apr 7 12:49:47 UTC 2021


Hi,

Using _Generic while preserving the promotion rules over all three parameter types is going to be horrible. And it will make the macro non-constant, which might break some other uses.

And ultimately, why the heck should VLC developers have to remember to use VLC_CLIP for min-max? There are enough VLC idiosyncrasies that one needs to learn and remember, not to add gratuitous ones.

Le 7 avril 2021 11:07:08 GMT+03:00, Alexandre Janniaux <ajanni at videolabs.io> a écrit :
>Hi,
>
>On Wed, Apr 07, 2021 at 07:29:21AM +0200, Steve Lhomme wrote:
>> On 2021-04-06 16:25, Rémi Denis-Courmont wrote:
>> > Le tiistaina 6. huhtikuuta 2021, 17.07.01 EEST Steve Lhomme a écrit
>:
>> > > Why ?
>> >
>> > Because it's a poor excuse of a functional macro that is not
>expansion-safe,
>> > and whose behaviour is utterly trivial.
>>
>> I disagree. This is the perfect use case for it. And replacing a one
>liner
>> by 3 lines is never good in my book.
>
>I too prefer VLC_CLIP, but it's non-obvious that it has been
>misused here, whereas it is with condition so the change from
>Marvin makes sense.
>
>Maybe we can switch to using a _Generic/template<> inline
>vlc_clip instead too?
>
>Regards,
>---
>Alexandre Janniaux
>Videolabs
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20210407/5ea13f70/attachment.html>


More information about the vlc-devel mailing list