Skip to content

Commit

Permalink
--tune uhqが使用できない場合、自動的に無効化するように。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Apr 13, 2024
1 parent 1a37939 commit 48d4771
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 6 additions & 0 deletions NVEnc/NVEnc_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ NVIDIA グラフィックドライバ 545.92
今後の更新で設定ファイルの互換性がなくなるかもしれません。

【メモ】
2024.04.13 (7.50)
- --lookahead-levelのデフォルト値を0に。
エンコード速度が大幅に低下する場合があった。
- --tune uhqが使用できない場合、自動的に無効化するように。
- Tuning Infoのログ出力の問題が改行されないのを修正。

2024.04.08 (7.49)
- NVENC SDK 12.2に対応。
- 新しいオプションを追加。
Expand Down
17 changes: 14 additions & 3 deletions NVEncCore/NVEncCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1914,9 +1914,20 @@ NVENCSTATUS NVEncCore::SetInputParam(InEncodeVideoParam *inputParam) {
}
}
m_stCreateEncodeParams.tuningInfo = (inputParam->tuningInfo == NV_ENC_TUNING_INFO_UNDEFINED) ? NV_ENC_TUNING_INFO_HIGH_QUALITY : inputParam->tuningInfo;
if (!m_dev->encoder()->checkAPIver(12, 2) && m_stCreateEncodeParams.tuningInfo == NV_ENC_TUNING_INFO_ULTRA_HIGH_QUALITY) {
PrintMes(RGY_LOG_WARN, _T("tune uhq disabled as it requires NVENC API 12.2.\n"));
m_stCreateEncodeParams.tuningInfo = NV_ENC_TUNING_INFO_HIGH_QUALITY;
if (m_stCreateEncodeParams.tuningInfo == NV_ENC_TUNING_INFO_ULTRA_HIGH_QUALITY) {
if (!m_dev->encoder()->checkAPIver(12, 2)) {
PrintMes(RGY_LOG_WARN, _T("tune uhq disabled as it requires NVENC API 12.2.\n"));
m_stCreateEncodeParams.tuningInfo = NV_ENC_TUNING_INFO_HIGH_QUALITY;
}
if (inputParam->codec_rgy != RGY_CODEC_HEVC) {
PrintMes(RGY_LOG_WARN, _T("tune uhq disabled as it is only supported with HEVC encoding.\n"));
m_stCreateEncodeParams.tuningInfo = NV_ENC_TUNING_INFO_HIGH_QUALITY;
}
if (m_dev->cc().first <= 6
|| (m_dev->cc().first == 7 && m_dev->cc().second < 5)) {
PrintMes(RGY_LOG_WARN, _T("tune uhq disabled as it requires GPUs Turing or above.\n"));
m_stCreateEncodeParams.tuningInfo = NV_ENC_TUNING_INFO_HIGH_QUALITY;
}
}

if (inputParam->ctrl.lowLatency
Expand Down

0 comments on commit 48d4771

Please sign in to comment.