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 -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
