On Mon, Sep 7, 2015 at 10:38 PM, wm4 <[email protected]> wrote:
> On Mon, 07 Sep 2015 12:59:52 +0200
> [email protected] (Niels Möller) wrote:
>
>> Vittorio Giovara <[email protected]> writes:
>>
>> > if (desc->flags & AV_PIX_FMT_FLAG_GRAY)
>> >
>> > is much simpler, more concise, and more correct than
>> >
>> > if ((desc->nb_components == 1 || (desc->nb_components == 2 &&
>> > desc->flags & AV_PIX_FMT_FLAG_ALPHA) && !(desc->flags &
>> > AV_PIX_FMT_FLAG_RGB))
>> >
>> > don't you think? ^_*
>>
>> Sure, but AV_PIX_FMT_IS_GRAY(desc) would be concise too. One can have
>> redundant interfaces with extra sugar, without putting redundant data in
>> the data structures.
>>
>> Happy hacking,
>> /Niels
>>
>
> As long as there's no meaning associated with each component descriptor
> in the pixfmt descriptor, it's definitely not redundant.
>
> A AV_PIX_FMT_IS_GRAY(desc) would encode internal knowledge about the
> pixel format into the ABI, which is definitely not what you want.
> (Provided that it'd be a macro.)

I agree.
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to