From patchwork Tue Oct 11 09:54:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 38684 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp777768pzb; Tue, 11 Oct 2022 02:55:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ZyjQvGYOK1a091oe8gI7i80PulZAJpOj0h6nmuDzUhRlS+cs3OM0IJ39QgS/wjPb7ifED X-Received: by 2002:a17:907:5c2:b0:77e:def7:65d8 with SMTP id wg2-20020a17090705c200b0077edef765d8mr18358907ejb.487.1665482107853; Tue, 11 Oct 2022 02:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665482107; cv=none; d=google.com; s=arc-20160816; b=AZ3x9TtB0N4U9ksoO0nSRTVeO8MJQ6wBDkVxFabHGiaSUkU58VtvuEBDuwgCt6sdwm DdtXcis0ib1aRrRCjog6mcfLZ+Ro//RTAWM7flKpw1uZ6LIS5etXJNYIRT/eBiBO9Aw4 tB2LeeEWRs8cUttODq6MyJv5+KJaiM60F+M3Pk3fHnIx0QatJsi4TjFcvpQL9rSdvboc i99iEN+aSolaORMHujTfoDjN/e9s1wMg+8Lrdu5dEXanZXO6iCw4o75wNHUlfhQQQ9HV UWe/1ujFqbkz756hkRBLl3uI1U8ZE9h1/Osyq7LTG91InAmq8PO3jgqjfLROoI2tkJVc fXVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=my4IzuSjv+lgYgjYri0EOONhxAP0GVUNeVPSV2YQppk=; b=WZiz6JGY6rjSsU2eV21BaUAlUK1u9GKVhQjfWeVj1vzQT8A7w0+qh2TUCWpCSLYNOy OAQGlm2SFjvAv6YyUTUzOGFGRl79q7cQ+KuBtADrT5uxV3uW5kKoTP8LpecKDBELWzKZ uwiSb2IyIMKx+1sNK7hFNSClzk0ZlN3QUTk9AVTVCLRxZtzaX40N9IIStCOBp3ce87Wj OvZNAL7k4UuSWxgA4Lqq0nwcqEi3FFoM68fj9b+OQCtAK+PKDB179tsRNDF6og13TnQC 8bjivAuu6S/sGO9t5IIkfBQNqS27mjb0rl20e/yDrGh3Tff/PUbnh6bun5ZljMzesb/r PMpw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b10-20020aa7cd0a000000b00458947655ebsi11623585edw.89.2022.10.11.02.55.07; Tue, 11 Oct 2022 02:55:07 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C3EF968BC58; Tue, 11 Oct 2022 12:55:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A9B0F68BB70 for ; Tue, 11 Oct 2022 12:54:57 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1FCFA2404F5 for ; Tue, 11 Oct 2022 11:54:57 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Hz9acrGbq0vL for ; Tue, 11 Oct 2022 11:54:56 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 746672404E4 for ; Tue, 11 Oct 2022 11:54:56 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 633273A0D7F for ; Tue, 11 Oct 2022 11:54:55 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 11 Oct 2022 11:54:42 +0200 Message-Id: <20221011095445.27001-2-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221011095445.27001-1-anton@khirnov.net> References: <20221011095445.27001-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/5] lavfi/vf_deinterlace_qsv: set output frame durations X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: IYDdRfOsdl+K --- libavfilter/vf_deinterlace_qsv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c index 3065d6ac95..98ed7283ad 100644 --- a/libavfilter/vf_deinterlace_qsv.c +++ b/libavfilter/vf_deinterlace_qsv.c @@ -516,6 +516,11 @@ static int process_frame(AVFilterContext *ctx, const AVFrame *in, out->pts++; s->last_pts = out->pts; + if (outlink->frame_rate.num && outlink->frame_rate.den) + out->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base); + else + out->duration = 0; + ret = ff_filter_frame(outlink, out); if (ret < 0) return ret;