diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-26 08:01:50 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-26 08:01:50 +0000 |
commit | 60b76a958faee93d45e33b68b2ac9914448aa04a (patch) | |
tree | 73c7beac162733e34e448ae2f4e5c869d5cb5a42 /libswscale | |
parent | 378e6bf1923e4354b7e514a3117ff2de632765b1 (diff) | |
download | mpv-60b76a958faee93d45e33b68b2ac9914448aa04a.tar.bz2 mpv-60b76a958faee93d45e33b68b2ac9914448aa04a.tar.xz |
Add 3 more RGB makros that allow specifying RGB in bytes and any rgb/bgr.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30434 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-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 \ |