From 8861bfa9137e9e4d637f0c681db5029bad7d9e74 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Sat, 14 Mar 2020 17:58:02 +0200 Subject: vo_gpu: warn if correct-downscaling is ignored And document that it's ignored with bilinear scaler. --- video/out/gpu/video.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'video') diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 3c06751959..539934fe67 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -292,6 +292,7 @@ struct gl_video { bool broken_frame; // temporary error state bool colorspace_override_warned; + bool correct_downscaling_warned; }; static const struct gl_video_opts gl_video_opts_def = { @@ -4022,6 +4023,16 @@ static void reinit_from_options(struct gl_video *p) "E.g.: --video-sync=display-resample\n"); p->dsi_warned = true; } + + if (p->opts.correct_downscaling && !p->correct_downscaling_warned) { + const char *name = p->opts.scaler[SCALER_DSCALE].kernel.name; + if (!name) + name = p->opts.scaler[SCALER_SCALE].kernel.name; + if (!name || !strcmp(name, "bilinear")) { + MP_WARN(p, "correct-downscaling requires non-bilinear scaler.\n"); + p->correct_downscaling_warned = true; + } + } } void gl_video_configure_queue(struct gl_video *p, struct vo *vo) -- cgit v1.2.3