Skip to content

Expose mergeable camera-shake rate bins for p99 - #628

Merged
kstonekuan merged 3 commits into
mainfrom
feat/camera-shake-rate-bins
Sep 26, 2026
Merged

kstonekuan merged 3 commits into
mainfrom
feat/camera-shake-rate-bins

Conversation

@kstonekuan

@kstonekuan kstonekuan commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Camera-shake summaries currently discard assessed frame-pair rates after computing mean, RMS, and maximum. That prevents consumers from calculating a run-wide p99 across windows without decoding media again.

This adds assessed-duration rate bins to the existing one-pass summary and a duration-weighted percentile helper. Bins are one degree per second below 4,096°/s and 64 per doubling above it, keeping memory bounded. The helper returns the selected bin's upper bound, capped by the observed maximum. Compensated per-bin accumulation and precise prefix sums keep 30 fps percentile boundaries stable without treating a genuinely below-threshold bin as complete. Existing mean, RMS, maximum, and coverage calculations are unchanged.

Validation: Ruff, ty, 2,385 tests passed (8 skipped), including exact-boundary and below-threshold regressions.

@kstonekuan
kstonekuan marked this pull request as ready for review September 26, 2026 00:07
@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds camera shake rate binning and percentile calculation.

The PR appears safe to merge based on the changes since the previous review.

Summary

The PR adds mergeable, duration-weighted camera-shake rate bins and a percentile helper, with documentation and tests. Since the previous review, it removes the near-boundary isclose shortcut and revises the boundary test.

Reviews (3) · Last reviewed commit: "Preserve exact shake percentile boundari..."

Comment thread src/hflow/camera_motion.py Outdated
Comment thread src/hflow/camera_motion.py Outdated
@kstonekuan
kstonekuan merged commit 9f1a482 into main Sep 26, 2026
4 of 5 checks passed
@kstonekuan
kstonekuan deleted the feat/camera-shake-rate-bins branch September 26, 2026 05:35
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.

1 participant