# HG changeset patch # User michael # Date 1221185137 0 # Node ID 4ff95ffda171a5d7e49d6124a7b68185fdb055a6 # Parent 8202118fbaa1ca1f0040fab0778eaec4fb87913e Do not use the unscaled yuv->rgb converters if SWS_ACCURATE_RND is set, because they do not accurately round. diff -r 8202118fbaa1 -r 4ff95ffda171 libswscale/swscale.c --- 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); }