aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-03 00:22:49 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-03 00:22:49 +0000
commitf412d5e97aadf184c67f721fd8a07acdefad2a78 (patch)
tree5590ae786437c6f627d74dab7be9464e25232d0c
parentb3cf7cb144cd6c70ea8501a0ffaa4bc68619037e (diff)
downloadffmpeg-f412d5e97aadf184c67f721fd8a07acdefad2a78.tar.gz
Simplify usePal() macro, make it use av_pix_fmt_descriptors.
Originally committed as revision 30172 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
-rw-r--r--libswscale/swscale.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 9f81a8b3a8..12bc60850d 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -188,13 +188,7 @@ const char * swscale_license(void)
|| 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))