this_rdc.rate += ref_frame_cost[ref_frame];
this_rdc.rdcost = RDCOST(x->rdmult, x->rddiv, this_rdc.rate, this_rdc.dist);
+ // Bias against non-zero (above some threshold) motion for large blocks.
+ // This is temporary fix to avoid selection of large mv for big blocks.
+ if (cpi->oxcf.speed > 5 &&
+ cpi->oxcf.content != VP9E_CONTENT_SCREEN &&
+ (frame_mv[this_mode][ref_frame].as_mv.row > 64 ||
+ frame_mv[this_mode][ref_frame].as_mv.row < -64 ||
+ frame_mv[this_mode][ref_frame].as_mv.col > 64 ||
+ frame_mv[this_mode][ref_frame].as_mv.col < -64)) {
+ if (bsize == BLOCK_64X64)
+ this_rdc.rdcost = this_rdc.rdcost << 1;
+ else if (bsize >= BLOCK_32X32)
+ this_rdc.rdcost = 3 * this_rdc.rdcost >> 1;
+ }
+
// Skipping checking: test to see if this block can be reconstructed by
// prediction only.
if (cpi->allow_encode_breakout) {