ref: 4c5a4efc3820cf2c0969814ceacd6f53cf5d3bf5
parent: bcdac7b4bef3b75796cf83e274a3e4e1e49cde24
parent: f87e315e1e34de158581cbf7bc96248542d4b3fb
author: Jingning Han <jingning@google.com>
date: Wed Feb 25 05:33:25 EST 2015
Merge "Re-distribute hierarchical vector match pattern"
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -533,10 +533,10 @@
}
center = offset;
- for (d = -8; d <= 8; d += 4) {
+ for (d = -8; d <= 8; d += 16) {
int this_pos = offset + d;
// check limit
- if (this_pos < 0 || this_pos > 64 || this_pos == 32)
+ if (this_pos < 0 || this_pos > 64)
continue;
this_sad = vp9_vector_sad(&ref[this_pos], src, 64);
if (this_sad < best_sad) {
@@ -546,10 +546,10 @@
}
offset = center;
- for (d = -4; d <= 4; d += 2) {
+ for (d = -4; d <= 4; d += 8) {
int this_pos = offset + d;
// check limit
- if (this_pos < 0 || this_pos > 64 || this_pos == 32)
+ if (this_pos < 0 || this_pos > 64)
continue;
this_sad = vp9_vector_sad(&ref[this_pos], src, 64);
if (this_sad < best_sad) {
@@ -559,10 +559,23 @@
}
offset = center;
- for (d = -2; d <= 2; d += 1) {
+ for (d = -2; d <= 2; d += 4) {
int this_pos = offset + d;
// check limit
- if (this_pos < 0 || this_pos > 64 || this_pos == 32)
+ if (this_pos < 0 || this_pos > 64)
+ continue;
+ this_sad = vp9_vector_sad(&ref[this_pos], src, 64);
+ if (this_sad < best_sad) {
+ best_sad = this_sad;
+ center = this_pos;
+ }
+ }
+ offset = center;
+
+ for (d = -1; d <= 1; d += 2) {
+ int this_pos = offset + d;
+ // check limit
+ if (this_pos < 0 || this_pos > 64)
continue;
this_sad = vp9_vector_sad(&ref[this_pos], src, 64);
if (this_sad < best_sad) {