summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2018-11-05 17:49:39 -0800
committerMarco Paniconi <marpan@google.com>2018-11-06 11:01:52 -0800
commit7db01784570c676a5a2d4a73a5e3986a846e6491 (patch)
tree2b059ddc300c2542a3ed30d4f509c984c6941e41 /vp9/encoder/vp9_encodeframe.c
parentee8920732d1b1446799c5cb9195cfcb2df1fefe8 (diff)
downloadlibvpx-7db01784570c676a5a2d4a73a5e3986a846e6491.tar
libvpx-7db01784570c676a5a2d4a73a5e3986a846e6491.tar.gz
libvpx-7db01784570c676a5a2d4a73a5e3986a846e6491.tar.bz2
libvpx-7db01784570c676a5a2d4a73a5e3986a846e6491.zip
vp9 screen-content: Adjustments for screen content.
Increase search area, use NSTEP, and in some cases avoid bsize below 16x16. This for base spatial layer when many blocks in the frame have motion (from scene detection analysis). Improves quality for scrolling motion. Change-Id: If77b43e738a6c43610d4727a95712667088db564
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index fb25fbc5c..4aae37706 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1378,6 +1378,20 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile,
x->sb_use_mv_part = 1;
x->sb_mvcol_part = mi->mv[0].as_mv.col;
x->sb_mvrow_part = mi->mv[0].as_mv.row;
+ if (cpi->oxcf.content == VP9E_CONTENT_SCREEN &&
+ cpi->svc.spatial_layer_id == 0 &&
+ cpi->rc.high_num_blocks_with_motion && !x->zero_temp_sad_source &&
+ cm->width >= 1280 && cm->height >= 720) {
+ // Disable split below 16x16 block size when scroll motion is detected.
+ // TODO(marpan/jianj): Improve this condition: issue is that search
+ // range is hard-coded/limited in vp9_int_pro_motion_estimation() so
+ // scroll motion may not be detected here.
+ if ((abs(x->sb_mvrow_part) >= 48 && abs(x->sb_mvcol_part) <= 8) ||
+ y_sad < 100000) {
+ compute_minmax_variance = 0;
+ thresholds[2] = INT64_MAX;
+ }
+ }
}
y_sad_last = y_sad;