[FFmpeg-cvslog] avfilter/vf_yadif: detect telecine content

Michael Niedermayer git at videolan.org
Tue Jan 6 00:32:45 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan  5 23:55:59 2015 +0100| [42411a85b78c73897fedf321697fedd61f9c41a6] | committer: Michael Niedermayer

avfilter/vf_yadif: detect telecine content

Fixes: yadif with interlaced_flag_switch.mpeg

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42411a85b78c73897fedf321697fedd61f9c41a6
---

 libavfilter/vf_yadif.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 8b951a4..ea72e62 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -345,7 +345,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
     if (!yadif->prev)
         return 0;
 
-    if ((yadif->deint && !yadif->cur->interlaced_frame) || ctx->is_disabled) {
+    if ((yadif->deint && !yadif->cur->interlaced_frame) ||
+        ctx->is_disabled ||
+        (yadif->deint && !yadif->prev->interlaced_frame && yadif->prev->repeat_pict) ||
+        (yadif->deint && !yadif->next->interlaced_frame && yadif->next->repeat_pict)
+    ) {
         yadif->out  = av_frame_clone(yadif->cur);
         if (!yadif->out)
             return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list