From patchwork Thu Aug 11 07:59:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 146 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.67 with SMTP id o64csp753524vsd; Thu, 11 Aug 2016 01:05:40 -0700 (PDT) X-Received: by 10.28.47.7 with SMTP id v7mr7274594wmv.38.1470902740908; Thu, 11 Aug 2016 01:05:40 -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 tf20si1323917wjb.154.2016.08.11.01.05.39; Thu, 11 Aug 2016 01:05:40 -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; 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 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 789BE68A573; Thu, 11 Aug 2016 11:05:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D24C768A2DE for ; Thu, 11 Aug 2016 11:05:11 +0300 (EEST) Received: by mail-pf0-f182.google.com with SMTP id y134so24510391pfg.0 for ; Thu, 11 Aug 2016 01:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version; bh=pFSRR0JxtsOTPv84XwuR3PX+FbQ0bNlQC4MJWGQbZFg=; b=mfC0O9iBvV34hLTdPIg9QegqR136sL+KldFYYfHfosy9z18nmFCtLEY4G0psjgDmH/ qQI0EBw9R55tzUcdR5wO8KnpOWb/oN58SADI1OZ53YzXVUg4DAiBAmNdT8Lpwqe1zhF2 1phA3rOMux0iVe26KBX4D/9f0UYchFJCfLjcpARC9Sn9sKaqEvEbLgJncWKgjXDAPLQc /fzVIMHL1304eld3cvemnwkEDL4gFegvjmmrEh3tmsP0hEU+ZIfx7HZzlMPCYlGFsJRM NBG/qoQIBNa6+VuxyidfjXobS2v/snsk5qqiXG2yTB/xbrLIktpF46CznapRj/yqjph2 uteg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=pFSRR0JxtsOTPv84XwuR3PX+FbQ0bNlQC4MJWGQbZFg=; b=mmSMEpv0tMpB5I1Id5Urr7JYnbwE0gE10jsa0RvyWojpUHDiO5oqxUWSQuEJWheFn1 AqH2rSns99NwEpipavqhvaRyfE5VEP7B0vaz/xg26QnoIz6eFkvS9sBlpTX8dSbdXbY0 4VPeV9P9XFUnTQP3DlJATH74HcN0VqpbnycwzXVrSaic8EGH33w0eUp68u17LSGzERnz nFcEaaLXaVUyEcZ/vrgB57B1X4JP5nfLeWzhVZB9KRNqJQoKmM4Q/rvRVHsl9UV9ZuGL eFPbcVStmXehY8JIqkC7wWindKjvNgXus2f038l5OW7oS+eNRF8yOjri8bvLHjVJ7GuL AOeg== X-Gm-Message-State: AEkoouuITsEyv5yoDGtwKgAyZHyfo+3dkTE9/EwgmL5k5jtDoVG8FVt9gqmmyowgG/MgYg== X-Received: by 10.98.210.69 with SMTP id c66mr14665916pfg.71.1470902403765; Thu, 11 Aug 2016 01:00:03 -0700 (PDT) Received: from [10.239.204.146] ([192.55.54.40]) by smtp.gmail.com with ESMTPSA id g21sm2742782pfj.88.2016.08.11.01.00.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Aug 2016 01:00:03 -0700 (PDT) To: ffmpeg-devel@ffmpeg.org From: Jun Zhao Message-ID: <3ae0d191-793b-8bfb-ea76-98cacd63b2af@gmail.com> Date: Thu, 11 Aug 2016 15:59:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Disposition: attachment; filename*0="0001-ffmpeg-qsv-fix-QSV-accelerated-transcode-performance.pa"; filename*1="tch" X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] ffmpeg/qsv: fix QSV-accelerated transcode performance drop issue 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" From cafa70e97ce48b65e2a4a99782f6ce3557fef755 Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Thu, 11 Aug 2016 15:34:01 +0800 Subject: [PATCH] ffmpeg/qsv: fix QSV-accelerated transcode performance drop issue. the merge commit 1b04ea1 "avconv: create simple filtergraphs earlier" will init the filtergraphs earlier, then init the QSV transcode can't suppose the nb_filters's value, else lead to the QSV transcode performance drop. Signed-off-by: Jun Zhao --- ffmpeg_qsv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ffmpeg_qsv.c b/ffmpeg_qsv.c index 95a2351..acc54dd 100644 --- a/ffmpeg_qsv.c +++ b/ffmpeg_qsv.c @@ -210,8 +210,7 @@ int qsv_transcode_init(OutputStream *ost) /* check if the decoder supports QSV and the output only goes to this stream */ ist = input_streams[ost->source_index]; - if (ist->nb_filters || ist->hwaccel_id != HWACCEL_QSV || - !ist->dec || !ist->dec->pix_fmts) + if (ist->hwaccel_id != HWACCEL_QSV || !ist->dec || !ist->dec->pix_fmts) return 0; for (pix_fmt = ist->dec->pix_fmts; *pix_fmt != AV_PIX_FMT_NONE; pix_fmt++) if (*pix_fmt == AV_PIX_FMT_QSV)