summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2015-11-04 00:01:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-11-04 00:01:23 +0000
commitc6641709a707ccb98cbdf785428659e44d4f2c8b (patch)
treebf27f84eb0a6b7c0db0cc34ee3504112b765afd4 /vp9/encoder
parent17534d2918dd48e0568a06582120d4030f1ec168 (diff)
parent04a99cb36bb6a3d24de0d99ac621e0313ea759a6 (diff)
downloadlibvpx-c6641709a707ccb98cbdf785428659e44d4f2c8b.tar
libvpx-c6641709a707ccb98cbdf785428659e44d4f2c8b.tar.gz
libvpx-c6641709a707ccb98cbdf785428659e44d4f2c8b.tar.bz2
libvpx-c6641709a707ccb98cbdf785428659e44d4f2c8b.zip
Merge "Bias against non-zero mv for large blocks."
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_pickmode.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index a692c2909..8c4782da5 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1483,6 +1483,20 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
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) {