From: Johann Date: Tue, 25 Aug 2015 23:50:32 +0000 (-0700) Subject: Clean up unused function warnings in vp8 encoder X-Git-Tag: v1.5.0~217^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06ba5254eeee83a23c5f3783fb3ed5615d4b14c8;p=libvpx Clean up unused function warnings in vp8 encoder Mark rdopt.h and treewriter.h functions with INLINE. Change-Id: Ib81168a709d09dfba7de16c596133310e04c6656 --- diff --git a/vp8/encoder/rdopt.h b/vp8/encoder/rdopt.h index b4fcd10b6..1cb1a0726 100644 --- a/vp8/encoder/rdopt.h +++ b/vp8/encoder/rdopt.h @@ -12,13 +12,15 @@ #ifndef VP8_ENCODER_RDOPT_H_ #define VP8_ENCODER_RDOPT_H_ +#include "./vpx_config.h" + #ifdef __cplusplus extern "C" { #endif #define RDCOST(RM,DM,R,D) ( ((128+(R)*(RM)) >> 8) + (DM)*(D) ) -static void insertsortmv(int arr[], int len) +static INLINE void insertsortmv(int arr[], int len) { int i, j, k; @@ -41,7 +43,7 @@ static void insertsortmv(int arr[], int len) } } -static void insertsortsad(int arr[],int idx[], int len) +static INLINE void insertsortsad(int arr[],int idx[], int len) { int i, j, k; @@ -77,10 +79,10 @@ extern void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, extern void vp8_rd_pick_intra_mode(MACROBLOCK *x, int *rate); -static void get_plane_pointers(const YV12_BUFFER_CONFIG *fb, - unsigned char *plane[3], - unsigned int recon_yoffset, - unsigned int recon_uvoffset) +static INLINE void get_plane_pointers(const YV12_BUFFER_CONFIG *fb, + unsigned char *plane[3], + unsigned int recon_yoffset, + unsigned int recon_uvoffset) { plane[0] = fb->y_buffer + recon_yoffset; plane[1] = fb->u_buffer + recon_uvoffset; @@ -88,10 +90,10 @@ static void get_plane_pointers(const YV12_BUFFER_CONFIG *fb, } -static void get_predictor_pointers(const VP8_COMP *cpi, - unsigned char *plane[4][3], - unsigned int recon_yoffset, - unsigned int recon_uvoffset) +static INLINE void get_predictor_pointers(const VP8_COMP *cpi, + unsigned char *plane[4][3], + unsigned int recon_yoffset, + unsigned int recon_uvoffset) { if (cpi->ref_frame_flags & VP8_LAST_FRAME) get_plane_pointers(&cpi->common.yv12_fb[cpi->common.lst_fb_idx], @@ -107,8 +109,8 @@ static void get_predictor_pointers(const VP8_COMP *cpi, } -static void get_reference_search_order(const VP8_COMP *cpi, - int ref_frame_map[4]) +static INLINE void get_reference_search_order(const VP8_COMP *cpi, + int ref_frame_map[4]) { int i=0; diff --git a/vp8/encoder/treewriter.h b/vp8/encoder/treewriter.h index cfb2730ab..2debf9276 100644 --- a/vp8/encoder/treewriter.h +++ b/vp8/encoder/treewriter.h @@ -15,6 +15,7 @@ /* Trees map alphabets into huffman-like codes suitable for an arithmetic bit coder. Timothy S Murphy 11 October 2004 */ +#include "./vpx_config.h" #include "vp8/common/treecoder.h" #include "boolhuff.h" /* for now */ @@ -46,7 +47,7 @@ typedef BOOL_CODER vp8_writer; /* Both of these return bits, not scaled bits. */ -static unsigned int vp8_cost_branch(const unsigned int ct[2], vp8_prob p) +static INLINE unsigned int vp8_cost_branch(const unsigned int ct[2], vp8_prob p) { /* Imitate existing calculation */ @@ -76,7 +77,7 @@ static void vp8_treed_write } while (n); } -static void vp8_write_token +static INLINE void vp8_write_token ( vp8_writer *const w, vp8_tree t, @@ -107,7 +108,7 @@ static int vp8_treed_cost( return c; } -static int vp8_cost_token +static INLINE int vp8_cost_token ( vp8_tree t, const vp8_prob *const p,