summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-12 21:55:35 +0200
committerwm4 <wm4@nowhere>2020-04-13 15:56:27 +0200
commitc99d95ac17364c46bc161867d1102361f05a6cc5 (patch)
tree25b1033cbd19b87ec076f1c91b26677a07788772 /video/filter
parent28f2d7454d5ea997dec691376ebcdf4c4e0454b4 (diff)
downloadmpv-c99d95ac17364c46bc161867d1102361f05a6cc5.tar.bz2
mpv-c99d95ac17364c46bc161867d1102361f05a6cc5.tar.xz
vf_format: add gross mechanism for forcing scaler for testing
This sucks, but is helpful for testing. Obviously, it would be much nicer if there were a way to specify _all_ scaler options per filter (if the user wanted), instead of always using the global options. But this is "too hard" for now. For testing, it is extremely convenient to select the scaler backend, so add this option, but make clear that it could go away. We'd delete it once there is a better mechanism for this.
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf_format.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c
index a2adcca54a..793e37bc4a 100644
--- a/video/filter/vf_format.c
+++ b/video/filter/vf_format.c
@@ -54,6 +54,7 @@ struct vf_format_opts {
int dw, dh;
double dar;
int convert;
+ int force_scaler;
};
static void set_params(struct vf_format_opts *p, struct mp_image_params *out,
@@ -175,6 +176,8 @@ static struct mp_filter *vf_format_create(struct mp_filter *parent, void *option
return NULL;
}
+ priv->conv->force_scaler = priv->opts->force_scaler;
+
if (priv->opts->fmt)
mp_autoconvert_add_imgfmt(priv->conv, priv->opts->fmt, 0);
@@ -199,6 +202,10 @@ static const m_option_t vf_opts_fields[] = {
{"dh", OPT_INT(dh)},
{"dar", OPT_DOUBLE(dar)},
{"convert", OPT_FLAG(convert)},
+ {"force-scaler", OPT_CHOICE(force_scaler,
+ {"auto", MP_SWS_AUTO},
+ {"sws", MP_SWS_SWS},
+ {"zimg", MP_SWS_ZIMG})},
{"outputlevels", OPT_REMOVED("use the --video-output-levels global option")},
{"peak", OPT_REMOVED("use sig-peak instead (changed value scale!)")},
{0}