]> granicus.if.org Git - libvpx/commitdiff
sad_test: align exp_sad[]
authorJames Zern <jzern@google.com>
Sat, 27 Jul 2019 17:40:11 +0000 (10:40 -0700)
committerJames Zern <jzern@google.com>
Sat, 27 Jul 2019 17:40:11 +0000 (10:40 -0700)
fixes a crash on win32 in SSE4_1/SAD*

BUG=webm:1637

Change-Id: I9838915dccf8ed435d1326bc43465edd89687c18

test/sad_test.cc

index 9125a01844f4e9824013e55efe04156f6eec8698..94cb325231ce9aed76292d8cbd0124ba0eefb1d8 100644 (file)
@@ -275,7 +275,8 @@ class SADx8Test : public SADTestBase<SadMxNx8Param> {
   }
 
   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 @@ class SADx4Test : public SADTestBase<SadMxNx4Param> {
   }
 
   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 @@ TEST_P(SADx4Test, DISABLED_Speed) {
   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));