summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSil Vilerino <sivileri@microsoft.com>2023-04-14 10:39:04 -0400
committerHaihao Xiang <haihao.xiang@intel.com>2023-04-24 13:24:41 +0800
commitd54127c41a81cf2078a3504f78e0e4232cfe11b7 (patch)
tree6fd8039e865eacf7c191ff8026361c691da12e27 /configure
parent734a61d282b9cfc89a1e4e7bb174d80f4cce3d88 (diff)
downloadffmpeg-d54127c41a81cf2078a3504f78e0e4232cfe11b7.tar.gz
lavu/hwcontext_vaapi: Add Windows/VAAPI support with vaGetDisplayWin32
Libva 2.17+ adds a new libva-win32 node and Mesa 22.3 adds a VAAPI driver based on Direct3D 12 for Windows. Both of them are available at: https://www.nuget.org/packages/Microsoft.Direct3D.VideoAccelerationCompatibilityPack Initial review at https://github.com/intel-media-ci/ffmpeg/pull/619/ Signed-off-by: Sil Vilerino <sivileri@microsoft.com> Reviewed-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Reviewed-by: Wu, Tong1 <tong1.wu@intel.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 25 insertions, 2 deletions
diff --git a/configure b/configure
index 549ed1401c..bb7be67676 100755
--- a/configure
+++ b/configure
@@ -2316,6 +2316,7 @@ SYSTEM_LIBRARIES="
bcrypt
vaapi_drm
vaapi_x11
+ vaapi_win32
vdpau_x11
"
@@ -3827,7 +3828,7 @@ swscale_suggest="libm stdatomic"
avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs lcms2_extralibs"
avfilter_extralibs="pthreads_extralibs"
-avutil_extralibs="d3d11va_extralibs mediacodec_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs"
+avutil_extralibs="d3d11va_extralibs mediacodec_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vaapi_win32_extralibs vdpau_x11_extralibs"
# programs
ffmpeg_deps="avcodec avfilter avformat threads"
@@ -6948,6 +6949,21 @@ test_cpp <<EOF && enable uwp && d3d11va_extralibs="-ldxgi -ld3d11"
#endif
EOF
+# vaapi_win32 requires linking directly to dxgi if not building for
+# the desktop api partition
+test_cpp <<EOF && enable uwp && vaapi_win32_extralibs="-ldxgi"
+#ifdef WINAPI_FAMILY
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#error desktop, not uwp
+#else
+// WINAPI_FAMILY_APP, WINAPI_FAMILY_PHONE_APP => UWP
+#endif
+#else
+#error no family set
+#endif
+EOF
+
# mediafoundation requires linking directly to mfplat if building for uwp target
enabled uwp && mediafoundation_extralibs="-lmfplat -lmfuuid -lole32 -lstrmiids" || mediafoundation_extralibs="-lmfuuid -lole32 -lstrmiids"
@@ -6958,7 +6974,14 @@ enabled vaapi &&
check_pkg_config vaapi "libva >= 0.35.0" "va/va.h" vaInitialize
if enabled vaapi; then
- check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM
+ case $target_os in
+ mingw32*|mingw64*|win32|win64)
+ check_pkg_config vaapi_win32 "libva-win32" "va/va_win32.h" vaGetDisplayWin32
+ ;;
+ *)
+ check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM
+ ;;
+ esac
if enabled xlib_x11; then
check_pkg_config vaapi_x11 "libva-x11" "va/va_x11.h" vaGetDisplay