diff options
author | James Zern <jzern@google.com> | 2021-01-26 18:03:17 -0800 |
---|---|---|
committer | James Zern <jzern@google.com> | 2021-01-26 18:09:16 -0800 |
commit | bd8dfea54d10adb2c0b19ccdaa6891757b1e5ae0 (patch) | |
tree | 99d0fe6edda28ad353c1cabce2dcaf3a82822874 /test/sad_test.cc | |
parent | 3aecf4a0ba219d0b92f765c59a89df55ce628da7 (diff) | |
download | libvpx-bd8dfea54d10adb2c0b19ccdaa6891757b1e5ae0.tar libvpx-bd8dfea54d10adb2c0b19ccdaa6891757b1e5ae0.tar.gz libvpx-bd8dfea54d10adb2c0b19ccdaa6891757b1e5ae0.tar.bz2 libvpx-bd8dfea54d10adb2c0b19ccdaa6891757b1e5ae0.zip |
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
Diffstat (limited to 'test/sad_test.cc')
-rw-r--r-- | test/sad_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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 <typename Function> struct TestParams { TestParams(int w, int h, Function f, int bd = -1) @@ -117,9 +121,6 @@ class SADTestBase : public ::testing::TestWithParam<ParamType> { 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; |