Bug 570882 - Need assembler optimization for VPX on Windows x64. r=cpearce
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 09 Jun 2010 20:18:51 +0900
changeset 43394 993be74a2a7f23c2c004d559219aa89f75269e53
parent 43393 545c6d13e8e8227c187cfb5eb2a47bbd0948af07
child 43395 593d13102b68b2bb4e33b45672b2a055d6e943ba
push id13681
push userm_kato@ga2.so-net.ne.jp
push dateWed, 09 Jun 2010 11:21:27 +0000
treeherdermozilla-central@993be74a2a7f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs570882
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 570882 - Need assembler optimization for VPX on Windows x64. r=cpearce
configure.in
media/libvpx/Makefile.in
media/libvpx/vpx_config.asm
media/libvpx/vpx_config.h
media/libvpx/vpx_config_c.c
media/libvpx/vpx_config_x86_64-win64-vs8.asm
media/libvpx/vpx_config_x86_64-win64-vs8.c
media/libvpx/vpx_config_x86_64-win64-vs8.h
--- a/configure.in
+++ b/configure.in
@@ -5910,17 +5910,18 @@ if test -n "$MOZ_WEBM"; then
         if test -n "$VPX_AS"; then
           VPX_X86_ASM=1
           VPX_AS='$(topsrcdir)/media/libvpx/yasm2masm-as.sh'
         else
             AC_MSG_ERROR([Need MASM (ml.exe) in order to assemble libvpx optimized assembly. Either disable webm (reconfigure with --disable-webm) or install MASM. MASM is included in the Windows 7 SDK, or you can download MASM directly from http://www.microsoft.com/downloads/details.aspx?familyid=7a1c9da0-0510-44a2-b042-7ef370530c64&displaylang=en])
         fi
     else 
 
-      dnl For Darwin x86, Darwin x86_64, and Linux x86 we can use YASM.
+      dnl For Darwin x86, Darwin x86_64, Linux x86, and WINNT x86_64
+      dhl we can use YASM.
       AC_MSG_CHECKING([for YASM assembler])
       AC_CHECK_PROGS(VPX_AS, yasm, "")
       if test -n "$VPX_AS"; then
         dnl We have YASM, see if we have assembly on this platform.  
         case "$OS_ARCH:$OS_TEST" in
         Linux:x86|Linux:i?86)
           VPX_ASFLAGS="-f elf32 -rnasm -pnasm"
           VPX_X86_ASM=1
@@ -5928,19 +5929,23 @@ if test -n "$MOZ_WEBM"; then
         Darwin:i?86)
           VPX_ASFLAGS="-f macho32 -rnasm -pnasm -DPIC"
           VPX_X86_ASM=1
         ;;
         Darwin:x86_64)
           VPX_ASFLAGS="-f macho64 -rnasm -pnasm -DPIC"
           VPX_X86_ASM=1
         ;;
+        WINNT:x86_64)
+          VPX_ASFLAGS="-f x64 -rnasm -pnasm"
+          VPX_X86_ASM=1
+        ;;
         esac
       fi # end have YASM
-    fi # end !WINNT
+    fi # end !WINNT_x86_MSVC
 
     if test -n "$VPX_X86_ASM"; then
       AC_DEFINE(VPX_X86_ASM)
     else
       AC_MSG_WARN([No assembler or assembly support for libvpx, using unoptimized C routines.])
     fi
 fi
 
