summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vp9/encoder/vp9_encodeframe.c8
-rw-r--r--vp9/encoder/vp9_ratectrl.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 9e71e7a1b..72dbbff42 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1424,14 +1424,16 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile,
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->svc.spatial_layer_id == cpi->svc.first_spatial_layer_to_encode &&
cpi->svc.high_num_blocks_with_motion && !x->zero_temp_sad_source &&
cm->width > 640 && cm->height > 480) {
- // Disable split below 16x16 block size when scroll motion is detected.
+ // Disable split below 16x16 block size when scroll motion (horz or
+ // vert) 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) ||
+ if (((abs(x->sb_mvrow_part) >= 48 && abs(x->sb_mvcol_part) <= 8) ||
+ (abs(x->sb_mvcol_part) >= 48 && abs(x->sb_mvrow_part) <= 8)) &&
y_sad < 100000) {
compute_minmax_variance = 0;
thresholds[2] = INT64_MAX;
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 9540e218b..152efa7e0 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -2932,7 +2932,7 @@ void vp9_scene_detection_onepass(VP9_COMP *cpi) {
} else {
rc->avg_source_sad[lagframe_idx] = avg_sad;
}
- if (num_zero_temp_sad < (num_samples >> 1))
+ if (num_zero_temp_sad < (3 * num_samples >> 2))
rc->high_num_blocks_with_motion = 1;
}
}