From patchwork Mon Oct 3 13:46:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 844 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp1600723vsd; Mon, 3 Oct 2016 06:47:04 -0700 (PDT) X-Received: by 10.194.94.39 with SMTP id cz7mr7477374wjb.141.1475502424204; Mon, 03 Oct 2016 06:47:04 -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 kq1si34900765wjb.150.2016.10.03.06.47.03; Mon, 03 Oct 2016 06:47:04 -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 6E6E4689D00; Mon, 3 Oct 2016 16:46:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E92A0689CD9 for ; Mon, 3 Oct 2016 16:46:40 +0300 (EEST) Received: from mfilter34-d.gandi.net (mfilter34-d.gandi.net [217.70.178.165]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id CCF8CC5A46 for ; Mon, 3 Oct 2016 15:46:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter34-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter34-d.gandi.net (mfilter34-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id bGH1AlcTW8lo for ; Mon, 3 Oct 2016 15:46:52 +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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 5C7AAC5A49 for ; Mon, 3 Oct 2016 15:46:52 +0200 (CEST) Date: Mon, 3 Oct 2016 15:46:51 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20161003134651.GA10582@nb4> References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [FFmpeg-devel] [PATCH] libswscale/swscale_unscaled.c: UHD Resolution Performance Increase for Color Space Convertions / NVENC Related 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 Mon, Oct 03, 2016 at 12:35:51PM +0300, Ali KIZIL wrote: > Hello, > > This patch is done for performance increase on UHD or above resolution > color space convertions. > Some SDI sources provide yuv422p10 for 10bit source and uyvy422 for 8 bit > source. > To encode these sources with NVENC 10 bits, there is a need to convert > these color spaces to P010. > > Before patch for UHD and above resolutions, convertion could not exceed > ~25-30 fps, which can not be used for a 50 fps encoding. > This patch fixes this problem. > > Also, color space convertion speed for 10bit YUV422P to 8bit YUV420P is > having the same problem. > If anybody wants to encode 10 bits source in 8 bits for UHD or above > resolutions could not achive high frame rate ratio as well. > This patch also fixes this problem. > > I think it will be good to apply this patch to avoid performance loss in > high resolutions. > > Kind Regards, > swscale_unscaled.c | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 140 insertions(+) > 5c347db66a9a32fbb91cd17ea768143bc768f948 0001-For-10bit-SDI-Sources-to-10bit-NVENC-Encode.patch > From 9a680c588248abec30f7a4afdcf7a18c58766ade Mon Sep 17 00:00:00 2001 > From: Sayit BELET > Date: Mon, 3 Oct 2016 12:09:58 +0300 > Subject: [PATCH] For 10bit SDI Sources to 10bit NVENC Encode 10bit YUV422P to > P010 yuv422p10ToP010Wrapper breaks fate Test vsynth1-vc2-422p10 failed. Look at tests/data/fate/vsynth1-vc2-422p10.err for details. make: *** [fate-vsynth1-vc2-422p10] Error 1 make: *** Waiting for unfinished jobs.... [...] --- ./tests/ref/vsynth/vsynth1-vc2-422p10 2016-10-02 14:30:45.987076676 +0200 +++ tests/data/fate/vsynth1-vc2-422p10 2016-10-03 15:45:54.060991862 +0200 @@ -1,4 +1,4 @@ 88e3488e4689cf06e75959c71e2f9d96 *tests/data/fate/vsynth1-vc2-422p10.mov 1684055 tests/data/fate/vsynth1-vc2-422p10.mov -f35dd1c1df4726bb1d75d95e321b0698 *tests/data/fate/vsynth1-vc2-422p10.out.rawvideo -stddev: 1.88 PSNR: 42.61 MAXDIFF: 23 bytes: 7603200/ 760320 +3ed919ead3917805fcde08467b6c4907 *tests/data/fate/vsynth1-vc2-422p10.out.rawvideo +stddev: 3.56 PSNR: 37.09 MAXDIFF: 38 bytes: 7603200/ 760320