summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2013-08-23 13:29:32 -0700
committerYaowu Xu <yaowu@google.com>2013-08-23 15:43:57 -0700
commit13930cf569e8e0459fa2ccd5da08e05c4b0cd11d (patch)
treecfdc5122a3c5f4af0530adeed7eb217d59c6ccb6 /vp9/encoder/vp9_encodeframe.c
parent8e04257bc5ec1af171a7d9c512393a908ff08066 (diff)
downloadlibvpx-13930cf569e8e0459fa2ccd5da08e05c4b0cd11d.tar
libvpx-13930cf569e8e0459fa2ccd5da08e05c4b0cd11d.tar.gz
libvpx-13930cf569e8e0459fa2ccd5da08e05c4b0cd11d.tar.bz2
libvpx-13930cf569e8e0459fa2ccd5da08e05c4b0cd11d.zip
Limit mv range to be based on partition size
Previous change c4048dbd limits the mv search range assuming max block size of 64x64, this commit change the search range using actual block size instead. Change-Id: Ibe07ab02b62bf64bd9f8675d2b997af20a2c7e11
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 2f8321254..898573155 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -503,8 +503,8 @@ static void set_offsets(VP9_COMP *cpi, int mi_row, int mi_col,
// Set up limit values for MV components
// mv beyond the range do not produce new/different prediction block
- x->mv_row_min = -((mi_row * MI_SIZE) + MAX_BLOCK_SIZE + VP9_INTERP_EXTEND);
- x->mv_col_min = -((mi_col * MI_SIZE) + MAX_BLOCK_SIZE + VP9_INTERP_EXTEND);
+ x->mv_row_min = -(((mi_row + mi_height) * MI_SIZE) + VP9_INTERP_EXTEND);
+ x->mv_col_min = -(((mi_col + mi_width) * MI_SIZE) + VP9_INTERP_EXTEND);
x->mv_row_max = (cm->mi_rows - mi_row) * MI_SIZE + VP9_INTERP_EXTEND;
x->mv_col_max = (cm->mi_cols - mi_col) * MI_SIZE + VP9_INTERP_EXTEND;