[FFmpeg-devel] [PATCH] imgconvert: add macro pixdesc_has_alpha for checking if a pixel format has an alpha component
Stefano Sabatini
stefasab at gmail.com
Sat Mar 10 00:14:01 CET 2012
On date Friday 2012-03-09 18:04:26 +0100, Michael Niedermayer encoded:
> On Fri, Mar 09, 2012 at 05:16:41PM +0100, Stefano Sabatini wrote:
> > On date Thursday 2012-03-08 17:01:28 +0100, Michael Niedermayer encoded:
> > > On Thu, Mar 08, 2012 at 02:44:47PM +0100, Stefano Sabatini wrote:
> > > > Reduce redundancy and simplify.
> > > > ---
> > > > libavcodec/imgconvert.c | 21 ++++++---------------
> > > > 1 files changed, 6 insertions(+), 15 deletions(-)
> > > >
> > > > diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
> > > > index 058a0d5..0d1ce3f 100644
> > > > --- a/libavcodec/imgconvert.c
> > > > +++ b/libavcodec/imgconvert.c
> > > > @@ -55,9 +55,12 @@
> > > > #define deinterlace_line deinterlace_line_c
> > > > #endif
> > > >
> > > > +#define pixdesc_has_alpha(pix_desc) \
> > > > + (pix_desc->nb_components == 2 || pix_desc->nb_components == 4 \
> > > > + || pix_desc->flags & PIX_FMT_PAL)
> > >
> > > does this match is_alpha for all pix fmts ?
> >
> > These are the alpha formats, after and before:
>
> LGTM then
Applied.
--
FFmpeg = Fantastic and Faithful Mind-dumbing Patchable Ephemeral Gladiator
More information about the ffmpeg-devel
mailing list