diff options
author | Niklas Haas <git@haasn.dev> | 2023-09-20 18:18:59 +0200 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2023-09-25 12:45:17 +0200 |
commit | 44cf6288c73b71d22a98870cb08b1daf9da5e048 (patch) | |
tree | be248ec9298a0c7be787f64e215834aee45d4a01 /video/out/gpu/video.c | |
parent | 57fad2d5f96e4629dab9cb9a4fefb2fba1111662 (diff) | |
download | mpv-44cf6288c73b71d22a98870cb08b1daf9da5e048.tar.bz2 mpv-44cf6288c73b71d22a98870cb08b1daf9da5e048.tar.xz |
vo_gpu: remove --scaler-lut-size
Pointless bloat option, hard-coded as 256 now in libplacebo and no
reason not to also hard-code in mpv.
See-Also: haasn/libplacebo@64d7c5aab06766a9492d3cfffd35333792052cd9
Diffstat (limited to 'video/out/gpu/video.c')
-rw-r--r-- | video/out/gpu/video.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 4e226486d5..69be403933 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -311,7 +311,6 @@ static const struct gl_video_opts gl_video_opts_def = { .correct_downscaling = true, .linear_downscaling = true, .sigmoid_upscaling = true, - .scaler_lut_size = 6, .interpolation_threshold = 0.01, .alpha_mode = ALPHA_BLEND_TILES, .background = {0, 0, 0, 255}, @@ -425,7 +424,7 @@ const struct m_sub_options gl_video_conf = { SCALER_OPTS("dscale", SCALER_DSCALE), SCALER_OPTS("cscale", SCALER_CSCALE), SCALER_OPTS("tscale", SCALER_TSCALE), - {"scaler-lut-size", OPT_INT(scaler_lut_size), M_RANGE(4, 10)}, + {"scaler-lut-size", OPT_REMOVED("hard-coded as 8")}, {"scaler-resizes-only", OPT_BOOL(scaler_resizes_only)}, {"correct-downscaling", OPT_BOOL(correct_downscaling)}, {"linear-downscaling", OPT_BOOL(linear_downscaling)}, @@ -1784,17 +1783,16 @@ static void reinit_scaler(struct gl_video *p, struct scaler *scaler, int stride = width * num_components; assert(size <= stride); - scaler->lut_size = 1 << p->opts.scaler_lut_size; - - float *weights = talloc_array(NULL, float, scaler->lut_size * stride); - mp_compute_lut(scaler->kernel, scaler->lut_size, stride, weights); + static const int lut_size = 256; + float *weights = talloc_array(NULL, float, lut_size * stride); + mp_compute_lut(scaler->kernel, lut_size, stride, weights); bool use_1d = scaler->kernel->polar && (p->ra->caps & RA_CAP_TEX_1D); struct ra_tex_params lut_params = { .dimensions = use_1d ? 1 : 2, - .w = use_1d ? scaler->lut_size : width, - .h = use_1d ? 1 : scaler->lut_size, + .w = use_1d ? lut_size : width, + .h = use_1d ? 1 : lut_size, .d = 1, .format = fmt, .render_src = true, |