shithub: libvpx

Download patch

ref: 420b9f5bd3ef1ed19b354f16ced9196c6453e7fe
parent: 74c67e3da3fe62ab2599dbb471657db7a8e03d16
parent: 5fc9688792735888731acaf5e2628cd1b3a76d1b
author: Johann Koenig <[email protected]>
date: Wed Dec 9 14:31:12 EST 2015

Merge "fix null pointer crash in Win32 because esp register is broken"

--- a/vpx_dsp/x86/highbd_subpel_variance_impl_sse2.asm
+++ b/vpx_dsp/x86/highbd_subpel_variance_impl_sse2.asm
@@ -124,7 +124,6 @@
 
       ; Store bilin_filter and pw_8 location in stack
       GET_GOT eax
-      add esp, 4                ; restore esp
 
       lea ecx, [GLOBAL(bilin_filter_m)]
       mov g_bilin_filterm, ecx
@@ -132,6 +131,7 @@
       lea ecx, [GLOBAL(pw_8)]
       mov g_pw_8m, ecx
 
+      RESTORE_GOT               ; restore esp
       LOAD_IF_USED 0, 1         ; load eax, ecx back
     %else
       cglobal highbd_sub_pixel_variance%1xh, 7, 7, 13, src, src_stride, \
@@ -141,7 +141,6 @@
 
       ; Store bilin_filter and pw_8 location in stack
       GET_GOT eax
-      add esp, 4                ; restore esp
 
       lea ecx, [GLOBAL(bilin_filter_m)]
       mov g_bilin_filterm, ecx
@@ -149,6 +148,7 @@
       lea ecx, [GLOBAL(pw_8)]
       mov g_pw_8m, ecx
 
+      RESTORE_GOT               ; restore esp
       LOAD_IF_USED 0, 1         ; load eax, ecx back
     %endif
   %else
--- a/vpx_dsp/x86/subpel_variance_sse2.asm
+++ b/vpx_dsp/x86/subpel_variance_sse2.asm
@@ -140,7 +140,6 @@
 
       ;Store bilin_filter and pw_8 location in stack
       GET_GOT eax
-      add esp, 4                ; restore esp
 
       lea ecx, [GLOBAL(bilin_filter_m)]
       mov g_bilin_filterm, ecx
@@ -148,6 +147,7 @@
       lea ecx, [GLOBAL(pw_8)]
       mov g_pw_8m, ecx
 
+      RESTORE_GOT               ; restore esp
       LOAD_IF_USED 0, 1         ; load eax, ecx back
     %else
       cglobal sub_pixel_variance%1xh, 7, 7, 13, src, src_stride, x_offset, \
@@ -157,7 +157,6 @@
 
       ;Store bilin_filter and pw_8 location in stack
       GET_GOT eax
-      add esp, 4                ; restore esp
 
       lea ecx, [GLOBAL(bilin_filter_m)]
       mov g_bilin_filterm, ecx
@@ -165,6 +164,7 @@
       lea ecx, [GLOBAL(pw_8)]
       mov g_pw_8m, ecx
 
+      RESTORE_GOT               ; restore esp
       LOAD_IF_USED 0, 1         ; load eax, ecx back
     %endif
   %else