On Sun, Mar 19, 2017 at 10:37:30PM +0100, Clément Bœsch wrote:
> On Sun, Mar 19, 2017 at 10:13:37PM +0100, Michael Niedermayer wrote:
> [...]
> > > > > +static av_always_inline int isBayer(enum AVPixelFormat pix_fmt)
> > > > > +{
> > > > > + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
> > > > > + av_assert0(desc);
> > > > > + return !strncmp(desc->name, "bayer_", 6);
> > > >
> > > > iam not sure strncmp() is a good idea speed wise
> > > >
> > >
> > > In a non-bayer case, the function will return in the worst case after the
> > > 2nd character, I have high doubt about this being a speed issue. We can
> > > introduce a flag for this, but I don't think it's worth.
> >
> > i think needing to call libc is a bit ugly here
> >
>
> It's already how we do it in libavutil/pixdesc.c.
>
> But anyway, how about the 2 attached patches?they look nice thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
