changeset 30130:0d34fd3b0db8

Simplify usePal() macro, make it use av_pix_fmt_descriptors.
author stefano
date Sun, 03 Jan 2010 00:22:49 +0000
parents a8283bcc8d2e
children 154c026fcac6
files libswscale/swscale.c
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Sun Jan 03 00:09:24 2010 +0000
+++ b/libswscale/swscale.c	Sun Jan 03 00:22:49 2010 +0000
@@ -188,13 +188,7 @@
         || isRGB(x)                 \
         || isBGR(x)                 \
     )
-#define usePal(x)           (       \
-           (x)==PIX_FMT_PAL8        \
-        || (x)==PIX_FMT_BGR4_BYTE   \
-        || (x)==PIX_FMT_RGB4_BYTE   \
-        || (x)==PIX_FMT_BGR8        \
-        || (x)==PIX_FMT_RGB8        \
-    )
+#define usePal(x) (av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL)
 
 #define RGB2YUV_SHIFT 15
 #define BY ( (int)(0.114*219/255*(1<<RGB2YUV_SHIFT)+0.5))