Skip to content

Commit

Permalink
vo_gpu: don't override scaler options with default ones
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kasper93 committed Sep 21, 2023
1 parent 6b96385 commit a63d292
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions video/out/gpu/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -3863,8 +3863,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,
Expand All @@ -3888,8 +3898,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;
Expand Down

0 comments on commit a63d292

Please sign in to comment.