summaryrefslogtreecommitdiffstats
path: root/video/sws_utils.c
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 /video/sws_utils.c
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.
Diffstat (limited to 'video/sws_utils.c')
-rw-r--r--video/sws_utils.c7
1 files changed, 1 insertions, 6 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)