Feature: throughput criterion for adaptive quality, plus anti-oscillation

Adaptive quality only looked at RTT, so a short RTT over a narrow pipe
read as "excellent": at 20-40ms it picks Ultra/High (DIFF/RGB565), both
with bitRate == 0, and never steps down. One 1080p RGB565 frame is
4.15 MB -- 1.66s of transmission on 20 Mbps.

Adds GetTargetQualityLevelByLoad(): congestion needs both fps < 60% of
baseline and bytes/frame still near the nominal bitrate, because a static
screen has a near-zero byte rate on any link. Merged with the RTT result
as max() -- averaging lets a good RTT mask a narrow pipe. Step-down is 3
confirmations and jumps straight to the level the throughput can carry
(capped at +2); step-up stays RTT-only, so the criterion is one-way and
the worst case is one level too low instead of a 30s/15s oscillation.

Anti-oscillation, all inside the switch: RTT hysteresis (85%/115% dead
band against the target level's threshold), failed step-up pinned for 3
minutes, cooldowns 3s -> 10s down / 15s up, counters interrupt each
other, and a hard limit of 6 changes per 5 minutes.

Server-only, no client change. m_ulBytesThisSecond had to be fixed first:
it is accumulated before the switch, so file transfer, audio and
clipboard counted as screen traffic; added m_ulScreenBytesThisSecond for
the four frame cases. Also gates a real bug in the 10s post-step-down
probe that disabled the criterion permanently on a static screen.

Default on (same migration caveat as the other four). Unticking takes the
original path unchanged. Verified on Debug: 27 hysteresis cases and the
load cases pass, menu defaults correct; not yet measured end to end.
This commit is contained in:
yuanyuanxiang committed 2026-11-05 14:24:42 +01:00
1 parent ab83f5d685
commit d6b04a98f0
12 files changed
+543 -23

No files matched your search

+3 -1
View File
@@ -1126,6 +1126,8 @@
#define ID_TOOL_TUNING_X264_VBV 33102
#define ID_TOOL_TUNING_GDI_SLEEP 33103
#define ID_TOOL_TUNING_PACE_FPS_FLOOR 33104
// 高级 → 远程桌面调优:自适应质量加吞吐判据(纯服务端,不下发客户端)
#define ID_TOOL_TUNING_ADAPTIVE_LOAD 33105
#define ID_EXIT_FULLSCREEN 40001
// Next default values for new objects
@@ -1133,7 +1135,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 417
#define _APS_NEXT_COMMAND_VALUE 33105
#define _APS_NEXT_COMMAND_VALUE 33106
#define _APS_NEXT_CONTROL_VALUE 2621
#define _APS_NEXT_SYMED_VALUE 105
#endif