changeset 27552:4ff95ffda171

Do not use the unscaled yuv->rgb converters if SWS_ACCURATE_RND is set, because they do not accurately round.
author michael
date Fri, 12 Sep 2008 02:05:37 +0000
parents 8202118fbaa1
children be05ce1c011e
files libswscale/swscale.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Thu Sep 11 22:02:15 2008 +0000
+++ b/libswscale/swscale.c	Fri Sep 12 02:05:37 2008 +0000
@@ -2160,7 +2160,8 @@
         }
 #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);
         }