summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/video.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-09-21 20:45:31 +0200
committerNiklas Haas <github-daiK1o@haasn.dev>2023-09-21 21:15:29 +0200
commite999e2b0377579a9f4b5a62088950457daaf24e1 (patch)
tree93973d3d2404411ac427828d250a400087f6f2ac /video/out/gpu/video.c
parenteae99b117ae9ff0d94593640715c3466ba5dda4b (diff)
downloadmpv-e999e2b0377579a9f4b5a62088950457daaf24e1.tar.bz2
mpv-e999e2b0377579a9f4b5a62088950457daaf24e1.tar.xz
vo_gpu: don't override scaler options with default ones
There was assumption in the code that default settings are compatible with dumb mode and are only one that should be used in this case. Force bilinear if dumb mode is enabled.
Diffstat (limited to 'video/out/gpu/video.c')
-rw-r--r--video/out/gpu/video.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index 1b9022a48c..c55994f3b0 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3850,8 +3850,18 @@ static void check_gl_features(struct gl_video *p)
"Most extended features will be disabled.\n");
}
p->dumb_mode = true;
+ static const struct scaler_config dumb_scaler_config = {
+ {"bilinear", .params = {NAN, NAN}},
+ {.params = {NAN, NAN}},
+ };
// Most things don't work, so whitelist all options that still work.
p->opts = (struct gl_video_opts){
+ .scaler = {
+ [SCALER_SCALE] = dumb_scaler_config,
+ [SCALER_DSCALE] = dumb_scaler_config,
+ [SCALER_CSCALE] = dumb_scaler_config,
+ [SCALER_TSCALE] = dumb_scaler_config,
+ },
.gamma = p->opts.gamma,
.gamma_auto = p->opts.gamma_auto,
.pbo = p->opts.pbo,
@@ -3875,8 +3885,6 @@ static void check_gl_features(struct gl_video *p)
.target_prim = p->opts.target_prim,
.target_peak = p->opts.target_peak,
};
- for (int n = 0; n < SCALER_COUNT; n++)
- p->opts.scaler[n] = gl_video_opts_def.scaler[n];
if (!have_fbo)
p->use_lut_3d = false;
return;