Merge "vp8: restrict 1st pass cpu_used range"
authorJames Zern <jzern@google.com>
Fri, 12 Mar 2021 19:44:42 +0000 (19:44 +0000)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Fri, 12 Mar 2021 19:44:42 +0000 (19:44 +0000)
vp8/vp8_cx_iface.c

index 1160f51..32dd3c7 100644 (file)
@@ -378,6 +378,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;