diff options
author | sdrik <sdrik@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-27 22:23:20 +0000 |
---|---|---|
committer | sdrik <sdrik@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-27 22:23:20 +0000 |
commit | f3ea1ffd7b86ce7143e17e3cc070f4fabcd13d7e (patch) | |
tree | 99efbbb4932cf9ad93288a99477617385b2a4343 | |
parent | 255c11b7452b5ef63d6850f70c9aa3a61bc32219 (diff) | |
download | mpv-f3ea1ffd7b86ce7143e17e3cc070f4fabcd13d7e.tar.bz2 mpv-f3ea1ffd7b86ce7143e17e3cc070f4fabcd13d7e.tar.xz |
Add an isALPHA macro to check if pixel format has alpha channel
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28747 b3059339-0415-0410-9bf9-f77b7e298cf2
-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) { |