Clean up unused function warnings in vp8 common Mark functions in findnearmv.h, invtrans.h and setupintrarecon.h with INLINE. Hide function in postproc.h behind the same #if as it's callers. Change-Id: Ic1e014a943d2aca280f137019218b9d4f1443d61
diff --git a/vp8/common/findnearmv.h b/vp8/common/findnearmv.h index 3c8c050..155847c 100644 --- a/vp8/common/findnearmv.h +++ b/vp8/common/findnearmv.h
@@ -12,6 +12,7 @@ #ifndef VP8_COMMON_FINDNEARMV_H_ #define VP8_COMMON_FINDNEARMV_H_ +#include "./vpx_config.h" #include "mv.h" #include "blockd.h" #include "modecont.h" @@ -22,8 +23,8 @@ #endif -static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp, - const int *ref_frame_sign_bias) +static INLINE void mv_bias(int refmb_ref_frame_sign_bias, int refframe, + int_mv *mvp, const int *ref_frame_sign_bias) { if (refmb_ref_frame_sign_bias != ref_frame_sign_bias[refframe]) { @@ -34,7 +35,7 @@ #define LEFT_TOP_MARGIN (16 << 3) #define RIGHT_BOTTOM_MARGIN (16 << 3) -static void vp8_clamp_mv2(int_mv *mv, const MACROBLOCKD *xd) +static INLINE void vp8_clamp_mv2(int_mv *mv, const MACROBLOCKD *xd) { if (mv->as_mv.col < (xd->mb_to_left_edge - LEFT_TOP_MARGIN)) mv->as_mv.col = xd->mb_to_left_edge - LEFT_TOP_MARGIN; @@ -47,8 +48,9 @@ mv->as_mv.row = xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN; } -static void vp8_clamp_mv(int_mv *mv, int mb_to_left_edge, int mb_to_right_edge, - int mb_to_top_edge, int mb_to_bottom_edge) +static INLINE void vp8_clamp_mv(int_mv *mv, int mb_to_left_edge, + int mb_to_right_edge, int mb_to_top_edge, + int mb_to_bottom_edge) { mv->as_mv.col = (mv->as_mv.col < mb_to_left_edge) ? mb_to_left_edge : mv->as_mv.col; @@ -59,9 +61,10 @@ mv->as_mv.row = (mv->as_mv.row > mb_to_bottom_edge) ? mb_to_bottom_edge : mv->as_mv.row; } -static unsigned int vp8_check_mv_bounds(int_mv *mv, int mb_to_left_edge, - int mb_to_right_edge, int mb_to_top_edge, - int mb_to_bottom_edge) +static INLINE unsigned int vp8_check_mv_bounds(int_mv *mv, int mb_to_left_edge, + int mb_to_right_edge, + int mb_to_top_edge, + int mb_to_bottom_edge) { unsigned int need_to_clamp; need_to_clamp = (mv->as_mv.col < mb_to_left_edge); @@ -101,7 +104,7 @@ extern const unsigned char vp8_mbsplit_offset[4][16]; -static int left_block_mv(const MODE_INFO *cur_mb, int b) +static INLINE int left_block_mv(const MODE_INFO *cur_mb, int b) { if (!(b & 3)) { @@ -116,7 +119,7 @@ return (cur_mb->bmi + b - 1)->mv.as_int; } -static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride) +static INLINE int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride) { if (!(b >> 2)) { @@ -130,7 +133,7 @@ return (cur_mb->bmi + (b - 4))->mv.as_int; } -static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b) +static INLINE B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b) { if (!(b & 3)) { @@ -156,7 +159,8 @@ return (cur_mb->bmi + b - 1)->as_mode; } -static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi_stride) +static INLINE B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, + int mi_stride) { if (!(b >> 2)) {
diff --git a/vp8/common/invtrans.h b/vp8/common/invtrans.h index affe57e..9cfea8d 100644 --- a/vp8/common/invtrans.h +++ b/vp8/common/invtrans.h
@@ -12,7 +12,7 @@ #ifndef VP8_COMMON_INVTRANS_H_ #define VP8_COMMON_INVTRANS_H_ -#include "vpx_config.h" +#include "./vpx_config.h" #include "vp8_rtcd.h" #include "blockd.h" #include "onyxc_int.h" @@ -37,7 +37,7 @@ } } -static void vp8_inverse_transform_mby(MACROBLOCKD *xd) +static INLINE void vp8_inverse_transform_mby(MACROBLOCKD *xd) { short *DQC = xd->dequant_y1;
diff --git a/vp8/common/postproc.c b/vp8/common/postproc.c index a4e6ae1..322b613 100644 --- a/vp8/common/postproc.c +++ b/vp8/common/postproc.c
@@ -675,6 +675,7 @@ } } +#if CONFIG_POSTPROC_VISUALIZER static void constrain_line (int x_0, int *x_1, int y_0, int *y_1, int width, int height) { int dx; @@ -717,6 +718,7 @@ *x_1 = ((0-y_0)*dx)/dy + x_0; } } +#endif // CONFIG_POSTPROC_VISUALIZER #if CONFIG_POSTPROC int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *ppflags)
diff --git a/vp8/common/setupintrarecon.h b/vp8/common/setupintrarecon.h index 608f4a9..1857c4e 100644 --- a/vp8/common/setupintrarecon.h +++ b/vp8/common/setupintrarecon.h
@@ -11,6 +11,7 @@ #ifndef VP8_COMMON_SETUPINTRARECON_H_ #define VP8_COMMON_SETUPINTRARECON_H_ +#include "./vpx_config.h" #include "vpx_scale/yv12config.h" #ifdef __cplusplus @@ -19,12 +20,11 @@ extern void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf); extern void vp8_setup_intra_recon_top_line(YV12_BUFFER_CONFIG *ybf); -static -void setup_intra_recon_left(unsigned char *y_buffer, - unsigned char *u_buffer, - unsigned char *v_buffer, - int y_stride, - int uv_stride) +static INLINE void setup_intra_recon_left(unsigned char *y_buffer, + unsigned char *u_buffer, + unsigned char *v_buffer, + int y_stride, + int uv_stride) { int i;