From patchwork Thu Oct 11 09:30:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 10639 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:ab0:73d2:0:0:0:0:0 with SMTP id m18csp1884388uaq; Thu, 11 Oct 2018 02:31:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV60wkF86rgkNqUVvCdrj5qMkGtdiesTTdMpdH/N4rntPcFBrlpXV7VTDsi004lKKx/UmSHUR X-Received: by 2002:a1c:607:: with SMTP id 7-v6mr955498wmg.103.1539250301962; Thu, 11 Oct 2018 02:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539250301; cv=none; d=google.com; s=arc-20160816; b=dFzsLcYSq/MHmg4TxtuiuRZWCvG7Vu/1/sXu+sxog2xTTVdzwleriQMiQ70fBx7TuQ xh/+xHBPgFIUszEcxAigV9YNCX3OaZlNJW4XCtMLcTx9mKjOGkBP2sjsbkg+k4IcUqm6 cpU7j0db0T6Skkz14LZkjkGC79gxr2QPoaRimKxjmnyIwGEgz6Ccw96Z0hUwlvF3kL6C t28As9t1nBBJjCQ8NhJbxQSi4mLnzyw3dSD5/2+PhBNWNRYv7WQjuwDDd0Anz8ygt1u1 RqdPPgqrYXj2YlnIZ2YPRfRPiG35D+hSQ8FxXdWmUYF85yenXKy8nIq3VrtAcGaqoNTb R7Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=0GwkKcSHMB47aQE37QrrYb+wiLVsYIidIYqnYP/SlQI=; b=K6oTGxteKmnES35krcN2jBLx2spR6dmg3tGFA1a3rTlIImh+mj9KwUYiVQ7Wg1zqdn jMK5yR6UtDQAgCk0Lxun1dmCybvOoNhmou4IJcGj4xk0/MlT4Qxwip2BYVbH116TJn+o vaDiVfigEvO9M2kLMbo7lJ1ArX6MA0iSLzCpNjoUheHKB6Kwp+w3s4Qz8j7HoDn9wMpo JxNJMwkE3Jv7GLCLfkYTKzEW8OakzpkMD/ZfWpRlEPqDHzmzMV6lsYh/LPzbT7Ls3qf0 fueJ+oJVoJTiNpV2Ja/CdIGQ6T7u+vukuFIjdIDx6efaOO7dCmtqP1KIlcT9cUpR/p6X rMcw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x130-v6si12889538wme.127.2018.10.11.02.31.41; Thu, 11 Oct 2018 02:31:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BCE768A1CC; Thu, 11 Oct 2018 12:31:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF1E9689EBB for ; Thu, 11 Oct 2018 12:31:09 +0300 (EEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 02:31:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="77188643" Received: from media_ffmpeg_skl_e3.sh.intel.com ([10.239.156.42]) by fmsmga007.fm.intel.com with ESMTP; 11 Oct 2018 02:30:57 -0700 From: Zhong Li To: ffmpeg-devel@ffmpeg.org Date: Thu, 11 Oct 2018 17:30:27 +0800 Message-Id: <1539250228-30384-1-git-send-email-zhong.li@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH 1/2] lavc/qsvenc_jpeg: add async_depth support 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 Cc: Zhong Li MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Currently qsv (m)jpeg encoding is broken. Regression introducing by the commit(id: c1bcd3): fix async support, which requires the minimum async_depth to be 1, instead previous zero. But the default async_depth of qsv (m)jpeg encoding is still initialized (mostly) as zero. This patch also abviously improves qsv (m)jpeg encoding performance due to the default async_depth is changed to 4. Signed-off-by: Zhong Li --- libavcodec/qsvenc_jpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c index c18fe91..01c10125 100644 --- a/libavcodec/qsvenc_jpeg.c +++ b/libavcodec/qsvenc_jpeg.c @@ -64,6 +64,7 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx) #define OFFSET(x) offsetof(QSVMJPEGEncContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { + { "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VE }, { NULL }, };