summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-24 14:31:11 +0200
committerwm4 <wm4@nowhere>2020-04-24 14:31:11 +0200
commit8909bf3317b26f35265efa7dae534f430c636bb3 (patch)
treed74e4fbfb042ee02e67e2b984c9fba9c9a96e22b
parent77738ac6f572edc0b34879b5741e192ccb89a9e7 (diff)
downloadmpv-8909bf3317b26f35265efa7dae534f430c636bb3.tar.bz2
mpv-8909bf3317b26f35265efa7dae534f430c636bb3.tar.xz
sws_utils: remove unused brightness etc. controls
Used to be used by vo_x11, and some other situations where software conversion was employed. Haven't seen anyone complain about how software brightness controls went away (originating from mplayer), so whatever, it won't be needed again.
-rw-r--r--video/sws_utils.c7
-rw-r--r--video/sws_utils.h1
2 files changed, 1 insertions, 7 deletions
diff --git a/video/sws_utils.c b/video/sws_utils.c
index 1a29d87308..1cce8ae4cd 100644
--- a/video/sws_utils.c
+++ b/video/sws_utils.c
@@ -166,9 +166,6 @@ static bool cache_valid(struct mp_sws_context *ctx)
return mp_image_params_equal(&ctx->src, &old->src) &&
mp_image_params_equal(&ctx->dst, &old->dst) &&
ctx->flags == old->flags &&
- ctx->brightness == old->brightness &&
- ctx->contrast == old->contrast &&
- ctx->saturation == old->saturation &&
ctx->allow_zimg == old->allow_zimg &&
ctx->force_scaler == old->force_scaler &&
(!ctx->opts_cache || !m_config_cache_update(ctx->opts_cache));
@@ -190,8 +187,6 @@ struct mp_sws_context *mp_sws_alloc(void *talloc_ctx)
*ctx = (struct mp_sws_context) {
.log = mp_null_log,
.flags = SWS_BILINEAR,
- .contrast = 1 << 16, // 1.0 in 16.16 fixed point
- .saturation = 1 << 16,
.force_reload = true,
.params = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT},
.cached = talloc_zero(ctx, struct mp_sws_context),
@@ -320,7 +315,7 @@ int mp_sws_reinit(struct mp_sws_context *ctx)
int r =
sws_setColorspaceDetails(ctx->sws, sws_getCoefficients(s_csp), s_range,
sws_getCoefficients(d_csp), d_range,
- ctx->brightness, ctx->contrast, ctx->saturation);
+ 0, 1 << 16, 1 << 16);
ctx->supports_csp = r >= 0;
if (sws_init_context(ctx->sws, ctx->src_filter, ctx->dst_filter) < 0)
diff --git a/video/sws_utils.h b/video/sws_utils.h
index 24846f544e..2c7af5eac0 100644
--- a/video/sws_utils.h
+++ b/video/sws_utils.h
@@ -35,7 +35,6 @@ struct mp_sws_context {
// User configuration. These can be changed freely, at any time.
// mp_sws_scale() will handle the changes transparently.
int flags;
- int brightness, contrast, saturation;
bool allow_zimg; // use zimg if available (ignores filters and all)
bool force_reload;
// These are also implicitly set by mp_sws_scale(), and thus optional.