]> git.sesse.net Git - ffmpeg/commitdiff
Add 3 more RGB makros that allow specifying RGB in bytes and any rgb/bgr.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 26 Jan 2010 08:01:50 +0000 (08:01 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 26 Jan 2010 08:01:50 +0000 (08:01 +0000)
Originally committed as revision 30434 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/swscale_internal.h

index b159d8f6969568579df13efa525c837aa2134e82..836a8680552d6b8fa3b411157023178703f7eeab 100644 (file)
@@ -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     \