ref: c163cbdb8360847b22ab4f0fbd6c7a5723af7bdf
parent: 14c612d0792f5bdcc0cbad6210cfff1c48d06292
author: Thomas Daede <daede003@umn.edu>
date: Wed Oct 24 09:51:39 EDT 2018
Make symbols shared with libaom static. Fixes #104.
--- a/src/msac.c
+++ b/src/msac.c
@@ -161,7 +161,7 @@
/*Initializes the decoder.
buf: The input buffer to use.
Return: 0 on success, or a negative value on error.*/
-void od_ec_dec_init(od_ec_dec *dec, const unsigned char *buf,
+static void od_ec_dec_init(od_ec_dec *dec, const unsigned char *buf,
uint32_t storage) {
dec->buf = buf;
dec->tell_offs = 10 - (OD_EC_WINDOW_SIZE - 8);
@@ -177,7 +177,7 @@
/*Decode a single binary value.
f: The probability that the bit is one, scaled by 32768.
Return: The value decoded (0 or 1).*/
-int od_ec_decode_bool_q15(od_ec_dec *dec, unsigned f) {
+static int od_ec_decode_bool_q15(od_ec_dec *dec, unsigned f) {
od_ec_window dif;
od_ec_window vw;
unsigned r;
@@ -212,7 +212,7 @@
nsyms: The number of symbols in the alphabet.
This should be at most 16.
Return: The decoded symbol s.*/
-int od_ec_decode_cdf_q15(od_ec_dec *dec, const uint16_t *icdf, int nsyms) {
+static int od_ec_decode_cdf_q15(od_ec_dec *dec, const uint16_t *icdf, int nsyms) {
od_ec_window dif;
unsigned r;
unsigned c;
--- a/src/ref_mvs.c
+++ b/src/ref_mvs.c
@@ -766,7 +766,7 @@
return comp_ctx;
}
-void av1_setup_frame_buf_refs(AV1_COMMON *cm);
+static void av1_setup_frame_buf_refs(AV1_COMMON *cm);
void av1_setup_frame_sign_bias(AV1_COMMON *cm);
void av1_setup_skip_mode_allowed(AV1_COMMON *cm);
@@ -773,7 +773,7 @@
void av1_copy_frame_mvs(const AV1_COMMON *const cm, MB_MODE_INFO *mi,
int mi_row, int mi_col, int x_mis, int y_mis);
-void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
+static void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
MB_MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
uint8_t ref_mv_count[MODE_CTX_REF_FRAMES],
CANDIDATE_MV ref_mv_stack[][MAX_REF_MV_STACK_SIZE],
@@ -781,12 +781,6 @@
int_mv *global_mvs, int mi_row, int mi_col,
int16_t *mode_context);
-// check a list of motion vectors by sad score using a number rows of pixels
-// above and a number cols of pixels in the left to select the one with best
-// score to use as ref motion vector
-void av1_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *nearest_mv,
- int_mv *near_mv, int is_integer);
-
int selectSamples(MV *mv, int *pts, int *pts_inref, int len, BLOCK_SIZE bsize);
int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
int *pts, int *pts_inref);
@@ -1610,7 +1604,7 @@
}
}
-void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
+static void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
MB_MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
uint8_t ref_mv_count[MODE_CTX_REF_FRAMES],
CANDIDATE_MV ref_mv_stack[][MAX_REF_MV_STACK_SIZE],
@@ -1653,18 +1647,7 @@
zeromv, mi_row, mi_col, mode_context);
}
-void av1_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *nearest_mv,
- int_mv *near_mv, int is_integer) {
- int i;
- // Make sure all the candidates are properly clamped etc
- for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i) {
- lower_mv_precision(&mvlist[i].as_mv, allow_hp, is_integer);
- }
- *nearest_mv = mvlist[0];
- *near_mv = mvlist[1];
-}
-
-void av1_setup_frame_buf_refs(AV1_COMMON *cm) {
+static void av1_setup_frame_buf_refs(AV1_COMMON *cm) {
cm->cur_frame.cur_frame_offset = cm->frame_offset;
MV_REFERENCE_FRAME ref_frame;
@@ -1807,7 +1790,7 @@
return 1;
}
-void av1_setup_motion_field(AV1_COMMON *cm) {
+static void av1_setup_motion_field(AV1_COMMON *cm) {
if (!cm->seq_params.enable_order_hint) return;
TPL_MV_REF *tpl_mvs_base = cm->tpl_mvs;