From patchwork Fri Apr 3 22:44:31 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: 18623 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a0c:ab15:0:0:0:0:0 with SMTP id h21csp1457797qvb; Fri, 3 Apr 2020 15:44:56 -0700 (PDT) X-Google-Smtp-Source: APiQypIEGMT6aTAm+rJRu6GU1xnvZqMOH1LM2MuzhxnME/OJITtNZW7ho1uhIpgLt01Ski6Qs1D2 X-Received: by 2002:a17:906:f215:: with SMTP id gt21mr10960798ejb.17.1585953896622; Fri, 03 Apr 2020 15:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585953896; cv=none; d=google.com; s=arc-20160816; b=b9haV9mp9oItd9i4Umaeyknm53ul15UvaE/HwRiINgKB8A1uSvVyGFypPEL3e2ytxm eRFWBaKFT1o7LUiddQs6/T2fhMEV+AO/MjVY4d1XmIV1vSK+cvoQ4fKOQnBnMXXRRzUR N+dIchAk8mS72v1dHacht5YtRLv5f0cQSoNHvABc5HpppvWC6kVyiZ9Ppz6NM7Qg2YRV 4/bfQemgqxgNLDiiBjVfA4LO3EBbSdBR/vNBT7BO5OLWcy0DSvFp9QG4KcHMYoJoKAM9 m4apy53CL8/tXCgrfl9UtztdRtgdmvYgrxCTJp4gDRl/jz1QsID/JFlmSr4rOPDqy486 AgRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:delivered-to; bh=c7uhObuBXV7zXjqvT9eQUtUlpnyIr6ipOU5RWzQe3fI=; b=R9J1m93+ScCrx3vtIyTwbucWIwA0suqgIT/3IyDy60tg4MP49JLY2D/UyxNK7LAqJ0 sowBqJUJ5OLZd1ujZmHcRB0DyiNzqzC8rnDeO/HVUCsETQoLSJtUivV5CQ0I9vteoaao u4s5FvoQR8dec3cepG8zwbrAx0YdbVyC81ADQQhYrIOOMmneuPQuuB6BzHa371m2VP5K hof+geyi4LDSrv6stucfxVOaW5sK3WuLiKf45v5WfDYGAld50yQtK65UthZC29jPWnZU 7yzyuiIQ641I3IWFsTL+uXshR1M8AKc/9IGw4qaOXGw6fm3A/fMKvsa1UOM4b08kB7fx r/wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="g26rVNn/"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s22si6415100eju.398.2020.04.03.15.44.56; Fri, 03 Apr 2020 15:44:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="g26rVNn/"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C408568AA24; Sat, 4 Apr 2020 01:44:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EDA3568AA24 for ; Sat, 4 Apr 2020 01:44:44 +0300 (EEST) Received: by mail-io1-f50.google.com with SMTP id i3so9307722ioo.13 for ; Fri, 03 Apr 2020 15:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=H766uoYTa9YrSryPJiacaUQiYrbQNrv2cieJqIP8f6k=; b=g26rVNn/G3fnw5Mx5rKOqCpEvD0hML8RznCr7FQuOK/p9v2pBoNG8mQDRpF4bgk26I TCH8u7VpJ0THEqO648yfKL01185E/Crv1/VOU9SETazy3V7HCrjdF8o0761oJJw6GhHN 6SElKEWilVNcP6U4X/dg+AbkLrzo/oVGJcQAV3dPjcFf61Ycc/+lJzOcDcIzqtyZKQu8 YEdjIwZBzijqJdPlq5+70FZmao9gZUuhCMpcwDAiipDwaOEW3+gEhU92EgWYENoOnhwv HetpN8Fx3nPnnbm3bbIMQv/4tO5v/91k3uCNEMomacOn8+g6ME6Utz7rPi4kD0M8oeCi ZAAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=H766uoYTa9YrSryPJiacaUQiYrbQNrv2cieJqIP8f6k=; b=aN18osZzY7BaypGBpsV85Po2QADEQcZNhpC7/UvWGdhVZA/Eji9utv1LDtlZ48cloB 4LoTICyar7wdQZFxQAfGp8oMLBW08mExU5LRZK4AU3tyAUKF8iatVhdtg6Ar4y3Fz09d WIVCkUaPsOsltunT/ahWU41E1fCrRdWmFsdgd6RIuKMBKTdffxCBZDP82dLYpuU0OKuu Vw+78q+Izid0JKIkkObmlQjSjYJlpYmBj3HIymv7kWqbwgg3NWwZm2Y4ZQmw4XEZbIjO tt5NzqQaPI6XaKQIpGCJlrjRvkAmQ8abTwTvTUj29V/lnDep3iBfrzrF3MSAE5JvFSF2 Xdyg== X-Gm-Message-State: AGi0PuYK2py/q2xw21LTQjb5WzzQeAriiWOdNCV0pgyhqBsXw38fVYoj H0iE25O4q3rlRWURyF03YqIlPe8e4Lv7SjEbV+FNYQ== X-Received: by 2002:a02:774a:: with SMTP id g71mr10011385jac.68.1585953883099; Fri, 03 Apr 2020 15:44:43 -0700 (PDT) MIME-Version: 1.0 References: <2f2a6d20-a2e2-e1ae-4c26-df232c2c5c8e@gmail.com> In-Reply-To: <2f2a6d20-a2e2-e1ae-4c26-df232c2c5c8e@gmail.com> From: Carl Eugen Hoyos Date: Sat, 4 Apr 2020 00:44:31 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH v3]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" X-TUID: tm873uVWUMTn Content-Length: 7272 Am Sa., 4. Apr. 2020 um 00:40 Uhr schrieb James Almer : > > On 4/3/2020 6:37 PM, Carl Eugen Hoyos wrote: > > Am Fr., 3. Apr. 2020 um 23:19 Uhr schrieb Carl Eugen Hoyos : > > > >> Attached patch marks actually telecined frames as interlaced, > >> other frames as progressive. > > > > New patch with changes to fate attached. > > > > Please comment, Carl Eugen > > Those yadif tests look wrong. The patch shouldn't affect them. Clearly, thank you! New patch attached, it should now only change the telecined frames and leave the other frames as they are, the setfield filter can be used to force a progressive setting for them. Please review, 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 = 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