diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 6f5d61340b..e556402353 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -90,6 +90,7 @@ Interface changes - add `--title-bar` option - add `--window-corners` option - rename `--cdrom-device` to `--cdda-device` + - remove `--scale-cutoff`, `--cscale-cutoff`, `--dscale-cutoff`, `--tscale-cutoff` --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 9c9371d4a6..e397d7b988 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -5347,14 +5347,6 @@ them. moving edges) in exchange for potentially adding more blur. The default for ``--tscale-clamp`` is 1.0, the others default to 0.0. -``--scale-cutoff=``, ``--cscale-cutoff=``, ``--dscale-cutoff=`` - Cut off the filter kernel prematurely once the value range drops below - this threshold. Doing so allows more aggressive pruning of skippable - coefficients by disregarding parts of the LUT which are effectively zeroed - out by the window function. Only affects polar (EWA) filters. The default - is 0.001 for each, which is perceptually transparent but provides a 10%-20% - speedup, depending on the exact radius and filter kernel chosen. - ``--scale-taper=``, ``--scale-wtaper=``, ``--dscale-taper=``, ``--dscale-wtaper=``, ``--cscale-taper=``, ``--cscale-wtaper=``, ``--tscale-taper=``, ``--tscale-wtaper=`` Kernel/window taper factor. Increasing this flattens the filter function. Value range is 0 to 1. A value of 0 (the default) means no flattening, a 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;