Skip to content

Fix RGB10 capture and port the DPCM proposal to current main - #2

Merged
aalpgiray merged 15 commits into
aalpgiray:lossless-dpcm-proposalfrom
yibiao-h:codex/pr201-dpcm-followup
Nov 6, 2026
Merged

aalpgiray merged 15 commits into
aalpgiray:lossless-dpcm-proposalfrom
yibiao-h:codex/pr201-dpcm-followup

Conversation

@yibiao-h

@yibiao-h yibiao-h commented Oct 29, 2026 •

Copy link
Copy Markdown

This contributes the DPCM corrections back to the source branch of swellweb#201, so that the original proposal can carry the DPCM work. Uncompressed RGB10 is separate in swellweb#229.

The source branch is synchronized with upstream main at 11b156f, then the tested DPCM follow-up fixes are applied. No new uncompressed RGB10 transport/menu option, cable-test rewrite or receiver address-refresh work is included here.

  • Capture packed l10r/ARGB2101010 and gate DPCM by actual receiver capabilities. Preserve legacy automatic fallbacks and CPU encoding where supported.
  • Separate Resolution and frame rate from Video compression: list each geometry once, migrate saved DPCM presets to an explicit compatible automatic policy, and retain CLI aliases and strict explicit selections. Receiver discovery refreshes and new-session copying preserve each session's compression and resolution. Restore HiDPI backing size on reconnect and guard stale capture callbacks.
  • Show neutral receiver metadata before a sender connects, retain requested dimensions across language changes, and use dimensions from valid received frames. Reset metadata on disconnect instead of showing a fixed 2560×1440 HiDPI label. Cover encoded, NV12 and DPCM frame metadata.
  • Add capability-gated reversible color decorrelation, bounded packet ownership and local network-completion accounting.
  • Preserve Metal upload/frame slots across repeated failures; prevent double-returning a frame permit for an unsubmitted command. Correct receiver icon sizing and report icon build failures.

The original six proposal commits remain in the history. After merging this contribution into lossless-dpcm-proposal, the head of swellweb#201 will update automatically. Please preserve the merge history (fast-forward or a normal merge, rather than squash/rebase) so the upstream main ancestry remains visible. Please also retarget swellweb#201 from maint-3.5 to main when incorporating this mainline version; otherwise its diff includes the upstream 3.6 changes. I do not have permission to change that PR's base or source branch directly.

Validation for 3ecb27d:

  • 220 Sender XCTest cases passed, including saved-session migration, CLI compatibility, receiver identity refresh, copied sessions, geometry-only menus and legacy fallback behavior. Tests use isolated preferences.
  • Full arm64 Receiver build, parser/reference codec tests, DPCM display, socket, diagnostic and production stream-metadata regressions passed. All five localizations pass validation; the new metadata regression is included in CI.

Earlier validation at bf19f6c (the same tree as 1142997) covers the unchanged transport, GPU ownership and packaging components:

  • 212 Sender XCTest cases and arm64/x86_64 Release builds passed.
  • Receiver arm64/x86_64 builds, portable tests and codec/parser ASan/UBSan checks passed.
  • 210 synthetic GPU encoder/reference frames, failure injection, receiver Metal tests in both cursor modes and synthetic HEVC startup passed.
  • Metal failure regressions verified slot/permit conservation, occupied-buffer contents and recovery with real GPU readback.
  • Localization, startup/queue/completion, display/socket/diagnostic checks, bounded permission probes and icon generation/readback passed.

This is not a fresh physical two-machine performance acceptance. No sustained FPS, Intel runtime or final panel-precision claim is made. GitHub CI for this source branch may not run because its workflows filter pull-request targets to release/main branches.

The independent RAW PR shares some display/session fixes; reconciling those overlaps is necessary if both upstream proposals are merged.

swellweb and others added 14 commits October 1, 2026 13:17
chore: synchronize main with TargetBridge 3.5.2
…pdate

docs: add maintainer update and support notice
* feat(discovery): remember receivers independently of IP

* feat(sender): add safe per-receiver codec selection

* feat(display): render 1080p profiles at native 1x scale

The receiver advertises a fixed 5120x2880 panel with a 2560x1440 HiDPI mode and
`"hiDPI":true`, regardless of the display it is actually attached to. The sender
took those values as the virtual display geometry, so a 1080p stream was captured
from a 1440p HiDPI desktop and rescaled twice on the way to a 1080p panel: the
desktop arrived at the wrong size and paid for two non-integer resamples.

Render matching could not fix this either. It sizes the backing store to the
stream but keeps the strictly 2x HiDPI contract, so 1080p became a 960x540
desktop — capture is 1:1, but every control is drawn at 2x on a panel with no
extra pixels to resolve it.

Give `TBVirtualDisplayModeSize` an explicit `isHiDPI`, defaulting to the existing
2x behaviour, and let the capture profile choose. The 1080p profiles declare
native scale and get a 1920x1080 1x mode; every other profile is untouched and
still derives its mode and HiDPI flag from the receiver profile.

The trigger is the profile rather than the receiver's reported panel size,
because that value is a compile-time constant on the receiver and cannot
distinguish a 1080p panel from a 5K one.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(display): complete 1080p profile integration

* fix(sender): stream virtual display directly when headless

* fix(sender): preserve audio in headless direct capture

* feat(sender): guide users through macOS permissions

* release: prepare TargetBridge 3.6.0 candidate

* ci: validate pull requests targeting dev-3.6.0

* fix(input): keep mouse relay off the logging hot path

(cherry picked from commit 9ea26f5)

* fix(display): prefer HiDPI backing mode for render matching

(cherry picked from commit b6f5424)

* fix(network): declare local network and Bonjour access

(cherry picked from commit 3a74aad)

* release: stamp TargetBridge 3.6.0 build

* fix(release): share build identifier across app bundles

* fix(sender): require persistent signing identity for updates

(cherry picked from commit cc8f284)

* fix(sender): pass update identity as a literal requirement

(cherry picked from commit a17cdca)

* build(sender): retain unconfigured disposable CI builds

(cherry picked from commit 0cc02f8)

* build(sender): package standalone executable for strict signing

(cherry picked from commit 9bd4a0b)

* fix(release): preserve macOS permission identity

* fix(release): validate signing certificate conditions

* fix(release): preserve receiver preferences when upgrading to 3.6.0

* fix(packaging): declare the receiver runtime macOS minimum

* docs(release): document verified receiver package compatibility

* docs(release): clarify permission continuity depends on signing

---------

Co-authored-by: Betafer <[email protected]>
Co-authored-by: polmarinm <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Resolve the two sender/project conflicts to the previously reviewed mainline port tree b7262a9. Preserve the original proposal commits and upstream release history.
@aalpgiray
aalpgiray merged commit 3ecb27d into aalpgiray:lossless-dpcm-proposal Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants