From dc1793048f234dc2c35ba19f17a5567ec74136d8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 26 Jan 2015 02:03:44 +0100 Subject: vo_opengl: make "mitchell" the hq default filter for downscaling Seems like several people agree that it's a good filter for downscaling. Setting this option by default may also prevent people from accidentally using an unsuitable filter for downscaling by setting "scale" and without being aware of the impliciations (maybe). On the other hand, this change is not strictly backwards compatible for the same reasons. Also, allow disabling this option with scale-down="" (before this, not setting it was the only way to do this - not possible anymore if it's set by default). This is what the change in handle_scaler_opt() does. --- DOCS/man/vo.rst | 2 +- video/out/gl_video.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index 4a02b7cfa8..d5be46ac9b 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -597,7 +597,7 @@ Available video output drivers are: This is equivalent to:: - --vo=opengl:scale=spline36:dither-depth=auto:fbo-format=rgba16:fancy-downscaling:sigmoid-upscaling + --vo=opengl:scale=spline36:scale-down=mitchell:dither-depth=auto:fbo-format=rgba16:fancy-downscaling:sigmoid-upscaling Note that some cheaper LCDs do dithering that gravely interferes with ``opengl``'s dithering. Disabling dithering with ``dither-depth=no`` helps. diff --git a/video/out/gl_video.c b/video/out/gl_video.c index d1d4d9713b..9e25af376b 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -350,6 +350,7 @@ const struct gl_video_opts gl_video_opts_hq_def = { .sigmoid_slope = 6.5, .sigmoid_upscaling = 1, .scalers = { "spline36", "bilinear" }, + .dscaler = "mitchell", .scaler_params = {{NAN, NAN}, {NAN, NAN}}, .scaler_radius = {3, 3}, .alpha_mode = 2, @@ -2720,7 +2721,7 @@ struct gl_video *gl_video_init(GL *gl, struct mp_log *log, struct osd_state *osd // Get static string for scaler shader. static const char *handle_scaler_opt(const char *name) { - if (name) { + if (name && name[0]) { const struct filter_kernel *kernel = mp_find_filter_kernel(name); if (kernel) return kernel->name; -- cgit v1.2.3