[FFmpeg-devel] [PATCH]lavf/webpenc: Do not set alpha flag for yuv420p
wm4
nfxjfg at googlemail.com
Mon May 2 20:57:31 CEST 2016
On Mon, 2 May 2016 08:36:16 -0400
"Ronald S. Bultje" <rsbultje at gmail.com> wrote:
> Hi,
>
> On Mon, May 2, 2016 at 5:49 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>
> > On Wednesday 13 April 2016 10:27:03 am you wrote:
> > > Maybe it should just check whether the pixel format is alpha, instead
> > > of whether it's not yuv420p. (Just a suggestion.)
> >
> > Isn't that exactly equivalent to what my patch is doing?
> > Or do I just misunderstand?
> >
> > I just thought that "if (pix_fmt != AV_PIX_FMT_YUV420P)" is shorter than
> > "if (pix_fmt == AV_PIX_FMT_RGB32 || pix_fmt == AV_PIX_FMT_YUVA420P)". Do
> > you
> > disagree?
>
>
> I think he means:
>
> AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
> if (desc->flags & AV_PIX_FMT_FLAG_ALPHA) {
> flags |= 16;
> }
Pretty much - if a better way can't be found.
More information about the ffmpeg-devel
mailing list