vp9: 1 pass: Move source sad computation into encodeframe loop.
Refactor to split the 1 passs source sad computation into scene detection (currently used for VBR and screen-content mode), and superblock based source sad computation (used in non-rd CBR mode). This allows the source sad computation for CBR mode to be multi-threaded. No change in compression. Change-Id: I112f2918613ccbd37c1771d852606d3af18c1388
This commit is contained in:
@@ -512,12 +512,9 @@ static void set_rt_speed_feature_framesize_independent(
|
||||
}
|
||||
if (!cpi->external_resize) sf->use_source_sad = 1;
|
||||
if (sf->use_source_sad) {
|
||||
// For SVC allocate for top layer.
|
||||
if (cpi->content_state_sb == NULL &&
|
||||
if (cpi->content_state_sb_fd == NULL &&
|
||||
(!cpi->use_svc ||
|
||||
cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1)) {
|
||||
cpi->content_state_sb = (uint8_t *)vpx_calloc(
|
||||
(cm->mi_stride >> 3) * ((cm->mi_rows >> 3) + 1), sizeof(uint8_t));
|
||||
cpi->content_state_sb_fd = (uint8_t *)vpx_calloc(
|
||||
(cm->mi_stride >> 3) * ((cm->mi_rows >> 3) + 1), sizeof(uint8_t));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user