From 80835de6cab6123ac0ceb3cf9b5d881840b934af Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Wed, 7 Nov 2018 11:14:42 -0800 Subject: [PATCH] vp9-screen-content: Adjust condition for large search area Account for dropped frame, and change resolution threshold for limiting split below 16x16. Change-Id: If94cfb2bc24d9103332d1c8d945daca8899db33d --- vp9/encoder/vp9_encodeframe.c | 2 +- vp9/encoder/vp9_speed_features.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 4aae37706..d5d1d279e 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1381,7 +1381,7 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile, 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) { + cm->width > 640 && cm->height > 480) { // 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 diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index 2b0d5e146..9f2dc144e 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -794,10 +794,12 @@ static void set_rt_speed_feature_framesize_independent( sf->partition_search_type = FIXED_PARTITION; sf->always_this_block_size = BLOCK_64X64; } - // Special case for screen content: increase motion search when high motion - // is detected. + // Special case for screen content: increase motion search on baase spatial + // layer when high motion is detected or previous SL0 frame was dropped. + // Avoid speed 5 for as there is an issue with SVC datarate test. if (cpi->oxcf.content == VP9E_CONTENT_SCREEN && cpi->oxcf.speed > 5 && - cpi->rc.high_num_blocks_with_motion && cpi->svc.spatial_layer_id == 0) { + cpi->svc.spatial_layer_id == 0 && + (cpi->rc.high_num_blocks_with_motion || cpi->svc.last_layer_dropped[0])) { sf->mv.search_method = NSTEP; sf->mv.fullpel_search_step_param = 2; } -- 2.40.0