From patchwork Fri Apr 3 21:19:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 18619 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 51EAC44B04E for ; Sat, 4 Apr 2020 00:19:53 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2F01D68ADE6; Sat, 4 Apr 2020 00:19:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F073C68ADE6 for ; Sat, 4 Apr 2020 00:19:46 +0300 (EEST) Received: by mail-il1-f174.google.com with SMTP id t6so8753978ilj.8 for ; Fri, 03 Apr 2020 14:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=rL0AXMmzYwunj2yJPRTJroQ2ZxpaYmrL5Yt/izCw5Eg=; b=Ih0uIUb8ZsqPlGUg9CjKZkSJAU0cJhHNt3yFlWtCUF1cM2ZgJSndPW2KqHuGeb64yV V/2pCbRU7Mio79r0UzB18ifr55fNKJCdbJLiDyhLs5fgYvGpOaCv2Nz5rp9cNzAtEuU4 Vpq4g9FcklW5G+IGi596GndRkmSqPNzYHq8Sk7ETDOsLCH4aM2QCGw74F8Y/hMW3r0Kh JGqwcMWI4QtJq574GRcIsTyO4cCYH2IUvjQpGrXuMAstzzhQqU6U6vamSq0e4gkyyEKN QgkBYWafZFHUyGYegyQ0vlWgSv5aRdi9RqrlySF+9XwbFZnFcfrZ24axtsdoF1bLH0j+ s8gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rL0AXMmzYwunj2yJPRTJroQ2ZxpaYmrL5Yt/izCw5Eg=; b=g+sm8qrAMTZsRi7YbyiG/AQ5wEHEmIHxqbe7VEvv7bLMS3bgQQcNrTReY3drWeUDcm 9WCPNe0sTlhVuhFTPQxxpouFgssGTeUBrBM8iu/R/5LBsXGS11uB6XfAfECojtVH6uFc 2nChy7+A0t/Lc/R850S/HmMeY8/mhvQg4st4A8nd82yqKpW4k5yBSoDxFjgBXZWkxWmY 7eZ3ydG9A+coBKlfjcqqeBXajk2nw1Jf1Gt7VMd0c9L7m1b0wonIyDfv22BxUnwvp2Fy 1+9075HOmxsY7bwg7PetnbQqN5pAdQnpzgK72m1Sde2qt/+GIIafJbyWIvENMWKyTDuI YX+Q== X-Gm-Message-State: AGi0PuYPGu7y+3iJeGnj5ZVgDT/eGbho/GrFQ5Q1Ufbk4L4ZqAJRXz3V SuUO8Dv2pJ17g3pFlTNqEjaY9UGCjJqrkD2a5aGBJw== X-Google-Smtp-Source: APiQypJFGVePuys2EDGfJnmFuCWkKxzvS7g5D0hRNXHETYOdLge8ird4tDXqOyUUfb8DAAq7Tcqe3yoqYs2xHKIkzMY= X-Received: by 2002:a05:6e02:4c:: with SMTP id i12mr10908747ilr.211.1585948785265; Fri, 03 Apr 2020 14:19:45 -0700 (PDT) MIME-Version: 1.0 From: Carl Eugen Hoyos Date: Fri, 3 Apr 2020 23:19:34 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavfi/telecine: Mark telecined frames as interlaced X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch marks actually telecined frames as interlaced, other frames as progressive. Please comment, Carl Eugen From 97f3bba7b4f4f4bf4bbb69376daeb45e3386ba62 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos 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