]> granicus.if.org Git - libvpx/commitdiff
Allocate aligned source in variance test
authorYunqing Wang <yunqingwang@google.com>
Fri, 25 Jul 2014 00:11:58 +0000 (17:11 -0700)
committerYunqing Wang <yunqingwang@google.com>
Fri, 25 Jul 2014 00:11:58 +0000 (17:11 -0700)
The source buffer is an aligned buffer in VP9. Added the alignment
to make it consistent with libvpx.

Change-Id: I3ebb9d2e8555ed532951da479dd5cbbb8812e02d

test/variance_test.cc

index 5469770690a4952057be60a9ada642487fdcbe60..9dc7c6a452faa2c814d03b45ef0901eb2c19fc27 100644 (file)
@@ -90,14 +90,14 @@ class VarianceTest
 
     rnd(ACMRandom::DeterministicSeed());
     block_size_ = width_ * height_;
-    src_ = new uint8_t[block_size_];
+    src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
     ref_ = new uint8_t[block_size_];
     ASSERT_TRUE(src_ != NULL);
     ASSERT_TRUE(ref_ != NULL);
   }
 
   virtual void TearDown() {
-    delete[] src_;
+    vpx_free(src_);
     delete[] ref_;
     libvpx_test::ClearSystemState();
   }