diff options
author | Yaowu Xu <yaowu@google.com> | 2013-09-24 13:47:29 -0700 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2013-09-24 13:47:29 -0700 |
commit | 35c5d79e6bdbf7e2659e9c6359bf75ebbf533934 (patch) | |
tree | 82de756d64527fcf72f7b2572455cb62805fd23f /vp9/encoder/vp9_firstpass.c | |
parent | b1c58f57a78340b9fc15b52b0baf0fd3e834c93c (diff) | |
download | libvpx-35c5d79e6bdbf7e2659e9c6359bf75ebbf533934.tar libvpx-35c5d79e6bdbf7e2659e9c6359bf75ebbf533934.tar.gz libvpx-35c5d79e6bdbf7e2659e9c6359bf75ebbf533934.tar.bz2 libvpx-35c5d79e6bdbf7e2659e9c6359bf75ebbf533934.zip |
Limit mv search range for first pass and mbgraph
Both first pass and mbgraph search use block size 16x16 for motion
estimation. This commit put a limit of motion vector range. The
effective range allows the entire 16x16 with required subpel
interpolation input to be completely outside image border, but
not any further away from image border.
Change-Id: Id70a5ed08be49e70959f064859d72adc7d775d08
Diffstat (limited to 'vp9/encoder/vp9_firstpass.c')
-rw-r--r-- | vp9/encoder/vp9_firstpass.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 6e44e604c..eaa3bd183 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -534,10 +534,11 @@ void vp9_first_pass(VP9_COMP *cpi) { recon_yoffset = (mb_row * recon_y_stride * 16); 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 - 8)); + // Set up limit values for motion vectors to prevent them extending + // outside the UMV borders + x->mv_row_min = -((mb_row * 16) + BORDER_MV_PIXELS_B16); x->mv_row_max = ((cm->mb_rows - 1 - mb_row) * 16) - + (VP9BORDERINPIXELS - 8); + + BORDER_MV_PIXELS_B16; // for each macroblock col in image for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) { @@ -583,9 +584,9 @@ void vp9_first_pass(VP9_COMP *cpi) { 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 - 8)); + x->mv_col_min = -((mb_col * 16) + BORDER_MV_PIXELS_B16); x->mv_col_max = ((cm->mb_cols - 1 - mb_col) * 16) - + (VP9BORDERINPIXELS - 8); + + BORDER_MV_PIXELS_B16; // Other than for the first frame do a motion search if (cm->current_video_frame > 0) { |