diff options
author | Cédric Schieli <cschieli@gmail.com> | 2009-02-27 22:23:20 +0000 |
---|---|---|
committer | Cédric Schieli <cschieli@gmail.com> | 2009-02-27 22:23:20 +0000 |
commit | c27516003fb01b7e0cde9d5bbe4f2cbb747005ce (patch) | |
tree | 2fff109a9b2f1c042c2df679371ee07118d7912d | |
parent | 2c8973425540ba9b71d95d67ba678233737a92a4 (diff) | |
download | ffmpeg-c27516003fb01b7e0cde9d5bbe4f2cbb747005ce.tar.gz |
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
-rw-r--r-- | libswscale/swscale_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index cf157428b3..cdf3754d14 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -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) { |