PyroWave forces Automatic bitrate #399

Merged
enricobuehler merged 1 commits from worktree-pyrowave-forces-auto into main 2026-08-26 18:14:13 +00:00
Owner

The decided-and-green-lit slice of the ABR stack overhaul (planning design/abr-stack-overhaul.md §5.2, branch design/abr-stack-overhaul): a fixed kbps is ill-defined for the all-intra codec — bits per pixel is its operating point — and an explicit client rate bypassed PUNKTFUNK_PYROWAVE_MAX_MBPS through the generic clamp (native.rs resolve_bitrate_kbps_for).

Host (the real guard, covers embedders that never update):

  • resolve_bitrate_kbps_for ignores an explicit rate under PyroWave and resolves the per-mode bpp pin + operator ceiling, warning when it overrides.
  • Both bitrate_auto gates treat PyroWave as Automatic, so mode switches and the delivered-size path re-resolve the pin whatever the Hello carried.
  • Tests updated: the explicit-rate assertions now pin (pyrowave_bitrate_pins_to_bpp_default) and respect the ceiling (pyrowave_auto_pin_respects_operator_ceiling).

Clients:

  • pf-client-core sends bitrate_kbps = 0 when the preference is an advertised PyroWave — gated on the decode probe having passed, because a failed probe falls back to H.26x where the user's explicit rate must survive. The Apple client mirrors the same gate at its own Hello site (SessionModel).
  • Console UI: the Bitrate row dims and goes inert under PyroWave (the EchoCancel pattern), the Y typed-rate shortcut and its hint are withheld, and the row explainer says why. New test bitrate_dims_under_pyrowave.
  • Apple settings: macOS/iOS bitrateRows swap to a disabled toggle with a one-line description; the tvOS picker (reachable only via a synced codec — tvOS has no codec row) swaps to a caption.
  • The stored rate is preserved everywhere; switching codecs back restores it.

Docs: client-settings.md and configuration.md no longer claim an explicit rate is honored / bypasses the ceiling.

Verified: swift build (macOS) and xcodebuild tvOS-simulator both green; cargo fmt --check clean. The Rust side leans on ci / rust — two emulated builds from parallel jobs were already occupying the local Docker (the OOM-each-other trap), so the workspace compile/tests intentionally ran here in CI, not locally.

The decided-and-green-lit slice of the ABR stack overhaul (planning `design/abr-stack-overhaul.md` §5.2, branch `design/abr-stack-overhaul`): a fixed kbps is ill-defined for the all-intra codec — bits per pixel is its operating point — and an explicit client rate **bypassed `PUNKTFUNK_PYROWAVE_MAX_MBPS`** through the generic clamp (`native.rs` `resolve_bitrate_kbps_for`). **Host (the real guard, covers embedders that never update):** - `resolve_bitrate_kbps_for` ignores an explicit rate under PyroWave and resolves the per-mode bpp pin + operator ceiling, warning when it overrides. - Both `bitrate_auto` gates treat PyroWave as Automatic, so mode switches and the delivered-size path re-resolve the pin whatever the Hello carried. - Tests updated: the explicit-rate assertions now pin (`pyrowave_bitrate_pins_to_bpp_default`) and respect the ceiling (`pyrowave_auto_pin_respects_operator_ceiling`). **Clients:** - `pf-client-core` sends `bitrate_kbps = 0` when the preference is an **advertised** PyroWave — gated on the decode probe having passed, because a failed probe falls back to H.26x where the user's explicit rate must survive. The Apple client mirrors the same gate at its own Hello site (`SessionModel`). - Console UI: the Bitrate row dims and goes inert under PyroWave (the `EchoCancel` pattern), the Y typed-rate shortcut and its hint are withheld, and the row explainer says why. New test `bitrate_dims_under_pyrowave`. - Apple settings: macOS/iOS `bitrateRows` swap to a disabled toggle with a one-line description; the tvOS picker (reachable only via a synced codec — tvOS has no codec row) swaps to a caption. - The stored rate is preserved everywhere; switching codecs back restores it. Docs: `client-settings.md` and `configuration.md` no longer claim an explicit rate is honored / bypasses the ceiling. **Verified:** `swift build` (macOS) and `xcodebuild` tvOS-simulator both green; `cargo fmt --check` clean. The Rust side leans on `ci / rust` — two emulated builds from parallel jobs were already occupying the local Docker (the OOM-each-other trap), so the workspace compile/tests intentionally ran here in CI, not locally.
enricobuehler added 1 commit 2026-08-26 15:44:16 +00:00
PyroWave forces Automatic bitrate (ABR overhaul RFC §5.2)
apple / swift (pull_request) Successful in 2m5s
apple / distribute (pull_request) Skipped
apple / screenshots (pull_request) Skipped
ci / web (pull_request) Successful in 2m27s
ci / rust-arm64 (pull_request) Successful in 3m37s
ci / bun-nix (pull_request) Successful in 29s
ci / docs-drift (pull_request) Successful in 55s
ci / docs-site (pull_request) Successful in 2m24s
android / android (pull_request) Successful in 7m51s
ci / rust (pull_request) Successful in 8m18s
windows-client / client (arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (pull_request) Successful in 2m48s
windows-client / client (x64, , x86_64-pc-windows-msvc, C:\t) (pull_request) Successful in 5m55s
1511374959
An explicit client rate under PyroWave was ill-defined (all-intra bpp
semantics — the operating point is bits per pixel, not kbps) and bypassed
the PUNKTFUNK_PYROWAVE_MAX_MBPS operator ceiling entirely.

Host: resolve_bitrate_kbps_for ignores the requested rate under PyroWave
(warn when overriding) so every PyroWave session goes through the per-mode
bpp pin + ceiling, and bitrate_auto treats PyroWave sessions as Automatic
so mode switches re-resolve the pin whatever the Hello carried.

Clients: pf-client-core sends bitrate 0 when the preference is an
ADVERTISED PyroWave (a failed decode probe falls back to H.26x, where the
user's rate must survive); the Apple client mirrors the same gate at its
own Hello site. The console UI and the Apple settings dim the bitrate
control with a one-line explanation instead of offering an inert rate.
The stored setting is preserved everywhere — switching codecs back
restores it.
enricobuehler merged commit dcedd7147f into main 2026-08-26 18:14:13 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#399