From patchwork Tue Jun 15 06:13:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 28316 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp3528427iol; Mon, 14 Jun 2021 23:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ2jy0MFr3E+xyx9sAF2fmLfB8pbqhBUc4sK8FruiJP+ywfmr3RGa3M0M/X12L02/vOxgL X-Received: by 2002:a05:6402:31a8:: with SMTP id dj8mr21135508edb.296.1623737900560; Mon, 14 Jun 2021 23:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623737900; cv=none; d=google.com; s=arc-20160816; b=RxTCTRfjB3pqrOJ/krXMSJtQv/XwzZ1hhCpprIobs2BWCMmW+3r2NbUMqa92NrFsII ttjzJK2eMh3xqYNxgn7kq80QYS+uVGK36Ds3Uz4wlmNRpSlifSaRmTUzRvLC8VlKzZ/H AOdpeO78/y8cKFzMifnCihgXQW9YWKIEgZenEHd9lNZfpmvc0ZQ+SzAKAdU7SeFbhcv6 4ETb0CTvazedFxNNgx302w4iW6IQ7RJ3YZ/1qr/bJE3pbY+m0i39msUcZV3bDqrmgJrk Be4TeZQbfsHVDhx+tVsMI5ZfsTYx0aG1m2nA5qE3Har6lS+CgiWZMbNtpCqRdELxcvXV LDrA== 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=kMVbMWA9Hr08QKOUylIagZK4gF8/G7O+9PdEqLWhREkSXyhodJ0UUEkKSoD4/O7GEi n4bmC5gVFf2Q0V7xQC4m7uAulbzEnB/+o0cLCAiuA6NXh68v5KAz8kr+Aaj+bfVeUZH/ mMhWcPAVQIPbGoG9Gs89ryZirotE/LrZ64+e7LQQ+ibxd0uH4tSC8k+fowms1rVm7dT5 LhiWmIdASDeDTHcRwkoo7OTW5qkX/0h3xwW0PaeE9vTOpLC8hDL1PDpBpczJfTHuurAz 530fMoK+MbDutLYjNpCEyq+YhRPtB/5GEquRsi3wD1sdkSZ46MTMRef2ljDGJzC11X91 sHig== 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 p7si13561818edq.96.2021.06.14.23.18.20; Mon, 14 Jun 2021 23:18:20 -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 EAE9E6899CF; Tue, 15 Jun 2021 09:15:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBD6F68836F for ; Tue, 15 Jun 2021 09:15:46 +0300 (EEST) IronPort-SDR: ob+YkmbaF1voFMMU56Fd0XQJGdKNS4G3Y8F2ersm5YRwoDhLdCHaejmse+Qme9uE9nLxqgKdbX BQf5kUYtqYtw== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="227395427" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="227395427" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2021 23:15:39 -0700 IronPort-SDR: umsrvoJdKbPUtsaltp7Z7ZaU7+Fs3FJdjasSsD3zvQ+WIef6ZHwR1u8Xethp/9+HYj2KaxbaC8 8fFX3U8AEPFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="451857188" Received: from xhh-tgl64.sh.intel.com ([10.239.159.53]) by fmsmga008.fm.intel.com with ESMTP; 14 Jun 2021 23:15:38 -0700 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Tue, 15 Jun 2021 14:13:53 +0800 Message-Id: <20210615061403.1576282-13-haihao.xiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210615061403.1576282-1-haihao.xiang@intel.com> References: <20210615061403.1576282-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 12/22] lavfi/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: 0CcNfI9QYAJz 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 }, };