From: Marco Date: Fri, 3 Nov 2017 18:29:35 +0000 (-0700) Subject: Nonrd_pickmode: avoid computing UV cost when early_term is set. X-Git-Tag: v1.7.0~81 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fbc354c97ca45754a76674dba5f6b43c2b0c15a;p=libvpx Nonrd_pickmode: avoid computing UV cost when early_term is set. For nonrd_pickmode: if early_term is set there should be no need to include UV in rdcost (when color_sensitivity is set). Neutral change on RTC and RTC_derf metrics, for speed >= 5. No change for ytlive metrics. Very small speed gain (~0.5%) on some clips with strong color content. Change-Id: Ifc00928ecd935fc71e94935ceef0ae7481249f07 --- diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index cc95a3409..22f9619ff 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -2069,7 +2069,8 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, this_rdc.rate += vp9_cost_bit(vp9_get_skip_prob(cm, xd), 1); } - if (x->color_sensitivity[0] || x->color_sensitivity[1]) { + if (!this_early_term && + (x->color_sensitivity[0] || x->color_sensitivity[1])) { RD_COST rdc_uv; const BLOCK_SIZE uv_bsize = get_plane_block_size(bsize, &xd->plane[1]); if (x->color_sensitivity[0])