shithub: libvpx

Download patch

ref: 1c48915233ffd62f5bfc9ffe660c87b4552aacaf
parent: 0aa3677d9df2d732fcf49b545e2a3c5aa4a29267
author: Johann <johannkoenig@google.com>
date: Wed Jun 21 07:46:58 EDT 2017

dct tests: align InvAccuracyCheck buffers

'in' is used for the reference fdct. 'coeff' is input to the idct being
tested and 'dst[16]' is output

Fixes a segfault on unaligned memory access on x86.

Change-Id: I3691b1380ed49986897dd89a63ce63a80a0e0962

--- a/test/dct_test.cc
+++ b/test/dct_test.cc
@@ -307,13 +307,13 @@
     const int count_test_block = 1000;
     Buffer<int16_t> in = Buffer<int16_t>(size_, size_, 4);
     ASSERT_TRUE(in.Init());
-    Buffer<tran_low_t> coeff = Buffer<tran_low_t>(size_, size_, 0);
+    Buffer<tran_low_t> coeff = Buffer<tran_low_t>(size_, size_, 0, 16);
     ASSERT_TRUE(coeff.Init());
-    Buffer<uint8_t> dst = Buffer<uint8_t>(size_, size_, 0);
+    Buffer<uint8_t> dst = Buffer<uint8_t>(size_, size_, 0, 16);
     ASSERT_TRUE(dst.Init());
     Buffer<uint8_t> src = Buffer<uint8_t>(size_, size_, 0);
     ASSERT_TRUE(src.Init());
-    Buffer<uint16_t> dst16 = Buffer<uint16_t>(size_, size_, 0);
+    Buffer<uint16_t> dst16 = Buffer<uint16_t>(size_, size_, 0, 16);
     ASSERT_TRUE(dst16.Init());
     Buffer<uint16_t> src16 = Buffer<uint16_t>(size_, size_, 0);
     ASSERT_TRUE(src16.Init());