From patchwork Tue Nov 28 04:42:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 44838 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bca6:b0:181:818d:5e7f with SMTP id fx38csp3935219pzb; Mon, 27 Nov 2023 20:43:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGf0gCBntq2ffPhn29KRXP9Hrxi7ZAzoBw8Nqjxkwm+5/BQv3bueYN9pzvY2AS8jhjT2iYr X-Received: by 2002:a2e:be1a:0:b0:2c9:a168:b837 with SMTP id z26-20020a2ebe1a000000b002c9a168b837mr4322783ljq.33.1701146592371; Mon, 27 Nov 2023 20:43:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701146592; cv=none; d=google.com; s=arc-20160816; b=Lf4SJE1uQ2CYZKk6eglojt3Kg6Ot5Sqye++Wgv6RYr2AxtFoul9OVZ3a/AtXHQmK7v XcLoKKe/wagtvVOjCBH7Xd+l18vFcQ0TKTYEtusm/ZCj5ov4g8U7JChdPs+EyxSqmIJ5 RAywLiExnbepDDFcMGZg3Xau8MRwMuWkUsbr9RDDOFy+XbuzMITSc/uWXauA/epNGV46 J6xzfAzzuKGKuao5yQRfXa9A1Wbatdg89cIXBKIN0/mo3en2uNa1trRYW5/575m6MX95 NgvtOpnFL8LWPS0wzokxLzW2EmFQOAMV7Gux9IXip6W+RE03q2jQs+8jE66tyFl+WXTX YPtA== 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:dkim-signature:delivered-to; bh=20Y9n/XW/0QTfjwfiCygfwM4BYRdlI69nWcSf4T8hKs=; fh=JVwoKitmDMglBIDNsFegDtZzf8dtFDpg13pNAFhv/r4=; b=SE1sO0iJ6QV2GSKkKOtVxDXyIlA3HAPxRi9ySTIbpHNQjWuY9VuBMpXB90bOCSp6qf leoo2S5MvQHqIqgLkWoyfROSJMfSOr73M4OeccsCr5QJMNGFz4CUe6mNUNuHUA10pAOC 4KAfN8emdgisWuiWKoKEV2jiGg+v5SxBXsEQWvDBX/JcjPSB6LynkIHQtTMKiicDjTXp doDQrrjF951VX1rhwBFRSd/UEft0hkOduIARc00S+zzKu3VnJZHVKA5wkH4yLlEbOpzO zalP2aSqQHMJZG5RjxvGevED/wVPDhJ2+eyUVGRIpe112pKQv2QpLko/6IV6Eo4Vn+nQ K9Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=mVyrBuQ4; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q12-20020a170906388c00b009feaeb5a391si5450054ejd.1037.2023.11.27.20.43.11; Mon, 27 Nov 2023 20:43:12 -0800 (PST) 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=@intel.com header.s=Intel header.b=mVyrBuQ4; 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 82E0468CFAF; Tue, 28 Nov 2023 06:42:54 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DAE2D68CFA3 for ; Tue, 28 Nov 2023 06:42:47 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701146573; x=1732682573; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aWBjDOpO0ICxD6WrjBE34j2tbL97YbmjIxmt6sDT5Pc=; b=mVyrBuQ4Ik2++jH4RzE0WFz5kIMYblq+xTkxOF17EogEU1NRi5wZ0Z67 0jbB+Iav8nPwG4AEjkRtbTfG2D3x7eCAra7NvyOVaKrCj5beaZFPnvJvb nRqA+5PEIZNE/cEsot1gbnO3+a3i092co88Xpy57l8nwpV/cWQOIFiK2b P6rfunwIM9E0IWTyqCn4OdzDIXDcXrG2VmbCiHstWTp/tksvNp5jC83w/ PfC+n3PAHc9+oe44AGNIOOw+LPWl3M+z2eBhWdV4X/f5Tp6hV7XWSykoR CO0sGgGJ3dIhlrBlG/p5JLRg5QOVbbLcQdcUoaenC7n1VHiHxMyueRavC A==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="6103475" X-IronPort-AV: E=Sophos;i="6.04,232,1695711600"; d="scan'208";a="6103475" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 20:42:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="1015797410" X-IronPort-AV: E=Sophos;i="6.04,232,1695711600"; d="scan'208";a="1015797410" Received: from xhh-dg264.sh.intel.com ([10.238.2.76]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 20:42:38 -0800 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Tue, 28 Nov 2023 12:42:27 +0800 Message-Id: <20231128044227.2440476-3-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231128044227.2440476-1-haihao.xiang@intel.com> References: <20231128044227.2440476-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 3/3] lavu/hwcontext_qsv: Make sure hardware vendor is Intel for qsv on d3d11va 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 , Artem Galin Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ZeVLFdbabz5c From: Haihao Xiang When multiple hardwares are available, the default one might not be Intel Hardware. We can use option vendor_id to choose the required vendor. Tested-by: Artem Galin Signed-off-by: Haihao Xiang --- libavutil/hwcontext_qsv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 1bfda9e69b..7a9cd0cc37 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -2200,6 +2200,12 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, #endif #if CONFIG_D3D11VA case AV_HWDEVICE_TYPE_D3D11VA: + { + // Make sure the hardware vendor is Intel when multiple devices are + // available, it will be ignored if user specifies the child device + // explicitly + av_dict_set(&child_device_opts, "vendor_id", "0x8086", 0); + } break; #endif #if CONFIG_DXVA2