Browse code

Merge commit 'a61c2115fb936d50b8b0328d00562fe529a7c46a'

* commit 'a61c2115fb936d50b8b0328d00562fe529a7c46a':
configure: rework dxva in avconv handling

Conflicts:
Makefile
configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2014/04/29 08:32:04
Showing 3 changed files
... ...
@@ -30,7 +30,7 @@ $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog)-$(CONFIG_OPENCL) += cmdutils_o
30 30
 
31 31
 OBJS-ffmpeg                   += ffmpeg_opt.o ffmpeg_filter.o
32 32
 OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o
33
-OBJS-ffmpeg-$(CONFIG_DXVA2)   += ffmpeg_dxva2.o
33
+OBJS-ffmpeg-$(HAVE_DXVA2_LIB) += ffmpeg_dxva2.o
34 34
 
35 35
 TESTTOOLS   = audiogen videogen rotozoom tiny_psnr tiny_ssim base64
36 36
 HOSTPROGS  := $(TESTTOOLS:%=tests/%) doc/print_options
... ...
@@ -1659,6 +1659,7 @@ SYSTEM_FUNCS="
1659 1659
     clock_gettime
1660 1660
     closesocket
1661 1661
     CommandLineToArgvW
1662
+    CoTaskMemFree
1662 1663
     CryptGenRandom
1663 1664
     dlopen
1664 1665
     fcntl
... ...
@@ -1759,6 +1760,7 @@ HAVE_LIST="
1759 1759
     $TYPES_LIST
1760 1760
     atomics_native
1761 1761
     dos_paths
1762
+    dxva2_lib
1762 1763
     libc_msvcrt
1763 1764
     libdc1394_1
1764 1765
     libdc1394_2
... ...
@@ -4501,6 +4503,7 @@ check_func_headers io.h setmode
4501 4501
 check_func_headers lzo/lzo1x.h lzo1x_999_compress
4502 4502
 check_func_headers stdlib.h getenv
4503 4503
 
4504
+check_func_headers windows.h CoTaskMemFree -lole32
4504 4505
 check_func_headers windows.h GetProcessAffinityMask
4505 4506
 check_func_headers windows.h GetProcessTimes
4506 4507
 check_func_headers windows.h GetSystemTimeAsFileTime
... ...
@@ -4800,10 +4803,6 @@ enabled vdpau && enabled xlib &&
4800 4800
     prepend ffmpeg_libs $($ldflags_filter "-lvdpau") &&
4801 4801
     enable vdpau_x11
4802 4802
 
4803
-enabled dxva2 &&
4804
-    check_header dxva2api.h -D_WIN32_WINNT=0x0600 &&
4805
-    prepend ffmpeg_libs $($ldflags_filter "-lole32")
4806
-
4807 4803
 # Funny iconv installations are not unusual, so check it after all flags have been set
4808 4804
 disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv
4809 4805
 
... ...
@@ -5033,6 +5032,10 @@ if test $target_os = "haiku"; then
5033 5033
     disable posix_memalign
5034 5034
 fi
5035 5035
 
5036
+enabled_all dxva2 CoTaskMemFree &&
5037
+    prepend ffmpeg_libs $($ldflags_filter "-lole32") &&
5038
+    enable dxva2_lib
5039
+
5036 5040
 ! enabled_any memalign posix_memalign aligned_malloc &&
5037 5041
     enabled_any $need_memalign && enable memalign_hack
5038 5042
 
... ...
@@ -67,7 +67,7 @@ const HWAccel hwaccels[] = {
67 67
 #if HAVE_VDPAU_X11
68 68
     { "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
69 69
 #endif
70
-#if CONFIG_DXVA2
70
+#if HAVE_DXVA2_LIB
71 71
     { "dxva2", dxva2_init, HWACCEL_DXVA2, AV_PIX_FMT_DXVA2_VLD },
72 72
 #endif
73 73
     { 0 },