ref: 1988a2c417f4be44ee7e90ea54dc1b175b43d964
parent: 7323218a5e390c20c2db71a158bee53b695958e7
parent: 618b7c16ab9cfcd1090d719bee6b00af0d05c5ab
author: Hui Su <huisu@google.com>
date: Tue Sep 18 14:36:48 EDT 2018
Merge "Remove the SECOND_LEVEL_CHECKS_BEST macro"
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -263,27 +263,6 @@
} \
}
-// TODO(yunqingwang): SECOND_LEVEL_CHECKS_BEST was a rewrote of
-// SECOND_LEVEL_CHECKS, and SECOND_LEVEL_CHECKS should be rewritten
-// later in the same way.
-#define SECOND_LEVEL_CHECKS_BEST \
- { \
- unsigned int second; \
- int br0 = br; \
- int bc0 = bc; \
- assert(tr == br || tc == bc); \
- if (tr == br && tc != bc) { \
- kc = bc - tc; \
- } else if (tr != br && tc == bc) { \
- kr = br - tr; \
- } \
- CHECK_BETTER(second, br0 + kr, bc0); \
- CHECK_BETTER(second, br0, bc0 + kc); \
- if (br0 != br || bc0 != bc) { \
- CHECK_BETTER(second, br0 + kr, bc0 + kc); \
- } \
- }
-
#define SETUP_SUBPEL_SEARCH \
const uint8_t *const z = x->plane[0].src.buf; \
const int src_stride = x->plane[0].src.stride; \
@@ -755,7 +734,22 @@
bc = tc;
}
- if (iters_per_step > 1 && best_idx != -1) SECOND_LEVEL_CHECKS_BEST;
+ if (iters_per_step > 1 && best_idx != -1) {
+ unsigned int second;
+ const int br0 = br;
+ const int bc0 = bc;
+ assert(tr == br || tc == bc);
+ if (tr == br && tc != bc) {
+ kc = bc - tc;
+ } else if (tr != br && tc == bc) {
+ kr = br - tr;
+ }
+ CHECK_BETTER(second, br0 + kr, bc0);
+ CHECK_BETTER(second, br0, bc0 + kc);
+ if (br0 != br || bc0 != bc) {
+ CHECK_BETTER(second, br0 + kr, bc0 + kc);
+ }
+ }
tr = br;
tc = bc;