diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-02-03 11:05:19 -0800 |
---|---|---|
committer | Dmitry Kovalev <dkovalev@google.com> | 2014-02-03 14:26:36 -0800 |
commit | ae1c2987335c065b1b3ff8520326f7e1dfcefeec (patch) | |
tree | 776695a655d362ec5a7d747a5e5ae68196e29f0b /vp9/encoder/vp9_mcomp.c | |
parent | cabfd505a44b9157550c0853e891a2b10b93a745 (diff) | |
download | libvpx-ae1c2987335c065b1b3ff8520326f7e1dfcefeec.tar libvpx-ae1c2987335c065b1b3ff8520326f7e1dfcefeec.tar.gz libvpx-ae1c2987335c065b1b3ff8520326f7e1dfcefeec.tar.bz2 libvpx-ae1c2987335c065b1b3ff8520326f7e1dfcefeec.zip |
Inlinging get_next_chkpts macro in vp9_mcomp.c.
Change-Id: I38ca35dccfb9051d08b026d75ba2f3a35adb0259
Diffstat (limited to 'vp9/encoder/vp9_mcomp.c')
-rw-r--r-- | vp9/encoder/vp9_mcomp.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c index ec9934a30..36591bd42 100644 --- a/vp9/encoder/vp9_mcomp.c +++ b/vp9/encoder/vp9_mcomp.c @@ -466,7 +466,6 @@ int vp9_find_best_sub_pixel_comp_tree(const MACROBLOCK *x, #undef PRE #undef DIST #undef CHECK_BETTER -#undef SP static INLINE int check_bounds(const MACROBLOCK *x, int row, int col, int range) { @@ -496,11 +495,6 @@ static INLINE int check_point(const MACROBLOCK *x, const MV *mv) { }\ } -#define get_next_chkpts(list, i, n) \ - list[0] = ((i) == 0 ? (n) - 1 : (i) - 1); \ - list[1] = (i); \ - list[2] = ((i) == (n) - 1 ? 0 : (i) + 1); - #define MAX_PATTERN_SCALES 11 #define MAX_PATTERN_CANDIDATES 8 // max number of canddiates per scale #define PATTERN_CANDIDATES_REF 3 // number of refinement candidates @@ -644,7 +638,10 @@ static int vp9_pattern_search(const MACROBLOCK *x, do { int next_chkpts_indices[PATTERN_CANDIDATES_REF]; best_site = -1; - get_next_chkpts(next_chkpts_indices, k, num_candidates[s]); + next_chkpts_indices[0] = (k == 0) ? num_candidates[s] - 1 : k - 1; + next_chkpts_indices[1] = k; + next_chkpts_indices[2] = (k == num_candidates[s] - 1) ? 0 : k + 1; + if (check_bounds(x, br, bc, 1 << s)) { for (i = 0; i < PATTERN_CANDIDATES_REF; i++) { this_mv.row = br + candidates[s][next_chkpts_indices[i]].row; |