diff options
Diffstat (limited to 'vp9/common')
-rw-r--r-- | vp9/common/vp9_alloccommon.c | 1 | ||||
-rw-r--r-- | vp9/common/vp9_common.h | 2 | ||||
-rw-r--r-- | vp9/common/vp9_idct.c | 1 | ||||
-rw-r--r-- | vp9/common/vp9_postproc.c | 6 | ||||
-rw-r--r-- | vp9/common/vp9_systemdependent.h | 74 |
5 files changed, 4 insertions, 80 deletions
diff --git a/vp9/common/vp9_alloccommon.c b/vp9/common/vp9_alloccommon.c index 8eda491de..a3e01bf38 100644 --- a/vp9/common/vp9_alloccommon.c +++ b/vp9/common/vp9_alloccommon.c @@ -16,7 +16,6 @@ #include "vp9/common/vp9_entropymode.h" #include "vp9/common/vp9_entropymv.h" #include "vp9/common/vp9_onyxc_int.h" -#include "vp9/common/vp9_systemdependent.h" // TODO(hkuang): Don't need to lock the whole pool after implementing atomic // frame reference count. diff --git a/vp9/common/vp9_common.h b/vp9/common/vp9_common.h index c249ad4d7..76e7cd440 100644 --- a/vp9/common/vp9_common.h +++ b/vp9/common/vp9_common.h @@ -19,7 +19,7 @@ #include "vpx_dsp/vpx_dsp_common.h" #include "vpx_mem/vpx_mem.h" #include "vpx/vpx_integer.h" -#include "vp9/common/vp9_systemdependent.h" +#include "vpx_ports/bitops.h" #ifdef __cplusplus extern "C" { diff --git a/vp9/common/vp9_idct.c b/vp9/common/vp9_idct.c index 146bf4298..d12cd76db 100644 --- a/vp9/common/vp9_idct.c +++ b/vp9/common/vp9_idct.c @@ -14,7 +14,6 @@ #include "./vpx_dsp_rtcd.h" #include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_idct.h" -#include "vp9/common/vp9_systemdependent.h" #include "vpx_dsp/inv_txfm.h" #include "vpx_ports/mem.h" diff --git a/vp9/common/vp9_postproc.c b/vp9/common/vp9_postproc.c index 53b3b700c..1843bb95c 100644 --- a/vp9/common/vp9_postproc.c +++ b/vp9/common/vp9_postproc.c @@ -17,12 +17,12 @@ #include "./vp9_rtcd.h" #include "vpx_ports/mem.h" +#include "vpx_ports/system_state.h" #include "vpx_scale/vpx_scale.h" #include "vpx_scale/yv12config.h" #include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_postproc.h" -#include "vp9/common/vp9_systemdependent.h" #include "vp9/common/vp9_textblit.h" #if CONFIG_VP9_POSTPROC @@ -544,7 +544,7 @@ static void fillrd(struct postproc_state *state, int q, int a) { double sigma; int ai = a, qi = q, i; - vp9_clear_system_state(); + vpx_clear_system_state(); sigma = ai + .5 + .6 * (63 - qi) / 63.0; @@ -638,7 +638,7 @@ int vp9_post_proc_frame(struct VP9Common *cm, return 0; } - vp9_clear_system_state(); + vpx_clear_system_state(); // Alloc memory for prev_mip in the first frame. if (cm->current_video_frame == 1) { diff --git a/vp9/common/vp9_systemdependent.h b/vp9/common/vp9_systemdependent.h deleted file mode 100644 index e4178b249..000000000 --- a/vp9/common/vp9_systemdependent.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ -#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ - -#include "vpx_ports/msvc.h" - -#ifdef _MSC_VER -# include <math.h> // the ceil() definition must precede intrin.h -# if _MSC_VER > 1310 && (defined(_M_X64) || defined(_M_IX86)) -# include <intrin.h> -# define USE_MSC_INTRINSICS -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#include "./vpx_config.h" -#if ARCH_X86 || ARCH_X86_64 -void vpx_reset_mmx_state(void); -#define vp9_clear_system_state() vpx_reset_mmx_state() -#else -#define vp9_clear_system_state() -#endif - -// use GNU builtins where available. -#if defined(__GNUC__) && \ - ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4) -static INLINE int get_msb(unsigned int n) { - return 31 ^ __builtin_clz(n); -} -#elif defined(USE_MSC_INTRINSICS) -#pragma intrinsic(_BitScanReverse) - -static INLINE int get_msb(unsigned int n) { - unsigned long first_set_bit; - _BitScanReverse(&first_set_bit, n); - return first_set_bit; -} -#undef USE_MSC_INTRINSICS -#else -// Returns (int)floor(log2(n)). n must be > 0. -static INLINE int get_msb(unsigned int n) { - int log = 0; - unsigned int value = n; - int i; - - for (i = 4; i >= 0; --i) { - const int shift = (1 << i); - const unsigned int x = value >> shift; - if (x != 0) { - value = x; - log += shift; - } - } - return log; -} -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ |