From 3fc01f95da993c6353082af6cb82cd5cdb8824f5 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 8 Jun 2016 13:03:29 -0700 Subject: [PATCH] vp9: Use nonrd_pick_partition on scene-cut, for speed 5 vbr mode. On scene-cut detected frames (i.e., high_source_sad = 1), use nonrd_pick_partition (over choose_part + select_part), as the nonrd_pick partitioning is generally better. Small positive increase in metrics on ytlive set (~0.5 - 1%). Negligle overall speed decrease, as its only used on scene-cut frames. Only affects 1 pass vbr mode, speed = 5. Change-Id: I07c89cbdc75f5bb16eb8e0e2773ead0980d2de5c --- vp9/encoder/vp9_encodeframe.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index e357050..21a66bb 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -3797,8 +3797,14 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi, break; case REFERENCE_PARTITION: set_offsets(cpi, tile_info, x, mi_row, mi_col, BLOCK_64X64); - if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled && - xd->mi[0]->segment_id) { + // Use nonrd_pick_partition on scene-cut for VBR, or on qp-segment + // if cyclic_refresh is enabled. + // 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 && + cm->frame_type != KEY_FRAME) || + (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled && + xd->mi[0]->segment_id)) { // Use lower max_partition_size for low resoultions. if (cm->width <= 352 && cm->height <= 288) x->max_partition_size = BLOCK_32X32; -- 2.7.4