Commit cd9ae6d7 authored by Marco Paniconi's avatar Marco Paniconi Committed by Gerrit Code Review
Browse files

Merge "Avoid scaling last_source, unless needed."

parents f79f71fc e8a4a3e2
......@@ -3201,7 +3201,13 @@ static void encode_without_recode_loop(VP9_COMP *cpi,
cpi->Source = vp9_scale_if_required(cm,
cpi->un_scaled_source,
&cpi->scaled_source);
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,
cpi->unscaled_last_source,
&cpi->scaled_last_source);
......
Markdown is supported
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