Skip to content
Snippets Groups Projects
Commit c2751600 authored by Cédric Schieli's avatar Cédric Schieli
Browse files

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
parent 2c897342
No related branches found
No related tags found
No related merge requests found
...@@ -273,6 +273,13 @@ const char *sws_format_name(int format); ...@@ -273,6 +273,13 @@ const char *sws_format_name(int format);
|| (x)==PIX_FMT_MONOBLACK \ || (x)==PIX_FMT_MONOBLACK \
|| (x)==PIX_FMT_MONOWHITE \ || (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) static inline int fmt_depth(int fmt)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment