Hi,

On Mon, Apr 2, 2012 at 9:34 AM, Derek Buitenhuis
<[email protected]> wrote:
> On 02/04/2012 10:11 AM, Ronald S. Bultje wrote:
>> Why is this necessary?
>>
>> Ronald
>
> Otherwise, isAnyRGB(PIX_FMT_GBRP) fails, which it clearly should not.
>
> This is how FFmpeg did it, but it's kind of ugly. What would you suggest?

Well, let's just say that those macros have all sort of ill-defined
behaviour associated with them. For example, placing
PIX_FMT_MONOWHITE/BLACK under isGray() causes all kind of bad failures
(and used to cause crashes). This isn't because black/white aren't
gray, but because the uses of such generic macros are associated with
specific behaviours in some sort of a "but it works for me!" kind of
way. The same is true for the RGB macros...

Renaming the macros to isPackedRGB would be sufficient if it's just
consistency. Is there a specific case where we need a isRGB(GBRP)
test?

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

Reply via email to