summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-12-28 10:24:54 -0700
committerJohn Stebbins <[email protected]>2018-12-28 10:24:54 -0700
commit2965a5c02901e8ac1e4c5f6e637996c8576b2e7f (patch)
tree7529f707093ed5179ade8eea65115c7d4a4c9a47
parentbd4dc1dde6948389b0b7d98e501791a5ec6ec8c7 (diff)
avfilter: fix yadif options
'mode' still worked, but I've changed to use mnemonic string values. 'parity' still worked, but I've changed to use mnemonic string values. 'auto' failed, was replaced by 'deint=deinterlaced'. Fixes https://forum.handbrake.fr/viewtopic.php?f=6&t=38564
-rw-r--r--libhb/avfilter.c42
1 files changed, 33 insertions, 9 deletions
diff --git a/libhb/avfilter.c b/libhb/avfilter.c
index 91b571301..c5d65f69e 100644
--- a/libhb/avfilter.c
+++ b/libhb/avfilter.c
@@ -499,22 +499,46 @@ convert_deint_settings(const hb_dict_t * settings)
{
return hb_value_null();
}
- int automatic = !!(mode & MODE_DECOMB_SELECTIVE);
- int bob = !!(mode & MODE_YADIF_BOB);
- int no_spatial = !(mode & MODE_YADIF_SPATIAL);
- mode = bob | (no_spatial << 1);
hb_dict_t * result = hb_dict_init();
hb_dict_t * avsettings = hb_dict_init();
- hb_dict_set(avsettings, "mode", hb_value_int(mode));
- if (automatic)
+ if (mode & MODE_YADIF_BOB)
{
- hb_dict_set(avsettings, "auto", hb_value_int(automatic));
+ if (mode & MODE_YADIF_SPATIAL)
+ {
+ hb_dict_set(avsettings, "mode", hb_value_string("send_field"));
+ }
+ else
+ {
+ hb_dict_set(avsettings, "mode",
+ hb_value_string("send_field_nospatial"));
+ }
+ }
+ else
+ {
+ if (mode & MODE_YADIF_SPATIAL)
+ {
+ hb_dict_set(avsettings, "mode", hb_value_string("send_frame"));
+ }
+ else
+ {
+ hb_dict_set(avsettings, "mode",
+ hb_value_string("send_frame_nospatial"));
+ }
+ }
+
+ if (mode & MODE_DECOMB_SELECTIVE)
+ {
+ hb_dict_set(avsettings, "deint", hb_value_string("interlaced"));
+ }
+ if (parity == 0)
+ {
+ hb_dict_set(avsettings, "parity", hb_value_string("tff"));
}
- if (parity != -1)
+ else if (parity == 1)
{
- hb_dict_set(avsettings, "parity", hb_value_int(parity));
+ hb_dict_set(avsettings, "parity", hb_value_string("bff"));
}
hb_dict_set(result, "yadif", avsettings);