diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-09-04 22:31:22 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-09-04 22:31:22 +0000 |
commit | c1fa10dc7ec74c38354ec40b8c7984edd6510b59 (patch) | |
tree | 586d6ee8153779bee662597ade9765694bafe70f /libswscale | |
parent | 172a4bfaea255b29e718a9764e7bf5180d58f77c (diff) | |
download | mpv-c1fa10dc7ec74c38354ec40b8c7984edd6510b59.tar.bz2 mpv-c1fa10dc7ec74c38354ec40b8c7984edd6510b59.tar.xz |
Fix SWS_FAST_BILINEAR and SWS_POINT with some unscaled rgb<->bgr converters.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27523 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 7b96298781..2c439d2f41 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2161,17 +2161,11 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH && srcFormat != PIX_FMT_MONOBLACK && dstFormat != PIX_FMT_MONOBLACK && dstFormat != PIX_FMT_RGB32_1 && dstFormat != PIX_FMT_BGR32_1 - && !needsDither) + && (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)))) c->swScale= rgb2rgbWrapper; /* LQ converters if -sws 0 or -sws 4*/ if (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)){ - /* rgb/bgr -> rgb/bgr (dither needed forms) */ - if ( (isBGR(srcFormat) || isRGB(srcFormat)) - && (isBGR(dstFormat) || isRGB(dstFormat)) - && needsDither) - c->swScale= rgb2rgbWrapper; - /* yv12_to_yuy2 */ if (srcFormat == PIX_FMT_YUV420P && (dstFormat == PIX_FMT_YUYV422 || dstFormat == PIX_FMT_UYVY422)) |