diff --git a/Makefile b/Makefile index 72f0224fb2..82467c3d27 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog)-$(CONFIG_OPENCL) += cmdutils_o OBJS-ffmpeg += ffmpeg_opt.o ffmpeg_filter.o OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o -OBJS-ffmpeg-$(CONFIG_DXVA2) += ffmpeg_dxva2.o +OBJS-ffmpeg-$(HAVE_DXVA2_LIB) += ffmpeg_dxva2.o TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options diff --git a/configure b/configure index fad934c3ff..ee4393941a 100755 --- a/configure +++ b/configure @@ -1659,6 +1659,7 @@ SYSTEM_FUNCS=" clock_gettime closesocket CommandLineToArgvW + CoTaskMemFree CryptGenRandom dlopen fcntl @@ -1759,6 +1760,7 @@ HAVE_LIST=" $TYPES_LIST atomics_native dos_paths + dxva2_lib libc_msvcrt libdc1394_1 libdc1394_2 @@ -4501,6 +4503,7 @@ check_func_headers io.h setmode check_func_headers lzo/lzo1x.h lzo1x_999_compress check_func_headers stdlib.h getenv +check_func_headers windows.h CoTaskMemFree -lole32 check_func_headers windows.h GetProcessAffinityMask check_func_headers windows.h GetProcessTimes check_func_headers windows.h GetSystemTimeAsFileTime @@ -4800,10 +4803,6 @@ enabled vdpau && enabled xlib && prepend ffmpeg_libs $($ldflags_filter "-lvdpau") && enable vdpau_x11 -enabled dxva2 && - check_header dxva2api.h -D_WIN32_WINNT=0x0600 && - prepend ffmpeg_libs $($ldflags_filter "-lole32") - # Funny iconv installations are not unusual, so check it after all flags have been set disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv @@ -5033,6 +5032,10 @@ if test $target_os = "haiku"; then disable posix_memalign fi +enabled_all dxva2 CoTaskMemFree && + prepend ffmpeg_libs $($ldflags_filter "-lole32") && + enable dxva2_lib + ! enabled_any memalign posix_memalign aligned_malloc && enabled_any $need_memalign && enable memalign_hack diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 25968f4f6a..000c788032 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -67,7 +67,7 @@ const HWAccel hwaccels[] = { #if HAVE_VDPAU_X11 { "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU }, #endif -#if CONFIG_DXVA2 +#if HAVE_DXVA2_LIB { "dxva2", dxva2_init, HWACCEL_DXVA2, AV_PIX_FMT_DXVA2_VLD }, #endif { 0 },