From 5e34461448c3b68385d5cc92d6b4d4c95be394fb Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Thu, 24 Jun 2010 09:02:48 -0400 Subject: [PATCH] Remove INLINE/FORCEINLINE These are mostly vestigial, it's up to the compiler to decide what should be inlined, and this collided with certain Windows platform SDKs. Change-Id: I80dd35de25eda7773156e355b5aef8f7e44e179b --- build/make/configure.sh | 2 -- configure | 2 -- vp8/vp8dx.mk | 2 -- vpx_ports/mem_ops.h | 26 +++++++++++++------------- vpx_ports/mem_ops_aligned.h | 12 ++++++------ vpx_ports/vpx_timer.h | 6 +++--- vpx_scale/generic/bicubic_scaler.c | 8 ++++---- 7 files changed, 26 insertions(+), 32 deletions(-) diff --git a/build/make/configure.sh b/build/make/configure.sh index b22fbbabb..35131b07b 100755 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -395,8 +395,6 @@ EOF write_common_target_config_h() { cat > ${TMP_H} << EOF /* This file automatically generated by configure. Do not edit! */ -#define INLINE ${INLINE} -#define FORCEINLINE ${FORCEINLINE:-${INLINE}} #define RESTRICT ${RESTRICT} EOF print_config_h ARCH "${TMP_H}" ${ARCH_LIST} diff --git a/configure b/configure index f74714dcf..d2dfb6b35 100755 --- a/configure +++ b/configure @@ -519,8 +519,6 @@ process_toolchain() { enable solution vs_version=${tgt_cc##vs} all_targets="${all_targets} solution" - INLINE=__inline - FORCEINLINE=__forceinline ;; esac diff --git a/vp8/vp8dx.mk b/vp8/vp8dx.mk index 68a0ee86c..8ab94259c 100644 --- a/vp8/vp8dx.mk +++ b/vp8/vp8dx.mk @@ -30,7 +30,6 @@ CFLAGS+=-I$(SRC_PATH_BARE)/$(VP8_PREFIX)decoder # common #define ARM #define DISABLE_THREAD -#define INLINE=__forceinline #INCLUDES += algo/vpx_common/vpx_mem/include #INCLUDES += common @@ -44,7 +43,6 @@ CFLAGS+=-I$(SRC_PATH_BARE)/$(VP8_PREFIX)decoder # decoder #define ARM #define DISABLE_THREAD -#define INLINE=__forceinline #INCLUDES += algo/vpx_common/vpx_mem/include #INCLUDES += common diff --git a/vpx_ports/mem_ops.h b/vpx_ports/mem_ops.h index 813f91fba..ddf0983c7 100644 --- a/vpx_ports/mem_ops.h +++ b/vpx_ports/mem_ops.h @@ -60,7 +60,7 @@ #undef mem_get_be16 #define mem_get_be16 mem_ops_wrap_symbol(mem_get_be16) -static INLINE unsigned MEM_VALUE_T mem_get_be16(const void *vmem) +static unsigned MEM_VALUE_T mem_get_be16(const void *vmem) { unsigned MEM_VALUE_T val; const MAU_T *mem = (const MAU_T *)vmem; @@ -72,7 +72,7 @@ static INLINE unsigned MEM_VALUE_T mem_get_be16(const void *vmem) #undef mem_get_be24 #define mem_get_be24 mem_ops_wrap_symbol(mem_get_be24) -static INLINE unsigned MEM_VALUE_T mem_get_be24(const void *vmem) +static unsigned MEM_VALUE_T mem_get_be24(const void *vmem) { unsigned MEM_VALUE_T val; const MAU_T *mem = (const MAU_T *)vmem; @@ -85,7 +85,7 @@ static INLINE unsigned MEM_VALUE_T mem_get_be24(const void *vmem) #undef mem_get_be32 #define mem_get_be32 mem_ops_wrap_symbol(mem_get_be32) -static INLINE unsigned MEM_VALUE_T mem_get_be32(const void *vmem) +static unsigned MEM_VALUE_T mem_get_be32(const void *vmem) { unsigned MEM_VALUE_T val; const MAU_T *mem = (const MAU_T *)vmem; @@ -99,7 +99,7 @@ static INLINE unsigned MEM_VALUE_T mem_get_be32(const void *vmem) #undef mem_get_le16 #define mem_get_le16 mem_ops_wrap_symbol(mem_get_le16) -static INLINE unsigned MEM_VALUE_T mem_get_le16(const void *vmem) +static unsigned MEM_VALUE_T mem_get_le16(const void *vmem) { unsigned MEM_VALUE_T val; const MAU_T *mem = (const MAU_T *)vmem; @@ -111,7 +111,7 @@ static INLINE unsigned MEM_VALUE_T mem_get_le16(const void *vmem) #undef mem_get_le24 #define mem_get_le24 mem_ops_wrap_symbol(mem_get_le24) -static INLINE unsigned MEM_VALUE_T mem_get_le24(const void *vmem) +static unsigned MEM_VALUE_T mem_get_le24(const void *vmem) { unsigned MEM_VALUE_T val; const MAU_T *mem = (const MAU_T *)vmem; @@ -124,7 +124,7 @@ static INLINE unsigned MEM_VALUE_T mem_get_le24(const void *vmem) #undef mem_get_le32 #define mem_get_le32 mem_ops_wrap_symbol(mem_get_le32) -static INLINE unsigned MEM_VALUE_T mem_get_le32(const void *vmem) +static unsigned MEM_VALUE_T mem_get_le32(const void *vmem) { unsigned MEM_VALUE_T val; const MAU_T *mem = (const MAU_T *)vmem; @@ -137,7 +137,7 @@ static INLINE unsigned MEM_VALUE_T mem_get_le32(const void *vmem) } #define mem_get_s_generic(end,sz) \ - static INLINE signed MEM_VALUE_T mem_get_s##end##sz(const void *vmem) {\ + static signed MEM_VALUE_T mem_get_s##end##sz(const void *vmem) {\ const MAU_T *mem = (const MAU_T*)vmem;\ signed MEM_VALUE_T val = mem_get_##end##sz(mem);\ return (val << (MEM_VALUE_T_SZ_BITS - sz)) >> (MEM_VALUE_T_SZ_BITS - sz);\ @@ -169,7 +169,7 @@ mem_get_s_generic(le, 32); #undef mem_put_be16 #define mem_put_be16 mem_ops_wrap_symbol(mem_put_be16) -static INLINE void mem_put_be16(void *vmem, MEM_VALUE_T val) +static void mem_put_be16(void *vmem, MEM_VALUE_T val) { MAU_T *mem = (MAU_T *)vmem; @@ -179,7 +179,7 @@ static INLINE void mem_put_be16(void *vmem, MEM_VALUE_T val) #undef mem_put_be24 #define mem_put_be24 mem_ops_wrap_symbol(mem_put_be24) -static INLINE void mem_put_be24(void *vmem, MEM_VALUE_T val) +static void mem_put_be24(void *vmem, MEM_VALUE_T val) { MAU_T *mem = (MAU_T *)vmem; @@ -190,7 +190,7 @@ static INLINE void mem_put_be24(void *vmem, MEM_VALUE_T val) #undef mem_put_be32 #define mem_put_be32 mem_ops_wrap_symbol(mem_put_be32) -static INLINE void mem_put_be32(void *vmem, MEM_VALUE_T val) +static void mem_put_be32(void *vmem, MEM_VALUE_T val) { MAU_T *mem = (MAU_T *)vmem; @@ -202,7 +202,7 @@ static INLINE void mem_put_be32(void *vmem, MEM_VALUE_T val) #undef mem_put_le16 #define mem_put_le16 mem_ops_wrap_symbol(mem_put_le16) -static INLINE void mem_put_le16(void *vmem, MEM_VALUE_T val) +static void mem_put_le16(void *vmem, MEM_VALUE_T val) { MAU_T *mem = (MAU_T *)vmem; @@ -212,7 +212,7 @@ static INLINE void mem_put_le16(void *vmem, MEM_VALUE_T val) #undef mem_put_le24 #define mem_put_le24 mem_ops_wrap_symbol(mem_put_le24) -static INLINE void mem_put_le24(void *vmem, MEM_VALUE_T val) +static void mem_put_le24(void *vmem, MEM_VALUE_T val) { MAU_T *mem = (MAU_T *)vmem; @@ -223,7 +223,7 @@ static INLINE void mem_put_le24(void *vmem, MEM_VALUE_T val) #undef mem_put_le32 #define mem_put_le32 mem_ops_wrap_symbol(mem_put_le32) -static INLINE void mem_put_le32(void *vmem, MEM_VALUE_T val) +static void mem_put_le32(void *vmem, MEM_VALUE_T val) { MAU_T *mem = (MAU_T *)vmem; diff --git a/vpx_ports/mem_ops_aligned.h b/vpx_ports/mem_ops_aligned.h index 24b6dc100..61496f14b 100644 --- a/vpx_ports/mem_ops_aligned.h +++ b/vpx_ports/mem_ops_aligned.h @@ -40,19 +40,19 @@ #define swap_endian_32_se(val,raw) swap_endian_32(val,raw) #define mem_get_ne_aligned_generic(end,sz) \ - static INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned(const void *vmem) {\ + static unsigned MEM_VALUE_T mem_get_##end##sz##_aligned(const void *vmem) {\ const uint##sz##_t *mem = (const uint##sz##_t *)vmem;\ return *mem;\ } #define mem_get_sne_aligned_generic(end,sz) \ - static INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned(const void *vmem) {\ + static signed MEM_VALUE_T mem_get_s##end##sz##_aligned(const void *vmem) {\ const int##sz##_t *mem = (const int##sz##_t *)vmem;\ return *mem;\ } #define mem_get_se_aligned_generic(end,sz) \ - static INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned(const void *vmem) {\ + static unsigned MEM_VALUE_T mem_get_##end##sz##_aligned(const void *vmem) {\ const uint##sz##_t *mem = (const uint##sz##_t *)vmem;\ unsigned MEM_VALUE_T val, raw = *mem;\ swap_endian_##sz(val,raw);\ @@ -60,7 +60,7 @@ } #define mem_get_sse_aligned_generic(end,sz) \ - static INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned(const void *vmem) {\ + static signed MEM_VALUE_T mem_get_s##end##sz##_aligned(const void *vmem) {\ const int##sz##_t *mem = (const int##sz##_t *)vmem;\ unsigned MEM_VALUE_T val, raw = *mem;\ swap_endian_##sz##_se(val,raw);\ @@ -68,13 +68,13 @@ } #define mem_put_ne_aligned_generic(end,sz) \ - static INLINE void mem_put_##end##sz##_aligned(void *vmem, MEM_VALUE_T val) {\ + static void mem_put_##end##sz##_aligned(void *vmem, MEM_VALUE_T val) {\ uint##sz##_t *mem = (uint##sz##_t *)vmem;\ *mem = (uint##sz##_t)val;\ } #define mem_put_se_aligned_generic(end,sz) \ - static INLINE void mem_put_##end##sz##_aligned(void *vmem, MEM_VALUE_T val) {\ + static void mem_put_##end##sz##_aligned(void *vmem, MEM_VALUE_T val) {\ uint##sz##_t *mem = (uint##sz##_t *)vmem, raw;\ swap_endian_##sz(raw,val);\ *mem = (uint##sz##_t)raw;\ diff --git a/vpx_ports/vpx_timer.h b/vpx_ports/vpx_timer.h index c9ec6ba9e..f5e817ff4 100644 --- a/vpx_ports/vpx_timer.h +++ b/vpx_ports/vpx_timer.h @@ -51,7 +51,7 @@ struct vpx_usec_timer }; -static INLINE void +static void vpx_usec_timer_start(struct vpx_usec_timer *t) { #if defined(_MSC_VER) @@ -62,7 +62,7 @@ vpx_usec_timer_start(struct vpx_usec_timer *t) } -static INLINE void +static void vpx_usec_timer_mark(struct vpx_usec_timer *t) { #if defined(_MSC_VER) @@ -73,7 +73,7 @@ vpx_usec_timer_mark(struct vpx_usec_timer *t) } -static INLINE long +static long vpx_usec_timer_elapsed(struct vpx_usec_timer *t) { #if defined(_MSC_VER) diff --git a/vpx_scale/generic/bicubic_scaler.c b/vpx_scale/generic/bicubic_scaler.c index 3052542b7..c600c3f1b 100644 --- a/vpx_scale/generic/bicubic_scaler.c +++ b/vpx_scale/generic/bicubic_scaler.c @@ -46,7 +46,7 @@ static float a = -0.6; // 3 2 // C0 = a*t - a*t // -static INLINE short c0_fixed(unsigned int t) +static short c0_fixed(unsigned int t) { // put t in Q16 notation unsigned short v1, v2; @@ -67,7 +67,7 @@ static INLINE short c0_fixed(unsigned int t) // 2 3 // C1 = a*t + (3-2*a)*t - (2-a)*t // -static INLINE short c1_fixed(unsigned int t) +static short c1_fixed(unsigned int t) { unsigned short v1, v2, v3; unsigned short two, three; @@ -96,7 +96,7 @@ static INLINE short c1_fixed(unsigned int t) // 2 3 // C2 = 1 - (3-a)*t + (2-a)*t // -static INLINE short c2_fixed(unsigned int t) +static short c2_fixed(unsigned int t) { unsigned short v1, v2, v3; unsigned short two, three; @@ -124,7 +124,7 @@ static INLINE short c2_fixed(unsigned int t) // 2 3 // C3 = a*t - 2*a*t + a*t // -static INLINE short c3_fixed(unsigned int t) +static short c3_fixed(unsigned int t) { int v1, v2, v3;