diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-04-15 01:27:34 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-04-15 01:27:34 +0000 |
commit | fa65e2f63ac4ac7d2a2030191df0842a31bc5501 (patch) | |
tree | 207c79426955be2f4978f7ef2828dd1fcb01ae3e /libswscale/swscale.c | |
parent | 21c08a3f1c91c6a9fa7dbaf48d14078ecb4b985d (diff) | |
download | ffmpeg-fa65e2f63ac4ac7d2a2030191df0842a31bc5501.tar.gz |
improve horizontal chroma resolution with pal
Originally committed as revision 22994 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 1b21a2f463..0dec5e5e8e 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2036,7 +2036,10 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH c->chrSrcVSubSample+= c->vChrDrop; // drop every 2. pixel for chroma calculation unless user wants full chroma - if((isBGR(srcFormat) || isRGB(srcFormat)) && !(flags&SWS_FULL_CHR_H_INP)) + if((isBGR(srcFormat) || isRGB(srcFormat)) && !(flags&SWS_FULL_CHR_H_INP) + && srcFormat!=PIX_FMT_RGB8 && srcFormat!=PIX_FMT_BGR8 + && srcFormat!=PIX_FMT_RGB4 && srcFormat!=PIX_FMT_BGR4 + && srcFormat!=PIX_FMT_RGB4_BYTE && srcFormat!=PIX_FMT_BGR4_BYTE) c->chrSrcHSubSample=1; if(param){ |