Am Fr., 3. Apr. 2020 um 23:19 Uhr schrieb Carl Eugen Hoyos <ceffm...@gmail.com>:

> Attached patch marks actually telecined frames as interlaced,
> other frames as progressive.

New patch with changes to fate attached.

Please comment, Carl Eugen
From 97f3bba7b4f4f4bf4bbb69376daeb45e3386ba62 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@gmail.com>
Date: Fri, 3 Apr 2020 23:04:15 +0200
Subject: [PATCH] lavfi/telecine: Mark telecined frames as interlaced.

---
 libavfilter/vf_telecine.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c
index 62599a7a3a..3e65f08e39 100644
--- a/libavfilter/vf_telecine.c
+++ b/libavfilter/vf_telecine.c
@@ -207,6 +207,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
                                 s->stride[i],
                                 (s->planeheight[i] - !s->first_field + 1) / 2);
         }
+        s->frame[nout]->interlaced_frame = 1;
         nout++;
         len--;
         s->occupied = 0;
@@ -220,6 +221,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
                                 inpicref->data[i], inpicref->linesize[i],
                                 s->stride[i],
                                 s->planeheight[i]);
+        s->frame[nout]->interlaced_frame = inpicref->interlaced_frame;
         nout++;
         len -= 2;
     }
@@ -236,6 +238,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
 
     for (i = 0; i < nout; i++) {
         AVFrame *frame = av_frame_clone(s->frame[i]);
+        int interlaced = frame->interlaced_frame;
 
         if (!frame) {
             av_frame_free(&inpicref);
@@ -243,6 +246,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
         }
 
         av_frame_copy_props(frame, inpicref);
+        frame->interlaced_frame = interlaced;
         frame->pts = ((s->start_time == AV_NOPTS_VALUE) ? 0 : s->start_time) +
                      av_rescale(outlink->frame_count_in, s->ts_unit.num,
                                 s->ts_unit.den);
diff --git a/tests/ref/fate/filter-pixfmts-fieldmatch b/tests/ref/fate/filter-pixfmts-fieldmatch
index c3165b872d..eb0fc3c224 100644
--- a/tests/ref/fate/filter-pixfmts-fieldmatch
+++ b/tests/ref/fate/filter-pixfmts-fieldmatch
@@ -1,5 +1,5 @@
-yuv410p             a6c9b4065e8253d8120772f69be0bf04
-yuv411p             b913e634ad37ce046240252bed8681fb
-yuv420p             a9286560141eb14595e427dbe5829b00
-yuv422p             11ad22ce00c5e8a30d0472f29fb15434
-yuv444p             6c5b0c1343d625d0656b6755906fd874
+yuv410p             572e4416ae6988dab3dbdbed3296b57c
+yuv411p             ce9ccbb1985b7840955e57c23d4bc003
+yuv420p             f06c53990f577893fef6a4270aab691b
+yuv422p             1c6ad2c3198ad577593214ebc9bc5705
+yuv444p             24813e175b1b09c01f5ec16149d83fce
diff --git a/tests/ref/fate/filter-pixfmts-pullup b/tests/ref/fate/filter-pixfmts-pullup
index c6ddb3489a..88c1dd565d 100644
--- a/tests/ref/fate/filter-pixfmts-pullup
+++ b/tests/ref/fate/filter-pixfmts-pullup
@@ -1,12 +1,12 @@
-gray                415c928947f83f9b45c24ad15a094bda
-yuv410p             0f29d0b6394871e1e6cde484b4f351f4
-yuv411p             ec059b1992e1acda472b9b2dd3e4506b
-yuv420p             dba6303cd02cc39cb0db7b546793d565
-yuv422p             d7d3224dd900bb1b96608a28a704360d
-yuv440p             d4c5f20701cfceb4bbf7d75cfcc13514
-yuv444p             7e405274037e7f2ab845d7413a71e16d
-yuvj411p            dc602e7bd3449d16e17e695815616b1e
-yuvj420p            b98ec86eeef2d512aeb2fc4d32ffa656
-yuvj422p            f09c3240bb662477b76ce4da34b4feed
-yuvj440p            8d3ab69e2bbbbbd2f9be323c18922533
-yuvj444p            2dc27560eed5d685354796dcccce853c
+gray                0af7cbb0cfb3efcb946e697c4b7bd5f9
+yuv410p             c7a9e3aeb6b30eadcdf6ca5acb52c5b2
+yuv411p             2e19fb03dd57e4700ff560da3a84402e
+yuv420p             7019c5de9774970eb3a7828cb92439e8
+yuv422p             8fc1c9fff0aa2566a50ff10a54e80ba7
+yuv440p             16775691a106117ecd244c45252f4ba7
+yuv444p             b6ec514e4c30fea6b0dd696bf7d147d5
+yuvj411p            0b899555985616330109a2381d9828a4
+yuvj420p            1f51fe0c2c8d5ba12409bc4c821fed56
+yuvj422p            5e9a13247fe5201ea83d3a64241631e3
+yuvj440p            2e22b2e340f372792bec5ba0a8f46822
+yuvj444p            becc016653bb26b472625d87dbfc10c4
diff --git a/tests/ref/fate/filter-yadif-mode0 b/tests/ref/fate/filter-yadif-mode0
index be807f9de5..15017492ff 100644
--- a/tests/ref/fate/filter-yadif-mode0
+++ b/tests/ref/fate/filter-yadif-mode0
@@ -33,3 +33,34 @@
 0,         36,         36,        1,   622080, 0x2e81bd32
 0,         37,         37,        1,   622080, 0x852cf6cf
 0,         38,         38,        1,   622080, 0xb055f0e5
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
diff --git a/tests/ref/fate/filter-yadif-mode1 b/tests/ref/fate/filter-yadif-mode1
index 53741b0ae7..4f90c8cd40 100644
--- a/tests/ref/fate/filter-yadif-mode1
+++ b/tests/ref/fate/filter-yadif-mode1
@@ -62,3 +62,34 @@
 0,         74,         74,        1,   622080, 0x852cf6cf
 0,         75,         75,        1,   622080, 0x892a014e
 0,         76,         76,        1,   622080, 0xb055f0e5
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
diff --git a/tests/ref/fate/filter-yadif10 b/tests/ref/fate/filter-yadif10
index 28e799fc1f..7475a24fc3 100644
--- a/tests/ref/fate/filter-yadif10
+++ b/tests/ref/fate/filter-yadif10
@@ -33,3 +33,34 @@
 0,         36,         36,        1,  1244160, 0xdd8b3b20
 0,         37,         37,        1,  1244160, 0x229ac529
 0,         38,         38,        1,  1244160, 0xf844e0a2
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
diff --git a/tests/ref/fate/filter-yadif16 b/tests/ref/fate/filter-yadif16
index 0c856ab37a..19f42311ff 100644
--- a/tests/ref/fate/filter-yadif16
+++ b/tests/ref/fate/filter-yadif16
@@ -33,3 +33,34 @@
 0,         36,         36,        1,  1244160, 0x9fc1bd32
 0,         37,         37,        1,  1244160, 0x1389f6cf
 0,         38,         38,        1,  1244160, 0x6fc5f0e5
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
+yadif->cur->interlaced_frame: 1 
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to