From: James Zern Date: Thu, 30 May 2019 22:58:12 +0000 (-0700) Subject: vp8: restrict 1st pass cpu_used range X-Git-Tag: v1.11.0-rc1~76^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3359c1e5ddd18de6ace98aacdd0e38550999275e;p=libvpx vp8: restrict 1st pass cpu_used range < 4 isn't meaningful in the first pass; additional analysis will be done, but thrown out, unnecessarily increasing the runtime. Change-Id: Ic3de77e3eaa7a8a3371f76f84693e9655c60fdba --- diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c index d65bf9652..bda109e7a 100644 --- a/vp8/vp8_cx_iface.c +++ b/vp8/vp8_cx_iface.c @@ -370,6 +370,9 @@ static vpx_codec_err_t set_vp8e_config(VP8_CONFIG *oxcf, #endif oxcf->cpu_used = vp8_cfg.cpu_used; + if (cfg.g_pass == VPX_RC_FIRST_PASS) { + oxcf->cpu_used = VPXMAX(4, oxcf->cpu_used); + } oxcf->encode_breakout = vp8_cfg.static_thresh; oxcf->play_alternate = vp8_cfg.enable_auto_alt_ref; oxcf->noise_sensitivity = vp8_cfg.noise_sensitivity;