shithub: libvpx

Download patch

ref: 0fe8304d0ba90388d06aaec588edf729e088ea1d
parent: 87d1a488ede4d3fa71f374c781520f2784ca3dfb
parent: e5fe165840d25240d6b2fe02f33c613eda61ff2e
author: Jingning Han <[email protected]>
date: Wed Mar 4 04:01:33 EST 2015

Merge "Properly handle the boundary blocks for integral projection search"

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -715,6 +715,7 @@
     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 @@
     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);