aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-07-07 15:18:56 +0200
committerGravatar wm4 <wm4@nowhere>2015-07-07 15:18:56 +0200
commit25755f5fe75ad2a4ac9fb4ecf70f7bdf7a58a04c (patch)
treedf2a9d0d30287f0a94aa87dcadecd0c15c1f2a54 /video
parent92727e7332cd8c9237552675fd8e8dba9b1a4127 (diff)
vf_yadif: expose interlaced frame mode
Also remove the enabled suboption, which did nothing. (It was probably broken at some point.)
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_yadif.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/video/filter/vf_yadif.c b/video/filter/vf_yadif.c
index 6526283af1..7bfd209475 100644
--- a/video/filter/vf_yadif.c
+++ b/video/filter/vf_yadif.c
@@ -28,14 +28,10 @@
struct vf_priv_s {
int mode;
- int do_deinterlace;
+ int interlaced_only;
struct vf_lw_opts *lw_opts;
};
-static const struct vf_priv_s vf_priv_default = {
- .do_deinterlace = 1,
-};
-
static int vf_open(vf_instance_t *vf)
{
struct vf_priv_s *p = vf->priv;
@@ -43,10 +39,11 @@ static int vf_open(vf_instance_t *vf)
// Earlier libavfilter yadif versions used pure integers for the first
// option. We can't/don't handle this, but at least allow usage of the
// filter with default settings. So use an empty string for "send_frame".
- const char *mode[] = {"", "send_field", "send_frame_nospatial",
+ const char *mode[] = {"send_frame", "send_field", "send_frame_nospatial",
"send_field_nospatial"};
- if (vf_lw_set_graph(vf, p->lw_opts, "yadif", "%s", mode[p->mode]) >= 0)
+ if (vf_lw_set_graph(vf, p->lw_opts, "yadif", "mode=%s:deint=%s", mode[p->mode],
+ p->interlaced_only ? "interlaced" : "all") >= 0)
{
return 1;
}
@@ -62,7 +59,7 @@ static const m_option_t vf_opts_fields[] = {
{"field", 1},
{"frame-nospatial", 2},
{"field-nospatial", 3})),
- OPT_FLAG("enabled", do_deinterlace, 0),
+ OPT_FLAG("interlaced-only", interlaced_only, 0),
OPT_SUBSTRUCT("", lw_opts, vf_lw_conf, 0),
{0}
};
@@ -72,6 +69,5 @@ const vf_info_t vf_info_yadif = {
.name = "yadif",
.open = vf_open,
.priv_size = sizeof(struct vf_priv_s),
- .priv_defaults = &vf_priv_default,
.options = vf_opts_fields,
};