vp9_systemdependent.h revision ba164dffc5a6795bce97fae02b51ccf3330e15e4
147d431f63a66505a645f282416659a9758a91f1cBrett Chabot/*
247d431f63a66505a645f282416659a9758a91f1cBrett Chabot *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
347d431f63a66505a645f282416659a9758a91f1cBrett Chabot *
447d431f63a66505a645f282416659a9758a91f1cBrett Chabot *  Use of this source code is governed by a BSD-style license
547d431f63a66505a645f282416659a9758a91f1cBrett Chabot *  that can be found in the LICENSE file in the root of the source
647d431f63a66505a645f282416659a9758a91f1cBrett Chabot *  tree. An additional intellectual property rights grant can be found
747d431f63a66505a645f282416659a9758a91f1cBrett Chabot *  in the file PATENTS.  All contributing project authors may
847d431f63a66505a645f282416659a9758a91f1cBrett Chabot *  be found in the AUTHORS file in the root of the source tree.
947d431f63a66505a645f282416659a9758a91f1cBrett Chabot */
1047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
1147d431f63a66505a645f282416659a9758a91f1cBrett Chabot#ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
1247d431f63a66505a645f282416659a9758a91f1cBrett Chabot#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
1347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
1447d431f63a66505a645f282416659a9758a91f1cBrett Chabot#ifdef _MSC_VER
1547d431f63a66505a645f282416659a9758a91f1cBrett Chabot#include <math.h>
1647d431f63a66505a645f282416659a9758a91f1cBrett Chabot#endif
1747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
1847d431f63a66505a645f282416659a9758a91f1cBrett Chabot#include "./vpx_config.h"
1947d431f63a66505a645f282416659a9758a91f1cBrett Chabot#if ARCH_X86 || ARCH_X86_64
2047d431f63a66505a645f282416659a9758a91f1cBrett Chabotvoid vpx_reset_mmx_state(void);
2147d431f63a66505a645f282416659a9758a91f1cBrett Chabot#define vp9_clear_system_state() vpx_reset_mmx_state()
2247d431f63a66505a645f282416659a9758a91f1cBrett Chabot#else
2347d431f63a66505a645f282416659a9758a91f1cBrett Chabot#define vp9_clear_system_state()
2447d431f63a66505a645f282416659a9758a91f1cBrett Chabot#endif
2547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
2647d431f63a66505a645f282416659a9758a91f1cBrett Chabot#ifdef _MSC_VER
2747d431f63a66505a645f282416659a9758a91f1cBrett Chabot// round is not defined in MSVC
2847d431f63a66505a645f282416659a9758a91f1cBrett Chabotstatic int round(double x) {
2947d431f63a66505a645f282416659a9758a91f1cBrett Chabot  if (x < 0)
3047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    return (int)ceil(x - 0.5);
3147d431f63a66505a645f282416659a9758a91f1cBrett Chabot  else
3247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    return (int)floor(x + 0.5);
3347d431f63a66505a645f282416659a9758a91f1cBrett Chabot}
3447d431f63a66505a645f282416659a9758a91f1cBrett Chabot#endif
3547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
3647d431f63a66505a645f282416659a9758a91f1cBrett Chabotstruct VP9Common;
3747d431f63a66505a645f282416659a9758a91f1cBrett Chabotvoid vp9_machine_specific_config(struct VP9Common *);
3847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
3947d431f63a66505a645f282416659a9758a91f1cBrett Chabot#endif  // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
4047d431f63a66505a645f282416659a9758a91f1cBrett Chabot