From patchwork Wed Feb 22 19:42:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 2646 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.149 with SMTP id x21csp1038364vsf; Wed, 22 Feb 2017 11:43:02 -0800 (PST) X-Received: by 10.28.149.199 with SMTP id x190mr3877990wmd.91.1487792582773; Wed, 22 Feb 2017 11:43:02 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v6si3825690wmv.50.2017.02.22.11.43.02; Wed, 22 Feb 2017 11:43:02 -0800 (PST) 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 7FE2A68824F; Wed, 22 Feb 2017 21:42:51 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A65968798F for ; Wed, 22 Feb 2017 21:42:45 +0200 (EET) Received: from mfilter9-d.gandi.net (mfilter9-d.gandi.net [217.70.178.138]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id A56BFFB8C2 for ; Wed, 22 Feb 2017 20:42:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter9-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter9-d.gandi.net (mfilter9-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id clUAN6Zy-sQq for ; Wed, 22 Feb 2017 20:42:50 +0100 (CET) X-Originating-IP: 213.47.41.20 Received: from localhost (213-47-41-20.cable.dynamic.surfer.at [213.47.41.20]) (Authenticated sender: michael@niedermayer.cc) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 264C0FB881 for ; Wed, 22 Feb 2017 20:42:49 +0100 (CET) Date: Wed, 22 Feb 2017 20:42:25 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20170222194225.GG5776@nb4> References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [FFmpeg-devel] minterpolate filter 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" On Wed, Feb 22, 2017 at 08:02:00AM +0000, Ural wrote: > Hello all. First, thanks for doing great and hard work. I can't imagine > any video-(pre/post)processing exist without ffmpeg. > I am posting my question in devel, because I am not asking how to do > something. What I am trying to do works, but bad. > > I create videos from pictures and need to make them as smooth as > possible. I found, that what I need called 'motion interpolation'. I > started to search all forums, and found only 3 things can help me: > slowmovideo, butterflow and new ffmpeg's filter minterpolate. > > > slowmovideo needs many configuration, I was not able to get it to work > as I want. with butterflow, I tried anything. From installing OpenCL, > OpenGL and other stuff to switching to nvidia binary drivers and > installing all sdk tools and cuda. It never worked. Some error about > cuda, and google don't know about it. > > > So third option was the only one available. When I tried it, it did > exactly what I want! But it is incredibly SLOW. I have 8-core CPU, and > it processes about 0.1-0.3 fps. And uses just 1 CORE, no video card. > > Guys, do you have some plans about this awesome filter? Like to port it > to opencl, or use at least all cores? There are no any option available, > so all hopes only to this filter. Or maybe some other > alternatives/patches exist? theres mcfps https://github.com/michaelni/FFmpeg/tree/mcfps its not really designed for speed but if you switch it to use non iterative ME (see diff below) it does around 12fps here with matrixbench mcfps is far from finished, i had many ideas on how to improve it and as funding was mentioned in another reply in this thread and i think i didnt mention it before, there was a company funding the mcfps work. The ideas people had during review of the mcfps work conflicted with my ideas to improve the motion estimation code though and without these improvments, the quality the company would expect would not be achievable. Which kind of halted the project minterpolate came after that as a gsoc project and was supposed to be based on mcfps but wasnt really, so each of mcfps and minterpolate are better at some things and worse at others. Also noone is working on minterpolate anymore AFAIK Both mcfps and minterpolate are quality wise not as good as id like There were alot of ideas/improvments that should be tried. Optimizing the existing code should come after improving it quality wise, except were such optimizations arent in the way of improving the code. If i find the motivation to work on improving the quality of the now in git minterpolate, i guess i could check if that company still is interrested in funding that or if they dont want to hear anything from me and that filter anymore ... its quite a while. not saying that this would be boring work id only do if its payed [...] diff --git a/libavfilter/vf_mcfps.c b/libavfilter/vf_mcfps.c index 0aa951e7a0..788d600f28 100644 --- a/libavfilter/vf_mcfps.c +++ b/libavfilter/vf_mcfps.c @@ -258,7 +258,7 @@ av_log(0,0, "FPS %d/%d\n", mcfps->frame_rate.num, mcfps->frame_rate.den); avctx_enc->flags |= CODEC_FLAG_QPEL; avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; avctx_enc->global_quality = 12; - avctx_enc->me_method = ME_ITER; + avctx_enc->me_method = ME_EPZS; // avctx_enc->dia_size = 16; avctx_enc->mb_decision = FF_MB_DECISION_RD; avctx_enc->scenechange_threshold = 2000000000;