From dae280d537e4db9fca9e48e44a1f5f0495c7763e Mon Sep 17 00:00:00 2001 From: Johann Date: Tue, 4 Nov 2014 10:32:51 -0800 Subject: [PATCH] Align structures in quantize test MACROBLOCKD structures require alignment. This fixes an issue caught by clang IOC. Change-Id: Ibb5bcc122f531b4302a87e1144e4feaf46c1de64 --- test/quantize_test.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/quantize_test.cc b/test/quantize_test.cc index aaa195a77..66d7699bc 100644 --- a/test/quantize_test.cc +++ b/test/quantize_test.cc @@ -69,9 +69,8 @@ class QuantizeTestBase { vp8cx_frame_init_quantizer(vp8_comp_); // Copy macroblockd from the reference to get pre-set-up dequant values. - macroblockd_dst_ = - reinterpret_cast( - vpx_calloc(sizeof(*macroblockd_dst_), 1)); + macroblockd_dst_ = reinterpret_cast( + vpx_memalign(32, sizeof(*macroblockd_dst_))); vpx_memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd, sizeof(*macroblockd_dst_)); // Fix block pointers - currently they point to the blocks in the reference