diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-01-26 08:01:50 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-01-26 08:01:50 +0000 |
commit | 81858371d94ec66aab2b5b64866bd399c7125ad6 (patch) | |
tree | 3e94d353519b7eb4b7d277a041a0321bd01ebf7c /libswscale/swscale_internal.h | |
parent | 3b1ee70312c9a363411a2beb4ee5a5ac105e2fc0 (diff) | |
download | ffmpeg-81858371d94ec66aab2b5b64866bd399c7125ad6.tar.gz |
Add 3 more RGB makros that allow specifying RGB in bytes and any rgb/bgr.
Originally committed as revision 30434 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r-- | libswscale/swscale_internal.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index b159d8f696..836a868055 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -411,6 +411,22 @@ const char *sws_format_name(enum PixelFormat format); || (x)==PIX_FMT_MONOBLACK \ || (x)==PIX_FMT_MONOWHITE \ ) +#define isRGBinBytes(x) ( \ + (x)==PIX_FMT_RGB48BE \ + || (x)==PIX_FMT_RGB48LE \ + || (x)==PIX_FMT_RGBA \ + || (x)==PIX_FMT_ARGB \ + || (x)==PIX_FMT_RGB24 \ + ) +#define isBGRinBytes(x) ( \ + (x)==PIX_FMT_BGRA \ + || (x)==PIX_FMT_ABGR \ + || (x)==PIX_FMT_BGR24 \ + ) +#define isAnyRGB(x) ( \ + isRGBinInt(x) \ + || isBGRinInt(x) \ + ) #define isALPHA(x) ( \ (x)==PIX_FMT_BGR32 \ || (x)==PIX_FMT_BGR32_1 \ |