summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r--video/out/gl_video.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 3478c8afcc..359013a6e6 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -289,6 +289,7 @@ static const struct gl_video_opts gl_video_opts_def = {
.scale_sep = 1,
.scalers = { "bilinear", "bilinear" },
.scaler_params = {{NAN, NAN}, {NAN, NAN}},
+ .scaler_radius = {NAN, NAN},
.alpha_mode = 2,
};
@@ -300,6 +301,7 @@ const struct gl_video_opts gl_video_opts_hq_def = {
.scale_sep = 1,
.scalers = { "spline36", "bilinear" },
.scaler_params = {{NAN, NAN}, {NAN, NAN}},
+ .scaler_radius = {NAN, NAN},
.alpha_mode = 2,
};
@@ -326,6 +328,8 @@ const struct m_sub_options gl_video_conf = {
OPT_FLOAT("lparam2", scaler_params[0][1], 0),
OPT_FLOAT("cparam1", scaler_params[1][0], 0),
OPT_FLOAT("cparam2", scaler_params[1][1], 0),
+ OPT_FLOATRANGE("lradius", scaler_radius[0], 0, 1.0, 8.0),
+ OPT_FLOATRANGE("cradius", scaler_radius[1], 0, 1.0, 8.0),
OPT_FLAG("scaler-resizes-only", scaler_resizes_only, 0),
OPT_FLAG("fancy-downscaling", fancy_downscaling, 0),
OPT_FLAG("indirect", indirect, 0),
@@ -1117,6 +1121,12 @@ static void init_scaler(struct gl_video *p, struct scaler *scaler)
scaler->kernel->params[n] = p->opts.scaler_params[scaler->index][n];
}
+ if (scaler->kernel->radius < 0) {
+ float radius = p->opts.scaler_radius[scaler->index];
+ if (!isnan(radius))
+ scaler->kernel->radius = radius;
+ }
+
update_scale_factor(p, scaler->kernel);
int size = scaler->kernel->size;