diff --git a/doc/filters.texi b/doc/filters.texi index 0f64b4a3fa..bd9f881aa1 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -18096,6 +18096,35 @@ Macroblock size. Default @code{16}. Search parameter. Default @code{7}. @end table +@section mestimate_d3d12 + +Estimate and export motion vectors using D3D12 hardware-accelerated motion estimation. +This filter uses GPU hardware motion estimation capabilities available in +DirectX 12 Video APIs to achieve significant performance improvements +over the software-based @code{mestimate} filter. + +Motion vectors are stored in frame side data to be used by other filters. + +This filter requires the input to be in @code{d3d12} hardware pixel format. +The filter uses quarter-pixel precision for motion vector estimation. + +This filter accepts the following options: +@table @option +@item mb_size +Macroblock size. Only @code{8} and @code{16} are supported. +Default @code{16}. +@end table + +@subsection Examples + +Estimate motion vectors using D3D12 hardware acceleration with 16x16 blocks, +and visualize them: +@example +ffmpeg -hwaccel d3d12va -hwaccel_output_format d3d12 -i input.mp4 \ + -vf mestimate_d3d12=mb_size=16,hwdownload,format=nv12,codecview=mv=pf \ + -c:v libx264 -preset fast -b:v 5M output.mp4 +@end example + @section midequalizer Apply Midway Image Equalization effect using two video streams.