From: Marco Date: Fri, 6 Oct 2017 17:53:40 +0000 (-0700) Subject: Adjust threshold in scene detection X-Git-Tag: v1.7.0~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e405eb06b147d259b4509de896dbe4d8562f7133;p=libvpx Adjust threshold in scene detection For 1 pass vbr: increase min_thresh slightly, and also add condition on golden/arf update for using full nonrd_pick_partition. Reduces possible false detection for scene cut detection. Neutral/small change in metrics or speed for speed 5. Change-Id: I388f4d9a56e3cc763e0148338c1bc0381e58ad76 --- diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index c9d865e5c..dee17ade2 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -4216,7 +4216,8 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi, ThreadData *td, // nonrd_pick_partition does not support 4x4 partition, so avoid it // on key frame for now. if ((cpi->oxcf.rc_mode == VPX_VBR && cpi->rc.high_source_sad && - cpi->oxcf.speed < 6 && cm->frame_type != KEY_FRAME)) { + cpi->oxcf.speed < 6 && cm->frame_type != KEY_FRAME && + (cpi->refresh_golden_frame || cpi->refresh_alt_ref_frame))) { // Use lower max_partition_size for low resoultions. if (cm->width <= 352 && cm->height <= 288) x->max_partition_size = BLOCK_32X32; diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index e796b66e0..536af35fa 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -2280,7 +2280,7 @@ void vp9_scene_detection_onepass(VP9_COMP *cpi) { uint32_t min_thresh = 4000; float thresh = 8.0f; if (cpi->oxcf.rc_mode == VPX_VBR) { - min_thresh = 60000; + min_thresh = 70000; thresh = 2.1f; } if (cpi->oxcf.lag_in_frames > 0) {