]> git.sesse.net Git - vlc/commitdiff
Workaround another swscale bug.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 20 Apr 2009 20:06:57 +0000 (22:06 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 20 Apr 2009 20:09:16 +0000 (22:09 +0200)
 Some RGB conversion are broken if SWS_ACCURATE_RND is not set.
This commit should be reverted when swscale is fixed (or at least a
check on the version is needed).

modules/video_filter/swscale.c

index 67a4eb90d95f135243bde9dd1397b0f162165d42..61d0d8250423b10eac3fcce496c792a1420bb9b0 100644 (file)
@@ -301,6 +301,17 @@ static int GetParameters( ScalerConfiguration *p_cfg,
         b_has_ao = true;
     }
 
+    /* FIXME TODO removed when ffmpeg is fixed
+     * Without SWS_ACCURATE_RND the quality is really bad for some conversions */
+    switch( i_fmto )
+    {
+    case PIX_FMT_ARGB:
+    case PIX_FMT_RGBA:
+    case PIX_FMT_ABGR:
+        i_sws_flags |= SWS_ACCURATE_RND;
+        break;
+    }
+
     if( p_cfg )
     {
         p_cfg->i_fmti = i_fmti;