ref: 747cf7a50533dbff6b04ce723754d960fc859ee2
parent: de1a9c77a7e54f6c0dce272850c43251f38b6c6c
author: Marco <[email protected]>
date: Thu May 25 07:01:25 EDT 2017
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
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -560,19 +560,26 @@
(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;