summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2015-03-04 09:01:33 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2015-03-04 09:01:33 -0800
commit0fe8304d0ba90388d06aaec588edf729e088ea1d (patch)
treef007a10c6d594e1a06b15b64dff05580ae77dd00 /vp9/encoder/vp9_encodeframe.c
parent87d1a488ede4d3fa71f374c781520f2784ca3dfb (diff)
parente5fe165840d25240d6b2fe02f33c613eda61ff2e (diff)
downloadlibvpx-0fe8304d0ba90388d06aaec588edf729e088ea1d.tar
libvpx-0fe8304d0ba90388d06aaec588edf729e088ea1d.tar.gz
libvpx-0fe8304d0ba90388d06aaec588edf729e088ea1d.tar.bz2
libvpx-0fe8304d0ba90388d06aaec588edf729e088ea1d.zip
Merge "Properly handle the boundary blocks for integral projection search"
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index f1d9c920f..78950f041 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -715,6 +715,7 @@ static void choose_partitioning(VP9_COMP *cpi,
unsigned int var = 0, uv_sse;
#if GLOBAL_MOTION
unsigned int y_sse;
+ BLOCK_SIZE bsize;
#endif
vp9_setup_pre_planes(xd, 0, yv12, mi_row, mi_col,
&cm->frame_refs[LAST_FRAME - 1].sf);
@@ -725,7 +726,16 @@ static void choose_partitioning(VP9_COMP *cpi,
mbmi->interp_filter = BILINEAR;
#if GLOBAL_MOTION
- y_sse = motion_estimation(cpi, x, BLOCK_64X64);
+ if (mi_row + 4 < cm->mi_rows && mi_col + 4 < cm->mi_cols)
+ bsize = BLOCK_64X64;
+ else if (mi_row + 4 < cm->mi_rows && mi_col + 4 >= cm->mi_cols)
+ bsize = BLOCK_32X64;
+ else if (mi_row + 4 >= cm->mi_rows && mi_col + 4 < cm->mi_cols)
+ bsize = BLOCK_64X32;
+ else
+ bsize = BLOCK_32X32;
+
+ y_sse = motion_estimation(cpi, x, bsize);
#endif
vp9_build_inter_predictors_sb(xd, mi_row, mi_col, BLOCK_64X64);