From 4487f5a69059e44cf6400754bd2d9af42f74bb5f Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 29 May 2013 06:29:56 -0700 Subject: Remove some unused code related to macroblock/splitmv coding. Change-Id: Ic40d56fb162f4e201547dfae33e62ccd9e865889 --- vp9/common/vp9_entropymode.c | 10 ---------- vp9/common/vp9_entropymode.h | 3 --- vp9/decoder/vp9_decodemv.c | 4 ---- vp9/encoder/vp9_bitstream.c | 9 --------- vp9/encoder/vp9_rdopt.c | 4 ++-- 5 files changed, 2 insertions(+), 28 deletions(-) diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c index 622f1dcf4..9c390dfd0 100644 --- a/vp9/common/vp9_entropymode.c +++ b/vp9/common/vp9_entropymode.c @@ -141,13 +141,6 @@ const vp9_tree_index vp9_uv_mode_tree[VP9_UV_MODES * 2 - 2] = { -H_PRED, -TM_PRED }; -const vp9_tree_index vp9_mv_ref_tree[8] = { - -ZEROMV, 2, - -NEARESTMV, 4, - -NEARMV, 6, - -NEWMV, -SPLITMV -}; - const vp9_tree_index vp9_sb_mv_ref_tree[6] = { -ZEROMV, 2, -NEARESTMV, 4, @@ -168,7 +161,6 @@ struct vp9_token vp9_sb_kf_ymode_encodings[VP9_I32X32_MODES]; struct vp9_token vp9_kf_ymode_encodings[VP9_YMODES]; struct vp9_token vp9_uv_mode_encodings[VP9_UV_MODES]; -struct vp9_token vp9_mv_ref_encoding_array[VP9_MVREFS]; struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_MVREFS]; struct vp9_token vp9_partition_encodings[PARTITION_TYPES]; @@ -265,8 +257,6 @@ void vp9_entropy_mode_init() { vp9_switchable_interp_tree); vp9_tokens_from_tree(vp9_partition_encodings, vp9_partition_tree); - vp9_tokens_from_tree_offset(vp9_mv_ref_encoding_array, - vp9_mv_ref_tree, NEARESTMV); vp9_tokens_from_tree_offset(vp9_sb_mv_ref_encoding_array, vp9_sb_mv_ref_tree, NEARESTMV); } diff --git a/vp9/common/vp9_entropymode.h b/vp9/common/vp9_entropymode.h index 8fbc6f20e..7a83c702e 100644 --- a/vp9/common/vp9_entropymode.h +++ b/vp9/common/vp9_entropymode.h @@ -29,9 +29,7 @@ extern const vp9_tree_index vp9_kf_ymode_tree[]; extern const vp9_tree_index vp9_uv_mode_tree[]; #define vp9_sb_ymode_tree vp9_uv_mode_tree #define vp9_sb_kf_ymode_tree vp9_uv_mode_tree -extern const vp9_tree_index vp9_mv_ref_tree[]; extern const vp9_tree_index vp9_sb_mv_ref_tree[]; -extern const vp9_tree_index vp9_sub_mv_ref_tree[]; extern struct vp9_token vp9_bmode_encodings[VP9_BINTRAMODES]; extern struct vp9_token vp9_kf_bmode_encodings[VP9_BINTRAMODES]; @@ -43,7 +41,6 @@ extern struct vp9_token vp9_uv_mode_encodings[VP9_UV_MODES]; /* Inter mode values do not start at zero */ -extern struct vp9_token vp9_mv_ref_encoding_array[VP9_MVREFS]; extern struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_MVREFS]; // probability models for partition information diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index 6b511b504..813a26cdc 100644 --- a/vp9/decoder/vp9_decodemv.c +++ b/vp9/decoder/vp9_decodemv.c @@ -362,10 +362,6 @@ static MB_PREDICTION_MODE read_sb_mv_ref(vp9_reader *r, const vp9_prob *p) { return (MB_PREDICTION_MODE) treed_read(r, vp9_sb_mv_ref_tree, p); } -static MB_PREDICTION_MODE read_mv_ref(vp9_reader *r, const vp9_prob *p) { - return (MB_PREDICTION_MODE) treed_read(r, vp9_mv_ref_tree, p); -} - #ifdef VPX_MODE_COUNT unsigned int vp9_mv_cont_count[5][4] = { { 0, 0, 0, 0 }, diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 1dd822b89..f296d9688 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -524,15 +524,6 @@ static void pack_mb_tokens(vp9_writer* const bc, *tp = p; } -static void write_mv_ref(vp9_writer *bc, MB_PREDICTION_MODE m, - const vp9_prob *p) { -#if CONFIG_DEBUG - assert(NEARESTMV <= m && m <= SPLITMV); -#endif - write_token(bc, vp9_mv_ref_tree, p, - vp9_mv_ref_encoding_array - NEARESTMV + m); -} - static void write_sb_mv_ref(vp9_writer *bc, MB_PREDICTION_MODE m, const vp9_prob *p) { #if CONFIG_DEBUG diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 2eb3f9b29..72c4308d5 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -927,8 +927,8 @@ int vp9_cost_mv_ref(VP9_COMP *cpi, vp9_prob p [VP9_MVREFS - 1]; assert(NEARESTMV <= m && m <= SPLITMV); vp9_mv_ref_probs(pc, p, mode_context); - return cost_token(vp9_mv_ref_tree, p, - vp9_mv_ref_encoding_array - NEARESTMV + m); + return cost_token(vp9_sb_mv_ref_tree, p, + vp9_sb_mv_ref_encoding_array - NEARESTMV + m); } else return 0; } -- cgit v1.2.3