shithub: libvpx

Download patch

ref: bdb8afbbc0f54f31d880f403241e75c67dd33515
parent: 356c944782fc5232735f3e0d6a8f2c528ab91b04
parent: 9af8c39694d3ce0035b896d668ac6e57266e9898
author: Johann Koenig <johannkoenig@google.com>
date: Wed Sep 2 15:21:46 EDT 2015

Merge changes If253fb95,I1c8a792c,I49f9b10f,I15472738,I1e7f3c32

* changes:
  test: limit the valid image size on OS/2
  configure: add -Zhigh-mem to LDFLAGS on OS/2
  configure: disable PIC on OS/2
  Makefile: add $(STACKREALIGN) to CFLAGS for vp9_reconintra.c
  x86inc.asm: fix NASM compilation

--- a/build/make/Makefile
+++ b/build/make/Makefile
@@ -140,6 +140,8 @@
 $(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN)
 $(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN)
 $(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN)
+$(BUILD_PFX)%vp9_reconintra.c.d: CFLAGS += $(STACKREALIGN)
+$(BUILD_PFX)%vp9_reconintra.c.o: CFLAGS += $(STACKREALIGN)
 
 $(BUILD_PFX)%.c.d: %.c
 	$(if $(quiet),@echo "    [DEP] $@")
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1081,7 +1081,9 @@
           CROSS=${CROSS:-g}
           ;;
         os2)
+          disable_feature pic
           AS=${AS:-nasm}
+          add_ldflags -Zhigh-mem
           ;;
       esac
 
--- a/test/frame_size_tests.cc
+++ b/test/frame_size_tests.cc
@@ -74,7 +74,7 @@
   // size or almost 1 gig of memory.
   // In total the allocations will exceed 2GiB which may cause a failure with
   // mingw + wine, use a smaller size in that case.
-#if defined(_WIN32) && !defined(_WIN64)
+#if defined(_WIN32) && !defined(_WIN64) || defined(__OS2__)
   video.SetSize(4096, 3072);
 #else
   video.SetSize(4096, 4096);
--- a/third_party/x86inc/README.libvpx
+++ b/third_party/x86inc/README.libvpx
@@ -20,3 +20,5 @@
 Use .text instead of .rodata on macho to avoid broken tables in PIC mode.
 Use .text with no alignment for aout
 Only use 'hidden' visibility with Chromium
+Move '%use smartalign' for nasm out of 'INIT_CPUFLAGS' and before
+  'ALIGNMODE'.
--- a/third_party/x86inc/x86inc.asm
+++ b/third_party/x86inc/x86inc.asm
@@ -876,6 +876,10 @@
 %define    cpuflag(x) ((cpuflags & (cpuflags_ %+ x)) == (cpuflags_ %+ x))
 %define notcpuflag(x) ((cpuflags & (cpuflags_ %+ x)) != (cpuflags_ %+ x))
 
+%ifdef __NASM_VER__
+    %use smartalign
+%endif
+
 ; Takes an arbitrary number of cpuflags from the above list.
 ; All subsequent functions (up to the next INIT_CPUFLAGS) is built for the specified cpu.
 ; You shouldn't need to invoke this macro directly, it's a subroutine for INIT_MMX &co.
@@ -912,7 +916,6 @@
     %endif
 
     %ifdef __NASM_VER__
-        %use smartalign
         ALIGNMODE k7
     %elif ARCH_X86_64 || cpuflag(sse2)
         CPU amdnop