vf_yadif: change defaults

This is for the sake of command.c and the "deinterlace" option/property.
Instead of forcing certain "better" defaults when inserting yadif,
change the actual "yadif" defaults.

I pondered not changing vf_yadif, and instead adding a trivial "yadif-
auto" wrapper filter, which would merely have different defaults. But
thinking about it, it doesn't make any sense for "deinterlace" to have
different defaults from vf_yadif, with vf_yadif having the "worse"
defaults. If someone wants the old behavior, the old behavior can be
forced in a backward and forward compatible way by setting the
suboptions.

Fixes #2539 (kind of).
This commit is contained in:
wm4 2015-12-21 22:04:53 +01:00
parent 0afb1acab3
commit 7fa06e46c4
4 changed files with 11 additions and 6 deletions

View File

@ -19,6 +19,8 @@ Interface changes
::
--- mpv 0.15.0 ---
- change "yadif" video filter defaults
--- mpv 0.14.0 ---
- vo_opengl interpolation now requires --video-sync=display-... to be set
- change some vo_opengl defaults (including changing tscale)

View File

@ -454,16 +454,15 @@ Available filters are:
``<mode>``
:frame: Output 1 frame for each frame.
:field: Output 1 frame for each field.
:field: Output 1 frame for each field (default).
:frame-nospatial: Like ``frame`` but skips spatial interlacing check.
:field-nospatial: Like ``field`` but skips spatial interlacing check.
``<interlaced-only>``
:no: Deinterlace all frames (default).
:yes: Only deinterlace frames marked as interlaced (default if this
filter is inserted via ``deinterlace`` property).
:no: Deinterlace all frames.
:yes: Only deinterlace frames marked as interlaced (default).
This filter, is automatically inserted when using the ``d`` key (or any
This filter is automatically inserted when using the ``d`` key (or any
other key that toggles the ``deinterlace`` property or when using the
``--deinterlace`` switch), assuming the video output does not have native
deinterlacing support.

View File

@ -2207,7 +2207,7 @@ static int probe_deint_filters(struct MPContext *mpctx)
if (check_output_format(mpctx, IMGFMT_VAAPI) &&
probe_deint_filter(mpctx, "vavpp"))
return 0;
if (probe_deint_filter(mpctx, "yadif:mode=field:interlaced-only=yes"))
if (probe_deint_filter(mpctx, "yadif"))
return 0;
return -1;
}

View File

@ -78,5 +78,9 @@ const vf_info_t vf_info_yadif = {
.name = "yadif",
.open = vf_open,
.priv_size = sizeof(struct vf_priv_s),
.priv_defaults = &(const struct vf_priv_s){
.mode = 1,
.interlaced_only = 1,
},
.options = vf_opts_fields,
};