Commit e8a4a3e2 authored by Marco's avatar Marco
Browse files

Avoid scaling last_source, unless needed.

Save some encoding time, for the case of spatial layers
or under dynamic resizing mode.

Change-Id: If4a8eb6f0376c3d2dde8465fde6bfd86ab704920
parent 6ddbc845
......@@ -3201,7 +3201,13 @@ static void encode_without_recode_loop(VP9_COMP *cpi,
cpi->Source = vp9_scale_if_required(cm,
if (cpi->unscaled_last_source != NULL)
// Avoid scaling last_source unless its needed.
// Last source is currently only used for screen-content mode,
// or if partition_search_type == SOURCE_VAR_BASED_PARTITION.
if (cpi->unscaled_last_source != NULL &&
(cpi->oxcf.content == VP9E_CONTENT_SCREEN ||
cpi->sf.partition_search_type == SOURCE_VAR_BASED_PARTITION))
cpi->Last_Source = vp9_scale_if_required(cm,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment