changeset 30392:8d89e0052f84

Add 3 more RGB makros that allow specifying RGB in bytes and any rgb/bgr.
author michael
date Tue, 26 Jan 2010 08:01:50 +0000
parents 2a33c1c37e6b
children db62840d27ae
files libswscale/swscale_internal.h
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale_internal.h	Tue Jan 26 07:40:14 2010 +0000
+++ b/libswscale/swscale_internal.h	Tue Jan 26 08:01:50 2010 +0000
@@ -411,6 +411,22 @@
         || (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     \