From 131609dc2a75e6783396853023d6f49333e3f495 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 21 Dec 2011 06:41:57 +0100 Subject: sws: readd PAL8 to isPacked() Fixes PAL8 to YUV conversion. --- libswscale/swscale_internal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 50554439f0..bb3b52d8c9 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -609,9 +609,11 @@ const char *sws_format_name(enum PixelFormat format); (av_pix_fmt_descriptors[x].nb_components == 2 || \ av_pix_fmt_descriptors[x].nb_components == 4) -#define isPacked(x) \ +#define isPacked(x) (\ (av_pix_fmt_descriptors[x].nb_components >= 2 && \ - !(av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) + !(av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) || \ + (x) == PIX_FMT_PAL8\ + ) #define isPlanar(x) \ (av_pix_fmt_descriptors[x].nb_components >= 2 && \ -- cgit v1.2.3