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