summaryrefslogtreecommitdiff
path: root/libavfilter/vf_w3fdif.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-01-15 11:34:17 +0100
committerPaul B Mahol <onemda@gmail.com>2021-01-15 11:43:38 +0100
commitd4902751cb111d8f66d481d670cad079228e9f73 (patch)
tree185fbe2b1fc9cf4c41cb813a0eff97e81e2d6b82 /libavfilter/vf_w3fdif.c
parent64ea15f05075d58cbd76bdcd5bac9d3b47d891ee (diff)
avfilter/vf_w3fdif: fix parity in frame mode
Diffstat (limited to 'libavfilter/vf_w3fdif.c')
-rw-r--r--libavfilter/vf_w3fdif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index a714235ecf..ce98b86e4a 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -382,7 +382,9 @@ static int deinterlace_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_
const int start = (height * jobnr) / nb_jobs;
const int end = (height * (jobnr+1)) / nb_jobs;
const int max = s->max;
- const int tff = (s->field == (s->parity == -1 ? cur->top_field_first == cur->interlaced_frame : s->parity == 0 ? !cur->interlaced_frame : cur->interlaced_frame));
+ const int interlaced = cur->interlaced_frame;
+ const int tff = s->field == (s->parity == -1 ? interlaced ? cur->top_field_first : 1 :
+ s->parity ^ 1);
int j, y_in, y_out;
/* copy unchanged the lines of the field */