ref: 3a05782c6f7193aebc4db8b5fa0aaa62850a91dc
parent: 6d2307b2dda4c2d68a3e65e9ca43b3b39357cd9c
parent: abf37f1d6cf5f8f2c79267c6cbcfb8548e8c6599
author: Dmitry Kovalev <[email protected]>
date: Fri Jan 24 08:56:16 EST 2014
Merge "Inlining IFMVCV macro."
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -184,12 +184,6 @@
return (x & 7) << 1;
}
-#define IFMVCV(r, c, s, e) \
- if (c >= minc && c <= maxc && r >= minr && r <= maxr) \
- s \
- else \
- e;
-
static INLINE uint8_t *pre(uint8_t *buf, int stride, int r, int c, int offset) {
return &buf[(r >> 3) * stride + (c >> 3) - offset];
}
@@ -201,17 +195,18 @@
/* checks if (r, c) has better score than previous best */
#define CHECK_BETTER(v, r, c) \
- IFMVCV(r, c, { \
- thismse = (DIST(r, c)); \
- if ((v = MVC(r, c) + thismse) < besterr) { \
- besterr = v; \
- br = r; \
- bc = c; \
- *distortion = thismse; \
- *sse1 = sse; \
- } \
- }, \
- v = INT_MAX;)
+ if (c >= minc && c <= maxc && r >= minr && r <= maxr) { \
+ thismse = (DIST(r, c)); \
+ if ((v = MVC(r, c) + thismse) < besterr) { \
+ besterr = v; \
+ br = r; \
+ bc = c; \
+ *distortion = thismse; \
+ *sse1 = sse; \
+ } \
+ } else { \
+ v = INT_MAX; \
+ }
#define FIRST_LEVEL_CHECKS \
{ \
@@ -469,7 +464,6 @@
#undef MVC
#undef PRE
#undef DIST
-#undef IFMVCV
#undef CHECK_BETTER
#undef SP