From patchwork Fri Jan 5 02:33:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 45484 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:61f:b0:194:e134:edd4 with SMTP id ll31csp130990pzb; Thu, 4 Jan 2024 18:42:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEq1S8RihgitufeB09513iv/za/pj3I2Hz5AA7a77UYZl4qmfnOvrEBKWStczeWnS3HYflQ X-Received: by 2002:a05:6512:15a3:b0:50e:b304:de88 with SMTP id bp35-20020a05651215a300b0050eb304de88mr154305lfb.3.1704422546938; Thu, 04 Jan 2024 18:42:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704422546; cv=none; d=google.com; s=arc-20160816; b=R60O/M32gwvGZ7eJ8SEd0yBz99JSge+MgvegJW8yuPB5+pcJezS0W/8u2x42pO8PRK 6zelCUnRNUfLGjVLOS02KtUREkKoRVdyLQFaeM+hQhBd6IVdb4nm6mn0sTheD00tjtvd QUl7nq/vILmQcTe8yH6F7DE5J5zb6oBmlE00yn0ZEByIwcxrbOEeceMXyXh6IjEeKiYt z1xR2BPQKaZHkZ9/NOs/8gPRk0TSnqcEVhDsbD3HtumHM7lxkn9ZaTQMZH0kvF63M+kN eM2d2uPBGWwhwjtDZulWj1FS7kcQEqeW8xY9l+UEEjLSG2qhgzJ5vxnM9jabPOon5bgb e3sQ== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=MJIAMYVTjhbyxOU20Dvdz2WaR//HwpFK1zcBvvhkdw8=; fh=1kpmTRI1sW42eNCnNMby7VLIISQBX6KJuVYxOEG0t2A=; b=MZ1DKHzEsSYEAHHQT5PPCK0XKFibQ7PZJTG6UZ4cgjAlVdkeLoM/PoNCwggkJ0iqfm +YwRvlpppAfiz2GjpzMkKB8VQFvyDphOzmP+cz/jNtQBXfxnOlMw9gI2midr/ot5MF+C hI4dNZ5bf2bz6JEshamDBNlGOfH/W4OC4sxtns/SJIqrHOBSoo4eMkyQyb/KRj8k0CUh NrbBQyDFojw1Jeclt/udutiWul/LK44GGHiZhGYzoAFSxoYIfRP5ce+PydnvaTn9wcLJ jnS4+dLgQaNwNPZhmoQw9i7NDS3Tmeq/F3bY4BW5wqu22IfWo4zW/8ruNl/064K9Ken/ yhvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=V7HsRP6l; 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 kb6-20020a170907924600b00a235755017bsi224713ejb.338.2024.01.04.18.42.26; Thu, 04 Jan 2024 18:42:26 -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=V7HsRP6l; 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 AF7BC68CC0B; Fri, 5 Jan 2024 04:42:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 707CE68C9AA for ; Fri, 5 Jan 2024 04:42:14 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704422540; x=1735958540; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MS+ZWLqeA0tCZSPLeEmWAKeOCtAXzWnl5wBKLXiWh/k=; b=V7HsRP6lAX4bdKldAjnUqCex03jfuomaXbbxwosf42L4l6BIcOu2jnvX U4t4jgx5he/maK8qkJ1/It++l3Rgmw/WIJNlBvxI8brJrffznh9/eofhX on8QZwyAgacxzF7qOyC4t1+Uxj6pTzMCr1UEXEwvH1HA0NOCae+4eDGDA r73OvAn2xgngoIdrS+NLxpWHBMqdERw0yPZsprWHR9beOm7wAZO2IwFXm VgV5r9oWthALle0TNGSsVpPLy3awbm+pa9YWE8SpHOE8KDYMwnB5nxCQ+ cscVVxJ50qeArHjm2PYkuJl7nXm0n3rvLU4wWQfNToKjvMN6Cuex1tjYN A==; X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="18930262" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="18930262" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 18:42:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="809421725" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="809421725" Received: from xhh-dg264.sh.intel.com ([10.238.2.76]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 18:42:08 -0800 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Fri, 5 Jan 2024 10:33:51 +0800 Message-Id: <20240105023352.3959874-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/2] doc/ffmpeg: update the documentation about qsv device creation 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: 5LvlNrs4USnq From: Haihao Xiang Signed-off-by: Haihao Xiang --- doc/ffmpeg.texi | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 7246a46d2f..f095f402bd 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1406,16 +1406,38 @@ If not specified, @samp{auto_any} is used. platform-appropriate subdevice (@samp{dxva2} or @samp{d3d11va} or @samp{vaapi}) and then deriving a QSV device from that.) -Alternatively, @samp{child_device_type} helps to choose platform-appropriate subdevice type. -On Windows @samp{d3d11va} is used as default subdevice type. +The following options are recognized: +@table @option +@item child_device +Specify a DRM render node on Linux or DirectX adapter on Windows +@item child_device_type +Choose platform-appropriate subdevice type. On Windows @samp{d3d11va} is used +as default subdevice type. +@end table Examples: @table @emph +@item -init_hw_device qsv:hw,child_device=/dev/dri/renderD129 +Create a QSV device with @samp{MFX_IMPL_HARDWARE} on DRM render node /dev/dri/renderD129 + +@item -init_hw_device qsv:hw,child_device=1 +Create a QSV device with @samp{MFX_IMPL_HARDWARE} on DirectX adapter 1. The subdevice +type is @samp{d3d11va} if @code{--enable-libvpl} is specified at configuration time, the +subdevice type is @samp{dxva2} if @code{--enable-libmfx} is specified at configuration time. + @item -init_hw_device qsv:hw,child_device_type=d3d11va Choose the GPU subdevice with type @samp{d3d11va} and create QSV device with @samp{MFX_IMPL_HARDWARE}. @item -init_hw_device qsv:hw,child_device_type=dxva2 Choose the GPU subdevice with type @samp{dxva2} and create QSV device with @samp{MFX_IMPL_HARDWARE}. + +@item -init_hw_device qsv:hw,child_device=1,child_device_type=d3d11va +Create a QSV device with @samp{MFX_IMPL_HARDWARE} on DirectX adapter 1 with subdevice type @samp{d3d11va} + +@item -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device qsv=hw1@va +Create a VAAPI device called @samp{va} on /dev/dri/renderD129, then derive a QSV device called @samp{hw1} +from device @samp{va} + @end table @item opencl From patchwork Fri Jan 5 02:33:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 45485 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:61f:b0:194:e134:edd4 with SMTP id ll31csp131055pzb; Thu, 4 Jan 2024 18:42:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdxBaqRyNPlUaeSOZ91+wM7QtQVJdBxYWDWM3Y+hSDN5aLs6WMiMOl0zwX8YKPNN/0c4LR X-Received: by 2002:a05:651c:1546:b0:2cc:575f:d7fc with SMTP id y6-20020a05651c154600b002cc575fd7fcmr455224ljp.108.1704422557114; Thu, 04 Jan 2024 18:42:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704422557; cv=none; d=google.com; s=arc-20160816; b=TEb/12tX2Nhn2tuevUyWSZYU3IOKVdRLR9CSFAVcPhxQOFjTHcA9V4liT/KN+qvdip qVf1JCmZSSaq1e9+xDEonNE5M6naB79HnjIBw0gyLsShbrOOQMgNK3rVN+lmnBxuZY7u MBFvZI8Ke/ry65RghQ7WPdqbF9MO5QofX1BniDbRMxYUg3NfNu3fdN4j2JXlFDboKWOI tTc9cPs+Z2xjbi29gOaB2Pq/YVKteINPz7u7c9brDgokMYCTnjLp1iyJ+Af+4uS9C6/s yeaK5wJ80tnyO6ASCj2QEJj+L11hNqg3R71v1ywJUtDyQ+Occ93yoqtp+2//5lKYH6LG LpVg== 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=F8ZBgxLseDS2y0o0oIx0ftXrcoOxqv2QScy4p1Ody1A=; fh=1kpmTRI1sW42eNCnNMby7VLIISQBX6KJuVYxOEG0t2A=; b=LnE6DB1otLNSTwc1AuG2Lfc9lFNs7L8AymAFqCW+US8+gMsegEFxckBbRPAPrR+R7f bpZIwRofFK8wNgAtNP7KcUcaxRd+lR60OeDSDrNYzxr+V4UpKTzwBVWiNOspUyqQDz2i A9BO6A4vy/qGfkrvfL2dUaXDrFisRAEIcFrtnqPxZ3NYysQ9JhSRHSuD8RrKO0R7a1f/ 558QUMwULt8ztoZbMI89lKyyyJCqs/ADOf2j1Oh9gzTUPB8RBUNMvfX2++PKwiIjECiv R4BI7eTESs0HBjkJ8XT+CGGsw82AhcSrxODN/32VaISezc64q8l8W4pWnPeim9Qkh/zw kHfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=B4yN8OjT; 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 f26-20020a50a6da000000b005571d4aea54si281051edc.290.2024.01.04.18.42.36; Thu, 04 Jan 2024 18:42:37 -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=B4yN8OjT; 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 0B5C868CD06; Fri, 5 Jan 2024 04:42:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AC44568CCB5 for ; Fri, 5 Jan 2024 04:42:20 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704422546; x=1735958546; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z7jZynIEnRNtfwK6PZBZtJSljh/G7TcSkDBb94CPkGU=; b=B4yN8OjT0grKM3yvN3Tq9XattBOXDmH7n0wxih9nSSA7A+5JrNRRPJJQ 0AQT+ws/qsuD+BixHzDIYlyhHJe6qKcQgxjvPt7KVtFRnxNa1D+GZ6KIw wXd0JrTVOnz7eJjdX7H2QIAC21Of9QsNLSL9ep4Io6nOknzkPRxZIeUnp B5/uzKbPj1TBdk/tTMuLX8XN0RyagU7+YAzlTns29rzzTJlQ4l63O4nqX iY4u9p99264F2RhmWLwVeCTol3i4+bsTUZaXPUUvLCEpCWrpKMjyj3NPO XEJLcY7w2cu8VFOJHx35j1caLItqICKoZ50M7iPRGEZVyQfXsW//b9aVM g==; X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="18930263" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="18930263" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 18:42:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="809421734" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="809421734" Received: from xhh-dg264.sh.intel.com ([10.238.2.76]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 18:42:10 -0800 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Fri, 5 Jan 2024 10:33:52 +0800 Message-Id: <20240105023352.3959874-2-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240105023352.3959874-1-haihao.xiang@intel.com> References: <20240105023352.3959874-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/2] doc/ffmpeg: update the documentation about vaapi device creation 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: rxnxRC8K1nPP From: Haihao Xiang Signed-off-by: Haihao Xiang --- doc/ffmpeg.texi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index f095f402bd..8fb165c5df 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1385,6 +1385,29 @@ If not specified, it will attempt to open the default X11 display (@emph{$DISPLA and then the first DRM render node (@emph{/dev/dri/renderD128}), or the default DirectX adapter on Windows. +The following options are recognized: +@table @option +@item kernel_driver +When @var{device} is not specified, use this option to specify the name of the kernel +driver associated with the desired device. This option is only available when +@emph{libdrm} works on Linux. +@end table + +Examples: +@table @emph +@item -init_hw_device vaapi +Create a vaapi device on the default device + +@item -init_hw_device vaapi:/dev/dri/renderD129 +Create a vaapi device on DRM render node /dev/dri/renderD129 + +@item -init_hw_device vaapi:1 +Create a vaapi device on DirectX adapter 1 + +@item -init_hw_device vaapi:,kernel_driver=i915 +Create a vaapi device on a device associated with kernel driver @samp{i915} +@end table + @item vdpau @var{device} is an X11 display name. If not specified, it will attempt to open the default X11 display (@emph{$DISPLAY}).