1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp9/common/vp9_systemdependent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 +#ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ 1.15 +#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ 1.16 + 1.17 +#ifdef _MSC_VER 1.18 +#include <math.h> 1.19 +#define snprintf _snprintf 1.20 +#endif 1.21 + 1.22 +#include "./vpx_config.h" 1.23 +#if ARCH_X86 || ARCH_X86_64 1.24 +void vpx_reset_mmx_state(void); 1.25 +#define vp9_clear_system_state() vpx_reset_mmx_state() 1.26 +#else 1.27 +#define vp9_clear_system_state() 1.28 +#endif 1.29 + 1.30 +#if defined(_MSC_VER) && _MSC_VER < 1800 1.31 +// round is not defined in MSVC before VS2013. 1.32 +static int round(double x) { 1.33 + if (x < 0) 1.34 + return (int)ceil(x - 0.5); 1.35 + else 1.36 + return (int)floor(x + 0.5); 1.37 +} 1.38 +#endif 1.39 + 1.40 +struct VP9Common; 1.41 +void vp9_machine_specific_config(struct VP9Common *cm); 1.42 + 1.43 +#endif // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_