[SCM] libav/experimental: Add an isALPHA macro to check if pixel format has alpha channel

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:39:50 UTC 2013


The following commit has been merged in the experimental branch:
commit c27516003fb01b7e0cde9d5bbe4f2cbb747005ce
Author: Cédric Schieli <cschieli at gmail.com>
Date:   Fri Feb 27 22:23:20 2009 +0000

    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

diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index cf15742..cdf3754 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)
 {

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list