rgb24toyv12 isnt accuratly rounding, so disable it as well when the
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Sep 2008 04:40:51 +0000 (04:40 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Sep 2008 04:40:51 +0000 (04:40 +0000)
user asks for accurate rounding.

Originally committed as revision 27585 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/swscale.c

index 9dcb6f9..ff4738a 100644 (file)
@@ -2173,7 +2173,7 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH
         }
 
         /* bgr24toYV12 */
-        if (srcFormat==PIX_FMT_BGR24 && dstFormat==PIX_FMT_YUV420P)
+        if (srcFormat==PIX_FMT_BGR24 && dstFormat==PIX_FMT_YUV420P && !(flags & SWS_ACCURATE_RND))
             c->swScale= bgr24toyv12Wrapper;
 
         /* rgb/bgr -> rgb/bgr (no dither needed forms) */