浏览代码

obs-nvenc: Only show UHQ tune on supported GPUs

derrod 1 年之前
父节点
当前提交
db5b226bb9
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      plugins/obs-nvenc/nvenc-properties.c

+ 4 - 1
plugins/obs-nvenc/nvenc-properties.c

@@ -175,7 +175,10 @@ obs_properties_t *nvenc_properties_internal(enum codec_type codec)
 #define add_tune(val) \
 	obs_property_list_add_string(p, obs_module_text("Tuning." val), val)
 #ifdef NVENC_12_2_OR_LATER
-	if (codec == CODEC_HEVC)
+	/* The UHQ tune is only supported on Turing or later.
+	 * It uses the temporal filtering feature, so we can use its
+	 * availability as an indicator that we are on a supported GPU. */
+	if (codec == CODEC_HEVC && caps->temporal_filter)
 		add_tune("uhq");
 #endif
 	add_tune("hq");