vp9: Only compute y_sad for golden in variance partition for speed < 8.

Only affects speed 8. No obvious quality regression. Systematic speed
ups by ~1% on Nexus 6.

Change-Id: Ia904ca28ea041c3281c532911ec38fb7d7f46a17
This commit is contained in:
Jerome Jiang 2017-02-22 09:49:17 -08:00
parent 66f36f4735
commit 3d1fa00fce

View File

@ -1043,7 +1043,9 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile,
yv12_g = get_ref_frame_buffer(cpi, GOLDEN_FRAME);
}
if (yv12_g && yv12_g != yv12 && (cpi->ref_frame_flags & VP9_GOLD_FLAG)) {
// Only compute y_sad_g (sad for golden reference) for speed < 8.
if (cpi->oxcf.speed < 8 && yv12_g && yv12_g != yv12 &&
(cpi->ref_frame_flags & VP9_GOLD_FLAG)) {
vp9_setup_pre_planes(xd, 0, yv12_g, mi_row, mi_col,
&cm->frame_refs[GOLDEN_FRAME - 1].sf);
y_sad_g = cpi->fn_ptr[bsize].sdf(