From patchwork Mon Jun 12 22:40:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 3939 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.22.4 with SMTP id 4csp78086vsw; Mon, 12 Jun 2017 15:42:59 -0700 (PDT) X-Received: by 10.28.109.2 with SMTP id i2mr9243831wmc.11.1497307379211; Mon, 12 Jun 2017 15:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497307379; cv=none; d=google.com; s=arc-20160816; b=G27sJSI5g8fVP6IQBSVlbw9acYihcxsgZ/CYKwsb3yeG+6hUT8GzoUqfc2Uzaw0da3 vIgOT6C1wu2vi9n0EOZfV8B4O4XLrfMK40SVnAzA2V1QNd6QotmU9k8hB8LrCNp3xuMs v4DhC0J4anF1NH02Kg7GjaWEBW//fpkIjA0LIqsWVeqpDBy24Wryl9OiiYncz71qvIY8 qNBMNb7mGc8OS+Rdw2K4SO86x2VD9FNGJOt7vipot2XFnMeAexHVf87SLSchcVLmvCSC /RvIDiqUw2mwq40btCtWHjvLrfvKpbqttDk0gxFJ4D08rOub90q+STMpYoVGB1In/x1f 6S0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=ai2R9I5FvNzwN14k0omJzcQ5JgIdGyqBAN42VWSHW78=; b=Wuuy/kqrfIr6BGSyHHubDvaekZ/OY5GoF4Rdy2/Kaeq8n1wvpLQrrG4tXH1Ijoy1Kh j9w+aJbLgSLtMKAEDCE01kKzw/bcQRq77v0NPRzcfZ11a4r1hO39QfwOegs/RBvcOsHI oxIO4UKsxOFqmO5PNZG9ofkKxh1CuCAX8OExuTfoC5DtvRukN6vLH4RezUD18YvT7Yz2 Ys3PZyUfG7iLlCa/PMhH7jZrZiHhOLU5QC3cJqQqNFiGa1H/cJZrJFZ7/hf08xBFja+F v+HNN4BFqx/MfB6jDxLqnLX8mt9EnviwjAh5O121h5PfItMqFVz/YjzsoNHc5YqkTXVq KSBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@jkqxz-net.20150623.gappssmtp.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f1si8771653wma.56.2017.06.12.15.42.58; Mon, 12 Jun 2017 15:42:59 -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; dkim=neutral (body hash did not verify) header.i=@jkqxz-net.20150623.gappssmtp.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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AF14A68A07A; Tue, 13 Jun 2017 01:41:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7EC0C68A039 for ; Tue, 13 Jun 2017 01:41:04 +0300 (EEST) Received: by mail-wr0-f177.google.com with SMTP id v111so116324588wrc.3 for ; Mon, 12 Jun 2017 15:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=qgEA2yFw1s6hkHQeo5piLvV1r3bjt0x87464F+VL058=; b=IZT4mmHrWJ5D/3YBqnaEP0CAOWBMOwqSLET/5ODURDmMiJ9J5eCUQ4gdpgF9AWViZs PmJ62Pmxzk1V+hUQpGMRbOrqXprLjW2rGgBBuRwzwDkob2EaJSpCkAlbj3VNoLITc1B6 xRpm1Q8XXrzjQXpd6IndjqII3Pf17HKpYd9gYRMYmWgKFGzOAUuxNp+GxVOBpjw6vxLq H7KWDCWLbAFDAU2+jkS7Gu0xB8wvKLUz7KF5guNewItm5X5XQm70xVEMTFx3MDXRBvZ7 w1SKg8dEKbQifKPy3QmRkP/V9BWj3aurI769zoCdK+B0F2xD6WPet+9Wj4s2OV7eyQys W23Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=qgEA2yFw1s6hkHQeo5piLvV1r3bjt0x87464F+VL058=; b=pTqGzq4SgBjEACTFdEd+2Qrg6VorAxv4+Ue3ElIy7/v2gN3M8ByEBYIA67of7Bd4xC gydpCdrV8XCTRiFooD3dmkDYDO77UK9CrR8FPrIVirB39wUlGZqvN0WYjkeJIqvN9B21 Mt4eUcw43huB8iWzun5NcTHCkP2K86xSE3ABt7EWNQDUInt7cMyZVZQBYp3BoyJOTmOP 5jARUsHORGIJwbuaw9mT18v3kAyfsJRAIR9FZjyEyt+J+7vFbJ8AplmnpjlZX3Z8aQ1S Rq0DmYM2P8sudOTfYYi94FIsVwISzn+b9mXoXU7M6CPAmDzCJV+ydzWLHnOS/4PjW1Sq NBlg== X-Gm-Message-State: AKS2vOyJwCwP+kc8tUifF00PV7jKWwCI6E3vxv+JzU4jEZk5LA8INgtT /kkR9MIF5NS0CsSddlw= X-Received: by 10.223.169.138 with SMTP id b10mr685085wrd.29.1497307266036; Mon, 12 Jun 2017 15:41:06 -0700 (PDT) Received: from rywe.jkqxz.net (cpc91242-cmbg18-2-0-cust650.5-4.cable.virginm.net. [82.8.130.139]) by smtp.gmail.com with ESMTPSA id m191sm13098233wmg.30.2017.06.12.15.41.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 15:41:05 -0700 (PDT) From: Mark Thompson To: ffmpeg-devel@ffmpeg.org Date: Mon, 12 Jun 2017 23:40:25 +0100 Message-Id: <20170612224041.6750-9-sw@jkqxz.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612224041.6750-1-sw@jkqxz.net> References: <20170612224041.6750-1-sw@jkqxz.net> Subject: [FFmpeg-devel] [PATCH 08/24] ffmpeg: Document the -init_hw_device option X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" (cherry picked from commit 303fadf5963e01b8edf4ba2701e45f7e9e586aeb) --- doc/ffmpeg.texi | 85 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 27 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index dcc0cfb341..db7f05a3e0 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -715,6 +715,56 @@ would be more efficient. When doing stream copy, copy also non-key frames found at the beginning. +@item -init_hw_device @var{type}[=@var{name}][:@var{device}[,@var{key=value}...]] +Initialise a new hardware device of type @var{type} called @var{name}, using the +given device parameters. +If no name is specified it will receive a default name of the form "@var{type}%d". + +The meaning of @var{device} and the following arguments depends on the +device type: +@table @option + +@item cuda +@var{device} is the number of the CUDA device. + +@item dxva2 +@var{device} is the number of the Direct3D 9 display adapter. + +@item vaapi +@var{device} is either an X11 display name or a DRM render node. +If not specified, it will attempt to open the default X11 display (@emph{$DISPLAY}) +and then the first DRM render node (@emph{/dev/dri/renderD128}). + +@item vdpau +@var{device} is an X11 display name. +If not specified, it will attempt to open the default X11 display (@emph{$DISPLAY}). + +@item qsv +@var{device} selects a value in @samp{MFX_IMPL_*}. Allowed values are: +@table @option +@item auto +@item sw +@item hw +@item auto_any +@item hw_any +@item hw2 +@item hw3 +@item hw4 +@end table +If not specified, @samp{auto_any} is used. +(Note that it may be easier to achieve the desired result for QSV by creating the +platform-appropriate subdevice (@samp{dxva2} or @samp{vaapi}) and then deriving a +QSV device from that.) + +@end table + +@item -init_hw_device @var{type}[=@var{name}]@@@var{source} +Initialise a new hardware device of type @var{type} called @var{name}, +deriving it from the existing device with the name @var{source}. + +@item -init_hw_device list +List all hardware device types supported in this build of ffmpeg. + @item -hwaccel[:@var{stream_specifier}] @var{hwaccel} (@emph{input,per-stream}) Use hardware acceleration to decode the matching stream(s). The allowed values of @var{hwaccel} are: @@ -734,6 +784,9 @@ Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration. @item dxva2 Use DXVA2 (DirectX Video Acceleration) hardware acceleration. +@item vaapi +Use VAAPI (Video Acceleration API) hardware acceleration. + @item qsv Use the Intel QuickSync Video acceleration for video transcoding. @@ -757,33 +810,11 @@ useful for testing. @item -hwaccel_device[:@var{stream_specifier}] @var{hwaccel_device} (@emph{input,per-stream}) Select a device to use for hardware acceleration. -This option only makes sense when the @option{-hwaccel} option is also -specified. Its exact meaning depends on the specific hardware acceleration -method chosen. - -@table @option -@item vdpau -For VDPAU, this option specifies the X11 display/screen to use. If this option -is not specified, the value of the @var{DISPLAY} environment variable is used - -@item dxva2 -For DXVA2, this option should contain the number of the display adapter to use. -If this option is not specified, the default adapter is used. - -@item qsv -For QSV, this option corresponds to the values of MFX_IMPL_* . Allowed values -are: -@table @option -@item auto -@item sw -@item hw -@item auto_any -@item hw_any -@item hw2 -@item hw3 -@item hw4 -@end table -@end table +This option only makes sense when the @option{-hwaccel} option is also specified. +It can either refer to an existing device created with @option{-init_hw_device} +by name, or it can create a new device as if +@samp{-init_hw_device} @var{type}:@var{hwaccel_device} +were called immediately before. @item -hwaccels List all hardware acceleration methods supported in this build of ffmpeg.