Message ID | 20240105023352.3959874-1-haihao.xiang@intel.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v2,1/2] doc/ffmpeg: update the documentation about qsv device creation | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | fail | Make failed |
andriy/make_x86 | fail | Make failed |
On date Friday 2024-01-05 10:33:51 +0800, Xiang, Haihao wrote: > From: Haihao Xiang <haihao.xiang@intel.com> > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > --- > 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 missing dot at the end of complete sentence, here and below > +@item child_device_type > +Choose platform-appropriate subdevice type. On Windows @samp{d3d11va} is used > +as default subdevice type. Is this needed for non-Windows platforms? > +@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 You can quote the device with @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. 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} Looks good otherwise. BTW, do you know why all hwaccels are not documented in a dedicated file (hwaccels.texi or something)?
On Sa, 2024-01-06 at 11:51 +0100, Stefano Sabatini wrote: > On date Friday 2024-01-05 10:33:51 +0800, Xiang, Haihao wrote: > > From: Haihao Xiang <haihao.xiang@intel.com> > > > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > > --- > > 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 > > missing dot at the end of complete sentence, here and below > > > +@item child_device_type > > +Choose platform-appropriate subdevice type. On Windows @samp{d3d11va} is > > used > > +as default subdevice type. > > Is this needed for non-Windows platforms? > > > +@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 > > You can quote the device with @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. 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} > > Looks good otherwise. > > BTW, do you know why all hwaccels are not documented in a dedicated > file (hwaccels.texi or something)? Thanks for your comment, I updated the patch in v3 https://ffmpeg.org/pipermail/ffmpeg-devel/2024-January/319688.html . BTW I don't know why there isn't a dedicated file for hwaccels. Thanks Haihao
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