mirror of https://github.com/mpv-player/mpv
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@64d7c5aab0
This commit is contained in:
parent
4dc97ea688
commit
57fad2d5f9
|
@ -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.
|
||||
|
|
|
@ -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=<value>``, ``--cscale-cutoff=<value>``, ``--dscale-cutoff=<value>``
|
||||
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=<value>``, ``--scale-wtaper=<value>``, ``--dscale-taper=<value>``, ``--dscale-wtaper=<value>``, ``--cscale-taper=<value>``, ``--cscale-wtaper=<value>``, ``--tscale-taper=<value>``, ``--tscale-wtaper=<value>``
|
||||
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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -40,7 +40,6 @@ struct scaler_config {
|
|||
struct scaler_fun window;
|
||||
float radius;
|
||||
float antiring;
|
||||
float cutoff;
|
||||
float clamp;
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue