ref: bd8dfea54d10adb2c0b19ccdaa6891757b1e5ae0
parent: 3aecf4a0ba219d0b92f765c59a89df55ce628da7
author: James Zern <jzern@google.com>
date: Tue Jan 26 13:03:17 EST 2021
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
--- 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 @@
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;