shithub: libvpx

Download patch

ref: 0fc1b220a4bd7c22c4f9cc1b4aa9b42c4a0023c6
parent: 59b7f2f36f534ec53caba6ee049bfafca02511c6
author: James Zern <[email protected]>
date: Sat Jul 27 06:40:11 EDT 2019

sad_test: align exp_sad[]

fixes a crash on win32 in SSE4_1/SAD*

BUG=webm:1637

Change-Id: I9838915dccf8ed435d1326bc43465edd89687c18

--- a/test/sad_test.cc
+++ b/test/sad_test.cc
@@ -275,7 +275,8 @@
   }
 
   void CheckSADs() const {
-    uint32_t reference_sad, exp_sad[8];
+    uint32_t reference_sad;
+    DECLARE_ALIGNED(kDataAlignment, uint32_t, exp_sad[8]);
 
     SADs(exp_sad);
     for (int offset = 0; offset < 8; ++offset) {
@@ -299,7 +300,8 @@
   }
 
   void CheckSADs() const {
-    uint32_t reference_sad, exp_sad[4];
+    uint32_t reference_sad;
+    DECLARE_ALIGNED(kDataAlignment, uint32_t, exp_sad[4]);
 
     SADs(exp_sad);
     for (int block = 0; block < 4; ++block) {
@@ -534,7 +536,8 @@
   FillRandom(GetReference(2), reference_stride_);
   FillRandom(GetReference(3), reference_stride_);
   const int kCountSpeedTestBlock = 500000000 / (params_.width * params_.height);
-  uint32_t reference_sad[4], exp_sad[4];
+  uint32_t reference_sad[4];
+  DECLARE_ALIGNED(kDataAlignment, uint32_t, exp_sad[4]);
   vpx_usec_timer timer;
 
   memset(reference_sad, 0, sizeof(reference_sad));