From patchwork Thu Oct 27 13:06:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 1202 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp552673vsd; Thu, 27 Oct 2016 06:06:39 -0700 (PDT) X-Received: by 10.28.164.3 with SMTP id n3mr13036659wme.70.1477573599798; Thu, 27 Oct 2016 06:06:39 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h78si3068833wma.145.2016.10.27.06.06.39; Thu, 27 Oct 2016 06:06:39 -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 A2B51689EF5; Thu, 27 Oct 2016 16:06:33 +0300 (EEST) 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 4668D689EE5 for ; Thu, 27 Oct 2016 16:06:27 +0300 (EEST) Received: from mfilter1-d.gandi.net (mfilter1-d.gandi.net [217.70.178.130]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 11878FB887 for ; Thu, 27 Oct 2016 15:06:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter1-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter1-d.gandi.net (mfilter1-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id cTXz2TilNUDl for ; Thu, 27 Oct 2016 15:06:28 +0200 (CEST) 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 60FD6FB8D3 for ; Thu, 27 Oct 2016 15:06:28 +0200 (CEST) Date: Thu, 27 Oct 2016 15:06:08 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20161027130608.GP4602@nb4> References: <20161026194028.26438-1-philipl@overt.org> <20161026194028.26438-3-philipl@overt.org> MIME-Version: 1.0 In-Reply-To: <20161026194028.26438-3-philipl@overt.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [FFmpeg-devel] [PATCH 02/10] crystalhd: Switch to new decode API and remove the insanity 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, Oct 26, 2016 at 12:40:20PM -0700, Philip Langdale wrote: > The new decode API allows for m:n decode patterns, which is what > you need to use this hardware in a sane way. There are so many > situations where 1:1 doesn't happen naturally that it's a miracle > I got it working as well as I did. > > With this change, we can throw all of the crazy heuristics and > sleeps(!) out, and things work correctly. > > Small issue - mpv (at least) expects that every output call after > input EOF returns a frame or is the end of the stream - this is not > behaviour we can offer - sometimes we have separate fields that > require two calls to collect and combine. > > Trying to do a tight loop in the decoder to get the second field > requires restoring some heuristics to avoid dead-locking when > additional input is required to get additional output. > > Signed-off-by: Philip Langdale > --- > libavcodec/crystalhd.c | 480 +++++++++++++------------------------------------ > libavcodec/version.h | 2 +- > 2 files changed, 126 insertions(+), 356 deletions(-) breaks fate: ./configure && make -j12 fate-vsynth1-msmpeg4 ... TEST vsynth1-msmpeg4 Test vsynth1-msmpeg4 failed. Look at tests/data/fate/vsynth1-msmpeg4.err for details. make: *** [fate-vsynth1-msmpeg4] Error 1 [...] --- ./tests/ref/vsynth/vsynth1-msmpeg4 2016-10-27 03:11:18.675647981 +0200 +++ tests/data/fate/vsynth1-msmpeg4 2016-10-27 15:01:15.397863504 +0200 @@ -1,4 +1,5 @@ 3957ca57ac97f651c828ab00d8f0e088 *tests/data/fate/vsynth1-msmpeg4.avi 624706 tests/data/fate/vsynth1-msmpeg4.avi -4529fee96b8073e02974f5355e5f6c4e *tests/data/fate/vsynth1-msmpeg4.out.rawvideo -stddev: 7.98 PSNR: 30.09 MAXDIFF: 104 bytes: 7603200/ 7603200 +Running DIL (3.22.0) Version +DtsDeviceOpen: Opening HW in mode 0 +DtsDeviceOpen: Create File Failed