From: Marco Date: Thu, 25 May 2017 18:01:25 +0000 (-0700) Subject: vp9: SVC: Enable copy partition for SVC speed >= 7. X-Git-Tag: v1.7.0~436^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=747cf7a50533dbff6b04ce723754d960fc859ee2;p=libvpx vp9: SVC: Enable copy partition for SVC speed >= 7. Adjust the max_copied_frame setting for temporal layers. Keep the same setting for non-SVC at speed 8. This change also enables copy_partiton for non-SVC at speed 7, but with smaller value of max_copied_frame (=2). ~2% speedup for SVC speed 7, 3 layers, with little/no quality loss. Change-Id: Ic65ac9aad764ec65a35770d263424b2393ec6780 --- diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index 8d9e2e8c3..c4b9ad55a 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -560,19 +560,26 @@ static void set_rt_speed_feature_framesize_independent( (cm->mi_stride >> 3) * ((cm->mi_rows >> 3) + 1), sizeof(uint8_t)); } } - } - - if (speed >= 8) { - sf->adaptive_rd_thresh = 4; - // Enable partition copy. For SVC, only enabled for top resolution layer, + // Enable partition copy. For SVC only enabled for top spatial resolution + // layer. + cpi->max_copied_frame = 0; if (!cpi->last_frame_dropped && cpi->resize_state == ORIG && !cpi->external_resize && (!cpi->use_svc || cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1)) { sf->copy_partition_flag = 1; - cpi->max_copied_frame = 4; + cpi->max_copied_frame = 2; + // The top temporal enhancement layer (for number of temporal layers > 1) + // are non-reference frames, so use large/max value for max_copied_frame. + if (cpi->svc.number_temporal_layers > 1 && + cpi->svc.temporal_layer_id == cpi->svc.number_temporal_layers - 1) + cpi->max_copied_frame = 255; } + } + if (speed >= 8) { + sf->adaptive_rd_thresh = 4; + if (!cpi->use_svc) cpi->max_copied_frame = 4; if (cpi->row_mt && cpi->oxcf.max_threads > 1) sf->adaptive_rd_thresh_row_mt = 1;