summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2015-03-02 13:51:12 -0800
committerJingning Han <jingning@google.com>2015-03-03 16:15:12 -0800
commite5fe165840d25240d6b2fe02f33c613eda61ff2e (patch)
tree86cd2e065fcc681315ced7be877a8c94df78e96a /vp9/encoder
parent6e5115e12e916e7d787e0daf2a30a7c610947871 (diff)
downloadlibvpx-e5fe165840d25240d6b2fe02f33c613eda61ff2e.tar
libvpx-e5fe165840d25240d6b2fe02f33c613eda61ff2e.tar.gz
libvpx-e5fe165840d25240d6b2fe02f33c613eda61ff2e.tar.bz2
libvpx-e5fe165840d25240d6b2fe02f33c613eda61ff2e.zip
Properly handle the boundary blocks for integral projection search
Use rectangular block size for integral projection motion estimation if the the 64x64 block has over half block outside the frame. This avoids the issue that the motion information of these blocks is dominated by the extended pixels, instead of the pixels of interest. Change-Id: I22f4d2bb7f6a20db9b3f5e2e5463a7f4b9d1b737
Diffstat (limited to 'vp9/encoder')
-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 cf3ff46b4..fcd443cd5 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);