diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2013-03-05 14:12:16 -0800 |
---|---|---|
committer | Dmitry Kovalev <dkovalev@google.com> | 2013-03-05 14:12:16 -0800 |
commit | 7f99c3c59a446145a08c5d66f8f7af908535e8c0 (patch) | |
tree | 3981ac699ca4d7c787b198eaea03e2a19e59170b /vp9/common/vp9_mvref_common.c | |
parent | 764be4f66fc3928ec668f8faccef1705049ff5a5 (diff) | |
download | libvpx-7f99c3c59a446145a08c5d66f8f7af908535e8c0.tar libvpx-7f99c3c59a446145a08c5d66f8f7af908535e8c0.tar.gz libvpx-7f99c3c59a446145a08c5d66f8f7af908535e8c0.tar.bz2 libvpx-7f99c3c59a446145a08c5d66f8f7af908535e8c0.zip |
Code cleanup.
Removing redundant 'extern' keywords, fixing formatting and #include order,
code simplification.
Change-Id: I0e5fdc8009010f3f885f13b5d76859b9da511758
Diffstat (limited to 'vp9/common/vp9_mvref_common.c')
-rw-r--r-- | vp9/common/vp9_mvref_common.c | 12 |
1 files changed, 7 insertions, 5 deletions
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) { |