summaryrefslogtreecommitdiffstats
path: root/video/zimg.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-31 15:18:57 +0100
committerwm4 <wm4@nowhere>2019-10-31 15:26:03 +0100
commit835586513d026bcf1e7dec4693e07c28dda8cedd (patch)
treef96ce1fe2e8a474906ae09e9c9146d6e88030fd4 /video/zimg.h
parentc10ba5eb8e62d04ed80cad512cf4863dadee07f1 (diff)
downloadmpv-835586513d026bcf1e7dec4693e07c28dda8cedd.tar.bz2
mpv-835586513d026bcf1e7dec4693e07c28dda8cedd.tar.xz
sws_utils: shuffle around some shit
Purpose uncertain. I guess it's slightly better, maybe. The move of the sws/zimg options from VO opts (vo_opt_list) to the top-level option list is tricky. VO opts have some helper code in vo.c, that sends VOCTRL_SET_PANSCAN to the VO on every VO opts change. That's because updating certain VO options used to be this way (and not just the panscan option). This isn't needed anymore for sws/zimg options, so explicitly move them away.
Diffstat (limited to 'video/zimg.h')
-rw-r--r--video/zimg.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/video/zimg.h b/video/zimg.h
index 0d9c139f9a..9fa247d061 100644
--- a/video/zimg.h
+++ b/video/zimg.h
@@ -33,6 +33,7 @@ struct mp_zimg_context {
struct mp_image_params src, dst;
// Cached zimg state (if any). Private, do not touch.
+ struct m_config_cache *opts_cache;
zimg_filter_graph *zimg_graph;
void *zimg_tmp;
struct mp_zimg_repack *zimg_src;
@@ -43,6 +44,12 @@ struct mp_zimg_context {
// talloc_free() to release it).
struct mp_zimg_context *mp_zimg_alloc(void);
+// Enable auto-update of parameters from command line. Don't try to set custom
+// options (other than possibly .src/.dst), because they might be overwritten
+// if the user changes any options.
+void mp_zimg_enable_cmdline_opts(struct mp_zimg_context *ctx,
+ struct mpv_global *g);
+
// Try to build the conversion chain using the parameters currently set in ctx.
// If this succeeds, mp_zimg_convert() will always succeed (probably), as long
// as the input has the same parameters.
@@ -57,7 +64,3 @@ bool mp_zimg_config_image_params(struct mp_zimg_context *ctx);
// Convert/scale src to dst. On failure, the data in dst is not touched.
bool mp_zimg_convert(struct mp_zimg_context *ctx, struct mp_image *dst,
struct mp_image *src);
-
-// Set the global zimg command line parameters on this context. Use this if you
-// want the user to be able to change the scaler etc.
-void mp_zimg_set_from_cmdline(struct mp_zimg_context *ctx, struct mpv_global *g);