michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: #ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ michael@0: #define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ michael@0: michael@0: #ifdef _MSC_VER michael@0: #include michael@0: #define snprintf _snprintf michael@0: #endif michael@0: michael@0: #include "./vpx_config.h" michael@0: #if ARCH_X86 || ARCH_X86_64 michael@0: void vpx_reset_mmx_state(void); michael@0: #define vp9_clear_system_state() vpx_reset_mmx_state() michael@0: #else michael@0: #define vp9_clear_system_state() michael@0: #endif michael@0: michael@0: #if defined(_MSC_VER) && _MSC_VER < 1800 michael@0: // round is not defined in MSVC before VS2013. michael@0: static int round(double x) { michael@0: if (x < 0) michael@0: return (int)ceil(x - 0.5); michael@0: else michael@0: return (int)floor(x + 0.5); michael@0: } michael@0: #endif michael@0: michael@0: struct VP9Common; michael@0: void vp9_machine_specific_config(struct VP9Common *cm); michael@0: michael@0: #endif // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_