summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefano <stefano@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-16 19:11:03 +0000
committerstefano <stefano@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-16 19:11:03 +0000
commitd77dc477c51ebc5a59b417fab14e58b00f3e0de3 (patch)
tree956b89b17763fef8f1cb14763cc59eb3517f1bad
parent3c8de6d0064f53af517618654bc73660058dbe48 (diff)
downloadmpv-d77dc477c51ebc5a59b417fab14e58b00f3e0de3.tar.bz2
mpv-d77dc477c51ebc5a59b417fab14e58b00f3e0de3.tar.xz
Simplify code in sws_getContext() which logs if the destination format
support dithering, remove the const char *dither variable and use a literal string instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30329 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libswscale/swscale.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 612b250c72..dc97389fd0 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2809,11 +2809,6 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
assert(c->chrDstH <= dstH);
if (flags&SWS_PRINT_INFO) {
-#ifdef DITHER1XBPP
- const char *dither= " dithered";
-#else
- const char *dither= "";
-#endif
if (flags&SWS_FAST_BILINEAR)
av_log(c, AV_LOG_INFO, "FAST_BILINEAR scaler, ");
else if (flags&SWS_BILINEAR)
@@ -2841,7 +2836,11 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
av_log(c, AV_LOG_INFO, "from %s to%s %s ",
sws_format_name(srcFormat),
- dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 ? dither : "",
+#ifdef DITHER1XBPP
+ dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 ? " dithered" : "",
+#else
+ "",
+#endif
sws_format_name(dstFormat));
if (flags & SWS_CPU_CAPS_MMX2)