]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_w3fdif: not interlaced frames are filtered like tff
authorPaul B Mahol <onemda@gmail.com>
Sun, 3 Jan 2021 21:48:40 +0000 (22:48 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 3 Jan 2021 22:09:39 +0000 (23:09 +0100)
libavfilter/vf_w3fdif.c

index 685f7679f0f6a47fff3f081ef60cb9bbcc326b42..bbf1d026e2c587c75d9dc82ca1660adc66900429 100644 (file)
@@ -381,7 +381,7 @@ 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 == 1 : s->parity == 0 ? 1 : 0);
+    const int tff = (s->field == (s->parity == -1 ? cur->top_field_first == cur->interlaced_frame : s->parity == 0 ? !cur->interlaced_frame : cur->interlaced_frame));
     int j, y_in, y_out;
 
     /* copy unchanged the lines of the field */