summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_mcomp.c
diff options
context:
space:
mode:
authorHui Su <huisu@google.com>2018-09-18 10:33:23 -0700
committerHui Su <huisu@google.com>2018-09-21 09:37:31 -0700
commit1b14cb4e942189db7401c7e0542280fb96672648 (patch)
treef0fdd910757ca9accda726b85d82a2464b8b1044 /vp9/encoder/vp9_mcomp.c
parent734c3d2b66b063e9ebcf0bc4ceb9ae3a9baacd31 (diff)
downloadlibvpx-1b14cb4e942189db7401c7e0542280fb96672648.tar
libvpx-1b14cb4e942189db7401c7e0542280fb96672648.tar.gz
libvpx-1b14cb4e942189db7401c7e0542280fb96672648.tar.bz2
libvpx-1b14cb4e942189db7401c7e0542280fb96672648.zip
Improve subpel MV search for speed 1
Do one more subpel MV search each round. This improves coding efficiency slightly: lowres 0.12% midres 0.11% hdres 0.13% Also renames the control flag for subpel MV search quality. Encoding speed loss is less than 1%. This only affects speed 1. Change-Id: I3aecd25342f2dcacea6c143db494f7db6282cb92
Diffstat (limited to 'vp9/encoder/vp9_mcomp.c')
-rw-r--r--vp9/encoder/vp9_mcomp.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c
index 430659de3..30f101574 100644
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -734,20 +734,30 @@ uint32_t vp9_find_best_sub_pixel_tree(
bc = tc;
}
- if (iters_per_step > 1 && best_idx != -1) {
+ if (iters_per_step > 0 && 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;
+ if (iters_per_step == 1) {
+ CHECK_BETTER(second, br0, bc0 + kc);
+ }
} else if (tr != br && tc == bc) {
kr = br - tr;
+ if (iters_per_step == 1) {
+ CHECK_BETTER(second, br0 + kr, bc0);
+ }
}
- CHECK_BETTER(second, br0 + kr, bc0);
- CHECK_BETTER(second, br0, bc0 + kc);
- if (br0 != br || bc0 != bc) {
- CHECK_BETTER(second, br0 + kr, bc0 + kc);
+
+ if (iters_per_step > 1) {
+ CHECK_BETTER(second, br0 + kr, bc0);
+ CHECK_BETTER(second, br0, bc0 + kc);
+ if (br0 != br || bc0 != bc) {
+ CHECK_BETTER(second, br0 + kr, bc0 + kc);
+ }
}
}