summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-09-20 18:12:15 +0200
committerNiklas Haas <github-daiK1o@haasn.dev>2023-09-25 12:45:17 +0200
commit57fad2d5f96e4629dab9cb9a4fefb2fba1111662 (patch)
tree19e8a8357a162de76b36ed24784c6fdd180a3788 /video
parent4dc97ea688dddcbf1ee45461009acc37a43ce138 (diff)
downloadmpv-57fad2d5f96e4629dab9cb9a4fefb2fba1111662.tar.bz2
mpv-57fad2d5f96e4629dab9cb9a4fefb2fba1111662.tar.xz
vo_gpu: remove --scale-cutoff etc
Pointless bloat option, hard-coded as 1e-3 now in libplacebo and no reason not to also hard-code in mpv. See-Also: haasn/libplacebo@64d7c5aab06766a9492d3cfffd35333792052cd9
Diffstat (limited to 'video')
-rw-r--r--video/out/filter_kernels.c2
-rw-r--r--video/out/filter_kernels.h1
-rw-r--r--video/out/gpu/video.c13
-rw-r--r--video/out/gpu/video.h1
-rw-r--r--video/out/vo_gpu_next.c1
5 files changed, 5 insertions, 13 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c
index ed17650854..95d99ff316 100644
--- a/video/out/filter_kernels.c
+++ b/video/out/filter_kernels.c
@@ -164,7 +164,7 @@ void mp_compute_lut(struct filter_kernel *filter, int count, int stride,
double r = x * filter->radius / (count - 1);
out_array[x] = sample_filter(filter, r);
- if (fabs(out_array[x]) > filter->value_cutoff)
+ if (fabs(out_array[x]) > 1e-3f)
filter->radius_cutoff = r;
}
} else {
diff --git a/video/out/filter_kernels.h b/video/out/filter_kernels.h
index 1da5f18a35..b8b2f672fb 100644
--- a/video/out/filter_kernels.h
+++ b/video/out/filter_kernels.h
@@ -29,7 +29,6 @@ struct filter_kernel {
struct filter_window f; // the kernel itself
struct filter_window w; // window storage
double clamp; // clamping factor, affects negative weights
- double value_cutoff; // discard all contributions below this value (polar)
// Constant values
const char *window; // default window
bool polar; // whether or not the filter uses polar coordinates
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index d29c58a988..4e226486d5 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -302,12 +302,9 @@ static const struct gl_video_opts gl_video_opts_def = {
.sigmoid_center = 0.75,
.sigmoid_slope = 6.5,
.scaler = {
- {{"lanczos", .params={NAN, NAN}}, {.params = {NAN, NAN}},
- .cutoff = 0.001}, // scale
- {{"hermite", .params={NAN, NAN}}, {.params = {NAN, NAN}},
- .cutoff = 0.001}, // dscale
- {{NULL, .params={NAN, NAN}}, {.params = {NAN, NAN}},
- .cutoff = 0.001}, // cscale
+ {{"lanczos", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // scale
+ {{"hermite", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // dscale
+ {{NULL, .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // cscale
{{"oversample", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // tscale
},
.scaler_resizes_only = true,
@@ -354,7 +351,7 @@ static int validate_error_diffusion_opt(struct mp_log *log, const m_option_t *op
{n"-param1", OPT_FLOATDEF(scaler[i].kernel.params[0])}, \
{n"-param2", OPT_FLOATDEF(scaler[i].kernel.params[1])}, \
{n"-blur", OPT_FLOAT(scaler[i].kernel.blur)}, \
- {n"-cutoff", OPT_FLOAT(scaler[i].cutoff), M_RANGE(0.0, 1.0)}, \
+ {n"-cutoff", OPT_REMOVED("Hard-coded as 0.001")}, \
{n"-taper", OPT_FLOAT(scaler[i].kernel.taper), M_RANGE(0.0, 1.0)}, \
{n"-wparam", OPT_FLOATDEF(scaler[i].window.params[0])}, \
{n"-wblur", OPT_REMOVED("Just adjust filter radius directly")}, \
@@ -1776,8 +1773,6 @@ static void reinit_scaler(struct gl_video *p, struct scaler *scaler,
scaler->kernel->f.radius = conf->radius;
scaler->kernel->clamp = conf->clamp;
- scaler->kernel->value_cutoff = conf->cutoff;
-
scaler->insufficient = !mp_init_filter(scaler->kernel, sizes, scale_factor);
int size = scaler->kernel->size;
diff --git a/video/out/gpu/video.h b/video/out/gpu/video.h
index 93d5ea24f6..f9061fd7aa 100644
--- a/video/out/gpu/video.h
+++ b/video/out/gpu/video.h
@@ -40,7 +40,6 @@ struct scaler_config {
struct scaler_fun window;
float radius;
float antiring;
- float cutoff;
float clamp;
};
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 8803e5b045..b357d8a268 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -2065,7 +2065,6 @@ static void update_render_options(struct vo *vo)
const struct gl_video_opts *opts = p->opts_cache->opts;
pars->params.lut_entries = 1 << opts->scaler_lut_size;
pars->params.antiringing_strength = opts->scaler[0].antiring;
- pars->params.polar_cutoff = opts->scaler[0].cutoff;
pars->params.background_color[0] = opts->background.r / 255.0;
pars->params.background_color[1] = opts->background.g / 255.0;
pars->params.background_color[2] = opts->background.b / 255.0;