From: Stefano Sabatini Date: Sat, 16 Jan 2010 11:08:16 +0000 (+0000) Subject: Simplify reset_ptr(): employ usePal() macro rather than enumerating X-Git-Tag: v0.6~1905 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e906f4cfb15738b4c0cb56bad64531620af4818;p=platform%2Fupstream%2Flibav.git Simplify reset_ptr(): employ usePal() macro rather than enumerating all the paletted formats. Originally committed as revision 30317 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale --- diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 15071ea..71786b8 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2935,12 +2935,8 @@ static void reset_ptr(const uint8_t* src[], int format) src[3]=NULL; if(!isPlanarYUV(format)) { src[3]=src[2]=NULL; - if( format != PIX_FMT_PAL8 - && format != PIX_FMT_RGB8 - && format != PIX_FMT_BGR8 - && format != PIX_FMT_RGB4_BYTE - && format != PIX_FMT_BGR4_BYTE - ) + + if (!usePal(format)) src[1]= NULL; } }