summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2015-02-25 10:33:25 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2015-02-25 10:33:25 -0800
commit4c5a4efc3820cf2c0969814ceacd6f53cf5d3bf5 (patch)
tree34bf36cdef33ee005e75ba7c02ccbd38f7ab102a /vp9
parentbcdac7b4bef3b75796cf83e274a3e4e1e49cde24 (diff)
parentf87e315e1e34de158581cbf7bc96248542d4b3fb (diff)
downloadlibvpx-4c5a4efc3820cf2c0969814ceacd6f53cf5d3bf5.tar
libvpx-4c5a4efc3820cf2c0969814ceacd6f53cf5d3bf5.tar.gz
libvpx-4c5a4efc3820cf2c0969814ceacd6f53cf5d3bf5.tar.bz2
libvpx-4c5a4efc3820cf2c0969814ceacd6f53cf5d3bf5.zip
Merge "Re-distribute hierarchical vector match pattern"
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encodeframe.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 78e20fb08..b73e1d967 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -533,10 +533,10 @@ static int vector_match(int16_t *ref, int16_t *src) {
}
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 @@ static int vector_match(int16_t *ref, int16_t *src) {
}
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 @@ static int vector_match(int16_t *ref, int16_t *src) {
}
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) {