diff --git a/vp9/common/vp9_mvref_common.h b/vp9/common/vp9_mvref_common.h index 7bce3fa37c190611ac5dcca49a6b94e7efc78193..a937b7823a5102f1312a805c4e1638689833ed25 100644 --- a/vp9/common/vp9_mvref_common.h +++ b/vp9/common/vp9_mvref_common.h @@ -125,7 +125,7 @@ static const int idx_n_column_to_subblock[4][2] = { // clamp_mv_ref #define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units -static void clamp_mv_ref(MV *mv, const MACROBLOCKD *xd) { +static INLINE void clamp_mv_ref(MV *mv, const MACROBLOCKD *xd) { clamp_mv(mv, xd->mb_to_left_edge - MV_BORDER, xd->mb_to_right_edge + MV_BORDER, xd->mb_to_top_edge - MV_BORDER, diff --git a/vp9/decoder/vp9_reader.h b/vp9/decoder/vp9_reader.h index 32e200e2bd6ab89b3ba313244b73fbcf939f88b9..2d9eccfbf93ee192ee4e38b2148c4d32ad1749ae 100644 --- a/vp9/decoder/vp9_reader.h +++ b/vp9/decoder/vp9_reader.h @@ -52,7 +52,7 @@ int vp9_reader_has_error(vp9_reader *r); const uint8_t *vp9_reader_find_end(vp9_reader *r); -static int vp9_read(vp9_reader *r, int prob) { +static INLINE int vp9_read(vp9_reader *r, int prob) { unsigned int bit = 0; BD_VALUE value; BD_VALUE bigsplit; @@ -89,11 +89,11 @@ static int vp9_read(vp9_reader *r, int prob) { return bit; } -static int vp9_read_bit(vp9_reader *r) { +static INLINE int vp9_read_bit(vp9_reader *r) { return vp9_read(r, 128); // vp9_prob_half } -static int vp9_read_literal(vp9_reader *r, int bits) { +static INLINE int vp9_read_literal(vp9_reader *r, int bits) { int literal = 0, bit; for (bit = bits - 1; bit >= 0; bit--) @@ -102,8 +102,8 @@ static int vp9_read_literal(vp9_reader *r, int bits) { return literal; } -static int vp9_read_tree(vp9_reader *r, const vp9_tree_index *tree, - const vp9_prob *probs) { +static INLINE int vp9_read_tree(vp9_reader *r, const vp9_tree_index *tree, + const vp9_prob *probs) { vp9_tree_index i = 0; while ((i = tree[i + vp9_read(r, probs[i >> 1])]) > 0) diff --git a/vp9/encoder/vp9_writer.h b/vp9/encoder/vp9_writer.h index 7f4fa1ef2b82408e2b0a059b74f1a082992c30d4..938924be3ca68a0f74f21a396e8444eb7f878998 100644 --- a/vp9/encoder/vp9_writer.h +++ b/vp9/encoder/vp9_writer.h @@ -35,7 +35,7 @@ typedef struct { void vp9_start_encode(vp9_writer *bc, uint8_t *buffer); void vp9_stop_encode(vp9_writer *bc); -static void vp9_write(vp9_writer *br, int bit, int probability) { +static INLINE void vp9_write(vp9_writer *br, int bit, int probability) { unsigned int split; int count = br->count; unsigned int range = br->range; @@ -83,11 +83,11 @@ static void vp9_write(vp9_writer *br, int bit, int probability) { br->range = range; } -static void vp9_write_bit(vp9_writer *w, int bit) { +static INLINE void vp9_write_bit(vp9_writer *w, int bit) { vp9_write(w, bit, 128); // vp9_prob_half } -static void vp9_write_literal(vp9_writer *w, int data, int bits) { +static INLINE void vp9_write_literal(vp9_writer *w, int data, int bits) { int bit; for (bit = bits - 1; bit >= 0; bit--) diff --git a/vpx_ports/vpx_timer.h b/vpx_ports/vpx_timer.h index 9e2015e623d2ca3d2aa0333bcf27cb674b921e07..870338b4f0280e4d99aef5d7d14f90e1569fbd8f 100644 --- a/vpx_ports/vpx_timer.h +++ b/vpx_ports/vpx_timer.h @@ -53,7 +53,7 @@ struct vpx_usec_timer { }; -static void +static INLINE void vpx_usec_timer_start(struct vpx_usec_timer *t) { #if defined(_WIN32) QueryPerformanceCounter(&t->begin); @@ -63,7 +63,7 @@ vpx_usec_timer_start(struct vpx_usec_timer *t) { } -static void +static INLINE void vpx_usec_timer_mark(struct vpx_usec_timer *t) { #if defined(_WIN32) QueryPerformanceCounter(&t->end); @@ -73,7 +73,7 @@ vpx_usec_timer_mark(struct vpx_usec_timer *t) { } -static int64_t +static INLINE int64_t vpx_usec_timer_elapsed(struct vpx_usec_timer *t) { #if defined(_WIN32) LARGE_INTEGER freq, diff; @@ -101,13 +101,13 @@ struct vpx_usec_timer { void *dummy; }; -static void +static INLINE void vpx_usec_timer_start(struct vpx_usec_timer *t) { } -static void +static INLINE void vpx_usec_timer_mark(struct vpx_usec_timer *t) { } -static long +static INLINE int vpx_usec_timer_elapsed(struct vpx_usec_timer *t) { return 0; } diff --git a/vpx_ports/x86.h b/vpx_ports/x86.h index bc99f89d8c5f10d925c2c6499aae7536cc8ec118..81c2b8b873f34c1814a9f7baad04da0d03ad625d 100644 --- a/vpx_ports/x86.h +++ b/vpx_ports/x86.h @@ -116,7 +116,7 @@ void __cpuid(int CPUInfo[4], int info_type); #define BIT(n) (1<<n) #endif -static int +static INLINE int x86_simd_caps(void) { unsigned int flags = 0; unsigned int mask = ~0; @@ -172,7 +172,7 @@ x86_simd_caps(void) { unsigned __int64 __rdtsc(void); #pragma intrinsic(__rdtsc) #endif -static unsigned int +static INLINE unsigned int x86_readtsc(void) { #if defined(__GNUC__) && __GNUC__ unsigned int tsc; @@ -249,9 +249,9 @@ x87_get_control_word(void) { } #endif -static unsigned short +static INLINE unsigned int x87_set_double_precision(void) { - unsigned short mode = x87_get_control_word(); + unsigned int mode = x87_get_control_word(); x87_set_control_word((mode&~0x300) | 0x200); return mode; } diff --git a/vpxdec.c b/vpxdec.c index 1bab41e2f858f11241a8fdcb2d3955f1814a9f0a..becc23bc5008c686eb6f8e23df76c562f9ed5100 100644 --- a/vpxdec.c +++ b/vpxdec.c @@ -123,8 +123,8 @@ static const arg_def_t *vp8_pp_args[] = { }; #endif -static int vpx_image_scale(vpx_image_t *src, vpx_image_t *dst, - FilterModeEnum mode) { +static INLINE int vpx_image_scale(vpx_image_t *src, vpx_image_t *dst, + FilterModeEnum mode) { assert(src->fmt == VPX_IMG_FMT_I420); assert(dst->fmt == VPX_IMG_FMT_I420); return I420Scale(src->planes[VPX_PLANE_Y], src->stride[VPX_PLANE_Y],