--- a/media/libvpx/Makefile.in
+++ b/media/libvpx/Makefile.in
@@ -187,16 +187,18 @@ ASFILES += \
   recon_sse2.asm \
   subpixel_mmx.asm \
   subpixel_sse2.asm \
   dequantize_mmx.asm \
   emms.asm \
   $(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
+ifneq ($(OS_TEST),x86_64)
 ASFILES += \
   safeseh.asm \
   $(NULL)
 endif
+endif
 
 endif
  
 include $(topsrcdir)/config/rules.mk
--- a/media/libvpx/vpx_config.asm
+++ b/media/libvpx/vpx_config.asm
@@ -1,9 +1,11 @@
 %ifidn __OUTPUT_FORMAT__,elf32
 %include "vpx_config_x86-linux-gcc.asm"
 %elifidn __OUTPUT_FORMAT__,macho32
 %include "vpx_config_x86-darwin9-gcc.asm"
 %elifidn __OUTPUT_FORMAT__,macho64
 %include "vpx_config_x86_64-darwin9-gcc.asm"
 %elifidn __OUTPUT_FORMAT__,win32
 %include "vpx_config_x86-win32-vs8.asm"
+%elifidn __OUTPUT_FORMAT__,x64
+%include "vpx_config_x86_64-win64-vs8.asm"
 %endif
--- a/media/libvpx/vpx_config.h
+++ b/media/libvpx/vpx_config.h
@@ -11,16 +11,20 @@
 #elif defined(__APPLE__) && defined(__i386__)
 /* 32 bit MacOS. */
 #include "vpx_config_x86-darwin9-gcc.h"
 
 #elif defined(__linux__) && defined(__i386__)
 /* 32 bit Linux. */
 #include "vpx_config_x86-linux-gcc.h"
 
+#elif defined(_MSC_VER) && defined(_M_X64)
+/* 64 bit Windows */
+#include "vpx_config_x86_64-win64-vs8.h"
+
 #else
 #error VPX_X86_ASM is defined, but assembly not supported on this platform!
 #endif
 
 #else
 /* Assume generic GNU/GCC configuration. */
 #include "vpx_config_generic-gnu.h"
 #endif
--- a/media/libvpx/vpx_config_c.c
+++ b/media/libvpx/vpx_config_c.c
@@ -11,16 +11,19 @@
 #elif defined(__APPLE__) && defined(__i386__)
 /* 32 bit MacOS. */
 #include "vpx_config_x86-darwin9-gcc.c"
 
 #elif defined(__linux__) && defined(__i386__)
 /* 32 bit Linux. */
 #include "vpx_config_x86-linux-gcc.c"
 
+#elif defined(_MSC_VER) && defined(_M_X64)
+#include "vpx_config_x86_64-win64-vs8.c"
+
 #else
 #error VPX_X86_ASM is defined, but assembly not supported on this platform!
 #endif
 
 #else
 /* Assume generic GNU/GCC configuration. */
 #include "vpx_config_generic-gnu.c"
 #endif
new file mode 100644
--- /dev/null
+++ b/media/libvpx/vpx_config_x86_64-win64-vs8.asm
@@ -0,0 +1,61 @@
+ARCH_ARM equ 0
+ARCH_MIPS equ 0
+ARCH_X86 equ 0
+ARCH_X86_64 equ 1
+ARCH_PPC32 equ 0
+ARCH_PPC64 equ 0
+HAVE_ARMV5TE equ 0
+HAVE_ARMV6 equ 0
+HAVE_ARMV7 equ 0
+HAVE_IWMMXT equ 0
+HAVE_IWMMXT2 equ 0
+HAVE_MIPS32 equ 0
+HAVE_MMX equ 1
+HAVE_SSE equ 1
+HAVE_SSE2 equ 1
+HAVE_SSE3 equ 1
+HAVE_SSSE3 equ 1
+HAVE_ALTIVEC equ 0
+HAVE_VPX_PORTS equ 1
+HAVE_STDINT_H equ 0
+HAVE_ALT_TREE_LAYOUT equ 0
+HAVE_PTHREAD_H equ 0
+HAVE_SYS_MMAN_H equ 0
+CONFIG_EXTERNAL_BUILD equ 1
+CONFIG_INSTALL_DOCS equ 0
+CONFIG_INSTALL_BINS equ 1
+CONFIG_INSTALL_LIBS equ 1
+CONFIG_INSTALL_SRCS equ 0
+CONFIG_DEBUG equ 0
+CONFIG_GPROF equ 0
+CONFIG_GCOV equ 0
+CONFIG_RVCT equ 0
+CONFIG_GCC equ 0
+CONFIG_MSVS equ 1
+CONFIG_PIC equ 0
+CONFIG_BIG_ENDIAN equ 0
+CONFIG_CODEC_SRCS equ 0
+CONFIG_DEBUG_LIBS equ 0
+CONFIG_FAST_UNALIGNED equ 1
+CONFIG_MEM_MANAGER equ 0
+CONFIG_MEM_TRACKER equ 0
+CONFIG_MEM_CHECKS equ 0
+CONFIG_MD5 equ 1
+CONFIG_DEQUANT_TOKENS equ 0
+CONFIG_DC_RECON equ 0
+CONFIG_NEW_TOKENS equ 0
+CONFIG_EVAL_LIMIT equ 0
+CONFIG_RUNTIME_CPU_DETECT equ 1
+CONFIG_POSTPROC equ 1
+CONFIG_POSTPROC_GENERIC equ 0
+CONFIG_MULTITHREAD equ 1
+CONFIG_PSNR equ 0
+CONFIG_VP8_ENCODER equ 0
+CONFIG_VP8_DECODER equ 1
+CONFIG_VP8 equ 1
+CONFIG_ENCODERS equ 0
+CONFIG_DECODERS equ 1
+CONFIG_STATIC_MSVCRT equ 0
+CONFIG_SPATIAL_RESAMPLING equ 1
+CONFIG_REALTIME_ONLY equ 0
+CONFIG_SHARED equ 0
new file mode 100644
--- /dev/null
+++ b/media/libvpx/vpx_config_x86_64-win64-vs8.c
@@ -0,0 +1,2 @@
+static const char* const cfg = "--target=x86_64-win64-vs8 --disable-vp8-encoder --disable-examples --disable-install-docs";
+const char *vpx_codec_build_config(void) {return cfg;}
new file mode 100644
--- /dev/null
+++ b/media/libvpx/vpx_config_x86_64-win64-vs8.h
@@ -0,0 +1,65 @@
+/* This file automatically generated by configure. Do not edit! */
+#define INLINE      __inline
+#define FORCEINLINE __forceinline
+#define RESTRICT    
+#define ARCH_ARM 0
+#define ARCH_MIPS 0
+#define ARCH_X86 0
+#define ARCH_X86_64 1
+#define ARCH_PPC32 0
+#define ARCH_PPC64 0
+#define HAVE_ARMV5TE 0
+#define HAVE_ARMV6 0
+#define HAVE_ARMV7 0
+#define HAVE_IWMMXT 0
+#define HAVE_IWMMXT2 0
+#define HAVE_MIPS32 0
+#define HAVE_MMX 1
+#define HAVE_SSE 1
+#define HAVE_SSE2 1
+#define HAVE_SSE3 1
+#define HAVE_SSSE3 1
+#define HAVE_ALTIVEC 0
+#define HAVE_VPX_PORTS 1
+#define HAVE_STDINT_H 0
+#define HAVE_ALT_TREE_LAYOUT 0
+#define HAVE_PTHREAD_H 0
+#define HAVE_SYS_MMAN_H 0
+#define CONFIG_EXTERNAL_BUILD 1
+#define CONFIG_INSTALL_DOCS 0
+#define CONFIG_INSTALL_BINS 1
+#define CONFIG_INSTALL_LIBS 1
+#define CONFIG_INSTALL_SRCS 0
+#define CONFIG_DEBUG 0
+#define CONFIG_GPROF 0
+#define CONFIG_GCOV 0
+#define CONFIG_RVCT 0
+#define CONFIG_GCC 0
+#define CONFIG_MSVS 1
+#define CONFIG_PIC 0
+#define CONFIG_BIG_ENDIAN 0
+#define CONFIG_CODEC_SRCS 0
+#define CONFIG_DEBUG_LIBS 0
+#define CONFIG_FAST_UNALIGNED 1
+#define CONFIG_MEM_MANAGER 0
+#define CONFIG_MEM_TRACKER 0
+#define CONFIG_MEM_CHECKS 0
+#define CONFIG_MD5 1
+#define CONFIG_DEQUANT_TOKENS 0
+#define CONFIG_DC_RECON 0
+#define CONFIG_NEW_TOKENS 0
+#define CONFIG_EVAL_LIMIT 0
+#define CONFIG_RUNTIME_CPU_DETECT 1
+#define CONFIG_POSTPROC 1
+#define CONFIG_POSTPROC_GENERIC 0
+#define CONFIG_MULTITHREAD 1
+#define CONFIG_PSNR 0
+#define CONFIG_VP8_ENCODER 0
+#define CONFIG_VP8_DECODER 1
+#define CONFIG_VP8 1
+#define CONFIG_ENCODERS 0
+#define CONFIG_DECODERS 1
+#define CONFIG_STATIC_MSVCRT 0
+#define CONFIG_SPATIAL_RESAMPLING 1
+#define CONFIG_REALTIME_ONLY 0
+#define CONFIG_SHARED 0