[FFmpeg-cvslog] r28747 - trunk/libswscale/swscale_internal.h

sdrik subversion
Fri Feb 27 23:23:20 CET 2009


Author: sdrik
Date: Fri Feb 27 23:23:20 2009
New Revision: 28747

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

Modified:
   trunk/libswscale/swscale_internal.h

Modified: trunk/libswscale/swscale_internal.h
==============================================================================
--- trunk/libswscale/swscale_internal.h	Fri Feb 27 23:13:55 2009	(r28746)
+++ trunk/libswscale/swscale_internal.h	Fri Feb 27 23:23:20 2009	(r28747)
@@ -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)
 {




More information about the ffmpeg-cvslog mailing list