changeset 30284:03f99130b7c3

Factorize code which logs the source and destination formats in sws_getContext().
author stefano
date Sat, 16 Jan 2010 18:36:21 +0000
parents 11cf732119e4
children 042ec58ab0e2
files libswscale/swscale.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Sat Jan 16 16:39:46 2010 +0000
+++ b/libswscale/swscale.c	Sat Jan 16 18:36:21 2010 +0000
@@ -2839,12 +2839,10 @@
         else
             av_log(c, AV_LOG_INFO, "ehh flags invalid?! ");
 
-        if (dstFormat==PIX_FMT_BGR555 || dstFormat==PIX_FMT_BGR565)
-            av_log(c, AV_LOG_INFO, "from %s to%s %s ",
-                   sws_format_name(srcFormat), dither, sws_format_name(dstFormat));
-        else
-            av_log(c, AV_LOG_INFO, "from %s to %s ",
-                   sws_format_name(srcFormat), sws_format_name(dstFormat));
+        av_log(c, AV_LOG_INFO, "from %s to%s %s ",
+               sws_format_name(srcFormat),
+               dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 ? dither : "",
+               sws_format_name(dstFormat));
 
         if (flags & SWS_CPU_CAPS_MMX2)
             av_log(c, AV_LOG_INFO, "using MMX2\n");