changeset 28712:108abf7064d3

Add an isALPHA macro to check if pixel format has alpha channel
author sdrik
date Fri, 27 Feb 2009 22:23:20 +0000
parents 5669ee1ebe39
children e758bf5350ee
files libswscale/swscale_internal.h
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale_internal.h	Fri Feb 27 22:13:55 2009 +0000
+++ b/libswscale/swscale_internal.h	Fri Feb 27 22:23:20 2009 +0000
@@ -273,6 +273,13 @@
         || (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)
 {