diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-17 23:29:42 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-17 23:29:42 +0400 |
commit | 9d052adbebf0c85e32e3e011fd33ac633635b234 (patch) | |
tree | 68e79c637dd23f02b279d36e933d872a97c17f5b /libswscale/utils.c | |
parent | 29664fab0c22d3ffffe0fb3a925b192f62218000 (diff) |
swscale/utils: Simplify scaler name printing code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 0d4fc3fc28..b53724c665 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1546,32 +1546,34 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, av_assert0(c->chrDstH <= dstH); if (flags & SWS_PRINT_INFO) { + const char *scaler; if (flags & SWS_FAST_BILINEAR) - av_log(c, AV_LOG_INFO, "FAST_BILINEAR scaler, "); + scaler = "FAST_BILINEAR scaler"; else if (flags & SWS_BILINEAR) - av_log(c, AV_LOG_INFO, "BILINEAR scaler, "); + scaler = "BILINEAR scaler"; else if (flags & SWS_BICUBIC) - av_log(c, AV_LOG_INFO, "BICUBIC scaler, "); + scaler = "BICUBIC scaler"; else if (flags & SWS_X) - av_log(c, AV_LOG_INFO, "Experimental scaler, "); + scaler = "Experimental scaler"; else if (flags & SWS_POINT) - av_log(c, AV_LOG_INFO, "Nearest Neighbor / POINT scaler, "); + scaler = "Nearest Neighbor / POINT scaler"; else if (flags & SWS_AREA) - av_log(c, AV_LOG_INFO, "Area Averaging scaler, "); + scaler = "Area Averaging scaler"; else if (flags & SWS_BICUBLIN) - av_log(c, AV_LOG_INFO, "luma BICUBIC / chroma BILINEAR scaler, "); + scaler = "luma BICUBIC / chroma BILINEAR scaler"; else if (flags & SWS_GAUSS) - av_log(c, AV_LOG_INFO, "Gaussian scaler, "); + scaler = "Gaussian scaler"; else if (flags & SWS_SINC) - av_log(c, AV_LOG_INFO, "Sinc scaler, "); + scaler = "Sinc scaler"; else if (flags & SWS_LANCZOS) - av_log(c, AV_LOG_INFO, "Lanczos scaler, "); + scaler = "Lanczos scaler"; else if (flags & SWS_SPLINE) - av_log(c, AV_LOG_INFO, "Bicubic spline scaler, "); + scaler = "Bicubic spline scaler"; else - av_log(c, AV_LOG_INFO, "ehh flags invalid?! "); + scaler = "ehh flags invalid?!"; - av_log(c, AV_LOG_INFO, "from %s to %s%s ", + av_log(c, AV_LOG_INFO, "%s, from %s to %s%s ", + scaler, av_get_pix_fmt_name(srcFormat), #ifdef DITHER1XBPP dstFormat == AV_PIX_FMT_BGR555 || dstFormat == AV_PIX_FMT_BGR565 || |