From 8fbd31e715b95c3cf173f48c2fa9f8de9e224aea Mon Sep 17 00:00:00 2001 From: stevxiao Date: Thu, 29 Jan 2026 10:14:25 -0500 Subject: [PATCH] doc/filters: add entry for mestimate_d3d12 Add documentation for the filter "mestimate_d3d12" to the filters documentation. This is the follow-up for commit https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21217/commits Signed-off-by: younengxiao --- doc/filters.texi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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.