# HG changeset patch # User michael # Date 1264492910 0 # Node ID 8d89e0052f848694a8219f9b6efa8d465cee3149 # Parent 2a33c1c37e6bdf70a518f44a94282e522ba7ac39 Add 3 more RGB makros that allow specifying RGB in bytes and any rgb/bgr. diff -r 2a33c1c37e6b -r 8d89e0052f84 libswscale/swscale_internal.h --- 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 \