On Mon, Sep 7, 2015 at 12:06 PM, Hendrik Leppkes <[email protected]> wrote: > On Mon, Sep 7, 2015 at 11:44 AM, Vittorio Giovara > <[email protected]> wrote: >> On Mon, Sep 7, 2015 at 9:13 AM, Anton Khirnov <[email protected]> wrote: >>> Quoting Vittorio Giovara (2015-09-02 18:59:40) >>>> Applications can now detect rgb/yuv/gray/mono color types just >>>> by looking at pixdesc.flags. >>> >>> Can't you do it already by checking that the pixfmt is single component >>> and not rgb? >> >> you also have gray with alpha which is is two components > > So check if its one component, or two and has the alpha flag? =p
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? ^_* -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
