shithub: libvpx

Download patch

ref: 6a8d4631a8b28c2fb0be87467d38174ea3c04e95
parent: 2d1e63d0c50cc0088e6b851ec86fdc79f0476ac8
parent: 2fb826c4d551c0c320ab7b0a5ee9d3bde21d87a3
author: Yunqing Wang <yunqingwang@google.com>
date: Mon Aug 8 13:59:47 EDT 2016

Merge "Fix a motion vector out of range bug"

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1958,6 +1958,10 @@
           MV mvp_full;
           int max_mv;
           int cost_list[5];
+          int tmp_col_min = x->mv_col_min;
+          int tmp_col_max = x->mv_col_max;
+          int tmp_row_min = x->mv_row_min;
+          int tmp_row_max = x->mv_row_max;
 
           /* Is the best so far sufficiently good that we cant justify doing
            * and new motion search. */
@@ -2004,6 +2008,11 @@
               cpi, x, bsize, &mvp_full, step_param, sadpb,
               sf->mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL,
               &bsi->ref_mv[0]->as_mv, new_mv, INT_MAX, 1);
+
+          x->mv_col_min = tmp_col_min;
+          x->mv_col_max = tmp_col_max;
+          x->mv_row_min = tmp_row_min;
+          x->mv_row_max = tmp_row_max;
 
           if (bestsme < UINT_MAX) {
             uint32_t distortion;