feat: real fps counter + highest-fps capture mode#14
Merged
Conversation
cos_get_status returned a constant 30.0. Add a header-only FpsCounter (rolling 0.5s window) fed by a worker-thread frame counter; cos_get_status now reports the measured rate. fps_smoke.cpp covers the window semantics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… diag) CreateReader enumerated nothing — MF picked the camera's default native type, which can be a low-fps mode. Now enumerate native types, pick highest fps then highest res (<=1080p), and pin the RGB32 request to that size+rate so MF takes the MJPG-30 path; fall back to unconstrained if rejected. capture_probe.cpp is a standalone diagnostic (lists modes, measures RGB32 vs raw-MJPG delivery fps). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two small, independent capture-pipeline wins, surfaced while investigating choppy overlay playback:
Real measured fps in
cos_get_status— replaces the hardcoded30.0stub with a header-onlyFpsCounter(rolling 0.5 s window) fed by a worker-thread frame counter. The status line now shows the actual capture rate.Capture selects the highest-fps native camera mode —
CreateReaderpreviously let Media Foundation pick the camera's default native type (often a low-fps mode). It now enumerates native types, picks highest fps then highest resolution (≤ 1080p), and pins theRGB32request to that size + rate (falling back to unconstrained if MF rejects it). A standalonenative/shim/smoke/capture_probe.cppdiagnostic lists modes and measures RGB32 vs raw-MJPG delivery fps.Why
The old hardcoded
30.0masked real performance. Adding the real counter immediately exposed three environmental issues (none of them code bugs): a Debug build running unoptimized, a dev output dir missing itsmaxine\runtime, and the webcam capped at 15 fps on a bandwidth-limited USB port. The capture-mode change ensures we always request the camera's best mode rather than MF's default.Not in this PR (parked)
The AI sharpness effects (Artifact Reduction, Super Resolution) are deferred on
feat/ai-sharpness-resolution. Reason:nvvfxartifactreductiondoes not exist in the VFX 1.2.0.0 NGC catalog, and Super Resolution is NGX VSR (selectorVideoSuperRes, paramQualityLevel) — the initial inferred implementation needs a rewrite against the real per-feature header. The shared plumbing (C-ABI effect slots, worker wiring, MVVM toggles, tests) is preserved on that branch for the rebuild.Testing
fps_smokecovers theFpsCounterrolling-window semantics.capture_probeconfirms); green screen + eye contact unaffected.🤖 Generated with Claude Code