[FFmpeg-devel] [PATCH] imgconvert: add macro pixdesc_has_alpha for checking if a pixel format has an alpha component
Michael Niedermayer
michaelni at gmx.at
Thu Mar 8 17:01:28 CET 2012
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 ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120308/b0222ed2/attachment.asc>
More information about the ffmpeg-devel
mailing list