Improve: default the x264 bitrate cap off and label it for weak links

The cap is capped CRF (VBV): when a frame needs more bits than the
profile's nominal bitrate allows, x264 has to raise QP to stay under the
ceiling. Scenes with lots of change (video, scrolling, window dragging)
therefore lose detail and look blurry, while static scenes stay sharp -
the cap only bites on motion. That trade is worth it on intercontinental
or otherwise constrained links, where an uncapped frame can take seconds
to transmit and stall everything queued behind it, but it is a pure
quality loss on a LAN.

The tuning item now defaults to unchecked, so a master sends 0x3 (GDI
no-sleep and send pacing) by default; machines that already stored
TuningX264Vbv keep their explicit choice. The menu entry is renamed to
"x264 码率封顶 (VBV,仅限洲际弱网)" and the en_US, zh_TW and de_DE
translations were updated to match the new source string.

Only newly opened remote desktops pick up the flag, since CMD_SCREEN_TUNING
is sent when the session starts. Verified by rebuilding the Debug x64
server and client, and by finding the new menu and translation strings in
the built binary.

Co-Authored-By: deepseek-flash
This commit is contained in:
yuanyuanxianganddeepseek-flash committed 2026-11-07 09:52:54 +01:00
1 parent f77b18aa68
commit 4884b080e8
12 files changed
+23 -16

No files matched your search

+4 -3
View File
@@ -1371,10 +1371,11 @@ struct QualityProfile {
};
// ===== 远程桌面调优开关(CMD_SCREEN_TUNING 的位定义)=====
// 主控端「高级 → 远程桌面调优」里逐项勾选。三项默认全部勾选;取消勾选即把对应位清零,
// 主控端「高级 → 远程桌面调优」里逐项勾选。GDI 去延时与发送节流默认勾选,
// x264 码率封顶默认不勾选(仅限洲际弱网);取消勾选即把对应位清零,
// 回到加开关前的行为。每一位都能独立开关,某项出问题可以只关那一项,不必全关。
// 默认值改在 CMy2015RemoteDlg::OnInitDialog 的 GetInt 第三参数上,注意存量机器如果
// 已经写过 0,改默认值不会覆盖它们。
// 默认值改在 CMy2015RemoteDlg::OnInitDialog 的 GetInt 第三参数上,注意存量机器只要
// 已经写过该键,改默认值就不会覆盖它们(保持用户上次的显式选择)。
#define TUNING_X264_VBV 0x00000001 // x264 软编加 VBV 码率封顶(跨洲际防单帧打爆链路)
#define TUNING_GDI_NO_SLEEP 0x00000002 // GDI 抓屏去掉分段 BitBlt 之间的 5ms 延时(1080p 省 110ms/帧)
#define TUNING_PACE_FPS_FLOOR 0x00000004 // 发送节流帧率下限:慢链路下不再把帧率压到 2fps