From patchwork Tue Jan 16 05:23:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 45609 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:8199:b0:199:de12:6fa6 with SMTP id pd25csp1798361pzb; Mon, 15 Jan 2024 21:27:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvsIf1RP+V1Hr0s2XBaTjCKQYsD3J7cHS5AIIQk3gLqIqy3lOGIWYG5OqZrfMAaJ9xT25/ X-Received: by 2002:a05:6402:909:b0:559:2e6:bb27 with SMTP id g9-20020a056402090900b0055902e6bb27mr2961940edz.60.1705382879744; Mon, 15 Jan 2024 21:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705382879; cv=none; d=google.com; s=arc-20160816; b=h7N2lWLJXKAI85iLjAV3aMSnLQHw1lzMLdX7oOMiLxAj5FUy3L1wKDluzwflGiZ4Vz +9sWDkB3Vlz0G5ldxIqTzjrc0fcrCYrm2y6MRR3ROiZ0MaYkJAYnK/xWXW63x6/8xRUD VWNfhLdr6+1xCtCDJMobhwbSOUgAi8GbBSoQkscJl/uB0t27RAUVxfJNh98HEJABeq/X jRV27faD+7qD9M099ZTSJ3PPAvrWBtJjxRa+YAhv9G9vAosaZrkmydP2pYMYfnr7ifuE 2R5LSOLeqYLD5dPZuqvR3bCLJZFvwRrtYG5whKaPGLWxjJNCcpu+jEcdjH22/oVV9wAN mpRQ== 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=mX9npRGpvec9W3Ez8M6kK+jspnyfL9HKawiPh5mMVvo=; fh=1kpmTRI1sW42eNCnNMby7VLIISQBX6KJuVYxOEG0t2A=; b=MU6iJ9Rgv6e+dUi2qnLD0Qu4PJW0toYz1CE6bEwi5YVVoo5ww75gLLg561frPrI3qc r07I+QDjCPLwzFFmODTtxwJr9naiP+KOkxuOA1Ucva8/nB6eDngMzPtMSGShWC3ldDcW yWGsYEzYDjiHbY9KBfJm8FjSKuIQQGGU4AWyNQa8BBlenbkOgHaqINK3eoOxjFZuIc1Z 3ERnpRvodfr3C1TkONK5UKjSJE2kwCv9UtVYfViZ7mMIQzn1s5Ma1K8/XuYQd6nKk7TO ypTtMsssJ/Sy7NumnogbVrgQqZ0D6p6VCFdGIoqjsEBVzc/zkVwQwiozLYPG4A3daouY MTdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=eJ0uzLDv; 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 e20-20020a056402089400b00553e65efa08si4533345edy.561.2024.01.15.21.27.58; Mon, 15 Jan 2024 21:27:59 -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=eJ0uzLDv; 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 20CCB68CE3D; Tue, 16 Jan 2024 07:27:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF71A68C89E for ; Tue, 16 Jan 2024 07:27: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=1705382872; x=1736918872; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yMru0lvL4gk/YCmNX6uhLTiraN4JEcyyFCT9i0Tm9Rw=; b=eJ0uzLDvQSDX5vtI34/68rfYw/9ZsWHZ3F+X4IKlzQ+DJq6fOK4wTE3h KA9e99Cp6bHtoEDCW3ZPGFMiIrq1p3zKrcwjAumwnd0kUbkCKM6bo7AZg HKWPDCNDVH+tFrLSZ/YzxuF90RvTqv1puGUtLH3QlvMKLBTvUD6F6RVOy qjqd5jf98I5iPl70/GCrKnuRyF9BoRTCIlEgTRZofNAGQFqS1AOMMdSU2 p6dJC8GuiuTsF1b8muyTcMmc5grm98R+gqCSlngOu7Fw8s9nkbOj3x9nZ jxICmU7MkNEwwUh5EhLMtjsfiFG06Jxt7b6Yyh4kGqyHCzjYrSs7S8d8V w==; X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="464041760" X-IronPort-AV: E=Sophos;i="6.04,198,1695711600"; d="scan'208";a="464041760" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2024 21:27:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="818047971" X-IronPort-AV: E=Sophos;i="6.04,198,1695711600"; d="scan'208";a="818047971" Received: from xhh-dg264.sh.intel.com ([10.238.2.76]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2024 21:27:43 -0800 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Jan 2024 13:23:10 +0800 Message-Id: <20240116052311.1328243-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 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: EJv82uwsAHJn 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..d086d2e554 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 when @code{--enable-libvpl} is specified at configuration time, +@samp{dxva2} is used as default subdevice type when @code{--enable-libmfx} is specified at +configuration time. On Linux user can use @samp{vaapi} only as 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 @file{/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. + @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@@@var{va} +Create a VAAPI device called @samp{va} on @file{/dev/dri/renderD129}, then derive a QSV device called @samp{hw1} +from device @samp{va}. + @end table @item opencl From patchwork Tue Jan 16 05:23:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 45610 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:8199:b0:199:de12:6fa6 with SMTP id pd25csp1798428pzb; Mon, 15 Jan 2024 21:28:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlVsnAfj0wALbRo0BnjPKQEXv+ExU1TO4HxeOW64L4c4NP0lx9MK1B27uAOHR4VXzr7kdC X-Received: by 2002:a05:6402:312c:b0:559:715d:1b07 with SMTP id dd12-20020a056402312c00b00559715d1b07mr638387edb.74.1705382890346; Mon, 15 Jan 2024 21:28:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705382890; cv=none; d=google.com; s=arc-20160816; b=EfL/ipCVuImqAnN8seosq7XTN91sHwcfgDqE6qDnWgmxOpBHmLVkceJ/UdBlBfkxk6 L2OhhIpwhUKJ0IM3K4mUaatE6hnGZ4kNaBAv9uHBeJd7F/3tUd0a2PlGjDrTlqqNymGN 1SOAqLWLT4U5qv7iWrli8cTAxQHdmTZJX9w8s7Us7xj5SxigWdX0AvYoukEnFC/Wim/s NEphpGX/Ch0iyCpak1ybhGuRiBJMkBFV00IgDy1bvYJTHB5run5wlv3KDOQXFHPt1ffI GTZ4IPHExyfPrq8lnfilNHzsw5AkKRQNFA2CUJkzHemqmgjFJX+KOR+d2bK61F99jVX4 2ORw== 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=IX12tAiETHlosoZH8X/Ya314YVuI1TTmmv8MWxk4As4=; fh=1kpmTRI1sW42eNCnNMby7VLIISQBX6KJuVYxOEG0t2A=; b=rNzEv2s5QohSMshEW8GaOIO5J3s2Zq1bOYNBGDyaY+4BXr1nH+D0Wu9cKcNHpwwXYE 0YEK2sS2DpcvQc9IpXjuRjeggCvNwDBHleA6LIafs0q37hKgKQVDEm0W6Y8hxmRYKQkI z/wZHD7jgREHEUhd9yOofwc95cx/D4vnq7o+x02/EJ7iEL/pgARIWMsw5QcLwUcu3gzC ul6AvZn3kiF/qonX+nvun0GRQJU3N2Ul8v1ORWIIgErbVIZSkT3nHfeoYBtOm/XY3C9b KvSZO9K6QMIcGYsSNK3nKBsPZlbnELMBNq66UuUK4ETOFmPkXF2uff8qUyy3UdT2CUX8 s8Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=Y5FE2+96; 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 u2-20020a50c2c2000000b0055341f3d51esi4589472edf.566.2024.01.15.21.28.09; Mon, 15 Jan 2024 21:28:10 -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=Y5FE2+96; 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 5C0EF68CF01; Tue, 16 Jan 2024 07:28:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF40D68C89E for ; Tue, 16 Jan 2024 07:27:53 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705382878; x=1736918878; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dyKqF0yP6CsxWYnsnGJF9PJ+mWc+PpqLNqbMYbblY04=; b=Y5FE2+96M9k0qSu3ci+KaF8kagYqi9mZOKVG5rii/rkFAnBrOYKj/UYy uNxOzLSAUbTbbd/71wmwcRuZNPiWUcrLWcO3w2ilUgtgbsk+6xQMROD4y RTNB3IX8jAX4XpkYEMiI5yPuIuLqImHQCNaw5ZwtgIfewxpnetuLMEH5B LrHEoCuYigd2aVsKO9LuHhlIYaeF+r3fDXAmxNn6Ryr6g03F68UdV71Gb SK0QpWddMnz37VULnfQak2pwov4Fn/HQYnhAhUje+Jk1Yp1aI0O1FQzm8 8nnc003aLu2VqAxjxMfoGbQmjkEfy+oh+E/y3Pe/mAFsZYa8e2y4TTfJT g==; X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="464041762" X-IronPort-AV: E=Sophos;i="6.04,198,1695711600"; d="scan'208";a="464041762" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2024 21:27:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="818047974" X-IronPort-AV: E=Sophos;i="6.04,198,1695711600"; d="scan'208";a="818047974" Received: from xhh-dg264.sh.intel.com ([10.238.2.76]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2024 21:27:45 -0800 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Jan 2024 13:23:11 +0800 Message-Id: <20240116052311.1328243-2-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240116052311.1328243-1-haihao.xiang@intel.com> References: <20240116052311.1328243-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 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: C6iIBlpyZMOh 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 d086d2e554..bfb3772654 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 available only when +the hardware acceleration method @emph{drm} and @emph{vaapi} are enabled. +@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 @file{/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}).