summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-09-12 02:05:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-09-12 02:05:37 +0000
commit4155ece530ce66f46f2044a3556cfdaac690fafa (patch)
tree64e70c14fc4aed91bf6b6fad615bd39d7da2f122 /libswscale
parenta8fd7e764a45842fb3ef389287897295e238ac52 (diff)
downloadffmpeg-4155ece530ce66f46f2044a3556cfdaac690fafa.tar.gz
Do not use the unscaled yuv->rgb converters if SWS_ACCURATE_RND is set,
because they do not accurately round. Originally committed as revision 27584 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 83373fcffe..9dcb6f93e4 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2160,7 +2160,8 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH
}
#ifdef CONFIG_GPL
/* yuv2bgr */
- if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat)))
+ if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat))
+ && !(flags & SWS_ACCURATE_RND))
{
c->swScale= yuv2rgb_get_func_ptr(c);
}