diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2020-03-14 17:58:02 +0200 |
---|---|---|
committer | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2020-03-14 19:47:12 +0200 |
commit | 8861bfa9137e9e4d637f0c681db5029bad7d9e74 (patch) | |
tree | 507dbb5f7b090ced11169bf753328e1c003a9938 /video | |
parent | cb2b5553bfd87ef4a91f946b4ef123f9e0b522d1 (diff) | |
download | mpv-8861bfa9137e9e4d637f0c681db5029bad7d9e74.tar.bz2 mpv-8861bfa9137e9e4d637f0c681db5029bad7d9e74.tar.xz |
vo_gpu: warn if correct-downscaling is ignored
And document that it's ignored with bilinear scaler.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gpu/video.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) |