From patchwork Fri May 14 04:53:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 27745 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp121243iof; Thu, 13 May 2021 21:57:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0VrdNDrG7Sp3SZDkP+EzJU8ndQVdnIIwndVoKjdfrqg8A3/r6p69Jg/hSe9C4SDzF2iV2 X-Received: by 2002:a05:6402:128f:: with SMTP id w15mr7954333edv.354.1620968242209; Thu, 13 May 2021 21:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620968242; cv=none; d=google.com; s=arc-20160816; b=K9l1jswdmM3C2tKSl+XdVqO55AhX0UaxxvOZLgQiHbxhUtx5e2EWmwRbd6SrfRHy4M E2pjNiaKuTS7oMTDEAsiRNDYZswAOd48W9NhCgOLJqxnOho+pTf85AHeWm1nmAjZrVzq WN39E926nPCh9jveOEul2Ex629Q+NxtGipD3+8m6AWYK7shHZTdCRp4ZZ48gy5IvtWmf TQbZiLWC7sIh6LXKZJ4TxNPox8F7wZsxcBJUnGEC78amNrf5TV9akytLiTieAzyHjPp/ b63M2BRGDPDb+CM0QtVnlh3pnpQbruCIaMj7tKxPgS1T9wHvZZ5uElqA+XoLSRp+0LTJ SXHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:ironport-sdr:ironport-sdr:delivered-to; bh=gH0L3tTLUIdf1ftHWjTxe6Ms0AQJeJwpTblTZQN4mrA=; b=ea+tZT7p86ljX/wL0eYJ/Mqd/9kzkqFt6cyVq7GQYvhz5J0oifWnqmnvwszWowhhbb bK7EIiPwdsTI0u0lNXJglwXVDRRZWgbBHCYfx5uOkc3WCRluNMsiPARoUifs/zX954MO 7jUG9Nqdrh1+mVOozQUuvqiezIj0FhxujCECAWCPJJdzIsETg7kUqd9hHvUshEt1gQQJ B+Gito0/3ZjxGvBPEsDs4Ay64i/5AGBHadSq97u8nHa6D8WiQorqR1xQXhBZrRhhG6E+ CPnfr918rLIX1bXjFUrfsvSLp7WGqf/vt2GsIpnLI2h1vslZJJJIDnvFGMfFtl4eDvYm 0erg== 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 f6si4853714ejk.677.2021.05.13.21.57.21; Thu, 13 May 2021 21:57:22 -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 3DCDE689884; Fri, 14 May 2021 07:54:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8F4DC688335 for ; Fri, 14 May 2021 07:54:47 +0300 (EEST) IronPort-SDR: kfusVj2KNp3XwKj5JGGroTIfWjYKnz5Rn7D1eCpsbjZVEBlZRKLhpBSJFNlYzDtuqD3vAO/aQ0 fP34jP65QqXw== X-IronPort-AV: E=McAfee;i="6200,9189,9983"; a="179711908" X-IronPort-AV: E=Sophos;i="5.82,299,1613462400"; d="scan'208";a="179711908" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2021 21:54:39 -0700 IronPort-SDR: UktTaIIAOFfJ2r+SmJDADi0WVDmKsrSVgzpizuilqPq1JNzUBNj6P5gUnrynCOc9G5ZBdHifHV vJMdHHWtV0OA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,299,1613462400"; d="scan'208";a="626673104" Received: from xhh-tgl64.sh.intel.com ([10.239.159.130]) by fmsmga005.fm.intel.com with ESMTP; 13 May 2021 21:54:35 -0700 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 May 2021 12:53:50 +0800 Message-Id: <20210514045400.3277256-13-haihao.xiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210514045400.3277256-1-haihao.xiang@intel.com> References: <20210514045400.3277256-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/22] lavf/scale_qsv: add new options for scale_qsv filter X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Haihao Xiang Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: +sjgBlSq4oDE Allow user to set crop area and async depth --- libavfilter/vf_vpp_qsv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 03785e9398..bceee8c4df 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -675,6 +675,10 @@ static int qsvscale_query_formats(AVFilterContext *ctx) static const AVOption qsvscale_options[] = { { "w", "Output video width(0=input video width, -1=keep input video aspect)", OFFSET(ow), AV_OPT_TYPE_STRING, { .str = "iw" }, .flags = FLAGS }, { "h", "Output video height(0=input video height, -1=keep input video aspect)", OFFSET(oh), AV_OPT_TYPE_STRING, { .str = "ih" }, .flags = FLAGS }, + { "cw", "set the width crop area expression", OFFSET(cw), AV_OPT_TYPE_STRING, { .str = "iw" }, .flags = FLAGS }, + { "ch", "set the height crop area expression", OFFSET(ch), AV_OPT_TYPE_STRING, { .str = "ih" }, .flags = FLAGS }, + { "cx", "set the x crop area expression", OFFSET(cx), AV_OPT_TYPE_STRING, { .str = "(iw-ow)/2" }, .flags = FLAGS }, + { "cy", "set the y crop area expression", OFFSET(cy), AV_OPT_TYPE_STRING, { .str = "(ih-oh)/2" }, .flags = FLAGS }, { "format", "Output pixel format", OFFSET(output_format_str), AV_OPT_TYPE_STRING, { .str = "same" }, .flags = FLAGS }, #if QSV_HAVE_SCALING @@ -687,6 +691,8 @@ static const AVOption qsvscale_options[] = { { "hq", "", 0, AV_OPT_TYPE_CONST, { .i64 = 2}, 0, 0, FLAGS, "mode"}, #endif + { "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS }, + { NULL }, };