summaryrefslogtreecommitdiff
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-09-04 22:31:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-09-04 22:31:22 +0000
commit736143c8d95c7dedd079567f141f1352021aadc4 (patch)
treedd9ba81a9c8facad915ca4a326e1eb4ab2c1ae83 /libswscale/swscale.c
parent82ab49dc411c1a0694e4dbcc393a10f007fd8b46 (diff)
Fix SWS_FAST_BILINEAR and SWS_POINT with some unscaled rgb<->bgr converters.
Originally committed as revision 27523 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c8
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))