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

+1
View File
@@ -2090,6 +2090,7 @@ MCPԶ
x264 码率封顶 (VBV)=x264 Bitraten-Deckel (VBV)
GDI 抓屏去分段延时=GDI-Aufnahme ohne Segment-Pause
发送节流帧率下限=Mindest-Framerate beim Senden
自适应加吞吐判据=Durchsatz-Kriterium (adaptiv)
等级=Stufe
帧率(FPS)=FPS
最大宽度=Max. Breite
+1
View File
@@ -2095,6 +2095,7 @@ HTTPS
x264 码率封顶 (VBV)=x264 bitrate cap (VBV)
GDI 抓屏去分段延时=GDI capture: no per-slice delay
发送节流帧率下限=Send pacing FPS floor
自适应加吞吐判据=Adaptive throughput criterion
等级=Level
帧率(FPS)=FPS
最大宽度=Max Width
+1
View File
@@ -2088,6 +2088,7 @@ HTTPS
x264 码率封顶 (VBV)=x264 位元率上限 (VBV)
GDI 抓屏去分段延时=GDI 擷取去除分段延遲
发送节流帧率下限=傳送節流影格率下限
自适应加吞吐判据=自適應加吞吐判據
等级=等級
帧率(FPS)=幀率(FPS)
最大宽度=最大寬度