瀏覽代碼

UI: Suggest hw encoding by default depending on hw

In the auto-configuration dialog, use hardware encoding by default if
NVENC is available due to the fact that the latest generations of NVENC
currently has a better quality to bitrate ratio than veryfast x264 and
most other hardware devices.
jp9000 6 年之前
父節點
當前提交
dab44ae75a
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      UI/window-basic-auto-config.cpp

+ 6 - 2
UI/window-basic-auto-config.cpp

@@ -814,14 +814,18 @@ AutoConfig::AutoConfig(QWidget *parent)
 	streamPage->ui->bitrate->setValue(bitrate);
 	streamPage->ServiceChanged();
 
-	streamPage->ui->preferHardware->setChecked(os_get_physical_cores() <= 4);
-
 	TestHardwareEncoding();
 	if (!hardwareEncodingAvailable) {
 		delete streamPage->ui->preferHardware;
 		streamPage->ui->preferHardware = nullptr;
 	}
 
+	/* Newer generations of NVENC have a high enough quality to bitrate
+	 * ratio that if NVENC is available, it makes sense to just always
+	 * prefer hardware encoding by default */
+	bool preferHardware = nvencAvailable || os_get_physical_cores() <= 4;
+	streamPage->ui->preferHardware->setChecked(preferHardware);
+
 	setOptions(0);
 	setButtonText(QWizard::FinishButton,
 			QTStr("Basic.AutoConfig.ApplySettings"));