]> granicus.if.org Git - libvpx/commitdiff
vp8_fdct4x4_test: align input and output buffers
authorJames Zern <jzern@google.com>
Sat, 18 Feb 2017 21:24:32 +0000 (13:24 -0800)
committerJames Zern <jzern@google.com>
Sat, 18 Feb 2017 21:30:28 +0000 (13:30 -0800)
fixes segfault in 32-bit builds

Change-Id: I5b3cc5a335cb236a6ec4cb11fa8feb54ae0182c7

test/vp8_fdct4x4_test.cc

index b58cb2d409590113116124b6c8694d8dcbb152b2..4b3282da5f999432bd4ebe49582f0f5e327fe69a 100644 (file)
@@ -21,6 +21,7 @@
 #include "./vp8_rtcd.h"
 #include "test/acm_random.h"
 #include "vpx/vpx_integer.h"
+#include "vpx_ports/mem.h"
 
 namespace {
 
@@ -154,9 +155,9 @@ TEST_P(FdctTest, RoundTripErrorCheck) {
   double total_error = 0;
   const int count_test_block = 1000000;
   for (int i = 0; i < count_test_block; ++i) {
-    int16_t test_input_block[16];
+    DECLARE_ALIGNED(16, int16_t, test_input_block[16]);
+    DECLARE_ALIGNED(16, int16_t, test_output_block[16]);
     int16_t test_temp_block[16];
-    int16_t test_output_block[16];
 
     // Initialize a test block with input range [-255, 255].
     for (int j = 0; j < 16; ++j) {