diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index f7b48f6..2107786 100644 --- a/configure.ac +++ b/configure.ac @@ -92,15 +92,15 @@ AC_ARG_ENABLE([vaapi], AS_HELP_STRING([--disable-vaapi], [Disable VAAPI accelerated video encoding, decoding and rendering])) -#checking if Direct3D 12 hardware encoding is wanted. The Windows counterpart -#of the VAAPI encoding path above - there is no libva there, but FFmpeg can -#reach the same GPU encoders through D3D12 Video. Autodetected the same way, -#and only ever looked for when building for Windows. +#checking if Direct3D 12 hardware encoding and decoding is wanted. The Windows +#counterpart of the VAAPI path above - there is no libva there, but FFmpeg can +#reach the same GPU encoders and decoders through D3D12 Video. Autodetected the +#same way, and only ever looked for when building for Windows. AC_ARG_ENABLE([d3d12va], AS_HELP_STRING([--enable-d3d12va], - [Enable Direct3D 12 accelerated video encoding, Windows only (default: autodetect)]) + [Enable Direct3D 12 accelerated video encoding and decoding, Windows only (default: autodetect)]) AS_HELP_STRING([--disable-d3d12va], - [Disable Direct3D 12 accelerated video encoding])) + [Disable Direct3D 12 accelerated video encoding and decoding])) #checking if PulseAudio device enumeration is wanted. Only affects what the #settings dialog can list; see the check further down. @@ -324,19 +324,25 @@ AS_IF([test "x$PICA_VAAPI_ENABLED" = "xyes" && test "x$enable_vaapi_x11" != "xno ]) ]) -#check whether FFmpeg knows how to encode through Direct3D 12, which is how a -#Windows build reaches the GPU: libva is not part of that platform, but the -#hwcontext machinery the VAAPI path uses carries a D3D12 device type as well, -#and libavcodec has h264_d3d12va and hevc_d3d12va encoders to go with it. +#check whether FFmpeg knows how to encode and decode through Direct3D 12, one +#of the ways a Windows build reaches the GPU: libva is not part of that +#platform, but the hwcontext machinery the VAAPI path uses carries a D3D12 +#device type as well, and libavcodec has h264_d3d12va and hevc_d3d12va encoders +#and D3D12 hwaccels for its decoders to go with it. # #Nothing is linked for this - libavutil loads d3d12.dll itself when a device is #created - so all there is to check is that the headers are new enough to name -#the device type and the pixel format. Whether those encoders were compiled -#into the libavcodec being built against, and whether the machine the client -#ends up running on has a GPU that can encode, are both runtime questions, -#answered by falling back to the software encoder. +#the device type and the pixel format. Whether those encoders and hwaccels were +#compiled into the libavcodec being built against, and whether the machine the +#client ends up running on has a GPU that can use them, are both runtime +#questions, answered by falling back to software. +# +#The other Windows paths - Media Foundation encoding, Direct3D 11 and DXVA2 +#decoding - need no check of their own: FFmpeg's headers have named them for +#far longer than any FFmpeg this builds against, so they are compiled in on +#every Windows build and left to the runtime to find out whether they work. AS_IF([test "x$TARGET_OS" = "xwindows" && test "x$enable_d3d12va" != "xno"], [ - AC_MSG_CHECKING([whether FFmpeg supports Direct3D 12 video encoding]) + AC_MSG_CHECKING([whether FFmpeg supports Direct3D 12 video encoding and decoding]) pica_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS" @@ -350,21 +356,21 @@ AS_IF([test "x$TARGET_OS" = "xwindows" && test "x$enable_d3d12va" != "xno"], [ (void)device; (void)format;]])], [ PICA_D3D12VA_ENABLED=yes - AC_DEFINE([HAVE_D3D12VA], [1], [Define to 1 if FFmpeg can encode video through Direct3D 12]) + AC_DEFINE([HAVE_D3D12VA], [1], [Define to 1 if FFmpeg can encode and decode video through Direct3D 12]) AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) AS_IF([test "x$enable_d3d12va" = "xyes"], - [AC_MSG_ERROR(["Direct3D 12 encoding was requested but this FFmpeg has no D3D12 hardware context"])], - [AC_MSG_WARN(["this FFmpeg has no D3D12 hardware context - building without Direct3D 12 encoding"])]) + [AC_MSG_ERROR(["Direct3D 12 acceleration was requested but this FFmpeg has no D3D12 hardware context"])], + [AC_MSG_WARN(["this FFmpeg has no D3D12 hardware context - building without Direct3D 12 acceleration"])]) ]) CPPFLAGS="$pica_save_CPPFLAGS" ]) AS_IF([test "x$TARGET_OS" != "xwindows" && test "x$enable_d3d12va" = "xyes"], - [AC_MSG_ERROR(["Direct3D 12 encoding was requested but it only exists on Windows"])]) + [AC_MSG_ERROR(["Direct3D 12 acceleration was requested but it only exists on Windows"])]) ]) AM_CONDITIONAL([PICA_VAAPI], [test "x$PICA_VAAPI_ENABLED" = "xyes"]) |
