Browse Source

Add an isALPHA macro to check if pixel format has alpha channel

Originally committed as revision 28747 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
tags/v0.5
Cédric Schieli 17 years ago
parent
commit
c27516003f
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libswscale/swscale_internal.h

+ 7
- 0
libswscale/swscale_internal.h View File

@@ -273,6 +273,13 @@ const char *sws_format_name(int format);
|| (x)==PIX_FMT_MONOBLACK \
|| (x)==PIX_FMT_MONOWHITE \
)
#define isALPHA(x) ( \
(x)==PIX_FMT_BGR32 \
|| (x)==PIX_FMT_BGR32_1 \
|| (x)==PIX_FMT_RGB32 \
|| (x)==PIX_FMT_RGB32_1 \
|| (x)==PIX_FMT_YUVA420P \
)

static inline int fmt_depth(int fmt)
{


Loading…
Cancel
Save