diff options
author | wm4 <wm4@nowhere> | 2013-07-22 14:41:33 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-22 14:41:33 +0200 |
commit | 0b160e125723baa42aa3e880945817e518946bd2 (patch) | |
tree | 2d4cc87ba08c13b216e3dd8a994849f55827c869 /video/sws_utils.c | |
parent | db9102765afe9f8904ff299632dc09a5035a3eb8 (diff) | |
download | mpv-0b160e125723baa42aa3e880945817e518946bd2.tar.bz2 mpv-0b160e125723baa42aa3e880945817e518946bd2.tar.xz |
vf_scale: actually respect param and param2 suboptions
This was forgotten in commit b81f5e2.
Diffstat (limited to 'video/sws_utils.c')
-rw-r--r-- | video/sws_utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/sws_utils.c b/video/sws_utils.c index 91635cf6dd..ff139ea794 100644 --- a/video/sws_utils.c +++ b/video/sws_utils.c @@ -164,6 +164,7 @@ struct mp_sws_context *mp_sws_alloc(void *talloc_parent) .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), }; talloc_set_destructor(ctx, free_mp_sws); @@ -223,6 +224,9 @@ int mp_sws_reinit(struct mp_sws_context *ctx) av_opt_set_int(ctx->sws, "dsth", dst->h, 0); av_opt_set_int(ctx->sws, "dst_format", d_fmt, 0); + av_opt_set_double(ctx->sws, "param0", ctx->params[0], 0); + av_opt_set_double(ctx->sws, "param1", ctx->params[1], 0); + // This can fail even with normal operation, e.g. if a conversion path // simply does not support these settings. sws_setColorspaceDetails(ctx->sws, sws_getCoefficients(s_csp), s_range, |