From 700b7fd0a995ea203d9606ce51abf9dbd6fbe7f9 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 14 May 2015 20:22:50 -0700 Subject: [PATCH] vp9/encoder: make some functions static silences missing prototype warnings Change-Id: I3338fcaa67b5dcdf6bf237e8b374db3befd18753 --- vp9/encoder/vp9_aq_cyclicrefresh.c | 4 ++-- vp9/encoder/vp9_encodeframe.c | 2 +- vp9/encoder/vp9_encoder.c | 19 ++++++++++--------- vp9/encoder/vp9_firstpass.c | 4 ++-- vp9/encoder/vp9_resize.c | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c index 24b427d..4b1c959 100644 --- a/vp9/encoder/vp9_aq_cyclicrefresh.c +++ b/vp9/encoder/vp9_aq_cyclicrefresh.c @@ -357,7 +357,7 @@ void vp9_cyclic_refresh_check_golden_update(VP9_COMP *const cpi) { // 1/CR_SEGMENT_ID_BOOST1 (refresh) for each superblock. // Blocks labeled as BOOST1 may later get set to BOOST2 (during the // encoding of the superblock). -void vp9_cyclic_refresh_update_map(VP9_COMP *const cpi) { +static void cyclic_refresh_update_map(VP9_COMP *const cpi) { VP9_COMMON *const cm = &cpi->common; CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; unsigned char *const seg_map = cpi->segmentation_map; @@ -510,7 +510,7 @@ void vp9_cyclic_refresh_setup(VP9_COMP *const cpi) { vp9_set_segdata(seg, CR_SEGMENT_ID_BOOST2, SEG_LVL_ALT_Q, qindex_delta); // Update the segmentation and refresh map. - vp9_cyclic_refresh_update_map(cpi); + cyclic_refresh_update_map(cpi); } } diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 3c490f8..3d310f9 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -361,7 +361,7 @@ static void get_variance(var *v) { ((v->sum_error * v->sum_error) >> v->log2_count)) >> v->log2_count); } -void sum_2_variances(const var *a, const var *b, var *r) { +static void sum_2_variances(const var *a, const var *b, var *r) { assert(a->log2_count == b->log2_count); fill_variance(a->sum_square_error + b->sum_square_error, a->sum_error + b->sum_error, a->log2_count + 1, r); diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 4f5f8f3..e89ee5e 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -112,7 +112,7 @@ static INLINE void Scale2Ratio(VPX_SCALING mode, int *hr, int *hs) { // Mark all inactive blocks as active. Other segmentation features may be set // so memset cannot be used, instead only inactive blocks should be reset. -void vp9_suppress_active_map(VP9_COMP *cpi) { +static void suppress_active_map(VP9_COMP *cpi) { unsigned char *const seg_map = cpi->segmentation_map; int i; if (cpi->active_map.enabled || cpi->active_map.update) @@ -121,7 +121,7 @@ void vp9_suppress_active_map(VP9_COMP *cpi) { seg_map[i] = AM_SEGMENT_ID_ACTIVE; } -void vp9_apply_active_map(VP9_COMP *cpi) { +static void apply_active_map(VP9_COMP *cpi) { struct segmentation *const seg = &cpi->common.seg; unsigned char *const seg_map = cpi->segmentation_map; const unsigned char *const active_map = cpi->active_map.map; @@ -2936,7 +2936,7 @@ static void init_motion_estimation(VP9_COMP *cpi) { } } -void set_frame_size(VP9_COMP *cpi) { +static void set_frame_size(VP9_COMP *cpi) { int ref_frame; VP9_COMMON *const cm = &cpi->common; VP9EncoderConfig *const oxcf = &cpi->oxcf; @@ -3033,7 +3033,7 @@ static void encode_without_recode_loop(VP9_COMP *cpi) { setup_frame(cpi); - vp9_suppress_active_map(cpi); + suppress_active_map(cpi); // Variance adaptive and in frame q adjustment experiments are mutually // exclusive. if (cpi->oxcf.aq_mode == VARIANCE_AQ) { @@ -3043,7 +3043,7 @@ static void encode_without_recode_loop(VP9_COMP *cpi) { } else if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) { vp9_cyclic_refresh_setup(cpi); } - vp9_apply_active_map(cpi); + apply_active_map(cpi); // transform / motion compensation build reconstruction frame vp9_encode_frame(cpi); @@ -3397,7 +3397,7 @@ static void set_arf_sign_bias(VP9_COMP *cpi) { cm->ref_frame_sign_bias[ALTREF_FRAME] = arf_sign_bias; } -int setup_interp_filter_search_mask(VP9_COMP *cpi) { +static int setup_interp_filter_search_mask(VP9_COMP *cpi) { INTERP_FILTER ifilter; int ref_total[MAX_REF_FRAMES] = {0}; MV_REFERENCE_FRAME ref; @@ -3791,8 +3791,8 @@ static int frame_is_reference(const VP9_COMP *cpi) { cm->seg.update_data; } -void adjust_frame_rate(VP9_COMP *cpi, - const struct lookahead_entry *source) { +static void adjust_frame_rate(VP9_COMP *cpi, + const struct lookahead_entry *source) { int64_t this_duration; int step = 0; @@ -3877,7 +3877,8 @@ extern double vp9_get_blockiness(const unsigned char *img1, int img1_pitch, int width, int height); #endif -void adjust_image_stat(double y, double u, double v, double all, ImageStat *s) { +static void adjust_image_stat(double y, double u, double v, double all, + ImageStat *s) { s->stat[Y] += y; s->stat[U] += u; s->stat[V] += v; diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 9da4fc4..88b1030 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2414,7 +2414,7 @@ static void find_next_key_frame(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { } // Define the reference buffers that will be updated post encode. -void configure_buffer_updates(VP9_COMP *cpi) { +static void configure_buffer_updates(VP9_COMP *cpi) { TWO_PASS *const twopass = &cpi->twopass; cpi->rc.is_src_frame_alt_ref = 0; @@ -2461,7 +2461,7 @@ void configure_buffer_updates(VP9_COMP *cpi) { } } -int is_skippable_frame(const VP9_COMP *cpi) { +static int is_skippable_frame(const VP9_COMP *cpi) { // If the current frame does not have non-zero motion vector detected in the // first pass, and so do its previous and forward frames, then this frame // can be skipped for partition check, and the partition size is assigned diff --git a/vp9/encoder/vp9_resize.c b/vp9/encoder/vp9_resize.c index a3cf954..bca5b13 100644 --- a/vp9/encoder/vp9_resize.c +++ b/vp9/encoder/vp9_resize.c @@ -428,7 +428,7 @@ static int get_down2_length(int length, int steps) { return length; } -int get_down2_steps(int in_length, int out_length) { +static int get_down2_steps(int in_length, int out_length) { int steps = 0; int proj_in_length; while ((proj_in_length = get_down2_length(in_length, 1)) >= out_length) { -- 2.7.4