From 7f99c3c59a446145a08c5d66f8f7af908535e8c0 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Tue, 5 Mar 2013 14:12:16 -0800 Subject: Code cleanup. Removing redundant 'extern' keywords, fixing formatting and #include order, code simplification. Change-Id: I0e5fdc8009010f3f885f13b5d76859b9da511758 --- vp9/common/vp9_mvref_common.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'vp9/common/vp9_mvref_common.c') diff --git a/vp9/common/vp9_mvref_common.c b/vp9/common/vp9_mvref_common.c index 25aa53b5a..2f322a33f 100644 --- a/vp9/common/vp9_mvref_common.c +++ b/vp9/common/vp9_mvref_common.c @@ -11,23 +11,27 @@ #include "vp9/common/vp9_mvref_common.h" #define MVREF_NEIGHBOURS 8 + static int mb_mv_ref_search[MVREF_NEIGHBOURS][2] = { {0, -1}, {-1, 0}, {-1, -1}, {0, -2}, {-2, 0}, {-1, -2}, {-2, -1}, {-2, -2} }; + static int mb_ref_distance_weight[MVREF_NEIGHBOURS] = { 3, 3, 2, 1, 1, 1, 1, 1 }; + static int sb_mv_ref_search[MVREF_NEIGHBOURS][2] = { {0, -1}, {-1, 0}, {1, -1}, {-1, 1}, {-1, -1}, {0, -2}, {-2, 0}, {-1, -2} }; + static int sb_ref_distance_weight[MVREF_NEIGHBOURS] = { 3, 3, 2, 2, 2, 1, 1, 1 }; // clamp_mv_ref #define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units -static void clamp_mv_ref(const MACROBLOCKD *xd, int_mv *mv) { +static void clamp_mv_ref(const MACROBLOCKD *xd, int_mv *mv) { if (mv->as_mv.col < (xd->mb_to_left_edge - MV_BORDER)) mv->as_mv.col = xd->mb_to_left_edge - MV_BORDER; else if (mv->as_mv.col > xd->mb_to_right_edge + MV_BORDER) @@ -41,11 +45,9 @@ static void clamp_mv_ref(const MACROBLOCKD *xd, int_mv *mv) { // Gets a candidate refenence motion vector from the given mode info // structure if one exists that matches the given reference frame. -static int get_matching_candidate( - const MODE_INFO *candidate_mi, +static int get_matching_candidate(const MODE_INFO *candidate_mi, MV_REFERENCE_FRAME ref_frame, - int_mv *c_mv -) { + int_mv *c_mv) { int ret_val = TRUE; if (ref_frame == candidate_mi->mbmi.ref_frame) { -- cgit v1.2.3