[FFmpeg-devel] [PATCH]lavf/webpenc: Do not set alpha flag for yuv420p

Ronald S. Bultje rsbultje at gmail.com
Mon May 2 14:36:16 CEST 2016


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;
}

Ronald


More information about the ffmpeg-devel mailing list