#endif
#include "vpx/vpx_codec.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
delete video;
}
+#if CONFIG_VP8_DECODER
VP8_INSTANTIATE_TEST_CASE(TestVectorTest,
::testing::ValuesIn(libvpx_test::kVP8TestVectors,
libvpx_test::kVP8TestVectors +
libvpx_test::kNumVP8TestVectors));
+#endif // CONFIG_VP8_DECODER
+
+#if CONFIG_VP9_DECODER
VP9_INSTANTIATE_TEST_CASE(TestVectorTest,
::testing::ValuesIn(libvpx_test::kVP9TestVectors,
libvpx_test::kVP9TestVectors +
libvpx_test::kNumVP9TestVectors));
+#endif // CONFIG_VP9_DECODER
} // namespace
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx_mem/vpx_mem.h"
#include "vpx/vpx_integer.h"
+#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_systemdependent.h"
#ifdef __cplusplus
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
-#define ROUND_POWER_OF_TWO(value, n) \
- (((value) + (1 << ((n) - 1))) >> (n))
-
-#define ALIGN_POWER_OF_TWO(value, n) \
- (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1))
-
// Only need this for fixed-size arrays, for structs just assign.
#define vp9_copy(dest, src) { \
assert(sizeof(dest) == sizeof(src)); \
typedef int64_t tran_high_t;
typedef int32_t tran_low_t;
-#define CONVERT_TO_SHORTPTR(x) ((uint16_t*)(((uintptr_t)x) << 1))
-#define CONVERT_TO_BYTEPTR(x) ((uint8_t*)(((uintptr_t)x) >> 1 ))
-
#else
// Note:
#define __builtin_prefetch(x)
#endif
+/* Shift down with rounding */
+#define ROUND_POWER_OF_TWO(value, n) \
+ (((value) + (1 << ((n) - 1))) >> (n))
+#define ALIGN_POWER_OF_TWO(value, n) \
+ (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1))
+
+#if CONFIG_VP9_HIGHBITDEPTH
+#define CONVERT_TO_SHORTPTR(x) ((uint16_t*)(((uintptr_t)x) << 1))
+#define CONVERT_TO_BYTEPTR(x) ((uint8_t*)(((uintptr_t)x) >> 1))
+#endif // CONFIG_VP9_HIGHBITDEPTH
+
#endif // VPX_PORTS_MEM_H_