fix(pixelflux): Run a cleanup again once the rate doubles past its own
A constant-rate cleanup through the rate control ends on what its rate
made of the picture, and a region that then holds still arms no other
cleanup, so a later rise of the target changed nothing on the page. Over
WebSockets through a path cut to 1 Mbit/s with a content switch at 35 s
and a still screen after it (padprobe ws-still), x264's cleanup ran at
the steer's 0.85-1.2 Mbit/s after the cut and ended after 5 s at 25 dB
(a 9-10 KB frame every 4th or 5th, no run of empty frames past 5), and
the page held 25 dB after the still-screen probe landed the target on 8
Mbit/s; cut to 0.1-0.18 Mbit/s (ws-pend) it ended at 16 dB. The page had
every frame: the relay left none out after the last key frame, and the
encoder coded none after the target rose.
Each region keeps the highest rate its cleanup through the rate control
ran at (StripeState::cleanup_kbps). A rise to CLEANUP_RATE_RISE (2x)
that rate after the cleanup ended runs it again on the region's next
still frame (rate_rerun), through the rate control and without a key
frame; a steer's routine steps arm nothing, and motion clears it. Every
capture path takes the rise at a constant rate: X11's software stripes
and hardware sessions, DRI3, NvFBC and Wayland.
padprobe (WebSockets, x264 1080p dense text, 72.5 ms each way),
interleaved against main, n=3 an arm, final PSNR and seconds to sharp
after the narrowing ended:
ws-still main 26.17 / 46.87 / 46.97 dB 5.7 / 6.3 / 6.1 s
ws-still fix 47.02 / 47.01 / 47.09 dB 6.1 / 13.4 / 19.5 s
ws-pend main 46.71 / 46.74 / 46.98 dB 15.4 / 13.9 / 7.9 s
ws-pend fix 46.63 / 47.12 / 46.97 dB 14.0 / 18.2 / 15.4 s
Main's 26.17 run and the fix's ws-still 2 and 3 took the same course:
the cleanup ended under the cut target and the screen held still. Main
coded nothing after the target rose and kept 26 dB; the fix ran the
cleanup again at the rise (to 965 and to 8000 kbps) and reached 47 dB,
its seconds to sharp being when the target rose. In the runs whose
cleanup outlasted the climb the two arms' PSNR series match within half
a dB; ws-pend 2's rerun at 8000 kbps added 0.8 dB, which moves its sharp
mark later.
congestion_step websockets, 2 an arm: all checks pass; picture age over
the narrow stretch p50/max 169/984, 177/1224 ms on main and 157/1067,
171/1029 with the fix; the light screen after the link returns 15/54,
16/77 and 16/94, 17/77, which n=2 does not tell apart. slow_page
websockets, 3 an arm: main passed 3, the fix 2. No key frame for the
slow page and no stall past 132 ms in either; the slow page's median lag
behind the owner 56, 53.5, 51.5 frames on main and 55.5, 60.5, 52 with
the fix, the 60.5 failing the 60-frame mark. cargo test -p pixelflux
--lib passes but for the five x264_capped_crf tests that fail on main
with this host's conda x264.