From: James Zern Date: Wed, 27 Jan 2021 02:03:17 +0000 (-0800) Subject: sad_test: fix compilation w/gcc 4.8.5 X-Git-Tag: v1.10.0-rc1~14^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd8dfea54d10adb2c0b19ccdaa6891757b1e5ae0;p=libvpx sad_test: fix compilation w/gcc 4.8.5 use a #define for kDataAlignment as it's used with DECLARE_ALIGNED (__attribute__((aligned(n)))) and this version under CentOS is more strict over integer constants: ../vpx_ports/mem.h:18:72: error: requested alignment is not an integer constant #define DECLARE_ALIGNED(n, typ, val) typ val __attribute__((aligned(n))) Bug: webm:1690 Change-Id: I8d4661ec1c2c1b1522bdc210689715d2302c7e72 --- diff --git a/test/sad_test.cc b/test/sad_test.cc index 34cb26ed1..ee10a4638 100644 --- a/test/sad_test.cc +++ b/test/sad_test.cc @@ -26,6 +26,10 @@ #include "vpx_ports/msvc.h" #include "vpx_ports/vpx_timer.h" +// const[expr] should be sufficient for DECLARE_ALIGNED but early +// implementations of c++11 appear to have some issues with it. +#define kDataAlignment 32 + template struct TestParams { TestParams(int w, int h, Function f, int bd = -1) @@ -117,9 +121,6 @@ class SADTestBase : public ::testing::TestWithParam { protected: // Handle blocks up to 4 blocks 64x64 with stride up to 128 // crbug.com/webm/1660 - // const[expr] should be sufficient for DECLARE_ALIGNED but early - // implementations of c++11 appear to have some issues with it. - enum { kDataAlignment = 32 }; static const int kDataBlockSize = 64 * 128; static const int kDataBufferSize = 4 * kDataBlockSize;