ref: c0167cbbc217a86af6cc85cdb1e8afa70b51a00d
parent: 36f02bf3c15691e426b0a8e80d1fa0f2ae5afbb2
author: Jingning Han <[email protected]>
date: Fri Jun 7 11:43:08 EDT 2013
Fix mv range border in pixels WIP: trying to resolve the mismatch issue in extending frame dimension into multiples of 8. Change-Id: I24e7638ab3c50e21e6969c1eeed4f607d6f11f65
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -501,9 +501,9 @@
recon_uvoffset = (mb_row * recon_uv_stride * 8);
// Set up limit values for motion vectors to prevent them extending outside the UMV borders
- x->mv_row_min = -((mb_row * 16) + (VP9BORDERINPIXELS - 16));
+ x->mv_row_min = -((mb_row * 16) + (VP9BORDERINPIXELS - 8));
x->mv_row_max = ((cm->mb_rows - 1 - mb_row) * 16)
- + (VP9BORDERINPIXELS - 16);
+ + (VP9BORDERINPIXELS - 8);
// for each macroblock col in image
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) {
@@ -538,9 +538,9 @@
intra_error += (int64_t)this_error;
// Set up limit values for motion vectors to prevent them extending outside the UMV borders
- x->mv_col_min = -((mb_col * 16) + (VP9BORDERINPIXELS - 16));
+ x->mv_col_min = -((mb_col * 16) + (VP9BORDERINPIXELS - 8));
x->mv_col_max = ((cm->mb_cols - 1 - mb_col) * 16)
- + (VP9BORDERINPIXELS - 16);
+ + (VP9BORDERINPIXELS - 8);
// Other than for the first frame do a motion search
if (cm->current_video_frame > 0) {
--- a/vp9/encoder/vp9_mbgraph.c
+++ b/vp9/encoder/vp9_mbgraph.c
@@ -257,9 +257,9 @@
// Set up limit values for motion vectors to prevent them extending outside the UMV borders
arf_top_mv.as_int = 0;
gld_top_mv.as_int = 0;
- x->mv_row_min = -(VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND);
- x->mv_row_max = (cm->mb_rows - 1) * 16 + VP9BORDERINPIXELS
- - 16 - VP9_INTERP_EXTEND;
+ x->mv_row_min = -(VP9BORDERINPIXELS - 8 - VP9_INTERP_EXTEND);
+ x->mv_row_max = (cm->mb_rows - 1) * 8 + VP9BORDERINPIXELS
+ - 8 - VP9_INTERP_EXTEND;
xd->up_available = 0;
xd->plane[0].dst.stride = buf->y_stride;
xd->plane[0].pre[0].stride = buf->y_stride;
@@ -278,9 +278,9 @@
// Set up limit values for motion vectors to prevent them extending outside the UMV borders
arf_left_mv.as_int = arf_top_mv.as_int;
gld_left_mv.as_int = gld_top_mv.as_int;
- x->mv_col_min = -(VP9BORDERINPIXELS - 16 - VP9_INTERP_EXTEND);
- x->mv_col_max = (cm->mb_cols - 1) * 16 + VP9BORDERINPIXELS
- - 16 - VP9_INTERP_EXTEND;
+ x->mv_col_min = -(VP9BORDERINPIXELS - 8 - VP9_INTERP_EXTEND);
+ x->mv_col_max = (cm->mb_cols - 1) * 8 + VP9BORDERINPIXELS
+ - 8 - VP9_INTERP_EXTEND;
xd->left_available = 0;
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) {