diff mbox series

[FFmpeg-devel] lavfi/telecine: Mark telecined frames as interlaced

Message ID CAB0OVGpC2F0WxnmpAa2bZPkwRZerNdxbscw+V-vBdA1M8eqEjQ@mail.gmail.com
State Superseded
Headers show
Series [FFmpeg-devel] lavfi/telecine: Mark telecined frames as interlaced | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork fail Make fate failed

Commit Message

Carl Eugen Hoyos April 3, 2020, 9:19 p.m. UTC
Hi!

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

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos April 3, 2020, 9:37 p.m. UTC | #1
Am Fr., 3. Apr. 2020 um 23:19 Uhr schrieb Carl Eugen Hoyos <ceffmpeg@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
diff mbox series

Patch

From 97f3bba7b4f4f4bf4bbb69376daeb45e3386ba62 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@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 = 0;
         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);
-- 
2.24.1