]> granicus.if.org Git - libvpx/commitdiff
Merge "Replacing int_mv with MV."
authorDmitry Kovalev <dkovalev@google.com>
Sat, 1 Mar 2014 00:09:17 +0000 (16:09 -0800)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Sat, 1 Mar 2014 00:09:17 +0000 (16:09 -0800)
1  2 
vp9/encoder/vp9_pickmode.c

index e739e34c01310eb6843b317fc41d96e1d645faa9,05ba651c78bf4f8a6ea2f18b31f15159c1c99e64..edb14ea426b1303127be85973dee9599804f8a5c
@@@ -272,24 -267,15 +272,24 @@@ int64_t vp9_pick_inter_mode(VP9_COMP *c
            continue;
  
          sub_pixel_motion_search(cpi, x, tile, bsize, mi_row, mi_col,
-                                 &frame_mv[NEWMV][ref_frame]);
+                                 &frame_mv[NEWMV][ref_frame].as_mv);
        }
  
 -      mbmi->mode = this_mode;
 -      mbmi->mv[0].as_int = frame_mv[this_mode][ref_frame].as_int;
 -      vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize);
 +      if (frame_mv[this_mode][ref_frame].as_int == 0) {
 +        dist = x->mode_sad[ref_frame][INTER_OFFSET(ZEROMV)];
 +      } else if (this_mode != NEARESTMV &&
 +                 frame_mv[NEARESTMV][ref_frame].as_int ==
 +                     frame_mv[this_mode][ref_frame].as_int) {
 +        dist = x->mode_sad[ref_frame][INTER_OFFSET(NEARESTMV)];
 +      } else {
 +        mbmi->mode = this_mode;
 +        mbmi->mv[0].as_int = frame_mv[this_mode][ref_frame].as_int;
 +        vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize);
 +        dist = x->mode_sad[ref_frame][INTER_OFFSET(this_mode)] =
 +            cpi->fn_ptr[bsize].sdf(p->src.buf, p->src.stride,
 +                                   pd->dst.buf, pd->dst.stride, INT_MAX);
 +      }
  
 -      dist = cpi->fn_ptr[bsize].sdf(p->src.buf, p->src.stride,
 -                                    pd->dst.buf, pd->dst.stride, INT_MAX);
        this_rd = rate + dist;
  
        if (this_rd < best_rd) {