From 5c93e62e0af1929cef1a3c6e377fff3d967553a5 Mon Sep 17 00:00:00 2001 From: Yunqing Wang Date: Thu, 24 Jul 2014 17:11:58 -0700 Subject: [PATCH] Allocate aligned source in variance test 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/variance_test.cc b/test/variance_test.cc index 546977069..9dc7c6a45 100644 --- a/test/variance_test.cc +++ b/test/variance_test.cc @@ -90,14 +90,14 @@ class VarianceTest rnd(ACMRandom::DeterministicSeed()); block_size_ = width_ * height_; - src_ = new uint8_t[block_size_]; + src_ = reinterpret_cast(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(); }